summaryrefslogtreecommitdiffstats
path: root/lib/efl/elm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/efl/elm')
-rw-r--r--lib/efl/elm/elm_bg.rb37
-rw-r--r--lib/efl/elm/elm_box.rb42
-rw-r--r--lib/efl/elm/elm_bubble.rb22
-rw-r--r--lib/efl/elm/elm_button.rb22
-rw-r--r--lib/efl/elm/elm_calendar.rb22
-rw-r--r--lib/efl/elm/elm_check.rb22
-rw-r--r--lib/efl/elm/elm_clock.rb22
-rw-r--r--lib/efl/elm/elm_cursor.rb20
-rw-r--r--lib/efl/elm/elm_entry.rb22
-rw-r--r--lib/efl/elm/elm_frame.rb22
-rw-r--r--lib/efl/elm/elm_grid.rb22
-rw-r--r--lib/efl/elm/elm_icon.rb26
-rw-r--r--lib/efl/elm/elm_image.rb22
-rw-r--r--lib/efl/elm/elm_label.rb22
-rw-r--r--lib/efl/elm/elm_layout.rb26
-rw-r--r--lib/efl/elm/elm_list.rb54
-rw-r--r--lib/efl/elm/elm_menu.rb55
-rw-r--r--lib/efl/elm/elm_notify.rb22
-rw-r--r--lib/efl/elm/elm_object.rb68
-rw-r--r--lib/efl/elm/elm_object_item.rb20
-rw-r--r--lib/efl/elm/elm_panel.rb22
-rw-r--r--lib/efl/elm/elm_scroller.rb22
-rw-r--r--lib/efl/elm/elm_tooltip.rb20
-rw-r--r--lib/efl/elm/elm_win.rb33
24 files changed, 687 insertions, 0 deletions
diff --git a/lib/efl/elm/elm_bg.rb b/lib/efl/elm/elm_bg.rb
new file mode 100644
index 0000000..1eea4ce
--- /dev/null
+++ b/lib/efl/elm/elm_bg.rb
@@ -0,0 +1,37 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_bg'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmBg < ElmObject
+ #
+ include Helper
+ constructor :elm_bg_add
+ search_prefixes 'elm_bg_'
+ #
+ def file_get
+ f = FFI::MemoryPointer.new :pointer
+ g = FFI::MemoryPointer.new :pointer
+ Native.elm_bg_file_get @ptr, f, g
+ [ f.read_pointer.read_string, g.read_pointer.read_string ]
+ end
+ alias :file :file_get
+ def color_get
+ r = FFI::MemoryPointer.new :int
+ g = FFI::MemoryPointer.new :int
+ b = FFI::MemoryPointer.new :int
+ Native.elm_bg_color_get @ptr, r, g, b
+ [ r.read_int, g.read_int, b.read_int ]
+ end
+ alias :color :color_get
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_box.rb b/lib/efl/elm/elm_box.rb
new file mode 100644
index 0000000..b0539a2
--- /dev/null
+++ b/lib/efl/elm/elm_box.rb
@@ -0,0 +1,42 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_box'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmBox < ElmObject
+ #
+ include Helper
+ constructor :elm_box_add
+ search_prefixes 'elm_box_'
+ #
+ def padding_get
+ x = FFI::MemoryPointer.new :int
+ y = FFI::MemoryPointer.new :int
+ Native::elm_box_padding_get @ptr, x, y
+ [ x.read_int, y.read_int ]
+ end
+ alias :padding :padding_get
+ #
+ def align_get
+ x = FFI::MemoryPointer.new :float
+ y = FFI::MemoryPointer.new :float
+ Native::elm_box_align_get @ptr, x, y
+ [ x.read_float, y.read_float ]
+ end
+ alias :align :padding_get
+ #
+ def children_get
+ Efl::EinaList::REinaList.new Native.elm_box_children_get @ptr
+ end
+ alias :children :children_get
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_bubble.rb b/lib/efl/elm/elm_bubble.rb
new file mode 100644
index 0000000..ca5bbef
--- /dev/null
+++ b/lib/efl/elm/elm_bubble.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_bubble'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmBubble < ElmObject
+ #
+ include Helper
+ constructor :elm_bubble_add
+ search_prefixes 'elm_bubble_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_button.rb b/lib/efl/elm/elm_button.rb
new file mode 100644
index 0000000..dbf9c86
--- /dev/null
+++ b/lib/efl/elm/elm_button.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_button'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmButton < ElmObject
+ #
+ include Helper
+ constructor :elm_button_add
+ search_prefixes 'elm_button_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_calendar.rb b/lib/efl/elm/elm_calendar.rb
new file mode 100644
index 0000000..e8cf708
--- /dev/null
+++ b/lib/efl/elm/elm_calendar.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_calendar'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmCalendar < ElmObject
+ #
+ include Helper
+ constructor :elm_calendar_add
+ search_prefixes 'elm_calendar_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_check.rb b/lib/efl/elm/elm_check.rb
new file mode 100644
index 0000000..141890a
--- /dev/null
+++ b/lib/efl/elm/elm_check.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_check'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmCheck < ElmObject
+ #
+ include Helper
+ constructor :elm_check_add
+ search_prefixes 'elm_check_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_clock.rb b/lib/efl/elm/elm_clock.rb
new file mode 100644
index 0000000..4ebd02a
--- /dev/null
+++ b/lib/efl/elm/elm_clock.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_clock'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmClock < ElmObject
+ #
+ include Helper
+ constructor :elm_clock_add
+ search_prefixes 'elm_clock_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_cursor.rb b/lib/efl/elm/elm_cursor.rb
new file mode 100644
index 0000000..cfdd602
--- /dev/null
+++ b/lib/efl/elm/elm_cursor.rb
@@ -0,0 +1,20 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_cursor'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmCursor < ElmObject
+ #
+ search_prefixes 'elm_cursor_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_entry.rb b/lib/efl/elm/elm_entry.rb
new file mode 100644
index 0000000..0d2b287
--- /dev/null
+++ b/lib/efl/elm/elm_entry.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_entry'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmEntry < ElmObject
+ #
+ include Helper
+ constructor :elm_entry_add
+ search_prefixes 'elm_entry_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_frame.rb b/lib/efl/elm/elm_frame.rb
new file mode 100644
index 0000000..f1eb7a7
--- /dev/null
+++ b/lib/efl/elm/elm_frame.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_frame'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmFrame < ElmObject
+ #
+ include Helper
+ constructor :elm_frame_add
+ search_prefixes 'elm_frame_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_grid.rb b/lib/efl/elm/elm_grid.rb
new file mode 100644
index 0000000..9b00a35
--- /dev/null
+++ b/lib/efl/elm/elm_grid.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_grid'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmGrid < ElmObject
+ #
+ include Helper
+ constructor :elm_grid_add
+ search_prefixes 'elm_grid_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_icon.rb b/lib/efl/elm/elm_icon.rb
new file mode 100644
index 0000000..89a00ec
--- /dev/null
+++ b/lib/efl/elm/elm_icon.rb
@@ -0,0 +1,26 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_icon'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmIcon < ElmObject
+ #
+ include Helper
+ constructor :elm_icon_add
+ search_prefixes 'elm_icon_'
+ #
+ def scale_set args
+ Native.elm_icon_scale_set @ptr, *args
+ end
+ alias :scale= :scale_set
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_image.rb b/lib/efl/elm/elm_image.rb
new file mode 100644
index 0000000..6a37ee9
--- /dev/null
+++ b/lib/efl/elm/elm_image.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_image'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmImage < ElmObject
+ #
+ include Helper
+ constructor :elm_image_add
+ search_prefixes 'elm_image_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_label.rb b/lib/efl/elm/elm_label.rb
new file mode 100644
index 0000000..57460c4
--- /dev/null
+++ b/lib/efl/elm/elm_label.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_label'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmLabel < ElmObject
+ #
+ include Helper
+ constructor :elm_label_add
+ search_prefixes 'elm_label_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_layout.rb b/lib/efl/elm/elm_layout.rb
new file mode 100644
index 0000000..1eaeeef
--- /dev/null
+++ b/lib/efl/elm/elm_layout.rb
@@ -0,0 +1,26 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_layout'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmLayout < ElmObject
+ #
+ include Helper
+ constructor :elm_layout_add
+ search_prefixes 'elm_layout_'
+ #
+ def edje_get &block
+ Efl::Edje::REdje.new Native.method(:elm_layout_edje_get), @ptr, &block
+ end
+ alias :edje :edje_get
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_list.rb b/lib/efl/elm/elm_list.rb
new file mode 100644
index 0000000..dfdf7f9
--- /dev/null
+++ b/lib/efl/elm/elm_list.rb
@@ -0,0 +1,54 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/elm/elm_object_item'
+require 'efl/native/elm/elm_list'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmList < ElmObject
+ #
+ include Helper
+ constructor :elm_list_add
+ search_prefixes 'elm_list_'
+ #
+ def item_append label, left_icon=nil, right_icon=nil, cb=nil, data=nil
+ ElmObjectItem.new Native::elm_list_item_append @ptr, label, left_icon, right_icon, cb, data
+ end
+ #
+ def item_prepend label, left_icon=nil, right_icon=nil, cb=nil, data=nil
+ ElmObjectItem.new Native::elm_list_item_prepend @ptr, label, left_icon, right_icon, cb, data
+ end
+ #
+ def item_insert_before before, label, left_icon=nil, right_icon=nil, cb=nil, data=nil
+ ElmObjectItem.new Native::elm_list_item_insert_before @ptr, before, label, left_icon, right_icon, cb, data
+ end
+ #
+ def item_insert_after after, label, left_icon=nil, right_icon=nil, cb=nil, data=nil
+ ElmObjectItem.new Native::elm_list_item_insert_after @ptr, after, label, left_icon, right_icon, cb, data
+ end
+ #
+ def item_sorted_insert label, left_icon, right_icon, cb, data, cmp_fct
+ ElmObjectItem.new Native::elm_list_item_sorted_insert @ptr, label, left_icon, right_icon, cb, data, cmp_fct
+ end
+ #
+ def selected_item_get
+ ElmObjectItem.new Native::elm_list_selected_item_get @ptr
+ end
+ #
+ def item_prev
+ ElmObjectItem.new Native::elm_list_item_prev @ptr
+ end
+ #
+ def item_next
+ ElmObjectItem.new Native::elm_list_item_next @ptr
+ end
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_menu.rb b/lib/efl/elm/elm_menu.rb
new file mode 100644
index 0000000..f285011
--- /dev/null
+++ b/lib/efl/elm/elm_menu.rb
@@ -0,0 +1,55 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/elm/elm_object_item'
+require 'efl/native/elm/elm_menu'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmMenu < ElmObject
+ #
+ include Helper
+ constructor :elm_menu_add
+ search_prefixes 'elm_menu_'
+ #
+ def item_add parent, icon=nil, label=nil, cb=nil, data=nil
+ ElmObjectItem.new Native::elm_menu_item_add @ptr, parent, icon, label, cb, data
+ end
+ #
+ def item_add_object parent, subobj, cb=nil, data=nil
+ ElmObjectItem.new Native::elm_menu_item_add_object @ptr, parent, subobj, cb, data
+ end
+ #
+ def item_separator_add parent
+ ElmObjectItem.new Native::elm_menu_item_separator_add @ptr, parent
+ end
+ #
+ def selected_item_get
+ ElmObjectItem.new Native::elm_menu_selected_item_get @ptr
+ end
+ #
+ def last_item_get
+ ElmObjectItem.new Native::elm_menu_last_item_get @ptr
+ end
+ #
+ def first_item_get
+ ElmObjectItem.new Native::elm_menu_first_item_get @ptr
+ end
+ #
+ def item_next_get it
+ ElmObjectItem.new Native::elm_menu_item_next_get it
+ end
+ #
+ def item_prev_get it
+ ElmObjectItem.new Native::elm_menu_item_prev_get it
+ end
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_notify.rb b/lib/efl/elm/elm_notify.rb
new file mode 100644
index 0000000..c1b3d4c
--- /dev/null
+++ b/lib/efl/elm/elm_notify.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_notify'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmNotify < ElmObject
+ #
+ include Helper
+ constructor :elm_notify_add
+ search_prefixes 'elm_check_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_object.rb b/lib/efl/elm/elm_object.rb
new file mode 100644
index 0000000..f640da5
--- /dev/null
+++ b/lib/efl/elm/elm_object.rb
@@ -0,0 +1,68 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elementary'
+require 'efl/native/elm/elm_object'
+#
+module Efl
+ #
+ module Elm
+ #
+ module Helper
+ def self.included kls
+ def kls.constructor meth
+ self.class_eval <<-EOF
+ def initialize ptr, &block
+ if ptr.is_a? FFI::Pointer
+ super ptr, &block
+ else
+ super Native.method(:#{meth}), ptr, &block
+ end
+ end
+ EOF
+ end
+ end
+ end
+ #
+ class ElmObject < Efl::Evas::REvasObject
+ #
+ search_prefixes 'elm_object_'
+ #
+ def smart_callback_add event_str, cb, data=FFI::MemoryPointer::NULL
+ Native.evas_object_smart_callback_add @ptr, event_str, cb, data
+ end
+ #
+ def text_set label
+ Native.elm_object_part_text_set @ptr, nil, label
+ end
+ alias :text= :text_set
+ #
+ def text_get
+ Native.elm_object_part_text_get @ptr, nil
+ end
+ alias :text :text_get
+ #
+ def content_set content
+ Native.elm_object_part_content_set @ptr, nil, content
+ end
+ alias :content= :content_set
+ #
+ def content_get
+ Native.elm_object_part_content_get @ptr, nil
+ end
+ alias :content :content_get
+ #
+ def content_unset
+ Native.elm_object_part_content_unset @ptr, nil
+ end
+ #
+ def parent_widget_get
+ ElmObject.new Native.elm_object_parent_widget_get @ptr
+ end
+ alias :parent_widget :parent_widget_get
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_object_item.rb b/lib/efl/elm/elm_object_item.rb
new file mode 100644
index 0000000..eacedf0
--- /dev/null
+++ b/lib/efl/elm/elm_object_item.rb
@@ -0,0 +1,20 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_object_item'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmObjectItem < ElmObject
+ #
+ search_prefixes 'elm_object_item_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_panel.rb b/lib/efl/elm/elm_panel.rb
new file mode 100644
index 0000000..41dbcc5
--- /dev/null
+++ b/lib/efl/elm/elm_panel.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_panel'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmPanel < ElmObject
+ #
+ include Helper
+ constructor :elm_panel_add
+ search_prefixes 'elm_panel_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_scroller.rb b/lib/efl/elm/elm_scroller.rb
new file mode 100644
index 0000000..9cd855a
--- /dev/null
+++ b/lib/efl/elm/elm_scroller.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_scroller'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmScroller < ElmObject
+ #
+ include Helper
+ constructor :elm_scroller_add
+ search_prefixes 'elm_scroller_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_tooltip.rb b/lib/efl/elm/elm_tooltip.rb
new file mode 100644
index 0000000..3938586
--- /dev/null
+++ b/lib/efl/elm/elm_tooltip.rb
@@ -0,0 +1,20 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_tooltip'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmTooltip < ElmObject
+ #
+ search_prefixes 'elm_tooltip_', 'elm_object_tooltip_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_win.rb b/lib/efl/elm/elm_win.rb
new file mode 100644
index 0000000..daac677
--- /dev/null
+++ b/lib/efl/elm/elm_win.rb
@@ -0,0 +1,33 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_win'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmWin < ElmObject
+ #
+ search_prefixes 'elm_win_'
+ #
+ def initialize parent, title, type=:elm_win_basic, &block
+ super Native.method(:elm_win_add), parent, title, type, &block
+ end
+# def inwin_add
+# ElmInWin.new @ptr
+# end
+ def screen_position_get
+ x = FFI::MemoryPointer.new :int
+ y = FFI::MemoryPointer.new :int
+ Native.elm_win_screen_position_get @ptr, x, y
+ [ x.read_int, y.read_int ]
+ end
+ alias :screen_position :screen_position_get
+ end
+ #
+ end
+end
+#
+# EOF