summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/efl/ecore.rb14
-rw-r--r--lib/efl/edje.rb14
-rw-r--r--lib/efl/eet.rb42
-rw-r--r--lib/efl/eina.rb14
-rw-r--r--lib/efl/evas.rb14
5 files changed, 28 insertions, 70 deletions
diff --git a/lib/efl/ecore.rb b/lib/efl/ecore.rb
index a3c2310..95f1d49 100644
--- a/lib/efl/ecore.rb
+++ b/lib/efl/ecore.rb
@@ -6,11 +6,6 @@ require 'ffi'
module EFL
module ECORE
#
- MAJOR = 0
- MINOR = 0
- REVISION = 1
- VERSION = [MAJOR,MINOR,REVISION].join '.'
- #
extend FFI::Library
#
ffi_lib 'ecore'
@@ -25,12 +20,9 @@ module EFL
end
end
#
- def self.init
- ecore_init
- end
- #
- def self.shutdown
- ecore_shutdown
+ class << self
+ alias init ecore_init
+ alias shutdown ecore_shutdown
end
#
end
diff --git a/lib/efl/edje.rb b/lib/efl/edje.rb
index 5dbaa88..278c0af 100644
--- a/lib/efl/edje.rb
+++ b/lib/efl/edje.rb
@@ -6,11 +6,6 @@ require 'ffi'
module EFL
module EDJE
#
- MAJOR = 0
- MINOR = 0
- REVISION = 1
- VERSION = [MAJOR,MINOR,REVISION].join '.'
- #
extend FFI::Library
#
ffi_lib 'edje'
@@ -25,12 +20,9 @@ module EFL
end
end
#
- def self.init
- edje_init
- end
- #
- def self.shutdown
- edje_shutdown
+ class << self
+ alias init edje_init
+ alias shutdown edje_shutdown
end
#
end
diff --git a/lib/efl/eet.rb b/lib/efl/eet.rb
index a7d29b3..5e93fd9 100644
--- a/lib/efl/eet.rb
+++ b/lib/efl/eet.rb
@@ -6,11 +6,6 @@ require 'ffi'
module EFL
module EET
#
- MAJOR = 0
- MINOR = 0
- REVISION = 1
- VERSION = [MAJOR,MINOR,REVISION].join '.'
- #
class Error < Exception
ERROR_NONE=0
ERROR_BAD_OBJECT=1
@@ -76,32 +71,27 @@ module EFL
end
end
#
- def self.init
- eet_init
- end
- #
- def self.shutdown
- eet_shutdown
- end
- #
- def self.clearcache
- eet_clearcache
- end
- #
FILE_MODE_INVALID = -1
FILE_MODE_READ = 0
FILE_MODE_WRITE = 1
FILE_MODE_READ_WRITE = 2
#
- def self.open path, mode=FILE_MODE_READ, &blk
- if blk
- f = eet_open path, mode
- raise Exception.new "Unable to open file #{path}" if f.nil?
- yield EETFile.new f
- eet_close f
- else
- f = eet_open path, mode
- return EETFile.new f unless f.nil?
+ class << self
+ #
+ alias init eet_init
+ alias shutdown eet_shutdown
+ alias clearcache eet_clearcache
+ #
+ def open path, mode=FILE_MODE_READ, &blk
+ if blk
+ f = eet_open path, mode
+ raise Exception.new "Unable to open file #{path}" if f.nil?
+ yield EETFile.new f
+ eet_close f
+ else
+ f = eet_open path, mode
+ return EETFile.new f unless f.nil?
+ end
end
end
#
diff --git a/lib/efl/eina.rb b/lib/efl/eina.rb
index 3feb912..d1b0f68 100644
--- a/lib/efl/eina.rb
+++ b/lib/efl/eina.rb
@@ -6,11 +6,6 @@ require 'ffi'
module EFL
module EINA
#
- MAJOR = 0
- MINOR = 0
- REVISION = 1
- VERSION = [MAJOR,MINOR,REVISION].join '.'
- #
extend FFI::Library
#
ffi_lib 'eina'
@@ -25,12 +20,9 @@ module EFL
end
end
#
- def self.init
- eina_init
- end
- #
- def self.shutdown
- eina_shutdown
+ class << self
+ alias init eina_init
+ alias shutdown eina_shutdown
end
#
end
diff --git a/lib/efl/evas.rb b/lib/efl/evas.rb
index 88426a7..ccb4af3 100644
--- a/lib/efl/evas.rb
+++ b/lib/efl/evas.rb
@@ -6,11 +6,6 @@ require 'ffi'
module EFL
module EVAS
#
- MAJOR = 0
- MINOR = 0
- REVISION = 1
- VERSION = [MAJOR,MINOR,REVISION].join '.'
- #
extend FFI::Library
#
ffi_lib 'evas'
@@ -25,12 +20,9 @@ module EFL
end
end
#
- def self.init
- evas_init
- end
- #
- def self.shutdown
- evas_shutdown
+ class << self
+ alias init evas_init
+ alias shutdown evas_shutdown
end
#
end