[Kde-bindings] branches/work/kdebindings-smoke2
Arno Rehn
kde at arnorehn.de
Sat Apr 26 11:27:47 UTC 2008
SVN commit 801334 by arnorehn:
* Added plasma handlers.
* Put resolve_classname in the shared part of qtruby.
CCMAIL: kde-bindings at kde.org
M +5 -0 ChangeLog
M +1 -1 ruby/plasma/CMakeLists.txt
M +4 -0 ruby/plasma/plasma.cpp
A ruby/plasma/plasmahandlers.cpp [License: GPL (v2+)]
M +10 -0 ruby/qtruby/src/Qt.cpp
M +0 -10 ruby/qtruby/src/handlers.cpp
M +1 -0 ruby/qtruby/src/qtruby.h
--- branches/work/kdebindings-smoke2/ChangeLog #801333:801334
@@ -1,3 +1,8 @@
+2008-04-26 Arno Rehn <arno at arnorehn.de>
+
+ * Added plasma handlers.
+ * Put resolve_classname in the shared part of qtruby.
+
2008-04-23 Arno Rehn <arno at arnorehn.de>
* Fixed enum-checking for types.
--- branches/work/kdebindings-smoke2/ruby/plasma/CMakeLists.txt #801333:801334
@@ -1,7 +1,7 @@
include_directories( ${CMAKE_SOURCE_DIR}/smoke ${RUBY_INCLUDE_PATH} ${CMAKE_SOURCE_DIR}/ruby/qtruby/src)
INCLUDE_DIRECTORIES (${QT_INCLUDES})
-set(plasma_LIBRARY_SRC plasma.cpp)
+set(plasma_LIBRARY_SRC plasma.cpp plasmahandlers.cpp)
add_library(plasmaruby MODULE ${plasma_LIBRARY_SRC})
target_link_libraries(plasmaruby ${QT_QTCORE_LIBRARY} ${RUBY_LIBRARY} smokeqt smokekde smokeplasma qtruby4shared)
set_target_properties(plasmaruby PROPERTIES PREFIX "")
--- branches/work/kdebindings-smoke2/ruby/plasma/plasma.cpp #801333:801334
@@ -26,6 +26,8 @@
return smoke->binding->className(classId);
}
+extern TypeHandler Plasma_handlers[];
+
extern "C" {
VALUE plasma_module;
@@ -50,6 +52,8 @@
QtRubyModule module = { "Plasma", resolve_classname_plasma, 0 };
modules[plasma_Smoke] = module;
+ install_handlers(Plasma_handlers);
+
plasma_module = rb_define_module("Plasma");
plasma_internal_module = rb_define_module_under(plasma_module, "Internal");
--- branches/work/kdebindings-smoke2/ruby/qtruby/src/Qt.cpp #801333:801334
@@ -442,6 +442,16 @@
va_end(ap);
}
+const char *
+resolve_classname(Smoke* smoke, int classId, void * ptr)
+{
+ if (smoke->classes[classId].external) {
+ Smoke::ModuleIndex mi = smoke->findClass(smoke->className(classId));
+ return modules.value(mi.smoke).resolve_classname(mi.smoke, mi.index, ptr);
+ }
+ return modules.value(smoke).resolve_classname(smoke, classId, ptr);
+}
+
VALUE
findMethod(VALUE /*self*/, VALUE c_value, VALUE name_value)
{
--- branches/work/kdebindings-smoke2/ruby/qtruby/src/handlers.cpp #801333:801334
@@ -621,16 +621,6 @@
return smoke->binding->className(classId);
}
-static const char *
-resolve_classname(Smoke* smoke, int classId, void * ptr)
-{
- if (smoke->classes[classId].external) {
- Smoke::ModuleIndex mi = smoke->findClass(smoke->className(classId));
- return modules.value(mi.smoke).resolve_classname(mi.smoke, mi.index, ptr);
- }
- return modules.value(smoke).resolve_classname(smoke, classId, ptr);
-}
-
bool
matches_arg(Smoke *smoke, Smoke::Index meth, Smoke::Index argidx, const char *argtype)
{
--- branches/work/kdebindings-smoke2/ruby/qtruby/src/qtruby.h #801333:801334
@@ -127,6 +127,7 @@
extern Q_DECL_EXPORT void mapPointer(VALUE obj, smokeruby_object *o, Smoke::Index classId, void *lastptr);
extern Q_DECL_EXPORT void unmapPointer(smokeruby_object *, Smoke::Index, void*);
+extern Q_DECL_EXPORT const char * resolve_classname(Smoke* smoke, int classId, void * ptr);
extern Q_DECL_EXPORT void rb_str_catf(VALUE self, const char *format, ...) __attribute__ ((format (printf, 2, 3)));
extern Q_DECL_EXPORT VALUE findMethod(VALUE self, VALUE c_value, VALUE name_value);
More information about the Kde-bindings
mailing list