DOtherSide  0.7.1
C language library for creating bindings for the Qt QML language
Functions
QMetaObject

Functions related to the QMetaObject class. More...

Functions

DOS_API DosQMetaObjectdos_qmetaobject_create (DosQMetaObject *superClassMetaObject, const char *className, const SignalDefinitions *signalDefinitions, const SlotDefinitions *slotDefinitions, const PropertyDefinitions *propertyDefinitions)
 Create a new QMetaObject. More...
 
DOS_API void dos_qmetaobject_delete (DosQMetaObject *vptr)
 Free the memory allocated for the given QMetaObject. More...
 
DOS_API bool dos_qmetaobject_invoke_method (DosQObject *context, void(*callback)(DosQObject *context, void *data), void *data, DosQtConnectionType connection_type)
 Invoke a function with the given data. More...
 

Detailed Description

Functions related to the QMetaObject class.

Function Documentation

◆ dos_qmetaobject_create()

DOS_API DosQMetaObject* dos_qmetaobject_create ( DosQMetaObject superClassMetaObject,
const char *  className,
const SignalDefinitions signalDefinitions,
const SlotDefinitions slotDefinitions,
const PropertyDefinitions propertyDefinitions 
)

Create a new QMetaObject.

Parameters
superClassMetaObjectThe superclass metaobject
classNameThe class name
signalDefinitionsThe SignalDefinitions
slotDefinitionsThe SlotDefinitions struct
propertyDefinitionsThe PropertyDefinitions struct
Note
The returned QMetaObject should be freed using dos_qmetaobject_delete().
Attention
The QMetaObject should live more than the QObject it refears to. Depending on the implementation usually the QMetaObject should be modeled as static variable So with a lifetime equals to the entire application

◆ dos_qmetaobject_delete()

DOS_API void dos_qmetaobject_delete ( DosQMetaObject vptr)

Free the memory allocated for the given QMetaObject.

Parameters
vptrThe QMetaObject

◆ dos_qmetaobject_invoke_method()

DOS_API bool dos_qmetaobject_invoke_method ( DosQObject context,
void(*)(DosQObject *context, void *data)  callback,
void *  data,
DosQtConnectionType  connection_type 
)

Invoke a function with the given data.

Parameters
callbackThe callback that will be called
dataThe data passed to the callback
connection_typeThe connection type