diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-28 12:09:29 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-28 12:09:29 +0100 |
commit | 53579f8ec711675c2b304f9a616feac72fcaa0a9 (patch) | |
tree | 04132cf3e3b1305b815b2e71f5a0dfac7d4a2bd2 /lib/efl | |
parent | 29e9450a0771e668a2edd87e2287815c2981cab8 (diff) | |
download | ffi-efl-53579f8ec711675c2b304f9a616feac72fcaa0a9.zip ffi-efl-53579f8ec711675c2b304f9a616feac72fcaa0a9.tar.gz |
parse elm_index.h, generate elm_index.rb
Diffstat (limited to 'lib/efl')
-rw-r--r-- | lib/efl/elementary_all.rb | 2 | ||||
-rw-r--r-- | lib/efl/elm/elm_index.rb | 31 | ||||
-rw-r--r-- | lib/efl/native/elm/elm_index.rb | 63 |
3 files changed, 95 insertions, 1 deletions
diff --git a/lib/efl/elementary_all.rb b/lib/efl/elementary_all.rb index 09947d0..662a9e3 100644 --- a/lib/efl/elementary_all.rb +++ b/lib/efl/elementary_all.rb @@ -50,7 +50,7 @@ require 'efl/elm/elm_hover' require 'efl/elm/elm_hoversel' require 'efl/elm/elm_icon' require 'efl/elm/elm_image' -#require 'efl/elm/elm_index' +require 'efl/elm/elm_index' #require 'efl/elm/elm_intro' require 'efl/elm/elm_label' require 'efl/elm/elm_layout' diff --git a/lib/efl/elm/elm_index.rb b/lib/efl/elm/elm_index.rb new file mode 100644 index 0000000..c6ba981 --- /dev/null +++ b/lib/efl/elm/elm_index.rb @@ -0,0 +1,31 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/elm/elm_object_item' +require 'efl/native/elm/elm_index' +# +module Efl + # + module Elm + # + class ElmIndex < ElmObject + # + include Helper + constructor :elm_index_add + search_prefixes 'elm_index_' + # + def item_selected_get idx + ElmObjectItem.new Native::elm_index_item_selected_get @ptr, idx + end + # + def item_find item + ElmObjectItem.new Native::elm_index_item_find @ptr, item + end + # + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_index.rb b/lib/efl/native/elm/elm_index.rb new file mode 100644 index 0000000..b87d404 --- /dev/null +++ b/lib/efl/native/elm/elm_index.rb @@ -0,0 +1,63 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmIndex + # + FCT_PREFIX = 'elm_index_' 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_index_add(Evas_Object *parent); + [ :elm_index_add, [ :evas_object ], :evas_object ], + # EAPI void elm_index_active_set(Evas_Object *obj, Eina_Bool active); + [ :elm_index_active_set, [ :evas_object, :bool ], :void ], + # EAPI Eina_Bool elm_index_active_get(const Evas_Object *obj); + [ :elm_index_active_get, [ :evas_object ], :bool ], + # EAPI void elm_index_item_level_set(Evas_Object *obj, int level); + [ :elm_index_item_level_set, [ :evas_object, :int ], :void ], + # EAPI int elm_index_item_level_get(const Evas_Object *obj); + [ :elm_index_item_level_get, [ :evas_object ], :int ], + # EAPI Elm_Object_Item *elm_index_item_selected_get(const Evas_Object *obj, int level); + [ :elm_index_item_selected_get, [ :evas_object, :int ], :elm_object_item ], + # EAPI void elm_index_item_append(Evas_Object *obj, const char *letter, const void *item); + [ :elm_index_item_append, [ :evas_object, :string, :pointer ], :void ], + # EAPI void elm_index_item_prepend(Evas_Object *obj, const char *letter, const void *item); + [ :elm_index_item_prepend, [ :evas_object, :string, :pointer ], :void ], + # EAPI void elm_index_item_append_relative(Evas_Object *obj, const char *letter, const void *item, const Elm_Object_Item *relative); + [ :elm_index_item_append_relative, [ :evas_object, :string, :pointer, :elm_object_item ], :void ], + # EAPI void elm_index_item_prepend_relative(Evas_Object *obj, const char *letter, const void *item, const Elm_Object_Item *relative); + [ :elm_index_item_prepend_relative, [ :evas_object, :string, :pointer, :elm_object_item ], :void ], + # EAPI void elm_index_item_sorted_insert(Evas_Object *obj, const char *letter, const void *item, Eina_Compare_Cb cmp_func, Eina_Compare_Cb cmp_data_func); + [ :elm_index_item_sorted_insert, [ :evas_object, :string, :pointer, :eina_compare_cb, :eina_compare_cb ], :void ], + # EAPI Elm_Object_Item *elm_index_item_find(Evas_Object *obj, const void *item); + [ :elm_index_item_find, [ :evas_object, :pointer ], :elm_object_item ], + # EAPI void elm_index_item_clear(Evas_Object *obj); + [ :elm_index_item_clear, [ :evas_object ], :void ], + # EAPI void elm_index_item_go(Evas_Object *obj, int level); + [ :elm_index_item_go, [ :evas_object, :int ], :void ], + # EAPI const char *elm_index_item_letter_get(const Elm_Object_Item *item); + [ :elm_index_item_letter_get, [ :elm_object_item ], :string ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF |