diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-26 16:07:31 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-26 16:07:31 +0100 |
commit | fdda52941d977938b5c14086e81ee6bf6f17fd49 (patch) | |
tree | 92b41e7735176ef16086b7985a79ee7bb6276a58 | |
parent | 73e973d5f634898c5ae137ad61e7e9ce5c1ae775 (diff) | |
download | ffi-efl-fdda52941d977938b5c14086e81ee6bf6f17fd49.zip ffi-efl-fdda52941d977938b5c14086e81ee6bf6f17fd49.tar.gz |
parse elm_object_item.h and generate native/elm/elm_object_item.rb
-rw-r--r-- | lib/efl/native/elm/elm_object_item.rb | 99 | ||||
-rwxr-xr-x | tools/extract-api.sh | 3 | ||||
-rwxr-xr-x | tools/genruby.rb | 5 |
3 files changed, 106 insertions, 1 deletions
diff --git a/lib/efl/native/elm/elm_object_item.rb b/lib/efl/native/elm/elm_object_item.rb new file mode 100644 index 0000000..86a67d1 --- /dev/null +++ b/lib/efl/native/elm/elm_object_item.rb @@ -0,0 +1,99 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +require 'efl/native/elm/elm_general' +require 'efl/native/elm/elm_tooltip' +# +module Efl + # + module Elm + # + FCT_PREFIX = 'elm_object_item_' 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' + # + # CALLBACKS + # typedef void (*Elm_Object_Item_Smart_Cb) (void *data, Elm_Object_Item *it, void *event_info); + callback :elm_object_item_smart_cb, [ :pointer, :elm_object_item, :pointer ], :void + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object *elm_object_item_widget_get(const Elm_Object_Item *it); + [ :elm_object_item_widget_get, [ :elm_object_item ], :evas_object ], + # EAPI void elm_object_item_part_content_set(Elm_Object_Item *it, const char *part, Evas_Object *content); + [ :elm_object_item_part_content_set, [ :elm_object_item, :string, :evas_object ], :void ], + # EAPI Evas_Object *elm_object_item_part_content_get(const Elm_Object_Item *it, const char *part); + [ :elm_object_item_part_content_get, [ :elm_object_item, :string ], :evas_object ], + # EAPI Evas_Object *elm_object_item_part_content_unset(Elm_Object_Item *it, const char *part); + [ :elm_object_item_part_content_unset, [ :elm_object_item, :string ], :evas_object ], + # EAPI void elm_object_item_part_text_set(Elm_Object_Item *it, const char *part, const char *label); + [ :elm_object_item_part_text_set, [ :elm_object_item, :string, :string ], :void ], + # EAPI const char *elm_object_item_part_text_get(const Elm_Object_Item *it, const char *part); + [ :elm_object_item_part_text_get, [ :elm_object_item, :string ], :string ], + # EAPI void elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt); + [ :elm_object_item_access_info_set, [ :elm_object_item, :string ], :void ], + # EAPI void *elm_object_item_data_get(const Elm_Object_Item *it); + [ :elm_object_item_data_get, [ :elm_object_item ], :pointer ], + # EAPI void elm_object_item_data_set(Elm_Object_Item *it, void *data); + [ :elm_object_item_data_set, [ :elm_object_item, :pointer ], :void ], + # EAPI void elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source); + [ :elm_object_item_signal_emit, [ :elm_object_item, :string, :string ], :void ], + # EAPI void elm_object_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled); + [ :elm_object_item_disabled_set, [ :elm_object_item, :bool ], :void ], + # EAPI Eina_Bool elm_object_item_disabled_get(const Elm_Object_Item *it); + [ :elm_object_item_disabled_get, [ :elm_object_item ], :bool ], + # EAPI void elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb); + [ :elm_object_item_del_cb_set, [ :elm_object_item, :evas_smart_cb ], :void ], + # EAPI void elm_object_item_del(Elm_Object_Item *it); + [ :elm_object_item_del, [ :elm_object_item ], :void ], + # EAPI void elm_object_item_tooltip_text_set(Elm_Object_Item *it, const char *text); + [ :elm_object_item_tooltip_text_set, [ :elm_object_item, :string ], :void ], + # EAPI Eina_Bool elm_object_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable); + [ :elm_object_item_tooltip_window_mode_set, [ :elm_object_item, :bool ], :bool ], + # EAPI Eina_Bool elm_object_item_tooltip_window_mode_get(const Elm_Object_Item *it); + [ :elm_object_item_tooltip_window_mode_get, [ :elm_object_item ], :bool ], + # EAPI void elm_object_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb); + [ :elm_object_item_tooltip_content_cb_set, [ :elm_object_item, :elm_tooltip_item_content_cb, :pointer, :evas_smart_cb ], :void ], + # EAPI void elm_object_item_tooltip_unset(Elm_Object_Item *it); + [ :elm_object_item_tooltip_unset, [ :elm_object_item ], :void ], + # EAPI void elm_object_item_tooltip_style_set(Elm_Object_Item *it, const char *style); + [ :elm_object_item_tooltip_style_set, [ :elm_object_item, :string ], :void ], + # EAPI const char *elm_object_item_tooltip_style_get(const Elm_Object_Item *it); + [ :elm_object_item_tooltip_style_get, [ :elm_object_item ], :string ], + # EAPI void elm_object_item_cursor_set(Elm_Object_Item *it, const char *cursor); + [ :elm_object_item_cursor_set, [ :elm_object_item, :string ], :void ], + # EAPI const char *elm_object_item_cursor_get(const Elm_Object_Item *it); + [ :elm_object_item_cursor_get, [ :elm_object_item ], :string ], + # EAPI void elm_object_item_cursor_unset(Elm_Object_Item *it); + [ :elm_object_item_cursor_unset, [ :elm_object_item ], :void ], + # EAPI void elm_object_item_cursor_style_set(Elm_Object_Item *it, const char *style); + [ :elm_object_item_cursor_style_set, [ :elm_object_item, :string ], :void ], + # EAPI const char *elm_object_item_cursor_style_get(const Elm_Object_Item *it); + [ :elm_object_item_cursor_style_get, [ :elm_object_item ], :string ], + # EAPI void elm_object_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only); + [ :elm_object_item_cursor_engine_only_set, [ :elm_object_item, :bool ], :void ], + # EAPI Eina_Bool elm_object_item_cursor_engine_only_get(const Elm_Object_Item *it); + [ :elm_object_item_cursor_engine_only_get, [ :elm_object_item ], :bool ], + # EAPI void elm_object_item_smart_callback_add(Elm_Object_Item *it, const char *event, Elm_Object_Item_Smart_Cb func, const void *data); + [ :elm_object_item_smart_callback_add, [ :elm_object_item, :string, :elm_object_item_smart_cb, :pointer ], :void ], + # EAPI void *elm_object_item_smart_callback_del(Elm_Object_Item *it, const char *event, Elm_Object_Item_Smart_Cb func); + [ :elm_object_item_smart_callback_del, [ :elm_object_item, :string, :elm_object_item_smart_cb ], :pointer ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index f4b0617..f17a0fe 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -42,9 +42,10 @@ for header in \ "${INCLUDE}/ecore-1/Ecore_Fb.h" \ "${INCLUDE}/ecore-1/Ecore_File.h" \ "${INCLUDE}/EMap.h" \ + "${INCLUDE}/elementary-0/Elementary.h" \ "${INCLUDE}/elementary-0/elm_general.h" \ "${INCLUDE}/elementary-0/elm_tooltip.h" \ - "${INCLUDE}/elementary-0/Elementary.h" \ + "${INCLUDE}/elementary-0/elm_object_item.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index 9b9706a..e36eef2 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -342,6 +342,11 @@ libs << { :modname=>'Elm', :prefix=>'elm', :outfile=>'elm/elm_tooltip.rb', :requires=>['efl/native/elementary'], :constants=>[] } +libs << { + :lib=>'elementary-ver-pre-svn-09.so.0',:header=>'elm_object_item.h', + :modname=>'Elm', :prefix=>'elm_object_item', :outfile=>'elm/elm_object_item.rb', + :requires=>['efl/native/elementary','efl/native/elm/elm_general','efl/native/elm/elm_tooltip'], :constants=>[] +} Dir.mkdir lib_path unless (File.exists? lib_path) # libs.each do |lib| |