summaryrefslogtreecommitdiffstats
path: root/lib/efl/ecore.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-04-20 15:24:11 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-04-20 15:24:11 +0200
commit9a7cd18cd11e0f435443c62fa68871768b98d248 (patch)
tree1e34d56e4f5ad7cd1908ab6155cbcd7fc60bdee5 /lib/efl/ecore.rb
parent5a5e81dbf79ca4967b150ea4930255a2398ccab4 (diff)
downloadffi-efl-9a7cd18cd11e0f435443c62fa68871768b98d248.zip
ffi-efl-9a7cd18cd11e0f435443c62fa68871768b98d248.tar.gz
ffi-e17 renamed to ffi-efl
Diffstat (limited to 'lib/efl/ecore.rb')
-rw-r--r--lib/efl/ecore.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/efl/ecore.rb b/lib/efl/ecore.rb
new file mode 100644
index 0000000..5a8597a
--- /dev/null
+++ b/lib/efl/ecore.rb
@@ -0,0 +1,34 @@
+#! /usr/bin/env ruby
+# -*- coding: UTF-8 -*-
+#
+require 'efl/ecore/ecore-ffi'
+#
+module Efl
+ module Ecore
+ #
+ # ecore-1/Ecore.h line 95
+ EVENT_NONE = 0
+ EVENT_SIGNAL_USER = 1 # User signal event
+ EVENT_SIGNAL_HUP = 2 # Hup signal event
+ EVENT_SIGNAL_EXIT = 3 # Exit signal event
+ EVENT_SIGNAL_POWER = 4 # Power signal event
+ EVENT_SIGNAL_REALTIME = 5 # Realtime signal event
+ EVENT_COUNT = 6
+ #
+ class EcorePipe
+ def initialize cb, data
+ @ptr = Efl::API.ecore_pipe_add cb, data
+ end
+ def del; Efl::API.ecore_pipe_del @ptr; end
+ def read_close; Efl::API.ecore_pipe_read_close @ptr; end
+ def write_close; Efl::API.ecore_pipe_write_close @ptr; end
+ def write data
+ Efl::API.ecore_pipe_write @ptr, FFI::MemoryPointer.from_string(data.to_s), data.to_s.length+1
+ end
+ #
+ end
+ #
+ end
+end
+#
+# EOF