diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-05-04 23:42:07 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-05-04 23:42:07 +0200 |
commit | e4baccaefd209a25daa3ff8d5277fe86aca1d379 (patch) | |
tree | eb2744b7a8624a7538cb0224d40879074c819653 /lib/efl/eet.rb | |
parent | 3974ea1fb3734cbf4150c759eebdf8a93d77dc8b (diff) | |
download | ffi-efl-seperate-natives.zip ffi-efl-seperate-natives.tar.gz |
FFI are in separate namespaces (Efl::Evas::Native), ruby classes are in upper level (Efl::Evas)seperate-natives
Diffstat (limited to 'lib/efl/eet.rb')
-rw-r--r-- | lib/efl/eet.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/efl/eet.rb b/lib/efl/eet.rb index f483fbf..037495c 100644 --- a/lib/efl/eet.rb +++ b/lib/efl/eet.rb @@ -1,7 +1,7 @@ #! /usr/bin/env ruby # -*- coding: UTF-8 -*- # -require 'efl/ffi/eet' +require 'efl/native/eet' # module Efl # @@ -10,7 +10,7 @@ module Efl class REetFile # include Efl::ClassHelper - proxy_list [Efl::Eet,'eet_'].freeze + proxy_list [Efl::Eet::Native,'eet_'].freeze # def initialize ptr @ptr=ptr @@ -18,7 +18,7 @@ module Efl private :initialize # def self.open path, mode=:eet_file_mode_read - p = Efl::Eet.eet_open path, mode + p = Native.eet_open path, mode raise Exception.new "Unable to open file #{path}" if p.nil? o = REetFile.new FFI::AutoPointer.new p, REetFile.method(:release) return o if not block_given? @@ -27,21 +27,21 @@ module Efl nil end def self.release p - Efl::Eet.eet_close f + Native.eet_close f end def close @ptr.autorelease=false - Efl::Eet.eet_close @ptr + Native.eet_close @ptr @ptr = nil end # def write key, data, compress=false - Efl::Eet.eet_write @ptr, key, data, data.bytesize, ( compress ? 1 : 0 ) + Native.eet_write @ptr, key, data, data.bytesize, ( compress ? 1 : 0 ) end # def read key ptr = FFI::MemoryPointer.new(:int) - data = Efl::Eet.eet_read @ptr, key, ptr + data = Native.eet_read @ptr, key, ptr s = ptr.read_int ptr.free return nil if s==0 |