summaryrefslogtreecommitdiffstats
path: root/lib/efl/elm/elm_gengrid.rb
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/elm/elm_gengrid.rb
parentf5be08ea606ad373f3bab8e5a0f258b82a9cf11f (diff)
downloadffi-efl-bd3ae6b7e425dac8485e4dd2462b0c8fe145865a.zip
ffi-efl-bd3ae6b7e425dac8485e4dd2462b0c8fe145865a.tar.gz
parse elm_gengrid.h, generate elm_gengrid.rb
Diffstat (limited to 'lib/efl/elm/elm_gengrid.rb')
-rw-r--r--lib/efl/elm/elm_gengrid.rb79
1 files changed, 79 insertions, 0 deletions
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