diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-06-07 10:40:00 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-06-07 10:40:00 +0200 |
commit | 34490f8ac5bd72e586c9f632a2cec9bf68ba5798 (patch) | |
tree | 008267bf201f0577c6aed12fed3c8dd88deb4a90 /lib/efl/elementary.rb | |
parent | bf77dd78ff5136a30a54a1f0c7547d27f6570968 (diff) | |
download | ffi-efl-34490f8ac5bd72e586c9f632a2cec9bf68ba5798.zip ffi-efl-34490f8ac5bd72e586c9f632a2cec9bf68ba5798.tar.gz |
allow elementary classes to wrap pointers
Diffstat (limited to 'lib/efl/elementary.rb')
-rw-r--r-- | lib/efl/elementary.rb | 12 |
1 files 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 |