summaryrefslogtreecommitdiffstats
path: root/lib/efl/elm
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-03-07 00:48:20 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-03-07 00:48:20 +0100
commit82bfaab0b6487697b12c8544b6c70e72b4e4f7cf (patch)
treefb30f4ffe2c7b3f1c8a5c4a4b4ed02373649554d /lib/efl/elm
parent8c2f3d46390d2f44d2fcd58cd4f39ad621e6b3db (diff)
parent7d430af815626bb783f0eb435d7df549733958d2 (diff)
downloadffi-efl-82bfaab0b6487697b12c8544b6c70e72b4e4f7cf.zip
ffi-efl-82bfaab0b6487697b12c8544b6c70e72b4e4f7cf.tar.gz
Merge branch 'master' of asynk.ch:ffi-efl
Diffstat (limited to 'lib/efl/elm')
-rw-r--r--lib/efl/elm/elm_cnp.rb30
-rw-r--r--lib/efl/elm/elm_conform.rb26
-rw-r--r--lib/efl/elm/elm_factory.rb22
-rw-r--r--lib/efl/elm/elm_gesture_layer.rb22
-rw-r--r--lib/efl/elm/elm_glview.rb (renamed from lib/efl/elm/elm_pager.rb)8
-rw-r--r--lib/efl/elm/elm_segment_control.rb39
-rw-r--r--lib/efl/elm/elm_store.rb43
7 files changed, 186 insertions, 4 deletions
diff --git a/lib/efl/elm/elm_cnp.rb b/lib/efl/elm/elm_cnp.rb
new file mode 100644
index 0000000..9f8c3e8
--- /dev/null
+++ b/lib/efl/elm/elm_cnp.rb
@@ -0,0 +1,30 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_cnp'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmObject
+ #
+ def cnp_selection_set selection, format, buf, sizet
+ Native.elm_cnp_selection_set @ptr, selection, format, buf, sizet
+ end
+ #
+ def cnp_selection_get selection, format, datacb, data
+ Native.elm_cnp_selection_set @ptr, selection, format, datacb, data
+ end
+ #
+ def cnp_selection_clear selection
+ Native.elm_object_cnp_selection_clear @ptr, selection
+ end
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_conform.rb b/lib/efl/elm/elm_conform.rb
new file mode 100644
index 0000000..564ba3f
--- /dev/null
+++ b/lib/efl/elm/elm_conform.rb
@@ -0,0 +1,26 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_conform'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmConform < ElmObject
+ #
+ include Helper
+ constructor :elm_conformant_add
+ search_prefixes 'elm_conformant_'
+ #
+ def content_area_get
+ Evas::REvasObject.new Native.elm_conformant_content_area_get @ptr
+ end
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_factory.rb b/lib/efl/elm/elm_factory.rb
new file mode 100644
index 0000000..b8d60f6
--- /dev/null
+++ b/lib/efl/elm/elm_factory.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_factory'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmFactory < ElmObject
+ #
+ include Helper
+ constructor :elm_factory_add
+ search_prefixes 'elm_factory_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_gesture_layer.rb b/lib/efl/elm/elm_gesture_layer.rb
new file mode 100644
index 0000000..7b4c99d
--- /dev/null
+++ b/lib/efl/elm/elm_gesture_layer.rb
@@ -0,0 +1,22 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/native/elm/elm_gesture_layer'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmGestureLayer < ElmObject
+ #
+ include Helper
+ constructor :elm_gesture_layer_add
+ search_prefixes 'elm_gesture_layer_'
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_pager.rb b/lib/efl/elm/elm_glview.rb
index f11108d..542e5b8 100644
--- a/lib/efl/elm/elm_pager.rb
+++ b/lib/efl/elm/elm_glview.rb
@@ -2,17 +2,17 @@
# -*- coding: UTF-8 -*-
#
require 'efl/elm/elm_object'
-require 'efl/native/elm/elm_pager'
+require 'efl/native/elm/elm_glview'
#
module Efl
#
module Elm
#
- class ElmPager < ElmObject
+ class ElmGLView < ElmObject
#
include Helper
- constructor :elm_pager_add
- search_prefixes 'elm_pager_'
+ constructor :elm_glview_add
+ search_prefixes 'elm_glview_'
#
end
#
diff --git a/lib/efl/elm/elm_segment_control.rb b/lib/efl/elm/elm_segment_control.rb
new file mode 100644
index 0000000..f08f552
--- /dev/null
+++ b/lib/efl/elm/elm_segment_control.rb
@@ -0,0 +1,39 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/elm/elm_object'
+require 'efl/elm/elm_object_item'
+require 'efl/native/elm/elm_segment_control'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmCheck < ElmObject
+ #
+ include Helper
+ constructor :elm_segment_control_add
+ search_prefixes 'elm_segment_control_'
+ #
+ def item_add icon, label=nil
+ ElmObjectItem.new Native.elm_segment_control_item_add @ptr, icon, label
+ end
+ #
+ def item_insert_at icon, label, idx
+ ElmObjectItem.new Native.elm_segment_control_item_insert_at @ptr, icon, label, idx
+ end
+ #
+ def item_get idx
+ ElmObjectItem.new Native.elm_segment_control_item_get @ptr, idx
+ end
+ #
+ def item_selected_get
+ ElmObjectItem.new Native.elm_segment_control_item_selected_get @ptr
+ end
+ #
+ end
+ #
+ end
+end
+#
+# EOF
diff --git a/lib/efl/elm/elm_store.rb b/lib/efl/elm/elm_store.rb
new file mode 100644
index 0000000..625232a
--- /dev/null
+++ b/lib/efl/elm/elm_store.rb
@@ -0,0 +1,43 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl'
+require 'efl/native/elm/elm_store'
+#
+module Efl
+ #
+ module Elm
+ #
+ class ElmStore
+ #
+ include Efl::ClassHelper
+ search_prefixes 'elm_store_'
+ #
+ def initialize o=nil, &block
+ @ptr = (
+ case o
+ when NilClass
+ FFI::AutoPointer.new Native.elm_store_filesystem_new, ElmStore.method(:release)
+ when FFI::Pointer
+ o
+ else
+ raise ArgumentError.new "wrong argument #{o.class.name}"
+ end
+ )
+ instance_eval &block if block
+ end
+ def self.release p
+ Native.elm_store_free p
+ end
+ def free
+ @ptr.autorelease=false if @ptr.is_a? FFI::AutoPointer
+ ElmStore.release @ptr
+ @ptr=nil
+ end
+ #
+ end
+ #
+ end
+end
+#
+# EOF