libqmlbind
A C library for creating QML bindings for other languages easily through exporting objects to QML
engine.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "qmlbind_global.h"
4 
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8 
35 QMLBIND_API qmlbind_engine *qmlbind_engine_new();
36 
42 QMLBIND_API void qmlbind_engine_release(qmlbind_engine *self);
43 
68  qmlbind_engine *self,
69  const char *str, const char *fileName, int lineNumber
70 );
71 
85 
96 
104 QMLBIND_API qmlbind_value *qmlbind_engine_new_array(qmlbind_engine *self, int length);
105 
133  qmlbind_engine *self,
134  const qmlbind_metaclass *metaclass,
135  qmlbind_client_object *object
136 );
137 
148 QMLBIND_API void qmlbind_engine_add_import_path(qmlbind_engine *self, const char *path);
149 
163 QMLBIND_API void qmlbind_engine_collect_garbage(qmlbind_engine *self);
164 
166 #ifdef __cplusplus
167 }
168 #endif
QMLBIND_API void qmlbind_engine_release(qmlbind_engine *self)
Destroys the QQmlEngine.
an opaque struct mainly used as self argument in the methods defined in qmlbind_value.
Definition: qmlbind_global.h:64
an opaque struct mainly used as self argument in the methods defined in qmlbind_metaclass.
Definition: qmlbind_global.h:68
Contains all struct definitions of libqmlbind.
QMLBIND_API qmlbind_value * qmlbind_engine_new_array(qmlbind_engine *self, int length)
Creates a JavaScript object of class Array with the given length.
QMLBIND_API qmlbind_value * qmlbind_engine_eval(qmlbind_engine *self, const char *str, const char *fileName, int lineNumber)
Evaluates program, using lineNumber as the base line number, and returns the result of the evaluation...
QMLBIND_API qmlbind_value * qmlbind_engine_new_wrapper(qmlbind_engine *self, const qmlbind_metaclass *metaclass, qmlbind_client_object *object)
Creates a JavaScript object that wraps the given object.
an opaque struct to represent a client-side object exposed to the metaobject system to libqmlbind...
Definition: qmlbind_global.h:96
QMLBIND_API qmlbind_engine * qmlbind_engine_new()
Create a new QQmlEngine.
an opaque struct mainly used as self argument in the methods defined in qmlbind_engine.
Definition: qmlbind_global.h:60
QMLBIND_API void qmlbind_engine_add_import_path(qmlbind_engine *self, const char *path)
Adds path as a directory where the engine searches for installed modules in a URL-based directory str...
QMLBIND_API qmlbind_value * qmlbind_engine_new_object(qmlbind_engine *self)
Creates a JavaScript object of class Object.
QMLBIND_API void qmlbind_engine_collect_garbage(qmlbind_engine *self)
Runs the garbage collector.
QMLBIND_API qmlbind_value * qmlbind_engine_get_global_object(const qmlbind_engine *self)
Returns this engine's Global Object.