[Kde-bindings] KDE/kdebindings/ruby/qtruby/src
Cyrille Berger
cyb at lepi.org
Tue Sep 18 22:13:22 UTC 2007
SVN commit 714204 by berger:
add a function to convert from a 'smoked' ruby object to a 'void*' ruby object (this allow to create objects in QtRuby and later use them in a krossable application), I just need to figure out how to ensure that QtRuby doesn't delete those objects
CCMAIL:kde-bindings at kde.org
M +10 -0 Qt.cpp
--- trunk/KDE/kdebindings/ruby/qtruby/src/Qt.cpp #714203:714204
@@ -662,6 +662,15 @@
}
VALUE
+smoke2kross(VALUE /* self*/, VALUE sobj)
+{
+ smokeruby_object * o;
+ Data_Get_Struct(sobj, smokeruby_object, o);
+
+ return Data_Wrap_Struct(rb_cObject, 0, 0, o->ptr );
+}
+
+VALUE
qvariant_value(VALUE /*self*/, VALUE variant_value_klass, VALUE variant_value)
{
char * classname = rb_class2name(variant_value_klass);
@@ -3429,6 +3438,7 @@
rb_define_module_function(qt_internal_module, "create_qobject_class", (VALUE (*) (...)) create_qobject_class, 1);
rb_define_module_function(qt_internal_module, "cast_object_to", (VALUE (*) (...)) cast_object_to, 2);
rb_define_module_function(qt_internal_module, "kross2smoke", (VALUE (*) (...)) kross2smoke, 2);
+ rb_define_module_function(qt_internal_module, "smoke2kross", (VALUE (*) (...)) smoke2kross, 1);
rb_define_module_function(qt_internal_module, "application_terminated=", (VALUE (*) (...)) set_application_terminated, 1);
rb_define_module_function(qt_module, "version", (VALUE (*) (...)) version, 0);
More information about the Kde-bindings
mailing list