diff options
-rw-r--r-- | lib/efl/native/elm/elm_object.rb | 74 | ||||
-rwxr-xr-x | tools/extract-api.sh | 1 | ||||
-rwxr-xr-x | tools/genruby.rb | 5 |
3 files changed, 80 insertions, 0 deletions
diff --git a/lib/efl/native/elm/elm_object.rb b/lib/efl/native/elm/elm_object.rb new file mode 100644 index 0000000..ffeae49 --- /dev/null +++ b/lib/efl/native/elm/elm_object.rb @@ -0,0 +1,74 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/edje' +require 'efl/native/elementary' +# +module Efl + # + module ElmObject + # + FCT_PREFIX = 'elm_object_' 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_part_text_set(Evas_Object *obj, const char *part, const char *label); + [ :elm_object_part_text_set, [ :evas_object, :string, :string ], :void ], + # EAPI const char *elm_object_part_text_get(const Evas_Object *obj, const char *part); + [ :elm_object_part_text_get, [ :evas_object, :string ], :string ], + # EAPI void elm_object_part_content_set(Evas_Object *obj, const char *part, Evas_Object *content); + [ :elm_object_part_content_set, [ :evas_object, :string, :evas_object ], :void ], + # EAPI Evas_Object *elm_object_part_content_get(const Evas_Object *obj, const char *part); + [ :elm_object_part_content_get, [ :evas_object, :string ], :evas_object ], + # EAPI Evas_Object *elm_object_part_content_unset(Evas_Object *obj, const char *part); + [ :elm_object_part_content_unset, [ :evas_object, :string ], :evas_object ], + # EAPI void elm_object_access_info_set(Evas_Object *obj, const char *txt); + [ :elm_object_access_info_set, [ :evas_object, :string ], :void ], + # EAPI Evas_Object *elm_object_name_find(const Evas_Object *obj, const char *name, int recurse); + [ :elm_object_name_find, [ :evas_object, :string, :int ], :evas_object ], + # EAPI void elm_object_style_set(Evas_Object *obj, const char *style); + [ :elm_object_style_set, [ :evas_object, :string ], :void ], + # EAPI const char *elm_object_style_get(const Evas_Object *obj); + [ :elm_object_style_get, [ :evas_object ], :string ], + # EAPI void elm_object_disabled_set(Evas_Object *obj, Eina_Bool disabled); + [ :elm_object_disabled_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_object_disabled_get(const Evas_Object *obj); + [ :elm_object_disabled_get, [ :evas_object ], :bool ], + # EAPI Eina_Bool elm_object_widget_check(const Evas_Object *obj); + [ :elm_object_widget_check, [ :evas_object ], :bool ], + # EAPI Evas_Object *elm_object_parent_widget_get(const Evas_Object *obj); + [ :elm_object_parent_widget_get, [ :evas_object ], :evas_object ], + # EAPI Evas_Object *elm_object_top_widget_get(const Evas_Object *obj); + [ :elm_object_top_widget_get, [ :evas_object ], :evas_object ], + # EAPI const char *elm_object_widget_type_get(const Evas_Object *obj); + [ :elm_object_widget_type_get, [ :evas_object ], :string ], + # EAPI void elm_object_signal_emit(Evas_Object *obj, const char *emission, const char *source); + [ :elm_object_signal_emit, [ :evas_object, :string, :string ], :void ], + # EAPI void elm_object_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data); + [ :elm_object_signal_callback_add, [ :evas_object, :string, :string, :edje_signal_cb, :pointer ], :void ], + # EAPI void *elm_object_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func); + [ :elm_object_signal_callback_del, [ :evas_object, :string, :string, :edje_signal_cb ], :pointer ], + # EAPI void elm_object_event_callback_add(Evas_Object *obj, Elm_Event_Cb func, const void *data); + [ :elm_object_event_callback_add, [ :evas_object, :elm_event_cb, :pointer ], :void ], + # EAPI void *elm_object_event_callback_del(Evas_Object *obj, Elm_Event_Cb func, const void *data); + [ :elm_object_event_callback_del, [ :evas_object, :elm_event_cb, :pointer ], :pointer ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index 7d3965f..de52d7d 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -53,6 +53,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_win.h" \ "${INCLUDE}/elementary-0/elm_bg.h" \ "${INCLUDE}/elementary-0/elm_label.h" \ + "${INCLUDE}/elementary-0/elm_object.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index 0b4188a..b044f62 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -385,6 +385,11 @@ libs << { :modname=>'ElmLabel', :prefix=>'elm_label', :outfile=>'elm/elm_label.rb', :requires=>["#{NATIVE}/elementary","#{NATIVE}/elm/elm_entry"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_object.h', + :modname=>'ElmObject', :prefix=>'elm_object', :outfile=>'elm/elm_object.rb', + :requires=>["#{NATIVE}/edje","#{NATIVE}/elementary"], :constants=>[] +} Dir.mkdir lib_path unless (File.exists? lib_path) # libs.each do |lib| |