diff options
-rw-r--r-- | lib/efl/elm/elm_flipselector.rb | 50 | ||||
-rw-r--r-- | lib/efl/native/elm/elm_flipselector.rb | 63 | ||||
-rwxr-xr-x | tools/extract-api.sh | 1 | ||||
-rwxr-xr-x | tools/genruby.rb | 5 |
4 files changed, 119 insertions, 0 deletions
diff --git a/lib/efl/elm/elm_flipselector.rb b/lib/efl/elm/elm_flipselector.rb new file mode 100644 index 0000000..ab15fb9 --- /dev/null +++ b/lib/efl/elm/elm_flipselector.rb @@ -0,0 +1,50 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_flipselector' +# +module Efl + # + module Elm + # + class ElmFlipSelector < ElmObject + # + include Helper + constructor :elm_flipselector_add + search_prefixes 'elm_flipselector_' + # + def item_append label, cb=nil, data=nil + ElmObjectItem.new Native::elm_flipselector_item_append @ptr, label, cb, data + end + # + def item_prepend label, cb=nil, data=nil + ElmObjectItem.new Native::elm_flipselector_item_prepend @ptr, label, cb, data + end + # + def first_item_get + ElmObjectItem.new Native::elm_flipselector_first_item_get @ptr + end + # + def last_item_get + ElmObjectItem.new Native::elm_flipselector_last_item_get @ptr + end + # + def selected_item_get + ElmObjectItem.new Native::elm_flipselector_selected_item_get @ptr + end + # + def item_prev_get it + ElmObjectItem.new Native::elm_flipselector_item_prev_get it + end + # + def item_next_get it + ElmObjectItem.new Native::elm_flipselector_item_next_get it + end + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_flipselector.rb b/lib/efl/native/elm/elm_flipselector.rb new file mode 100644 index 0000000..a9995b9 --- /dev/null +++ b/lib/efl/native/elm/elm_flipselector.rb @@ -0,0 +1,63 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmFlipSelector + # + FCT_PREFIX = 'elm_flipselector_' 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_flipselector_add(Evas_Object *parent); + [ :elm_flipselector_add, [ :evas_object ], :evas_object ], + # EAPI void elm_flipselector_flip_next(Evas_Object *obj); + [ :elm_flipselector_flip_next, [ :evas_object ], :void ], + # EAPI void elm_flipselector_flip_prev(Evas_Object *obj); + [ :elm_flipselector_flip_prev, [ :evas_object ], :void ], + # EAPI Elm_Object_Item *elm_flipselector_item_append(Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data); + [ :elm_flipselector_item_append, [ :evas_object, :string, :evas_smart_cb, :pointer ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_flipselector_item_prepend(Evas_Object *obj, const char *label, Evas_Smart_Cb func, void *data); + [ :elm_flipselector_item_prepend, [ :evas_object, :string, :evas_smart_cb, :pointer ], :elm_object_item ], + # EAPI const Eina_List *elm_flipselector_items_get(const Evas_Object *obj); + [ :elm_flipselector_items_get, [ :evas_object ], :eina_list ], + # EAPI Elm_Object_Item *elm_flipselector_first_item_get(const Evas_Object *obj); + [ :elm_flipselector_first_item_get, [ :evas_object ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_flipselector_last_item_get(const Evas_Object *obj); + [ :elm_flipselector_last_item_get, [ :evas_object ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_flipselector_selected_item_get(const Evas_Object *obj); + [ :elm_flipselector_selected_item_get, [ :evas_object ], :elm_object_item ], + # EAPI void elm_flipselector_item_selected_set(Elm_Object_Item *it, Eina_Bool selected); + [ :elm_flipselector_item_selected_set, [ :elm_object_item, :bool ], :void ], + # EAPI Eina_Bool elm_flipselector_item_selected_get(const Elm_Object_Item *it); + [ :elm_flipselector_item_selected_get, [ :elm_object_item ], :bool ], + # EAPI Elm_Object_Item *elm_flipselector_item_prev_get(const Elm_Object_Item *it); + [ :elm_flipselector_item_prev_get, [ :elm_object_item ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_flipselector_item_next_get(const Elm_Object_Item *it); + [ :elm_flipselector_item_next_get, [ :elm_object_item ], :elm_object_item ], + # EAPI void elm_flipselector_interval_set(Evas_Object *obj, double interval); + [ :elm_flipselector_interval_set, [ :evas_object, :double ], :void ], + # EAPI double elm_flipselector_interval_get(const Evas_Object *obj); + [ :elm_flipselector_interval_get, [ :evas_object ], :double ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index ef99782..1e16293 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -69,6 +69,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_cursor.h" \ "${INCLUDE}/elementary-0/elm_notify.h" \ "${INCLUDE}/elementary-0/elm_flip.h" \ + "${INCLUDE}/elementary-0/elm_flipselector.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index fb402f6..2a3dfb7 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -465,6 +465,11 @@ libs << { :modname=>'ElmFlip', :prefix=>'elm_flip', :outfile=>'elm/elm_flip.rb', :requires=>["#{NATIVE}/elementary"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_flipselector.h', + :modname=>'ElmFlipSelector', :prefix=>'elm_flipselector', :outfile=>'elm/elm_flipselector.rb', + :requires=>["#{NATIVE}/elementary"], :constants=>[] +} # Dir.mkdir lib_path unless (File.exists? lib_path) # |