summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-03-07 09:37:05 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-03-07 09:37:05 +0100
commit05c5bc859f299c50f281fd39accb852e6ed3ad47 (patch)
tree28237a33fe9bcdcdde43b02990bef95fa1998afb
parent933dba43784b4b86e479f4206edf0cccc1eaf7da (diff)
downloadffi-efl-05c5bc859f299c50f281fd39accb852e6ed3ad47.zip
ffi-efl-05c5bc859f299c50f281fd39accb852e6ed3ad47.tar.gz
add elm_popup
-rw-r--r--lib/efl/elm/elm_popup.rb26
-rw-r--r--lib/efl/native/elm/elm_popup.rb59
-rwxr-xr-xtools/extract-api.sh1
-rwxr-xr-xtools/genruby.rb1
4 files changed, 87 insertions, 0 deletions
diff --git a/lib/efl/elm/elm_popup.rb b/lib/efl/elm/elm_popup.rb
new file mode 100644
index 0000000..339789f
--- /dev/null
+++ b/lib/efl/elm/elm_popup.rb
@@ -0,0 +1,26 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/elm/elm_object_item'
+require 'efl/native/elm/elm_popup'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmPopup < ElmObject
+ #
+ include Helper
+ constructor :elm_popup_add
+ search_prefixes 'elm_popup_'
+ #
+ def item_append label, icon, func, data=nil
+ ElmObjectItem.new Native.elm_popup_item_append @ptr, label, icon, func, data
+ end
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/native/elm/elm_popup.rb b/lib/efl/native/elm/elm_popup.rb
new file mode 100644
index 0000000..39bd621
--- /dev/null
+++ b/lib/efl/native/elm/elm_popup.rb
@@ -0,0 +1,59 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/native'
+require 'efl/native/elementary'
+#
+module Efl
+ #
+ module ElmPopup
+ #
+ FCT_PREFIX = 'elm_popup_' 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'
+ #
+ # ENUMS
+ # typedef enum {...} Elm_Popup_Orient;
+ enum :elm_popup_orient, [ :elm_popup_orient_top, 0, :elm_popup_orient_center, 1, :elm_popup_orient_bottom, 2, :elm_popup_orient_left, 3,
+ :elm_popup_orient_right, 4, :elm_popup_orient_top_left, 5, :elm_popup_orient_top_right, 6, :elm_popup_orient_bottom_left, 7,
+ :elm_popup_orient_bottom_right, 8, :elm_popup_orient_last, 9 ]
+ #
+ # FUNCTIONS
+ fcts = [
+ # EAPI Evas_Object *elm_popup_add(Evas_Object *parent);
+ [ :elm_popup_add, [ :evas_object ], :evas_object ],
+ # EAPI Elm_Object_Item *elm_popup_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data);
+ [ :elm_popup_item_append, [ :evas_object, :string, :evas_object, :evas_smart_cb, :pointer ], :elm_object_item ],
+ # EAPI void elm_popup_content_text_wrap_type_set(Evas_Object *obj, Elm_Wrap_Type wrap);
+ [ :elm_popup_content_text_wrap_type_set, [ :evas_object, :elm_wrap_type ], :void ],
+ # EAPI Elm_Wrap_Type elm_popup_content_text_wrap_type_get(Evas_Object *obj);
+ [ :elm_popup_content_text_wrap_type_get, [ :evas_object ], :elm_wrap_type ],
+ # EAPI void elm_popup_orient_set(Evas_Object *obj, Elm_Popup_Orient orient);
+ [ :elm_popup_orient_set, [ :evas_object, :elm_popup_orient ], :void ],
+ # EAPI Elm_Popup_Orient elm_popup_orient_get(Evas_Object *obj);
+ [ :elm_popup_orient_get, [ :evas_object ], :elm_popup_orient ],
+ # EAPI void elm_popup_timeout_set(Evas_Object *obj, double timeout);
+ [ :elm_popup_timeout_set, [ :evas_object, :double ], :void ],
+ # EAPI double elm_popup_timeout_get(Evas_Object *obj);
+ [ :elm_popup_timeout_get, [ :evas_object ], :double ],
+ # EAPI void elm_popup_allow_events_set(Evas_Object *obj, Eina_Bool allow);
+ [ :elm_popup_allow_events_set, [ :evas_object, :bool ], :void ],
+ # EAPI Eina_Bool elm_popup_allow_events_get(Evas_Object *obj);
+ [ :elm_popup_allow_events_get, [ :evas_object ], :bool ],
+ ]
+ #
+ attach_fcts fcts
+ #
+ end
+end
+#
+# EOF
diff --git a/tools/extract-api.sh b/tools/extract-api.sh
index 895011a..294c600 100755
--- a/tools/extract-api.sh
+++ b/tools/extract-api.sh
@@ -55,6 +55,7 @@ for header in \
"${INCLUDE}/elementary-0/elc_hoversel.h" \
"${INCLUDE}/elementary-0/elc_multibuttonentry.h" \
"${INCLUDE}/elementary-0/elc_naviframe.h" \
+ "${INCLUDE}/elementary-0/elc_popup.h" \
"${INCLUDE}/elementary-0/elm_actionslider.h" \
"${INCLUDE}/elementary-0/elm_app.h" \
"${INCLUDE}/elementary-0/elm_authors.h" \
diff --git a/tools/genruby.rb b/tools/genruby.rb
index 938eef9..2be069b 100755
--- a/tools/genruby.rb
+++ b/tools/genruby.rb
@@ -373,6 +373,7 @@ 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', 'ElmMultiButtonEntry')
libs << elm_h('elc_naviframe.h', 'ElmNaviFrame')
+libs << elm_h('elc_popup.h', 'ElmPopup')
libs << elm_h('elm_actionslider.h', 'ElmActionSlider')
libs << elm_h('elm_app.h', 'ElmApp')
libs << elm_h('elm_bg.h', 'ElmBg')