Class: QML::MetaObject

Inherits:
Object
  • Object
show all
Defined in:
ext/qml/meta_object.c

Instance Method Summary collapse

Instance Method Details

#register(uri, versionMajor, versionMinor, qmlName) ⇒ Object



64
65
66
67
68
69
70
71
72
# File 'ext/qml/meta_object.c', line 64

static VALUE metaobject_register(VALUE self, VALUE uri, VALUE versionMajor, VALUE versionMinor, VALUE qmlName) {
    qmlbind_metaobject metaobj = rbqml_get_metaobject(self);
    qmlbind_register_type(
        metaobj,
        rb_string_value_cstr(&uri),
        NUM2INT(versionMajor), NUM2INT(versionMinor),
        rb_string_value_cstr(&qmlName));
    return self;
}

#wrap(access) ⇒ Object



54
55
56
57
58
59
60
61
62
# File 'ext/qml/meta_object.c', line 54

VALUE metaobject_wrap(VALUE self, VALUE access) {
    wrap_data data;
    data.engine = rbqml_get_engine(rbqml_engine);
    data.metaobject = rbqml_get_metaobject(self);
    data.backref = (qmlbind_backref)access;

    qmlbind_value wrapped = rb_thread_call_without_gvl(wrap_impl, &data, RUBY_UBF_IO, NULL);
    return rbqml_to_ruby(wrapped);
}