diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-28 11:20:52 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-28 11:20:52 +0100 |
commit | 93d06a12fca5450e2ed161150f628bfcb3e40479 (patch) | |
tree | 4786cda52f0d6590808149d5a7eb57ea898f6a88 | |
parent | bbef3a090c6f5e2f4aafd8dbfb9a678c15dff8af (diff) | |
download | ffi-efl-93d06a12fca5450e2ed161150f628bfcb3e40479.zip ffi-efl-93d06a12fca5450e2ed161150f628bfcb3e40479.tar.gz |
parse elm_multibuttonentry.h, generate elm_multibuttonentry.rb
-rw-r--r-- | lib/efl/elementary_all.rb | 2 | ||||
-rw-r--r-- | lib/efl/elm/elm_multibuttonentry.rb | 58 | ||||
-rw-r--r-- | lib/efl/native/elm/elm_multibuttonentry.rb | 81 | ||||
-rwxr-xr-x | tools/genruby.rb | 2 |
4 files changed, 141 insertions, 2 deletions
diff --git a/lib/efl/elementary_all.rb b/lib/efl/elementary_all.rb index cfe3d5e..7bf1dce 100644 --- a/lib/efl/elementary_all.rb +++ b/lib/efl/elementary_all.rb @@ -59,7 +59,7 @@ require 'efl/elm/elm_list' #require 'efl/elm/elm_map' require 'efl/elm/elm_menu' #require 'efl/elm/elm_mirroring' -#require 'efl/elm/elm_multibuttonentry' +require 'efl/elm/elm_multibuttonentry' require 'efl/elm/elm_naviframe' #require 'efl/elm/elm_need' require 'efl/elm/elm_notify' diff --git a/lib/efl/elm/elm_multibuttonentry.rb b/lib/efl/elm/elm_multibuttonentry.rb new file mode 100644 index 0000000..b9b4ea2 --- /dev/null +++ b/lib/efl/elm/elm_multibuttonentry.rb @@ -0,0 +1,58 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/elm/elm_object' +require 'efl/elm/elm_object_item' +require 'efl/native/elm/elm_multibuttonentry' +# +module Efl + # + module Elm + # + class ElmMultiButtonEntry < ElmObject + # + include Helper + constructor :elm_multibuttonentry_add + search_prefixes 'elm_multibuttonentry_' + # + def item_prepend label, data=nil + ElmObjectItem.new Native::elm_multibuttonentry_item_prepend @ptr, label, data + end + # + def item_append label, data=nil + ElmObjectItem.new Native::elm_multibuttonentry_item_append @ptr, label, data + end + # + def item_insert_before before, label, data=nil + ElmObjectItem.new Native::elm_multibuttonentry_item_insert_before @ptr, before, label, data + end + # + def item_insert_after after, label, data=nil + ElmObjectItem.new Native::elm_multibuttonentry_item_insert_after @ptr, after, label, data + end + # + def first_item_get + ElmObjectItem.new Native::elm_multibuttonentry_first_item_get @ptr + end + # + def last_item_get + ElmObjectItem.new Native::elm_multibuttonentry_last_item_get @ptr + end + # + def selected_item_get + ElmObjectItem.new Native::elm_multibuttonentry_selected_item_get @ptr + end + # + def item_prev it + ElmObjectItem.new Native::elm_multibuttonentry_item_prev it + end + # + def item_next it + ElmObjectItem.new Native::elm_multibuttonentry_item_next it + end + end + # + end +end +# +# EOF diff --git a/lib/efl/native/elm/elm_multibuttonentry.rb b/lib/efl/native/elm/elm_multibuttonentry.rb new file mode 100644 index 0000000..39dbe5d --- /dev/null +++ b/lib/efl/native/elm/elm_multibuttonentry.rb @@ -0,0 +1,81 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native' +require 'efl/native/elementary' +# +module Efl + # + module ElmMultiButtonEntry + # + FCT_PREFIX = 'elm_multibuttonentry_' 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' + # + # CALLBACKS + # typedef Eina_Bool (*Elm_Multibuttonentry_Item_Filter_callback) (Evas_Object *obj, const char *item_label, void *item_data, void *data); + callback :elm_multibuttonentry_item_filter_callback_cb, [ :evas_object, :string, :pointer, :pointer ], :bool + # + # FUNCTIONS + fcts = [ + # EAPI Evas_Object *elm_multibuttonentry_add(Evas_Object *parent); + [ :elm_multibuttonentry_add, [ :evas_object ], :evas_object ], + # EAPI Evas_Object *elm_multibuttonentry_entry_get(const Evas_Object *obj); + [ :elm_multibuttonentry_entry_get, [ :evas_object ], :evas_object ], + # EAPI const char *elm_multibuttonentry_guide_text_get(const Evas_Object *obj); + [ :elm_multibuttonentry_guide_text_get, [ :evas_object ], :string ], + # EAPI void elm_multibuttonentry_guide_text_set(Evas_Object *obj, const char *guidetext); + [ :elm_multibuttonentry_guide_text_set, [ :evas_object, :string ], :void ], + # EAPI int elm_multibuttonentry_shrink_mode_get(const Evas_Object *obj); + [ :elm_multibuttonentry_shrink_mode_get, [ :evas_object ], :int ], + # EAPI void elm_multibuttonentry_shrink_mode_set(Evas_Object *obj, int shrink); + [ :elm_multibuttonentry_shrink_mode_set, [ :evas_object, :int ], :void ], + # EAPI Elm_Object_Item *elm_multibuttonentry_item_prepend(Evas_Object *obj, const char *label, void *data); + [ :elm_multibuttonentry_item_prepend, [ :evas_object, :string, :pointer ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_multibuttonentry_item_append(Evas_Object *obj, const char *label, void *data); + [ :elm_multibuttonentry_item_append, [ :evas_object, :string, :pointer ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_multibuttonentry_item_insert_before(Evas_Object *obj, Elm_Object_Item *before, const char *label, void *data); + [ :elm_multibuttonentry_item_insert_before, [ :evas_object, :elm_object_item, :string, :pointer ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_multibuttonentry_item_insert_after(Evas_Object *obj, Elm_Object_Item *after, const char *label, void *data); + [ :elm_multibuttonentry_item_insert_after, [ :evas_object, :elm_object_item, :string, :pointer ], :elm_object_item ], + # EAPI const Eina_List *elm_multibuttonentry_items_get(const Evas_Object *obj); + [ :elm_multibuttonentry_items_get, [ :evas_object ], :eina_list ], + # EAPI Elm_Object_Item *elm_multibuttonentry_first_item_get(const Evas_Object *obj); + [ :elm_multibuttonentry_first_item_get, [ :evas_object ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_multibuttonentry_last_item_get(const Evas_Object *obj); + [ :elm_multibuttonentry_last_item_get, [ :evas_object ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_multibuttonentry_selected_item_get(const Evas_Object *obj); + [ :elm_multibuttonentry_selected_item_get, [ :evas_object ], :elm_object_item ], + # EAPI void elm_multibuttonentry_item_select(Elm_Object_Item *it, Eina_Bool selected); + [ :elm_multibuttonentry_item_select, [ :elm_object_item, :bool ], :void ], + # EAPI void elm_multibuttonentry_item_unselect_all(Evas_Object *obj); + [ :elm_multibuttonentry_item_unselect_all, [ :evas_object ], :void ], + # EAPI void elm_multibuttonentry_clear(Evas_Object *obj); + [ :elm_multibuttonentry_clear, [ :evas_object ], :void ], + # EAPI Elm_Object_Item *elm_multibuttonentry_item_prev_get(const Elm_Object_Item *it); + [ :elm_multibuttonentry_item_prev_get, [ :elm_object_item ], :elm_object_item ], + # EAPI Elm_Object_Item *elm_multibuttonentry_item_next_get(const Elm_Object_Item *it); + [ :elm_multibuttonentry_item_next_get, [ :elm_object_item ], :elm_object_item ], + # EAPI void elm_multibuttonentry_item_filter_append(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_callback func, void *data); + [ :elm_multibuttonentry_item_filter_append, [ :evas_object, :elm_multibuttonentry_item_filter_callback_cb, :pointer ], :void ], + # EAPI void elm_multibuttonentry_item_filter_prepend(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_callback func, void *data); + [ :elm_multibuttonentry_item_filter_prepend, [ :evas_object, :elm_multibuttonentry_item_filter_callback_cb, :pointer ], :void ], + # EAPI void elm_multibuttonentry_item_filter_remove(Evas_Object *obj, Elm_Multibuttonentry_Item_Filter_callback func, void *data); + [ :elm_multibuttonentry_item_filter_remove, [ :evas_object, :elm_multibuttonentry_item_filter_callback_cb, :pointer ], :void ], + ] + # + attach_fcts fcts + # + end +end +# +# EOF diff --git a/tools/genruby.rb b/tools/genruby.rb index 7eb7efe..1042408 100755 --- a/tools/genruby.rb +++ b/tools/genruby.rb @@ -372,7 +372,7 @@ libs << elm_h('elc_fileselector_button.h', 'ElmFileSelectorButton') libs << elm_h('elc_fileselector_entry.h', 'ElmFileSelectorEntry') libs << elm_h('elc_fileselector.h', 'ElmFileSelector') libs << elm_h('elc_hoversel.h', 'ElmHoverSel', ["#{NATIVE}/elementary","#{NATIVE}/elm/elm_icon"]) -#libs << elm_h('elc_multibuttonentry.h', 'ElmX') +libs << elm_h('elc_multibuttonentry.h', 'ElmMultiButtonEntry') libs << elm_h('elc_naviframe.h', 'ElmNaviFrame') libs << elm_h('elm_actionslider.h', 'ElmActionSlider') #libs << elm_h('elm_app.h', 'ElmX') |