[Kde-bindings] A sample of our subset of QtC
Adam Treat
manyoso at yahoo.com
Fri Jan 10 20:20:25 UTC 2003
Richard,
I just wanted to show you an example of our subset of QtC. This only includes
the ctors at the moment (not the virtuals) but the important piece is the
typedef ;) The inclusion of the typedefs in the xml metadata really
increases the amount of ctors/methods in QtC.
Cheers,
Adam
#include "qapplication.h"
class QApplicationGlue: public QApplication
{
public:
void* managedObject;
QApplicationGlue (Display* dpy, HANDLE visual, HANDLE cmap):
QApplication ((Display*)dpy, (HANDLE)visual, (HANDLE)cmap) {}
QApplicationGlue (Display* dpy, int argc, char** argv, HANDLE visual,
HANDLE cmap): QApplication ((Display*)dpy, (int)argc, (char**)argv,
(HANDLE)visual, (HANDLE)cmap) {}
QApplicationGlue (int& argc, char* * argv): QApplication (argc, argv)
{}
QApplicationGlue (int& argc, char** argv, bool GUIenabled):
QApplication ((int&)argc, (char**)argv, (bool)GUIenabled) {}
QApplicationGlue (int& argc, char** argv, QApplication::Type arg1):
QApplication ((int&)argc, (char**)argv, (QApplication::Type)arg1) {}
};
extern "C"
{
typedef unsigned long HANDLE;
QApplication* new_QApplication3 (void* managedPtr, Display* dpy,
HANDLE visual, HANDLE cmap)
{
QApplicationGlue* glue = new QApplicationGlue ((Display*)dpy,
(HANDLE)visual, (HANDLE)cmap);
glue->managedObject = managedPtr;
return (QApplication*)glue;
}
QApplication* new_QApplication4 (void* managedPtr, Display* dpy, int
argc, char** argv, HANDLE visual, HANDLE cmap)
{
QApplicationGlue* glue = new QApplicationGlue ((Display*)dpy,
(int)argc, (char**)argv, (HANDLE)visual, (HANDLE)cmap);
glue->managedObject = managedPtr;
return (QApplication*)glue;
}
QApplication* new_QApplication0 (void* managedPtr, int& argc, char**
argv)
//void new_QApplication0 (void* managedPtr, int& argc, char** argv)
{
QApplicationGlue* glue = new QApplicationGlue (argc, argv);
//glue->managedObject = managedPtr;
return (QApplication*)glue;
}
QApplication* new_QApplication1 (void* managedPtr, int& argc, char**
argv, bool GUIenabled)
{
QApplicationGlue* glue = new QApplicationGlue ((int&)argc,
(char**)argv, (bool)GUIenabled);
glue->managedObject = managedPtr;
return (QApplication*)glue;
}
QApplication* new_QApplication2 (void* managedPtr, int& argc, char**
argv, QApplication::Type arg1)
{
QApplicationGlue* glue = new QApplicationGlue ((int&)argc,
(char**)argv, (QApplication::Type)arg1);
glue->managedObject = managedPtr;
return (QApplication*)glue;
}
} // extern "C"
More information about the Kde-bindings
mailing list