From bc37e7474ba44f4a258892793fb1cdc0694c90f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 28 Apr 2011 15:53:16 +0200 Subject: move #=== and #address from Evas to FFI::Helper --- lib/efl/evas.rb | 12 ------------ lib/efl/ffi.rb | 6 ++++++ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/lib/efl/evas.rb b/lib/efl/evas.rb index 6e75fb6..c4dcbb7 100644 --- a/lib/efl/evas.rb +++ b/lib/efl/evas.rb @@ -67,12 +67,6 @@ module Efl Efl::FFI.evas_free @ptr @ptr=nil end - def === o - @ptr === o.ptr - end - def address - @ptr.address - end def object_add t Efl::Evas::EvasObject.new Efl::FFI.send "evas_object_#{t}_add", @ptr end @@ -128,12 +122,6 @@ module Efl Efl::FFI.evas_object_del @ptr @ptr=nil end - def === o - @ptr === o.ptr - end - def address - @ptr.address - end def geometry_get x = ::FFI::MemoryPointer.new :int y = ::FFI::MemoryPointer.new :int diff --git a/lib/efl/ffi.rb b/lib/efl/ffi.rb index fc1a4d6..70ba4ef 100644 --- a/lib/efl/ffi.rb +++ b/lib/efl/ffi.rb @@ -49,6 +49,12 @@ module Efl m.class_eval "def self.func_prefixes; @func_prefixes; end" m.class_eval "def self.inherited sub; sub.class_eval 'def self.func_prefixes; superclass.func_prefixes; end'; end" end + def === o + @ptr === o.ptr + end + def address + @ptr.address + end def method_missing m, *args, &block if m =~/^(.*)=$/ m_s = $1+'_set' -- cgit v1.1-2-g2b99