summaryrefslogtreecommitdiffstats
path: root/lib/e17/edje.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/e17/edje.rb')
-rw-r--r--lib/e17/edje.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/e17/edje.rb b/lib/e17/edje.rb
new file mode 100644
index 0000000..4abeb0b
--- /dev/null
+++ b/lib/e17/edje.rb
@@ -0,0 +1,31 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'ffi'
+#
+module E17
+ module EDJE
+ #
+ extend FFI::Library
+ #
+ ffi_lib 'edje'
+ [
+ [ :edje_init, [], :int],
+ [ :edje_shutdown, [], :int],
+ ].each do |func|
+ begin
+ attach_function *func
+ rescue Object => e
+ puts "Could not attach #{func} #{e.message}"
+ end
+ end
+ #
+ class << self
+ alias init edje_init
+ alias shutdown edje_shutdown
+ end
+ #
+ end
+end
+#
+# EOF