summaryrefslogtreecommitdiffstats
path: root/lib/efl/elementary.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/efl/elementary.rb')
-rw-r--r--lib/efl/elementary.rb30
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