From 7964600436df7c37796b099f281aba2984786f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 25 May 2011 17:38:12 +0200 Subject: add ElmDiskSelectorItem, ElmEntry, ElmFlipSelector, ElmFLipSelectorItem and a few methods --- lib/efl/elementary.rb | 63 ++++++++++++++++++++++++++++++++++++++++++++ lib/efl/native/elementary.rb | 8 +++--- 2 files changed, 68 insertions(+), 3 deletions(-) diff --git a/lib/efl/elementary.rb b/lib/efl/elementary.rb index fdf4e32..f3c278b 100644 --- a/lib/efl/elementary.rb +++ b/lib/efl/elementary.rb @@ -100,6 +100,26 @@ module Efl super Native.method(:elm_box_add), parent, &block end # + def padding_get + x = FFI::MemoryPointer.new :int + y = FFI::MemoryPointer.new :int + Native::elm_box_padding_get @ptr, x, y + [ x.read_int, y.read_int ] + end + alias :padding :padding_get + # + def align_get + x = FFI::MemoryPointer.new :float + y = FFI::MemoryPointer.new :float + Native::elm_box_align_get @ptr, x, y + [ x.read_float, y.read_float ] + end + alias :align :padding_get + # + def children_get + Efl::EinaList::REinaList.new Native.elm_box_children_get @ptr + end + alias :children :children_get end # class ElmList < Efl::Evas::REvasObject @@ -167,6 +187,16 @@ module Efl alias :item_selected= :item_selected_set end # + class ElmDiskSelectorItem < Efl::Evas::REvasObject + # + search_prefixes 'elm_diskselector_item_', 'elm_object' + # + def data_get + Native::elm_diskselector_item_data_get @ptr + end + alias :data :data_get + end + # class ElmNotify < Efl::Evas::REvasObject # search_prefixes 'elm_notify_', 'elm_object' @@ -176,6 +206,39 @@ module Efl end end # + class ElmEntry < Efl::Evas::REvasObject + # + search_prefixes 'elm_entry_', 'elm_object' + # + def initialize parent, &block + super Native.method(:elm_entry_add), parent, &block + end + end + # + class ElmFlipSelector < Efl::Evas::REvasObject + # + search_prefixes 'elm_flipselector_', 'elm_object' + # + def initialize parent, &block + super Native.method(:elm_flipselector_add), parent, &block + end + # + def item_append label, cb, data + ElmFlipSelectorItem.new Native::elm_flipselector_item_append @ptr, label, cb, data + end + # + def selected_item_get + ElmFlipSelectorItem.new Native::elm_flipselector_selected_item_get @ptr + end + alias :selected_item :selected_item_get + end + # + class ElmFlipSelectorItem < Efl::Evas::REvasObject + # + search_prefixes 'elm_flipselector_item_', 'elm_object' + # + end + # end end # diff --git a/lib/efl/native/elementary.rb b/lib/efl/native/elementary.rb index 29dbf3e..62d5d93 100644 --- a/lib/efl/native/elementary.rb +++ b/lib/efl/native/elementary.rb @@ -330,6 +330,8 @@ module Efl callback :elm_store_item_unfetch_cb, [ :void_p, :elm_store_item_p ], :void # typedef void *(*Elm_Store_Item_Mapping_Cb) (void *data, Elm_Store_Item *sti, const char *part); callback :elm_store_item_mapping_cb, [ :void_p, :elm_store_item_p, :string ], :void_p + # Elm_Flipselector_Item : void (*func)(void *data, Evas_Object *obj, void *event_info) + callback :elm_flipselector_cb, [ :void_p, :evas_object_p, :void_p ], :void # # VARIABLES # EAPI extern Elm_Version *elm_version; @@ -2604,7 +2606,7 @@ module Efl # EAPI const char *elm_map_source_name_get(const Evas_Object *obj); [ :elm_map_source_name_get, [ :evas_object_p ], :string ], # EAPI void elm_map_route_source_set(Evas_Object *obj, Elm_Map_Route_Sources source); - # FIXME [ :elm_map_route_source_set, [ :evas_object_p, :elm_map_route_sources ], :void ], + [ :elm_map_route_source_set, [ :evas_object_p, :elm_map_route_sources ], :void ], # EAPI Elm_Map_Route_Sources elm_map_route_source_get(const Evas_Object *obj); [ :elm_map_route_source_get, [ :evas_object_p ], :elm_map_route_sources ], # EAPI int elm_map_source_zoom_min_get(const Evas_Object *obj); @@ -2870,9 +2872,9 @@ module Efl # EAPI void elm_flipselector_flip_prev(Evas_Object *obj); [ :elm_flipselector_flip_prev, [ :evas_object_p ], :void ], # EAPI Elm_Flipselector_Item *elm_flipselector_item_append(Evas_Object *obj, const char *label, void (*func)(void *data, Evas_Object *obj, void *event_info), void *data); - # FIXME + [ :elm_flipselector_item_append, [ :evas_object_p, :string, :elm_flipselector_cb, :void_p ], :evas_object_p ], # EAPI Elm_Flipselector_Item *elm_flipselector_item_prepend(Evas_Object *obj, const char *label, void (*func)(void *data, Evas_Object *obj, void *event_info), void *data); - # FIXME + [ :elm_flipselector_item_prepend, [ :evas_object_p, :string, :elm_flipselector_cb, :void_p ], :evas_object_p ], # EAPI const Eina_List *elm_flipselector_items_get(const Evas_Object *obj); [ :elm_flipselector_items_get, [ :evas_object_p ], :eina_list_p ], # EAPI Elm_Flipselector_Item *elm_flipselector_first_item_get(const Evas_Object *obj); -- cgit v1.1-2-g2b99