diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-29 17:12:28 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-29 17:12:28 +0100 |
commit | 3b43739a0fe76ee72ac9b8a7a612b8a997151f83 (patch) | |
tree | db642eb2cdc8f9f53837941f2baeff54ee5c7556 /lib/efl | |
parent | 1e1cf7af4c0cdf583cca161e499638dcb0133074 (diff) | |
download | ffi-efl-3b43739a0fe76ee72ac9b8a7a612b8a997151f83.zip ffi-efl-3b43739a0fe76ee72ac9b8a7a612b8a997151f83.tar.gz |
parse elm_segment_control.h, generate elm_segment_control.rb
Diffstat (limited to 'lib/efl')
-rw-r--r-- | lib/efl/elementary_all.rb | 2 | ||||
-rw-r--r-- | lib/efl/elm/elm_segment_control.rb | 39 | ||||
-rw-r--r-- | lib/efl/native/elm/elm_segment_control.rb | 57 |
3 files changed, 97 insertions, 1 deletions
diff --git a/lib/efl/elementary_all.rb b/lib/efl/elementary_all.rb index 22075a4..5de5480 100644 --- a/lib/efl/elementary_all.rb +++ b/lib/efl/elementary_all.rb @@ -65,7 +65,7 @@ require 'efl/elm/elm_route' require 'efl/elm/elm_scale' require 'efl/elm/elm_scroll' require 'efl/elm/elm_scroller' -#require 'efl/elm/elm_segment_control' +require 'efl/elm/elm_segment_control' require 'efl/elm/elm_separator' require 'efl/elm/elm_slider' require 'efl/elm/elm_slideshow' diff --git a/lib/efl/elm/elm_segment_control.rb b/lib/efl/elm/elm_segment_control.rb new file mode 100644 index 0000000..f08f552 --- /dev/null +++ b/lib/efl/elm/elm_segment_control.rb @@ -0,0 +1,39 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/elm/elm_object_item' +require 'efl/native/elm/elm_segment_control' +# +module Efl + # + module Elm + # + class ElmCheck < ElmObject + # + include Helper + constructor :elm_segment_control_add + search_prefixes 'elm_segment_control_' + # + def item_add icon, label=nil + ElmObjectItem.new Native.elm_segment_control_item_add @ptr, icon, label + end + # + def item_insert_at icon, label, idx + ElmObjectItem.new Native.elm_segment_control_item_insert_at @ptr, icon, label, idx + end + # + def item_get idx + ElmObjectItem.new Native.elm_segment_control_item_get @ptr, idx + end + # + def item_selected_get + ElmObjectItem.new Native.elm_segment_control_item_selected_get @ptr + end + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_segment_control.rb b/lib/efl/native/elm/elm_segment_control.rb new file mode 100644 index 0000000..76ae9df --- /dev/null +++ b/lib/efl/native/elm/elm_segment_control.rb @@ -0,0 +1,57 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmSegmentControl + # + FCT_PREFIX = 'elm_segment_control_' 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_segment_control_add(Evas_Object *parent); + [ :elm_segment_control_add, [ :evas_object ], :evas_object ], + # EAPI Elm_Object_Item *elm_segment_control_item_add(Evas_Object *obj, Evas_Object *icon, const char *label); + [ :elm_segment_control_item_add, [ :evas_object, :evas_object, :string ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_segment_control_item_insert_at(Evas_Object *obj, Evas_Object *icon, const char *label, int index); + [ :elm_segment_control_item_insert_at, [ :evas_object, :evas_object, :string, :int ], :elm_object_item ], + # EAPI void elm_segment_control_item_del_at(Evas_Object *obj, int index); + [ :elm_segment_control_item_del_at, [ :evas_object, :int ], :void ], + # EAPI int elm_segment_control_item_count_get(const Evas_Object *obj); + [ :elm_segment_control_item_count_get, [ :evas_object ], :int ], + # EAPI Elm_Object_Item *elm_segment_control_item_get(const Evas_Object *obj, int index); + [ :elm_segment_control_item_get, [ :evas_object, :int ], :elm_object_item ], + # EAPI const char *elm_segment_control_item_label_get(const Evas_Object *obj, int index); + [ :elm_segment_control_item_label_get, [ :evas_object, :int ], :string ], + # EAPI Evas_Object *elm_segment_control_item_icon_get(const Evas_Object *obj, int index); + [ :elm_segment_control_item_icon_get, [ :evas_object, :int ], :evas_object ], + # EAPI int elm_segment_control_item_index_get(const Elm_Object_Item *it); + [ :elm_segment_control_item_index_get, [ :elm_object_item ], :int ], + # EAPI Evas_Object *elm_segment_control_item_object_get(const Elm_Object_Item *it); + [ :elm_segment_control_item_object_get, [ :elm_object_item ], :evas_object ], + # EAPI Elm_Object_Item *elm_segment_control_item_selected_get(const Evas_Object *obj); + [ :elm_segment_control_item_selected_get, [ :evas_object ], :elm_object_item ], + # EAPI void elm_segment_control_item_selected_set(Elm_Object_Item *it, Eina_Bool select); + [ :elm_segment_control_item_selected_set, [ :elm_object_item, :bool ], :void ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF |