libqmlbind
A C library for creating QML bindings for other languages easily through exporting objects to QML
metaclass.h
Go to the documentation of this file.
1 #pragma once
2 #include "qmlbind_global.h"
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
51  qmlbind_client_class *classObject,
52  const char *className,
53  qmlbind_client_callbacks callbacks
54 );
55 
59 QMLBIND_API void qmlbind_metaclass_release(qmlbind_metaclass *self);
60 
69 QMLBIND_API void qmlbind_metaclass_add_method(
70  qmlbind_metaclass *self,
71  const char *name,
72  int arity
73 );
74 
84 QMLBIND_API void qmlbind_metaclass_add_signal(
85  qmlbind_metaclass *self,
86  const char *name,
87  int arity,
88  const char *const *params
89 );
90 
107 QMLBIND_API void qmlbind_metaclass_add_property(
108  qmlbind_metaclass *self,
109  const char *name,
110  const char *notifierSignal
111 );
112 
132 QMLBIND_API int qmlbind_metaclass_register(
133  const qmlbind_metaclass *self,
134  const char *uri,
135  int versionMajor, int versionMinor,
136  const char *qmlName
137 );
138 
140 #ifdef __cplusplus
141 }
142 #endif
an opaque struct mainly used as self argument in the methods defined in qmlbind_metaclass.
Definition: qmlbind_global.h:68
QMLBIND_API void qmlbind_metaclass_release(qmlbind_metaclass *self)
Destroys the qmlbind_metaclass.
an opaque struct to represent a client-side class object (a.k.a. metaclass) to libqmlbind.
Definition: qmlbind_global.h:114
QMLBIND_API int qmlbind_metaclass_register(const qmlbind_metaclass *self, const char *uri, int versionMajor, int versionMinor, const char *qmlName)
exposes the metaclass as qmlName component to QML type system.
Contains all struct definitions of libqmlbind.
QMLBIND_API void qmlbind_metaclass_add_property(qmlbind_metaclass *self, const char *name, const char *notifierSignal)
Adds a new property name for the resulting metaobject, which should emit notifierSignal on changes...
QMLBIND_API qmlbind_metaclass * qmlbind_metaclass_new(qmlbind_client_class *classObject, const char *className, qmlbind_client_callbacks callbacks)
Creates a new qmlbind_metaclass.
encapsulates client-side functions that are used from QML for C object creation, destruction, method calls and property modification.
Definition: qmlbind_global.h:126
QMLBIND_API void qmlbind_metaclass_add_signal(qmlbind_metaclass *self, const char *name, int arity, const char *const *params)
Adds a new signal name for the resulting metaobject with arity number of parameters.
QMLBIND_API void qmlbind_metaclass_add_method(qmlbind_metaclass *self, const char *name, int arity)
Adds a new method name for the resulting metaobject with arity number of parameters.