summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/efl/ecore.rb4
-rw-r--r--lib/efl/edje.rb4
-rw-r--r--lib/efl/eet.rb4
-rw-r--r--lib/efl/eina.rb4
-rw-r--r--lib/efl/elementary.rb4
-rw-r--r--lib/efl/evas.rb4
-rw-r--r--lib/efl/ffi.rb13
-rw-r--r--lib/efl/native/eina_log.rb2
-rw-r--r--spec/ecore_spec.rb2
-rw-r--r--spec/edje_spec.rb2
-rw-r--r--spec/eet_spec.rb2
-rw-r--r--spec/eina_spec.rb2
-rw-r--r--spec/elm_spec.rb2
-rw-r--r--spec/evas_spec.rb2
-rwxr-xr-xtools/genruby.rb2
-rw-r--r--tools/sed-variables1
16 files changed, 46 insertions, 8 deletions
diff --git a/lib/efl/ecore.rb b/lib/efl/ecore.rb
index 0d1e2fd..5216763 100644
--- a/lib/efl/ecore.rb
+++ b/lib/efl/ecore.rb
@@ -15,6 +15,10 @@ module Efl
EVENT_SIGNAL_REALTIME = 5 # Realtime signal event
EVENT_COUNT = 6
#
+ def self.version
+ Native::VersionStruct.new(Native.ecore_version)
+ end
+ #
class REcorePipe
def initialize cb, data
@ptr = FFI::AutoPointer.new Native.ecore_pipe_add(cb, data), REcorePipe.method(:release)
diff --git a/lib/efl/edje.rb b/lib/efl/edje.rb
index d2b2e6b..521ac38 100644
--- a/lib/efl/edje.rb
+++ b/lib/efl/edje.rb
@@ -8,6 +8,10 @@ module Efl
#
module Edje
#
+ def self.version
+ Native::VersionStruct.new(Native.edje_version)
+ end
+ #
class REdje < Efl::Evas::REvasObject
#
search_prefixes 'edje_object_'
diff --git a/lib/efl/eet.rb b/lib/efl/eet.rb
index 4c000fe..00ab1c1 100644
--- a/lib/efl/eet.rb
+++ b/lib/efl/eet.rb
@@ -7,6 +7,10 @@ module Efl
#
module Eet
#
+ def self.version
+ Native::VersionStruct.new(Native.eet_version)
+ end
+ #
class REetFile
#
include Efl::ClassHelper
diff --git a/lib/efl/eina.rb b/lib/efl/eina.rb
index 8b4fdad..356d3b0 100644
--- a/lib/efl/eina.rb
+++ b/lib/efl/eina.rb
@@ -7,6 +7,10 @@ module Efl
#
module Eina
#
+ def self.version
+ Native::VersionStruct.new(Native.eina_version)
+ end
+ #
end
#
end
diff --git a/lib/efl/elementary.rb b/lib/efl/elementary.rb
index 7d90632..739dc17 100644
--- a/lib/efl/elementary.rb
+++ b/lib/efl/elementary.rb
@@ -7,6 +7,10 @@ require 'efl/native/elementary'
module Efl
module Elm
#
+ def self.version
+ Native::VersionStruct.new(Native.elm_version)
+ end
+ #
class << self
def init *args
a = args.select { |e| e.is_a? String }
diff --git a/lib/efl/evas.rb b/lib/efl/evas.rb
index e701ef8..7ce8dc0 100644
--- a/lib/efl/evas.rb
+++ b/lib/efl/evas.rb
@@ -48,6 +48,10 @@ module Efl
EVAS_HINT_FILL = -1.0
EVAS_HINT_EXPAND = 1.0
#
+ def self.version
+ Native::VersionStruct.new(Native.evas_version)
+ end
+ #
class REvas
#
include Efl::ClassHelper
diff --git a/lib/efl/ffi.rb b/lib/efl/ffi.rb
index e7eea39..c9f78d7 100644
--- a/lib/efl/ffi.rb
+++ b/lib/efl/ffi.rb
@@ -5,6 +5,19 @@ require 'ffi'
#
module Efl
#
+ module Native
+ class VersionStruct < FFI::Struct
+ layout :major, :int,
+ :minor, :int,
+ :micro, :int,
+ :revision, :int
+
+ def full
+ [:major,:minor,:micro,:revision].collect { |e| self[e].to_s }.join '.'
+ end
+ end
+ end
+ #
module FFIHelper
#
def attach_fcts fcts
diff --git a/lib/efl/native/eina_log.rb b/lib/efl/native/eina_log.rb
index 66c86de..dd32725 100644
--- a/lib/efl/native/eina_log.rb
+++ b/lib/efl/native/eina_log.rb
@@ -5,7 +5,7 @@ require 'efl/ffi'
#
module Efl
#
- module Eina
+ module EinaLog
#
def self.method_missing m, *args, &block
sym = 'eina_log_'+m.to_s
diff --git a/spec/ecore_spec.rb b/spec/ecore_spec.rb
index 0ab3d6c..ddc775e 100644
--- a/spec/ecore_spec.rb
+++ b/spec/ecore_spec.rb
@@ -3,7 +3,7 @@
#
require 'efl/ecore'
#
-describe Efl::Ecore do
+describe "Efl::Ecore #{Efl::Ecore.version.full}" do
#
before(:all) do
Ecore = Efl::Ecore
diff --git a/spec/edje_spec.rb b/spec/edje_spec.rb
index 90a1660..a1e851e 100644
--- a/spec/edje_spec.rb
+++ b/spec/edje_spec.rb
@@ -21,7 +21,7 @@ require 'efl/evas'
require 'efl/edje'
require './spec/helper'
#
-describe Efl::Edje do
+describe "Efl::Edje #{Efl::Edje.version.full}" do
#
before(:all) {
Edje = Efl::Edje
diff --git a/spec/eet_spec.rb b/spec/eet_spec.rb
index 57b869a..f332c9b 100644
--- a/spec/eet_spec.rb
+++ b/spec/eet_spec.rb
@@ -3,7 +3,7 @@
#
require 'efl/eet'
#
-describe Efl::Eet do
+describe "Efl::Eet #{Efl::Eet.version.full}" do
#
before(:all) {
Eet = Efl::Eet
diff --git a/spec/eina_spec.rb b/spec/eina_spec.rb
index 39f2944..d3db081 100644
--- a/spec/eina_spec.rb
+++ b/spec/eina_spec.rb
@@ -3,7 +3,7 @@
#
require 'efl/eina'
#
-describe Efl::Eina do
+describe "Efl::Eina #{Efl::Eina.version.full}" do
before(:all) {
@i = Efl::Eina.init
}
diff --git a/spec/elm_spec.rb b/spec/elm_spec.rb
index f40ec9c..3073e9b 100644
--- a/spec/elm_spec.rb
+++ b/spec/elm_spec.rb
@@ -4,7 +4,7 @@
require 'efl/elementary'
require './spec/helper'
#
-describe Efl::Elm do
+describe "Efl::Elm #{Efl::Elm.version.full}" do
#
before(:all) {
Elm = Efl::Elm
diff --git a/spec/evas_spec.rb b/spec/evas_spec.rb
index 4290053..9320711 100644
--- a/spec/evas_spec.rb
+++ b/spec/evas_spec.rb
@@ -6,7 +6,7 @@ require 'efl/ecore'
require 'efl/evas'
require './spec/helper'
#
-describe Efl::Evas do
+describe "Efl::Evas #{Efl::Evas.version.full}" do
#
before(:all) {
Evas = Efl::Evas
diff --git a/tools/genruby.rb b/tools/genruby.rb
index 5065a7d..c7fa66c 100755
--- a/tools/genruby.rb
+++ b/tools/genruby.rb
@@ -9,7 +9,7 @@ libraries = [
# HEADER MODUE NAME FCT PREFIX LIB OUTPUT
[ 'eina_types.h', 'Eina', 'eina', 'eina', 'eina_types.rb' ],
[ 'eina_main.h', 'Eina', 'eina', 'eina', 'eina.rb' ],
- [ 'eina_log.h', 'Eina', 'eina_log', 'eina', 'eina_log.rb' ],
+ [ 'eina_log.h', 'EinaLog', 'eina_log', 'eina', 'eina_log.rb' ],
[ 'eina_list.h', 'EinaList', 'eina_list', 'eina', 'eina_list.rb' ],
[ 'eina_hash.h', 'EinaHash', 'eina_hash', 'eina', 'eina_hash.rb' ],
[ 'Eet.h', 'Eet', 'eet', 'eet', 'eet.rb' ],
diff --git a/tools/sed-variables b/tools/sed-variables
new file mode 100644
index 0000000..3f11c67
--- /dev/null
+++ b/tools/sed-variables
@@ -0,0 +1 @@
+s/(EAPI\s+extern\s+\w+\s+\*?\w+\s*;).*$/\1/p