[Kde-bindings] KDE/kdebindings
Arno Rehn
kde at arnorehn.de
Fri Dec 26 20:28:25 UTC 2008
SVN commit 901871 by arnorehn:
* Add KParts::Read(Write|Only)PartInternal classes so they can be used as return
types.
* Make the KPluginFactory and KService classes partial.
* Add KPluginFactory.Create<T> methods.
* KPart integration should work now in C# as well.
* Work around a typedef parsing error.
CCMAIL: kde-bindings at kde.org
M +5 -0 csharp/kimono/ChangeLog
M +25 -20 csharp/kimono/kde/KPluginFactory.cs
A csharp/kimono/kde/KPluginFactoryExtras.cs
M +3 -1 csharp/kimono/kde/KPluginLoader.cs
M +9 -17 csharp/kimono/kde/KService.cs
A csharp/kimono/kparts/KParts_ReadOnlyPartInternal.cs
A csharp/kimono/kparts/KParts_ReadWritePartInternal.cs
M +6 -0 csharp/kimono/src/kimono.cpp
M +4 -0 kalyptus/ChangeLog
M +16 -0 kalyptus/kalyptus
M +2 -0 kalyptus/kalyptusCxxToKimono.pm
--- trunk/KDE/kdebindings/csharp/kimono/ChangeLog #901870:901871
@@ -5,6 +5,11 @@
is starting with.
* kdehandlers.cpp: Add a marshaller for KService::List (which is a
QList<KSharedPtr<KService> >)
+ * Add KParts::Read(Write|Only)PartInternal classes so they can be used as return
+ types.
+ * Make the KPluginFactory and KService classes partial.
+ * Add KPluginFactory.Create<T> methods.
+ * KPart integration should work now in C# as well.
2008-12-23 Arno Rehn <arno at arnorehn.de>
--- trunk/KDE/kdebindings/csharp/kimono/kde/KPluginFactory.cs #901870:901871
@@ -64,30 +64,11 @@
/// See <see cref="IKPluginFactorySignals"></see> for signals emitted by KPluginFactory
/// </remarks> <short> \class KPluginFactory kpluginfactory.</short>
[SmokeClass("KPluginFactory")]
- public class KPluginFactory : QObject, IDisposable {
+ public partial class KPluginFactory : QObject, IDisposable {
protected KPluginFactory(Type dummy) : base((Type) null) {}
- /// <remarks>
- /// This is used to detect the arguments need for the constructor of plugin classes.
- /// You can inherit it, if you want to add new classes and still keep support for the old ones.
- /// </remarks> <short> This is used to detect the arguments need for the constructor of plugin classes.</short>
- [SmokeClass("KPluginFactory::InheritanceChecker")]
- public class InheritanceChecker : Object {
- protected SmokeInvocation interceptor = null;
- private IntPtr smokeObject;
- protected InheritanceChecker(Type dummy) {}
- // CreateInstanceFunction createInstanceFunction(KParts::Part* arg1); >>>> NOT CONVERTED
- // CreateInstanceFunction createInstanceFunction(QWidget* arg1); >>>> NOT CONVERTED
- // CreateInstanceFunction createInstanceFunction(); >>>> NOT CONVERTED
- }
protected new void CreateProxy() {
interceptor = new SmokeInvocation(typeof(KPluginFactory), this);
}
- // KPluginFactory* KPluginFactory(const char* arg1,const char* arg2,QObject* arg3); >>>> NOT CONVERTED
- // KPluginFactory* KPluginFactory(const char* arg1,const char* arg2); >>>> NOT CONVERTED
- // KPluginFactory* KPluginFactory(const char* arg1); >>>> NOT CONVERTED
- // KPluginFactory* KPluginFactory(); >>>> NOT CONVERTED
- // KPluginFactory* KPluginFactory(const KAboutData& arg1,QObject* arg2); >>>> NOT CONVERTED
- // KPluginFactory* KPluginFactory(const KAboutData& arg1); >>>> NOT CONVERTED
// KPluginFactory* KPluginFactory(KPluginFactoryPrivate& arg1,QObject* arg2); >>>> NOT CONVERTED
// KPluginFactory* KPluginFactory(KPluginFactoryPrivate& arg1); >>>> NOT CONVERTED
/// <remarks>
@@ -99,6 +80,22 @@
/// \param catalogName the translation catalog to use
/// \param parent a parent object
/// </remarks> <short> This constructor creates a factory for a plugin with the given \p componentName and \p catalogName.</short>
+ public KPluginFactory(string componentName, string catalogName, QObject parent) : this((Type) null) {
+ CreateProxy();
+ interceptor.Invoke("KPluginFactory$$#", "KPluginFactory(const char*, const char*, QObject*)", typeof(void), typeof(string), componentName, typeof(string), catalogName, typeof(QObject), parent);
+ }
+ public KPluginFactory(string componentName, string catalogName) : this((Type) null) {
+ CreateProxy();
+ interceptor.Invoke("KPluginFactory$$", "KPluginFactory(const char*, const char*)", typeof(void), typeof(string), componentName, typeof(string), catalogName);
+ }
+ public KPluginFactory(string componentName) : this((Type) null) {
+ CreateProxy();
+ interceptor.Invoke("KPluginFactory$", "KPluginFactory(const char*)", typeof(void), typeof(string), componentName);
+ }
+ public KPluginFactory() : this((Type) null) {
+ CreateProxy();
+ interceptor.Invoke("KPluginFactory", "KPluginFactory()", typeof(void));
+ }
/// <remarks>
/// This constructor creates a factory for a plugin with the given KAboutData object. This object is
/// used to initialize a KComponentData object for the plugin. You can later access it with
@@ -107,6 +104,14 @@
/// \param aboutData the KAboutData for the plugin
/// \param parent a parent object
/// </remarks> <short> This constructor creates a factory for a plugin with the given KAboutData object.</short>
+ public KPluginFactory(KAboutData aboutData, QObject parent) : this((Type) null) {
+ CreateProxy();
+ interceptor.Invoke("KPluginFactory##", "KPluginFactory(const KAboutData&, QObject*)", typeof(void), typeof(KAboutData), aboutData, typeof(QObject), parent);
+ }
+ public KPluginFactory(KAboutData aboutData) : this((Type) null) {
+ CreateProxy();
+ interceptor.Invoke("KPluginFactory#", "KPluginFactory(const KAboutData&)", typeof(void), typeof(KAboutData), aboutData);
+ }
/// <remarks>
/// You can use this method to get the component data of the plugin. It is filled with the
/// information given to the constructor of KPluginFactory.
--- trunk/KDE/kdebindings/csharp/kimono/kde/KPluginLoader.cs #901870:901871
@@ -52,7 +52,6 @@
public string PluginName {
get { return (string) interceptor.Invoke("fileName", "fileName()", typeof(string)); }
}
- // KPluginFactory* factory(); >>>> NOT CONVERTED
/// <remarks>
/// Used this constructor to load a plugin with a given library name. Plugin libraries shouldn't have a 'lib' prefix.
/// \param plugin The name of the plugin library.
@@ -94,6 +93,9 @@
/// to K_EXPORT_PLUGIN to use this method.
/// \returns The factory of the plugin or 0 on error.
/// </remarks> <short> Used to obtain the factory object of the plugin.</short>
+ public KPluginFactory Factory() {
+ return (KPluginFactory) interceptor.Invoke("factory", "factory()", typeof(KPluginFactory));
+ }
/// <remarks>
/// Queries the plugin version.
/// \returns The version given to K_EXPORT_PLUGIN_VERSION or (quint32) -1 if not set.
--- trunk/KDE/kdebindings/csharp/kimono/kde/KService.cs #901870:901871
@@ -20,24 +20,8 @@
/// <see> KServiceType</see>
/// <see> KServiceGroup</see>
[SmokeClass("KService")]
- public class KService : KSycocaEntry, IDisposable {
+ public partial class KService : KSycocaEntry, IDisposable {
protected KService(Type dummy) : base((Type) null) {}
- [SmokeClass("KService::ServiceTypeAndPreference")]
- public class ServiceTypeAndPreference : Object {
- protected SmokeInvocation interceptor = null;
- private IntPtr smokeObject;
- protected ServiceTypeAndPreference(Type dummy) {}
- public int Preference {
- get { return (int) interceptor.Invoke("preference", "preference()", typeof(int)); }
- set { interceptor.Invoke("setPreference$", "setPreference(int)", typeof(void), typeof(int), value); }
- }
- public string ServiceType {
- get { return (string) interceptor.Invoke("serviceType", "serviceType()", typeof(string)); }
- set { interceptor.Invoke("setServiceType$", "setServiceType(QString)", typeof(void), typeof(string), value); }
- }
- // ServiceTypeAndPreference(); >>>> NOT CONVERTED
- // ServiceTypeAndPreference(int arg1,const QString& arg2); >>>> NOT CONVERTED
- }
protected new void CreateProxy() {
interceptor = new SmokeInvocation(typeof(KService), this);
}
@@ -379,6 +363,14 @@
return (string) interceptor.Invoke("pluginKeyword", "pluginKeyword() const", typeof(string));
}
/// <remarks>
+ /// The path to the documentation for this service.
+ /// </remarks> <return> the documentation path, or string() if not set
+ /// </return>
+ /// <short> The path to the documentation for this service.</short>
+ public string DocPath() {
+ return (string) interceptor.Invoke("docPath", "docPath() const", typeof(string));
+ }
+ /// <remarks>
/// Returns the requested property.
/// <param> name="_name" the name of the property
/// </param><param> name="t" the assumed type of the property
--- trunk/KDE/kdebindings/csharp/kimono/src/kimono.cpp #901870:901871
@@ -38,6 +38,12 @@
const char *
resolve_classname_KDE(smokeqyoto_object * o)
{
+ if (o->smoke->isDerivedFromByName(o->smoke->classes[o->classId].className, "QObject")) {
+ if (strcmp(o->smoke->classes[o->classId].className, "KParts::ReadOnlyPart") == 0)
+ return "KParts.ReadOnlyPartInternal";
+ if (strcmp(o->smoke->classes[o->classId].className, "KParts::ReadWritePart") == 0)
+ return "KParts.ReadWritePartInternal";
+ }
return qyoto_modules[o->smoke].binding->className(o->classId);
}
--- trunk/KDE/kdebindings/kalyptus/ChangeLog #901870:901871
@@ -1,3 +1,7 @@
+2008-12-26 Arno Rehn <arno at arnorehn.de>
+
+ * Work around a typedef parsing error.
+
2008-12-25 Arno Rehn <arno at arnorehn.de>
* In case of multiple inheritance in C#, implement all methods of all superclasses
--- trunk/KDE/kdebindings/kalyptus/kalyptus #901870:901871
@@ -1436,7 +1436,22 @@
}
+=head2 trim
+ Param: a string.
+
+ Strips whitespaces from a string.
+
+=cut
+
+sub trim
+{
+ my $string = shift;
+ $string =~ s/^\s+//;
+ $string =~ s/\s+$//;
+ return $string;
+}
+
=head2 newTypedef
Parameters: realtype, name
@@ -1448,6 +1463,7 @@
sub newTypedef
{
my ( $realtype, $name ) = @_;
+ return undef if trim($realtype) eq trim($name);
my ( $node ) = Ast::New( $name );
--- trunk/KDE/kdebindings/kalyptus/kalyptusCxxToKimono.pm #901870:901871
@@ -180,6 +180,8 @@
'KUniqueApplication' => '1',
'KConfigGroup' => '1',
'KCmdLineArgs' => '1',
+ 'KPluginFactory' => '1',
+ 'KService' => '1',
'KTextEditor::CodeCompletionModel' => '1',
'KTextEditor::Document' => '1',
'KTextEditor::Factory' => '1',
More information about the Kde-bindings
mailing list