From 34490f8ac5bd72e586c9f632a2cec9bf68ba5798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 7 Jun 2011 10:40:00 +0200 Subject: allow elementary classes to wrap pointers --- lib/efl/elementary.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/efl/elementary.rb b/lib/efl/elementary.rb index e71ac88..5c33a80 100644 --- a/lib/efl/elementary.rb +++ b/lib/efl/elementary.rb @@ -15,8 +15,12 @@ module Efl def self.included kls def kls.constructor meth self.class_eval <<-EOF - def initialize parent, &block - super Native.method(:#{meth}), parent, &block + def initialize ptr, &block + if ptr.is_a? FFI::Pointer + super ptr, &block + else + super Native.method(:#{meth}), ptr, &block + end end EOF end @@ -187,8 +191,6 @@ module Efl # class ElmDiskSelectorItem < Efl::Evas::REvasObject # -# include Helper -# constructor :elm_icon_add search_prefixes 'elm_diskselector_item_', 'elm_object' # def data_get @@ -231,8 +233,6 @@ module Efl # class ElmFlipSelectorItem < Efl::Evas::REvasObject # -# include Helper -# constructor :elm_icon_add search_prefixes 'elm_flipselector_item_', 'elm_object' # end -- cgit v1.1-2-g2b99