summaryrefslogtreecommitdiffstats
path: root/lib/efl
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-02-28 16:18:51 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-02-28 16:18:51 +0100
commitbd3ae6b7e425dac8485e4dd2462b0c8fe145865a (patch)
tree14b32e45573078ea43f21975bc23051ce1374b34 /lib/efl
parentf5be08ea606ad373f3bab8e5a0f258b82a9cf11f (diff)
downloadffi-efl-bd3ae6b7e425dac8485e4dd2462b0c8fe145865a.zip
ffi-efl-bd3ae6b7e425dac8485e4dd2462b0c8fe145865a.tar.gz
parse elm_gengrid.h, generate elm_gengrid.rb
Diffstat (limited to 'lib/efl')
-rw-r--r--lib/efl/elementary_all.rb2
-rw-r--r--lib/efl/elm/elm_gengrid.rb79
-rw-r--r--lib/efl/native/elm/elm_gengrid.rb189
3 files changed, 269 insertions, 1 deletions
diff --git a/lib/efl/elementary_all.rb b/lib/efl/elementary_all.rb
index b321ff9..873160e 100644
--- a/lib/efl/elementary_all.rb
+++ b/lib/efl/elementary_all.rb
@@ -34,7 +34,7 @@ require 'efl/elm/elm_flip'
require 'efl/elm/elm_flipselector'
require 'efl/elm/elm_focus'
require 'efl/elm/elm_frame'
-#require 'efl/elm/elm_gengrid'
+require 'efl/elm/elm_gengrid'
require 'efl/elm/elm_genlist'
#require 'efl/elm/elm_gesture_layer'
#require 'efl/elm/elm_getting_started'
diff --git a/lib/efl/elm/elm_gengrid.rb b/lib/efl/elm/elm_gengrid.rb
new file mode 100644
index 0000000..15c6c40
--- /dev/null
+++ b/lib/efl/elm/elm_gengrid.rb
@@ -0,0 +1,79 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/elm/elm_object_item'
+require 'efl/native/elm/elm_gengrid'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmGenGrid < ElmObject
+ #
+ include Helper
+ constructor :elm_gengrid_add
+ search_prefixes 'elm_gengrid_'
+ #
+ def item_append itc, data, parent, flags, cb, cbdata
+ ElmObjectItem.new Native.elm_gengrid_item_append @ptr, itc, data, parent, flags, cb, cbdata
+ end
+ #
+ def item_prepend itc, data, parent, flags, cb, cbdata
+ ElmObjectItem.new Native.elm_gengrid_item_append @ptr, itc, data, parent, flags, cb, cbdata
+ end
+ #
+ def item_insert_before itc, data, parent, before, flags, cb, cbdata
+ ElmObjectItem.new Native.elm_gengrid_item_insert_before @ptr, itc, data, parent, before, flags, cb, cbdata
+ end
+ #
+ def item_insert_after itc, data, parent, before, flags, cb, cbdata
+ ElmObjectItem.new Native.elm_gengrid_item_insert_after @ptr, itc, data, parent, before, flags, cb, cbdata
+ end
+ #
+ def item_sorted_insert itc, data, parent, flags, cmp, cb, cbdata
+ ElmObjectItem.new Native.elm_gengrid_item_sorted_insert @ptr, itc, data, parent, flags, cmp, cb, cbdata
+ end
+ #
+ def selected_item_get
+ ElmObjectItem.new Native.elm_gengrid_selected_item_get @ptr
+ end
+ alias :selected_item :selected_item_get
+ #
+ def at_xy_item_get x, y
+ @ri0 ||= FFI::MemoryPointer.new :int
+ i = ElmObjectItem.new ElmObjectItem.new Native.elm_gengrid_first_item_get @ptr, x, y, @ri0
+ [ @ri0.read_int, i ]
+ end
+ #
+ def first_item_get
+ ElmObjectItem.new Native.elm_gengrid_first_item_get @ptr
+ end
+ alias :first_item :first_item_get
+ #
+ def last_item_get
+ ElmObjectItem.new Native.elm_gengrid_last_item_get @ptr
+ end
+ alias :last_item :last_item_get
+ #
+ def item_next_get it
+ ElmObjectItem.new Native.elm_gengrid_item_next_get it
+ end
+ alias :item_next :item_next_get
+ #
+ def item_prev_get it
+ ElmObjectItem.new Native.elm_gengrid_item_prev_get it
+ end
+ alias :item_prev :item_prev_get
+ #
+ def item_parent_get it
+ ElmObjectItem.new Native.elm_gengrid_item_parent_get it
+ end
+ alias :item_parent :item_parent_get
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/native/elm/elm_gengrid.rb b/lib/efl/native/elm/elm_gengrid.rb
new file mode 100644
index 0000000..250822e
--- /dev/null
+++ b/lib/efl/native/elm/elm_gengrid.rb
@@ -0,0 +1,189 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/native'
+require 'efl/native/elementary'
+#
+module Efl
+ #
+ module ElmGenGrid
+ #
+ FCT_PREFIX = 'elm_gengrid_' 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'
+ #
+ # TYPEDEFS
+ # typedef struct _Elm_Gengrid_Item_Class Elm_Gengrid_Item_Class;
+ typedef :pointer, :elm_gengrid_item_class
+ # typedef struct _Elm_Gengrid_Item_Class_Func Elm_Gengrid_Item_Class_Func;
+ typedef :pointer, :elm_gengrid_item_class_func
+ #
+ # CALLBACKS
+ # typedef char *(*Elm_Gengrid_Item_Text_Get_Cb) (void *data, Evas_Object *obj, const char *part);
+ callback :elm_gengrid_item_text_get_cb, [ :pointer, :evas_object, :string ], :string
+ # typedef Evas_Object *(*Elm_Gengrid_Item_Content_Get_Cb) (void *data, Evas_Object *obj, const char *part);
+ callback :elm_gengrid_item_content_get_cb, [ :pointer, :evas_object, :string ], :evas_object
+ # typedef Eina_Bool (*Elm_Gengrid_Item_State_Get_Cb) (void *data, Evas_Object *obj, const char *part);
+ callback :elm_gengrid_item_state_get_cb, [ :pointer, :evas_object, :string ], :bool
+ # typedef void (*Elm_Gengrid_Item_Del_Cb) (void *data, Evas_Object *obj);
+ callback :elm_gengrid_item_del_cb, [ :pointer, :evas_object ], :void
+ #
+ # FUNCTIONS
+ fcts = [
+ # EAPI Evas_Object *elm_gengrid_add(Evas_Object *parent);
+ [ :elm_gengrid_add, [ :evas_object ], :evas_object ],
+ # EAPI void elm_gengrid_item_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
+ [ :elm_gengrid_item_size_set, [ :evas_object, :int, :int ], :void ],
+ # EAPI void elm_gengrid_item_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
+ [ :elm_gengrid_item_size_get, [ :evas_object, :pointer, :pointer ], :void ],
+ # EAPI void elm_gengrid_group_item_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
+ [ :elm_gengrid_group_item_size_set, [ :evas_object, :int, :int ], :void ],
+ # EAPI void elm_gengrid_group_item_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
+ [ :elm_gengrid_group_item_size_get, [ :evas_object, :pointer, :pointer ], :void ],
+ # EAPI void elm_gengrid_align_set(Evas_Object *obj, double align_x, double align_y);
+ [ :elm_gengrid_align_set, [ :evas_object, :double, :double ], :void ],
+ # EAPI void elm_gengrid_align_get(const Evas_Object *obj, double *align_x, double *align_y);
+ [ :elm_gengrid_align_get, [ :evas_object, :pointer, :pointer ], :void ],
+ # EAPI void elm_gengrid_reorder_mode_set(Evas_Object *obj, Eina_Bool reorder_mode);
+ [ :elm_gengrid_reorder_mode_set, [ :evas_object, :bool ], :void ],
+ # EAPI Eina_Bool elm_gengrid_reorder_mode_get(const Evas_Object *obj);
+ [ :elm_gengrid_reorder_mode_get, [ :evas_object ], :bool ],
+ # EAPI Elm_Object_Item *elm_gengrid_item_append(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Evas_Smart_Cb func, const void *func_data);
+ [ :elm_gengrid_item_append, [ :evas_object, :elm_gengrid_item_class, :pointer, :evas_smart_cb, :pointer ], :elm_object_item ],
+ # EAPI Elm_Object_Item *elm_gengrid_item_prepend(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Evas_Smart_Cb func, const void *func_data);
+ [ :elm_gengrid_item_prepend, [ :evas_object, :elm_gengrid_item_class, :pointer, :evas_smart_cb, :pointer ], :elm_object_item ],
+ # EAPI Elm_Object_Item *elm_gengrid_item_insert_before(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Elm_Object_Item *relative, Evas_Smart_Cb func, const void *func_data);
+ [ :elm_gengrid_item_insert_before, [ :evas_object, :elm_gengrid_item_class, :pointer, :elm_object_item, :evas_smart_cb, :pointer ],
+ :elm_object_item ],
+ # EAPI Elm_Object_Item *elm_gengrid_item_insert_after(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Elm_Object_Item *relative, Evas_Smart_Cb func, const void *func_data);
+ [ :elm_gengrid_item_insert_after, [ :evas_object, :elm_gengrid_item_class, :pointer, :elm_object_item, :evas_smart_cb, :pointer ],
+ :elm_object_item ],
+ # EAPI Elm_Object_Item *elm_gengrid_item_sorted_insert(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
+ [ :elm_gengrid_item_sorted_insert, [ :evas_object, :elm_gengrid_item_class, :pointer, :eina_compare_cb, :evas_smart_cb, :pointer ],
+ :elm_object_item ],
+ # EAPI Elm_Object_Item *elm_gengrid_item_direct_sorted_insert(Evas_Object *obj, const Elm_Gengrid_Item_Class *gic, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data);
+ [ :elm_gengrid_item_direct_sorted_insert, [ :evas_object, :elm_gengrid_item_class, :pointer, :eina_compare_cb, :evas_smart_cb, :pointer ],
+ :elm_object_item ],
+ # EAPI void elm_gengrid_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select);
+ [ :elm_gengrid_always_select_mode_set, [ :evas_object, :bool ], :void ],
+ # EAPI Eina_Bool elm_gengrid_always_select_mode_get(const Evas_Object *obj);
+ [ :elm_gengrid_always_select_mode_get, [ :evas_object ], :bool ],
+ # EAPI void elm_gengrid_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select);
+ [ :elm_gengrid_no_select_mode_set, [ :evas_object, :bool ], :void ],
+ # EAPI Eina_Bool elm_gengrid_no_select_mode_get(const Evas_Object *obj);
+ [ :elm_gengrid_no_select_mode_get, [ :evas_object ], :bool ],
+ # EAPI void elm_gengrid_multi_select_set(Evas_Object *obj, Eina_Bool multi);
+ [ :elm_gengrid_multi_select_set, [ :evas_object, :bool ], :void ],
+ # EAPI Eina_Bool elm_gengrid_multi_select_get(const Evas_Object *obj);
+ [ :elm_gengrid_multi_select_get, [ :evas_object ], :bool ],
+ # EAPI void elm_gengrid_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
+ [ :elm_gengrid_bounce_set, [ :evas_object, :bool, :bool ], :void ],
+ # EAPI void elm_gengrid_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce);
+ [ :elm_gengrid_bounce_get, [ :evas_object, :pointer, :pointer ], :void ],
+ # EAPI void elm_gengrid_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel);
+ [ :elm_gengrid_page_relative_set, [ :evas_object, :double, :double ], :void ],
+ # EAPI void elm_gengrid_page_relative_get(const Evas_Object *obj, double *h_pagerel, double *v_pagerel);
+ [ :elm_gengrid_page_relative_get, [ :evas_object, :pointer, :pointer ], :void ],
+ # EAPI void elm_gengrid_page_size_set(Evas_Object *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize);
+ [ :elm_gengrid_page_size_set, [ :evas_object, :int, :int ], :void ],
+ # EAPI void elm_gengrid_current_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber);
+ [ :elm_gengrid_current_page_get, [ :evas_object, :pointer, :pointer ], :void ],
+ # EAPI void elm_gengrid_last_page_get(const Evas_Object *obj, int *h_pagenumber, int *v_pagenumber);
+ [ :elm_gengrid_last_page_get, [ :evas_object, :pointer, :pointer ], :void ],
+ # EAPI void elm_gengrid_page_show(const Evas_Object *obj, int h_pagenumber, int v_pagenumber);
+ [ :elm_gengrid_page_show, [ :evas_object, :int, :int ], :void ],
+ # EAPI void elm_gengrid_page_bring_in(const Evas_Object *obj, int h_pagenumber, int v_pagenumber);
+ [ :elm_gengrid_page_bring_in, [ :evas_object, :int, :int ], :void ],
+ # EAPI void elm_gengrid_horizontal_set(Evas_Object *obj, Eina_Bool setting);
+ [ :elm_gengrid_horizontal_set, [ :evas_object, :bool ], :void ],
+ # EAPI Eina_Bool elm_gengrid_horizontal_get(const Evas_Object *obj);
+ [ :elm_gengrid_horizontal_get, [ :evas_object ], :bool ],
+ # EAPI Elm_Object_Item *elm_gengrid_first_item_get(const Evas_Object *obj);
+ [ :elm_gengrid_first_item_get, [ :evas_object ], :elm_object_item ],
+ # EAPI Elm_Object_Item *elm_gengrid_last_item_get(const Evas_Object *obj);
+ [ :elm_gengrid_last_item_get, [ :evas_object ], :elm_object_item ],
+ # EAPI Elm_Object_Item *elm_gengrid_item_next_get(const Elm_Object_Item *it);
+ [ :elm_gengrid_item_next_get, [ :elm_object_item ], :elm_object_item ],
+ # EAPI Elm_Object_Item *elm_gengrid_item_prev_get(const Elm_Object_Item *it);
+ [ :elm_gengrid_item_prev_get, [ :elm_object_item ], :elm_object_item ],
+ # EAPI void elm_gengrid_item_update(Elm_Object_Item *it);
+ [ :elm_gengrid_item_update, [ :elm_object_item ], :void ],
+ # EAPI const Elm_Gengrid_Item_Class *elm_gengrid_item_item_class_get(const Elm_Object_Item *it);
+ [ :elm_gengrid_item_item_class_get, [ :elm_object_item ], :elm_gengrid_item_class ],
+ # EAPI void elm_gengrid_item_item_class_set(Elm_Object_Item *it, const Elm_Gengrid_Item_Class *gic);
+ [ :elm_gengrid_item_item_class_set, [ :elm_object_item, :elm_gengrid_item_class ], :void ],
+ # EAPI void elm_gengrid_item_pos_get(const Elm_Object_Item *it, unsigned int *x, unsigned int *y);
+ [ :elm_gengrid_item_pos_get, [ :elm_object_item, :pointer, :pointer ], :void ],
+ # EAPI void elm_gengrid_item_selected_set(Elm_Object_Item *it, Eina_Bool selected);
+ [ :elm_gengrid_item_selected_set, [ :elm_object_item, :bool ], :void ],
+ # EAPI Eina_Bool elm_gengrid_item_selected_get(const Elm_Object_Item *it);
+ [ :elm_gengrid_item_selected_get, [ :elm_object_item ], :bool ],
+ # EAPI const Evas_Object *elm_gengrid_item_object_get(const Elm_Object_Item *it);
+ [ :elm_gengrid_item_object_get, [ :elm_object_item ], :evas_object ],
+ # EAPI void elm_gengrid_item_show(Elm_Object_Item *it);
+ [ :elm_gengrid_item_show, [ :elm_object_item ], :void ],
+ # EAPI void elm_gengrid_item_bring_in(Elm_Object_Item *it);
+ [ :elm_gengrid_item_bring_in, [ :elm_object_item ], :void ],
+ # EAPI void elm_gengrid_item_tooltip_text_set(Elm_Object_Item *it, const char *text);
+ [ :elm_gengrid_item_tooltip_text_set, [ :elm_object_item, :string ], :void ],
+ # EAPI void elm_gengrid_item_tooltip_content_cb_set(Elm_Object_Item *it, Elm_Tooltip_Item_Content_Cb func, const void *data, Evas_Smart_Cb del_cb);
+ [ :elm_gengrid_item_tooltip_content_cb_set, [ :elm_object_item, :elm_tooltip_item_content_cb, :pointer, :evas_smart_cb ], :void ],
+ # EAPI void elm_gengrid_item_tooltip_unset(Elm_Object_Item *it);
+ [ :elm_gengrid_item_tooltip_unset, [ :elm_object_item ], :void ],
+ # EAPI void elm_gengrid_item_tooltip_style_set(Elm_Object_Item *it, const char *style);
+ [ :elm_gengrid_item_tooltip_style_set, [ :elm_object_item, :string ], :void ],
+ # EAPI const char *elm_gengrid_item_tooltip_style_get(const Elm_Object_Item *it);
+ [ :elm_gengrid_item_tooltip_style_get, [ :elm_object_item ], :string ],
+ # EAPI Eina_Bool elm_gengrid_item_tooltip_window_mode_set(Elm_Object_Item *it, Eina_Bool disable);
+ [ :elm_gengrid_item_tooltip_window_mode_set, [ :elm_object_item, :bool ], :bool ],
+ # EAPI Eina_Bool elm_gengrid_item_tooltip_window_mode_get(const Elm_Object_Item *it);
+ [ :elm_gengrid_item_tooltip_window_mode_get, [ :elm_object_item ], :bool ],
+ # EAPI void elm_gengrid_item_cursor_set(Elm_Object_Item *it, const char *cursor);
+ [ :elm_gengrid_item_cursor_set, [ :elm_object_item, :string ], :void ],
+ # EAPI const char *elm_gengrid_item_cursor_get(const Elm_Object_Item *it);
+ [ :elm_gengrid_item_cursor_get, [ :elm_object_item ], :string ],
+ # EAPI void elm_gengrid_item_cursor_unset(Elm_Object_Item *it);
+ [ :elm_gengrid_item_cursor_unset, [ :elm_object_item ], :void ],
+ # EAPI void elm_gengrid_item_cursor_style_set(Elm_Object_Item *it, const char *style);
+ [ :elm_gengrid_item_cursor_style_set, [ :elm_object_item, :string ], :void ],
+ # EAPI const char *elm_gengrid_item_cursor_style_get(const Elm_Object_Item *it);
+ [ :elm_gengrid_item_cursor_style_get, [ :elm_object_item ], :string ],
+ # EAPI void elm_gengrid_item_cursor_engine_only_set(Elm_Object_Item *it, Eina_Bool engine_only);
+ [ :elm_gengrid_item_cursor_engine_only_set, [ :elm_object_item, :bool ], :void ],
+ # EAPI Eina_Bool elm_gengrid_item_cursor_engine_only_get(const Elm_Object_Item *it);
+ [ :elm_gengrid_item_cursor_engine_only_get, [ :elm_object_item ], :bool ],
+ # EAPI void elm_gengrid_clear(Evas_Object *obj);
+ [ :elm_gengrid_clear, [ :evas_object ], :void ],
+ # EAPI Elm_Object_Item *elm_gengrid_selected_item_get(const Evas_Object *obj);
+ [ :elm_gengrid_selected_item_get, [ :evas_object ], :elm_object_item ],
+ # EAPI const Eina_List *elm_gengrid_selected_items_get(const Evas_Object *obj);
+ [ :elm_gengrid_selected_items_get, [ :evas_object ], :eina_list ],
+ # EAPI void elm_gengrid_filled_set(Evas_Object *obj, Eina_Bool fill);
+ [ :elm_gengrid_filled_set, [ :evas_object, :bool ], :void ],
+ # EAPI Eina_Bool elm_gengrid_filled_get(const Evas_Object *obj);
+ [ :elm_gengrid_filled_get, [ :evas_object ], :bool ],
+ # EAPI Elm_Gengrid_Item_Class *elm_gengrid_item_class_new(void);
+ [ :elm_gengrid_item_class_new, [ ], :elm_gengrid_item_class ],
+ # EAPI void elm_gengrid_item_class_free(Elm_Gengrid_Item_Class *itc);
+ [ :elm_gengrid_item_class_free, [ :elm_gengrid_item_class ], :void ],
+ # EAPI void elm_gengrid_item_class_ref(Elm_Gengrid_Item_Class *itc);
+ [ :elm_gengrid_item_class_ref, [ :elm_gengrid_item_class ], :void ],
+ # EAPI void elm_gengrid_item_class_unref(Elm_Gengrid_Item_Class *itc);
+ [ :elm_gengrid_item_class_unref, [ :elm_gengrid_item_class ], :void ],
+ ]
+ #
+ attach_fcts fcts
+ #
+ end
+end
+#
+# EOF