summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/efl/elementary_all.rb2
-rw-r--r--lib/efl/elm/elm_debug.rb25
-rw-r--r--lib/efl/native/elm/elm_debug.rb37
-rwxr-xr-xtools/genruby.rb2
4 files changed, 64 insertions, 2 deletions
diff --git a/lib/efl/elementary_all.rb b/lib/efl/elementary_all.rb
index 8052c50..5aa2630 100644
--- a/lib/efl/elementary_all.rb
+++ b/lib/efl/elementary_all.rb
@@ -24,7 +24,7 @@ require 'efl/elm/elm_colorselector'
#require 'efl/elm/elm_conform'
require 'efl/elm/elm_ctxpopup'
require 'efl/elm/elm_cursor'
-#require 'efl/elm/elm_debug'
+require 'efl/elm/elm_debug'
require 'efl/elm/elm_diskselector'
#require 'efl/elm/elm_engine'
require 'efl/elm/elm_entry'
diff --git a/lib/efl/elm/elm_debug.rb b/lib/efl/elm/elm_debug.rb
new file mode 100644
index 0000000..43d1d3b
--- /dev/null
+++ b/lib/efl/elm/elm_debug.rb
@@ -0,0 +1,25 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_scroll'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmObject
+ #
+ def tree_dump
+ Native::elm_object_tree_dump @ptr
+ end
+ def tree_dot_dump filepath
+ Native::elm_object_tree_dot_dump @ptr, filepath
+ end
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/native/elm/elm_debug.rb b/lib/efl/native/elm/elm_debug.rb
new file mode 100644
index 0000000..5aa52dc
--- /dev/null
+++ b/lib/efl/native/elm/elm_debug.rb
@@ -0,0 +1,37 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/native'
+require 'efl/native/elementary'
+#
+module Efl
+ #
+ module ElmDebug
+ #
+ FCT_PREFIX = 'elm_debug_' unless const_defined? :FCT_PREFIX
+ #
+ def self.method_missing meth, *args, &block
+ sym = Efl::MethodResolver.resolve self, meth, FCT_PREFIX
+ self.send sym, *args, &block
+ end
+ #
+ end
+ #
+ module Native
+ #
+ ffi_lib 'elementary-ver-pre-svn-09.so.0'
+ #
+ # FUNCTIONS
+ fcts = [
+ # EAPI void elm_object_tree_dump(const Evas_Object *top);
+ [ :elm_object_tree_dump, [ :evas_object ], :void ],
+ # EAPI void elm_object_tree_dot_dump(const Evas_Object *top, const char *file);
+ [ :elm_object_tree_dot_dump, [ :evas_object, :string ], :void ],
+ ]
+ #
+ attach_fcts fcts
+ #
+ end
+end
+#
+# EOF
diff --git a/tools/genruby.rb b/tools/genruby.rb
index a4bcf58..c457017 100755
--- a/tools/genruby.rb
+++ b/tools/genruby.rb
@@ -389,7 +389,7 @@ libs << elm_h('elm_colorselector.h', 'ElmColorSelector')
#libs << elm_h('elm_config.h', 'ElmConfig')
#libs << elm_h('elm_conform.h', 'ElmConform')
libs << elm_h('elm_cursor.h', 'ElmCursor')
-#libs << elm_h('elm_debug.h', 'ElmDebug')
+libs << elm_h('elm_debug.h', 'ElmDebug')
libs << elm_h('elm_diskselector.h', 'ElmDiskSelector', ["#{NATIVE}/elementary","#{NATIVE}/elm/elm_scroller"])
#libs << elm_h('elm_engine.h', 'ElmEngine')
#libs << elm_h('elm_factory.h', 'ElmFactory')