libqmlbind
A C library for creating QML bindings for other languages easily through exporting objects to QML
|
all types in libqmlbind which are not implemented by libqmlbind but by the client using it. More...
Classes | |
struct | qmlbind_client_object |
an opaque struct to represent a client-side object exposed to the metaobject system to libqmlbind. More... | |
struct | qmlbind_client_class |
an opaque struct to represent a client-side class object (a.k.a. metaclass) to libqmlbind. More... | |
struct | qmlbind_client_callbacks |
encapsulates client-side functions that are used from QML for C object creation, destruction, method calls and property modification. More... | |
Typedefs | |
typedef struct qmlbind_client_object | qmlbind_client_object |
an opaque struct to represent a client-side object exposed to the metaobject system to libqmlbind. More... | |
typedef struct qmlbind_client_class | qmlbind_client_class |
an opaque struct to represent a client-side class object (a.k.a. metaclass) to libqmlbind. More... | |
typedef struct qmlbind_client_callbacks | qmlbind_client_callbacks |
encapsulates client-side functions that are used from QML for C object creation, destruction, method calls and property modification. More... | |
all types in libqmlbind which are not implemented by libqmlbind but by the client using it.
typedef struct qmlbind_client_object qmlbind_client_object |
an opaque struct to represent a client-side object exposed to the metaobject system to libqmlbind.
In the client's implementation of qmlbind_client_callbacks
' new_object()
, you need to return a qmlbind_client_object
pointer, which is then given back to you as object
parameter in call_method()
, get_property()
and set_property()
. With the qmlbind_client_callbacks
, qmlbind_client_object
s can be created, used and deleted from QML.
A qmlbind_client_object
therefore is the rough equivalent of an instance of a QObject in code using libqmlbind.
See qmlbind_engine_new_wrapper()
to create new qmlbind_value
wrappers for a qmlbind_client_object
, and qmlbind_value_get_qmlbind_client_object()
to get the wrapped qmlbind_client_object
back.
typedef struct qmlbind_client_class qmlbind_client_class |
an opaque struct to represent a client-side class object (a.k.a. metaclass) to libqmlbind.
This is intended to be used in languages where classes are first-class objects, i.e. that have the concept of a class object with which you can generically construct new objects. Examples are python's type
class or ruby's Class
class. If you have this feautre, you can implement generic qmlbind_client_callbacks
for all classes.
In qmlbind_exporter_new()
, a qmlbind_client_class
pointer can be provided which is forwarded to qmlbind_client_callbacks
' new_object()
for that purpose. You could use it to transfer an arbitrary object, though.
In other languages, you can ignore this and implement multiple qmlbind_client_callbacks
.
A qmlbind_client_class
is the rough equivalent of a class inheriting QObject located in code using libqmlbind.
typedef struct qmlbind_client_callbacks qmlbind_client_callbacks |
encapsulates client-side functions that are used from QML for C object creation, destruction, method calls and property modification.
Those functions need to be implemented by libqmlbind's users for qmlbind_client_object
s they want to expose to QML.
This struct is needed to construct new qmlbind_exporter
s. All function pointers need to be defined, a nullptr is not a valid value here.