summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-02-27 15:38:22 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-02-27 15:38:22 +0100
commitd91b9c4689573bf64750c57089ad3711d4389cd7 (patch)
treeecb36e65c6cf598f0f1f955dfb9e5bbebf890060
parent06825f703d413cec78849877fb2dba6593336175 (diff)
downloadffi-efl-d91b9c4689573bf64750c57089ad3711d4389cd7.zip
ffi-efl-d91b9c4689573bf64750c57089ad3711d4389cd7.tar.gz
parse elm_layout.h, generate elm_layout.rb
-rw-r--r--lib/efl/elm/elm_layout.rb22
-rw-r--r--lib/efl/native/elm/elm_layout.rb77
-rwxr-xr-xtools/extract-api.sh1
-rwxr-xr-xtools/genruby.rb5
4 files changed, 105 insertions, 0 deletions
diff --git a/lib/efl/elm/elm_layout.rb b/lib/efl/elm/elm_layout.rb
new file mode 100644
index 0000000..a1eb99f
--- /dev/null
+++ b/lib/efl/elm/elm_layout.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_layout'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmLayout < ElmObject
+ #
+ include Helper
+ constructor :elm_layout_add
+ search_prefixes 'elm_layout_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/native/elm/elm_layout.rb b/lib/efl/native/elm/elm_layout.rb
new file mode 100644
index 0000000..c9d76b9
--- /dev/null
+++ b/lib/efl/native/elm/elm_layout.rb
@@ -0,0 +1,77 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/native'
+require 'efl/native/elementary'
+#
+module Efl
+ #
+ module ElmLayout
+ #
+ FCT_PREFIX = 'elm_layout_' 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 Evas_Object *elm_layout_add(Evas_Object *parent);
+ [ :elm_layout_add, [ :evas_object ], :evas_object ],
+ # EAPI Eina_Bool elm_layout_file_set(Evas_Object *obj, const char *file, const char *group);
+ [ :elm_layout_file_set, [ :evas_object, :string, :string ], :bool ],
+ # EAPI Eina_Bool elm_layout_theme_set(Evas_Object *obj, const char *clas, const char *group, const char *style);
+ [ :elm_layout_theme_set, [ :evas_object, :string, :string, :string ], :bool ],
+ # EAPI void elm_layout_box_append(Evas_Object *obj, const char *part, Evas_Object *child);
+ [ :elm_layout_box_append, [ :evas_object, :string, :evas_object ], :void ],
+ # EAPI void elm_layout_box_prepend(Evas_Object *obj, const char *part, Evas_Object *child);
+ [ :elm_layout_box_prepend, [ :evas_object, :string, :evas_object ], :void ],
+ # EAPI void elm_layout_box_insert_before(Evas_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference);
+ [ :elm_layout_box_insert_before, [ :evas_object, :string, :evas_object, :evas_object ], :void ],
+ # EAPI void elm_layout_box_insert_at(Evas_Object *obj, const char *part, Evas_Object *child, unsigned int pos);
+ [ :elm_layout_box_insert_at, [ :evas_object, :string, :evas_object, :uint ], :void ],
+ # EAPI Evas_Object *elm_layout_box_remove(Evas_Object *obj, const char *part, Evas_Object *child);
+ [ :elm_layout_box_remove, [ :evas_object, :string, :evas_object ], :evas_object ],
+ # EAPI void elm_layout_box_remove_all(Evas_Object *obj, const char *part, Eina_Bool clear);
+ [ :elm_layout_box_remove_all, [ :evas_object, :string, :bool ], :void ],
+ # EAPI void elm_layout_table_pack(Evas_Object *obj, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
+ [ :elm_layout_table_pack, [ :evas_object, :string, :evas_object, :ushort, :ushort, :ushort, :ushort ], :void ],
+ # EAPI Evas_Object *elm_layout_table_unpack(Evas_Object *obj, const char *part, Evas_Object *child_obj);
+ [ :elm_layout_table_unpack, [ :evas_object, :string, :evas_object ], :evas_object ],
+ # EAPI void elm_layout_table_clear(Evas_Object *obj, const char *part, Eina_Bool clear);
+ [ :elm_layout_table_clear, [ :evas_object, :string, :bool ], :void ],
+ # EAPI Evas_Object *elm_layout_edje_get(const Evas_Object *obj);
+ [ :elm_layout_edje_get, [ :evas_object ], :evas_object ],
+ # EAPI const char *elm_layout_data_get(const Evas_Object *obj, const char *key);
+ [ :elm_layout_data_get, [ :evas_object, :string ], :string ],
+ # EAPI void elm_layout_sizing_eval(Evas_Object *obj);
+ [ :elm_layout_sizing_eval, [ :evas_object ], :void ],
+ # EAPI Eina_Bool elm_layout_part_cursor_set(Evas_Object *obj, const char *part_name, const char *cursor);
+ [ :elm_layout_part_cursor_set, [ :evas_object, :string, :string ], :bool ],
+ # EAPI const char *elm_layout_part_cursor_get(const Evas_Object *obj, const char *part_name);
+ [ :elm_layout_part_cursor_get, [ :evas_object, :string ], :string ],
+ # EAPI void elm_layout_part_cursor_unset(Evas_Object *obj, const char *part_name);
+ [ :elm_layout_part_cursor_unset, [ :evas_object, :string ], :void ],
+ # EAPI Eina_Bool elm_layout_part_cursor_style_set(Evas_Object *obj, const char *part_name, const char *style);
+ [ :elm_layout_part_cursor_style_set, [ :evas_object, :string, :string ], :bool ],
+ # EAPI const char *elm_layout_part_cursor_style_get(const Evas_Object *obj, const char *part_name);
+ [ :elm_layout_part_cursor_style_get, [ :evas_object, :string ], :string ],
+ # EAPI Eina_Bool elm_layout_part_cursor_engine_only_set(Evas_Object *obj, const char *part_name, Eina_Bool engine_only);
+ [ :elm_layout_part_cursor_engine_only_set, [ :evas_object, :string, :bool ], :bool ],
+ # EAPI Eina_Bool elm_layout_part_cursor_engine_only_get(const Evas_Object *obj, const char *part_name);
+ [ :elm_layout_part_cursor_engine_only_get, [ :evas_object, :string ], :bool ],
+ ]
+ #
+ attach_fcts fcts
+ #
+ end
+end
+#
+# EOF
diff --git a/tools/extract-api.sh b/tools/extract-api.sh
index 7aab889..ad3dd8e 100755
--- a/tools/extract-api.sh
+++ b/tools/extract-api.sh
@@ -65,6 +65,7 @@ for header in \
"${INCLUDE}/elementary-0/elm_clock.h" \
"${INCLUDE}/elementary-0/elm_calendar.h" \
"${INCLUDE}/elementary-0/elm_bubble.h" \
+ "${INCLUDE}/elementary-0/elm_layout.h" \
; do
#
if [ ! -e "$header" ]; then
diff --git a/tools/genruby.rb b/tools/genruby.rb
index aafe4d4..70f2592 100755
--- a/tools/genruby.rb
+++ b/tools/genruby.rb
@@ -445,6 +445,11 @@ libs << {
:modname=>'ElmBubble', :prefix=>'elm_bubble', :outfile=>'elm/elm_bubble.rb',
:requires=>["#{NATIVE}/elementary"], :constants=>[]
}
+libs << {
+ :lib=>ELM_LIB,:header=>'elm_layout.h',
+ :modname=>'ElmLayout', :prefix=>'elm_layout', :outfile=>'elm/elm_layout.rb',
+ :requires=>["#{NATIVE}/elementary"], :constants=>[]
+}
#
Dir.mkdir lib_path unless (File.exists? lib_path)
#