diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-27 16:24:21 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-27 16:24:21 +0100 |
commit | d18d12a07e07b2bfe99b5b9ee855cca9b28b3f69 (patch) | |
tree | bfad027464eb82e7e33afdc9a49655dda908c9ed | |
parent | 2d9c273da1c9d2a5bba3a52705374bfcd20b142e (diff) | |
download | ffi-efl-d18d12a07e07b2bfe99b5b9ee855cca9b28b3f69.zip ffi-efl-d18d12a07e07b2bfe99b5b9ee855cca9b28b3f69.tar.gz |
parse elm_diskselector.h, generate elm_diskselector.rb
-rw-r--r-- | lib/efl/elm/elm_diskselector.rb | 46 | ||||
-rw-r--r-- | lib/efl/native/elm/elm_diskselector.rb | 76 | ||||
-rwxr-xr-x | tools/extract-api.sh | 1 | ||||
-rwxr-xr-x | tools/genruby.rb | 5 |
4 files changed, 128 insertions, 0 deletions
diff --git a/lib/efl/elm/elm_diskselector.rb b/lib/efl/elm/elm_diskselector.rb new file mode 100644 index 0000000..1a21613 --- /dev/null +++ b/lib/efl/elm/elm_diskselector.rb @@ -0,0 +1,46 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/native/elm/elm_diskselector' +# +module Efl + # + module Elm + # + class ElmDiskSelector < ElmObject + # + include Helper + constructor :elm_diskselector_add + search_prefixes 'elm_diskselector_' + # + def item_append label, icon=nil, cb=nil, data=nil + ElmObjectItem.new Native::elm_diskselector_item_append @ptr, label, icon, cb, data + end + # + def selected_item_get + ElmObjectItem.new Native::elm_diskselector_selected_item_get @ptr + end + # + def first_item_get + ElmObjectItem.new Native::elm_diskselector_first_item_get @ptr + end + # + def last_item_get + ElmObjectItem.new Native::elm_diskselector_last_item_get @ptr + end + # + def item_prev_get it + ElmObjectItem.new Native::elm_diskselector_item_prev_get it + end + # + def item_next_get it + ElmObjectItem.new Native::elm_diskselector_item_next_get it + end + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_diskselector.rb b/lib/efl/native/elm/elm_diskselector.rb new file mode 100644 index 0000000..265e0b5 --- /dev/null +++ b/lib/efl/native/elm/elm_diskselector.rb @@ -0,0 +1,76 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +require 'efl/native/elm/elm_scroller' +# +module Efl + # + module ElmDiskSelector + # + FCT_PREFIX = 'elm_diskselector_' 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_diskselector_add(Evas_Object *parent); + [ :elm_diskselector_add, [ :evas_object ], :evas_object ], + # EAPI void elm_diskselector_round_set(Evas_Object *obj, Eina_Bool round); + [ :elm_diskselector_round_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_diskselector_round_get(const Evas_Object *obj); + [ :elm_diskselector_round_get, [ :evas_object ], :bool ], + # EAPI int elm_diskselector_side_label_length_get(const Evas_Object *obj); + [ :elm_diskselector_side_label_length_get, [ :evas_object ], :int ], + # EAPI void elm_diskselector_side_label_length_set(Evas_Object *obj, int len); + [ :elm_diskselector_side_label_length_set, [ :evas_object, :int ], :void ], + # EAPI void elm_diskselector_display_item_num_set(Evas_Object *obj, int num); + [ :elm_diskselector_display_item_num_set, [ :evas_object, :int ], :void ], + # EAPI int elm_diskselector_display_item_num_get(const Evas_Object *obj); + [ :elm_diskselector_display_item_num_get, [ :evas_object ], :int ], + # EAPI void elm_diskselector_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce); + [ :elm_diskselector_bounce_set, [ :evas_object, :bool, :bool ], :void ], + # EAPI void elm_diskselector_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce); + [ :elm_diskselector_bounce_get, [ :evas_object, :pointer, :pointer ], :void ], + # EAPI void elm_diskselector_scroller_policy_get(const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v); + [ :elm_diskselector_scroller_policy_get, [ :evas_object, :pointer, :pointer ], :void ], + # EAPI void elm_diskselector_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v); + [ :elm_diskselector_scroller_policy_set, [ :evas_object, :elm_scroller_policy, :elm_scroller_policy ], :void ], + # EAPI void elm_diskselector_clear(Evas_Object *obj); + [ :elm_diskselector_clear, [ :evas_object ], :void ], + # EAPI const Eina_List *elm_diskselector_items_get(const Evas_Object *obj); + [ :elm_diskselector_items_get, [ :evas_object ], :eina_list ], + # EAPI Elm_Object_Item *elm_diskselector_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data); + [ :elm_diskselector_item_append, [ :evas_object, :string, :evas_object, :evas_smart_cb, :pointer ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_diskselector_selected_item_get(const Evas_Object *obj); + [ :elm_diskselector_selected_item_get, [ :evas_object ], :elm_object_item ], + # EAPI void elm_diskselector_item_selected_set(Elm_Object_Item *it, Eina_Bool selected); + [ :elm_diskselector_item_selected_set, [ :elm_object_item, :bool ], :void ], + # EAPI Eina_Bool elm_diskselector_item_selected_get(const Elm_Object_Item *it); + [ :elm_diskselector_item_selected_get, [ :elm_object_item ], :bool ], + # EAPI Elm_Object_Item *elm_diskselector_first_item_get(const Evas_Object *obj); + [ :elm_diskselector_first_item_get, [ :evas_object ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_diskselector_last_item_get(const Evas_Object *obj); + [ :elm_diskselector_last_item_get, [ :evas_object ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_diskselector_item_prev_get(const Elm_Object_Item *it); + [ :elm_diskselector_item_prev_get, [ :elm_object_item ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_diskselector_item_next_get(const Elm_Object_Item *it); + [ :elm_diskselector_item_next_get, [ :elm_object_item ], :elm_object_item ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/extract-api.sh b/tools/extract-api.sh index 1e16293..b81fe20 100755 --- a/tools/extract-api.sh +++ b/tools/extract-api.sh @@ -70,6 +70,7 @@ for header in \ "${INCLUDE}/elementary-0/elm_notify.h" \ "${INCLUDE}/elementary-0/elm_flip.h" \ "${INCLUDE}/elementary-0/elm_flipselector.h" \ + "${INCLUDE}/elementary-0/elm_diskselector.h" \ ; do # if [ ! -e "$header" ]; then diff --git a/tools/genruby.rb b/tools/genruby.rb index 2a3dfb7..9a47cea 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -470,6 +470,11 @@ libs << { :modname=>'ElmFlipSelector', :prefix=>'elm_flipselector', :outfile=>'elm/elm_flipselector.rb', :requires=>["#{NATIVE}/elementary"], :constants=>[] } +libs << { + :lib=>ELM_LIB,:header=>'elm_diskselector.h', + :modname=>'ElmDiskSelector', :prefix=>'elm_diskselector', :outfile=>'elm/elm_diskselector.rb', + :requires=>["#{NATIVE}/elementary","#{NATIVE}/elm/elm_scroller"], :constants=>[] +} # Dir.mkdir lib_path unless (File.exists? lib_path) # |