diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efl/ecore.rb | 4 | ||||
-rw-r--r-- | lib/efl/edje.rb | 4 | ||||
-rw-r--r-- | lib/efl/eet.rb | 4 | ||||
-rw-r--r-- | lib/efl/eina.rb | 4 | ||||
-rw-r--r-- | lib/efl/elementary.rb | 4 | ||||
-rw-r--r-- | lib/efl/evas.rb | 4 | ||||
-rw-r--r-- | lib/efl/ffi.rb | 13 | ||||
-rw-r--r-- | lib/efl/native/eina_log.rb | 2 |
8 files changed, 38 insertions, 1 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 |