diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-27 12:35:14 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-02-27 12:35:14 +0100 |
commit | 63df15daae7a3b86478d635128e814149918bb09 (patch) | |
tree | e76fbea0f1b0432ec17c105310d9928e420dfa06 /lib/efl/elementary.rb | |
parent | 7603f4c0902bf5845c7e7654c3745f5519347c8b (diff) | |
download | ffi-efl-63df15daae7a3b86478d635128e814149918bb09.zip ffi-efl-63df15daae7a3b86478d635128e814149918bb09.tar.gz |
add elementary,elementary_all,elm/elm_bg,elm/elm_label,elm/elm_object,elm/elm_win
Diffstat (limited to 'lib/efl/elementary.rb')
-rw-r--r-- | lib/efl/elementary.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/efl/elementary.rb b/lib/efl/elementary.rb new file mode 100644 index 0000000..f1c1ec5 --- /dev/null +++ b/lib/efl/elementary.rb @@ -0,0 +1,30 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/evas' +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 } + a << __FILE__ if a.length==0 + ptr = FFI::MemoryPointer.new :pointer, a.length + a.each_with_index do |s,i| + ptr[i].write_pointer FFI::MemoryPointer.from_string(s) + end + Native.elm_init a.length, ptr + end + end + # + end +end +# +# EOF |