ffi-efl 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/Changelog CHANGED
@@ -1,3 +1,13 @@
1
+ 2011-05-11 Jérémy Zurcher <jeremy@asynk.ch>
2
+ * use ditz ass issure tracker
3
+ * use FFI.attach_variable for EAPI extern ...
4
+ * Efl::EinaLog module and specs
5
+ * quick add classes : ElmWin, ElmInWIn, ElmBg, ElmLayout, ElmBox, ElmList, ElmIcon, ElmNotify, ElmDiskSelector, ElmPager
6
+ * REinaList has #to_a and #to_ary
7
+ * add ClassHelper #null? #to_a #to_ary #to_s
8
+ * rework REvasObject#initialize
9
+ * rework ClassHelper#method_missing
10
+
1
11
  2011-05-06 Jérémy Zurcher <jeremy@asynk.ch>
2
12
  * release 0.0.5
3
13
  * add REvasText class + specs
data/Rakefile CHANGED
@@ -44,7 +44,7 @@ PROJ.spec.opts << '--color'
44
44
  PROJ.rcov.opts << '-I lib'
45
45
  #
46
46
  # Dependencies
47
- depend_on 'ffi', '>=1.0.7'
47
+ depend_on 'ffi', '>=1.0.2'
48
48
  #
49
49
  task :default => [:spec]
50
50
  #
data/lib/efl/ecore.rb CHANGED
@@ -15,6 +15,10 @@ module Efl
15
15
  EVENT_SIGNAL_REALTIME = 5 # Realtime signal event
16
16
  EVENT_COUNT = 6
17
17
  #
18
+ def self.version
19
+ Native::VersionStruct.new(Native.ecore_version)
20
+ end
21
+ #
18
22
  class REcorePipe
19
23
  def initialize cb, data
20
24
  @ptr = FFI::AutoPointer.new Native.ecore_pipe_add(cb, data), REcorePipe.method(:release)
@@ -89,7 +89,7 @@ module Efl
89
89
  @ecore_getopt = nil
90
90
  @desc = desc
91
91
  @options = [
92
- [ 0, FFI::Pointer::NULL, FFI::Pointer::NULL, FFI::Pointer::NULL, 0, {:dummy=>FFI::Pointer::NULL} ]
92
+ [ 0 ],
93
93
  ]
94
94
  @values = [
95
95
  [ :ptrp, FFI::Pointer::NULL ]
@@ -120,6 +120,10 @@ module Efl
120
120
  @ecore_getopt[:strict] = @desc[:strict] if @desc.has_key? :strict
121
121
  @options.each_with_index do |o,i|
122
122
  d = @ecore_getopt.desc_ptr i
123
+ if o[0]==0
124
+ d[:shortname] = d[:longname] = d[:help] = d[:metavar] = d[:action] = d[:action_param][:dummy] = 0
125
+ break
126
+ end
123
127
  d[:shortname] = o[0].to_s.bytes.first
124
128
  d[:longname] = p_from_string o[1]
125
129
  d[:help] = p_from_string o[2]
@@ -228,12 +232,12 @@ module Efl
228
232
  self << [ short, long, help, FFI::Pointer::NULL, :ecore_getopt_action_count, [:dummy,FFI::Pointer::NULL] ]
229
233
  end
230
234
  def callback_full short, long, help, meta, cb, data, arg_req, def_val
231
- self << [ short, long, help, meta, :ecore_getopt_action_callback, [:callback, [cb, data, arg_req,def_val] ] ]
235
+ self << [ short, long, help, meta, :ecore_getopt_action_callback, [:callback, [cb, data, arg_req, def_val] ] ]
232
236
  end
233
- def callback_noargs short, long, help, cb, data
237
+ def callback_noargs short, long, help, cb, data=nil
234
238
  callback_full short, long, help, FFI::Pointer::NULL, cb, data, :ecore_getopt_desc_arg_requirement_no, FFI::Pointer::NULL
235
239
  end
236
- def callback_args short, long, help, meta, cb, data
240
+ def callback_args short, long, help, meta, cb, data=nil
237
241
  callback_full short, long, help, meta, cb, data, :ecore_getopt_desc_arg_requirement_yes, FFI::Pointer::NULL
238
242
  end
239
243
  def help short, long
data/lib/efl/edje.rb CHANGED
@@ -7,6 +7,10 @@ require 'efl/native/edje'
7
7
  module Efl
8
8
  #
9
9
  module Edje
10
+ #
11
+ def self.version
12
+ Native::VersionStruct.new(Native.edje_version)
13
+ end
10
14
  #
11
15
  class REdje < Efl::Evas::REvasObject
12
16
  #
data/lib/efl/eet.rb CHANGED
@@ -6,6 +6,10 @@ require 'efl/native/eet'
6
6
  module Efl
7
7
  #
8
8
  module Eet
9
+ #
10
+ def self.version
11
+ Native::VersionStruct.new(Native.eet_version)
12
+ end
9
13
  #
10
14
  class REetFile
11
15
  #
data/lib/efl/eina.rb CHANGED
@@ -7,6 +7,10 @@ module Efl
7
7
  #
8
8
  module Eina
9
9
  #
10
+ def self.version
11
+ Native::VersionStruct.new(Native.eina_version)
12
+ end
13
+ #
10
14
  end
11
15
  #
12
16
  end
data/lib/efl/eina_list.rb CHANGED
@@ -49,9 +49,10 @@ module Efl
49
49
  p = l[:next]
50
50
  end
51
51
  end
52
- def to_ary
52
+ def to_a
53
53
  inject([]) { |s,e| s<<e }
54
54
  end
55
+ alias :to_ary :to_a
55
56
  # for fun and tests
56
57
  def append p
57
58
  @ptr = Native.eina_list_append @ptr, p
@@ -0,0 +1,68 @@
1
+ #! /usr/bin/env ruby
2
+ # -*- coding: UTF-8 -*-
3
+ #
4
+ require 'efl/native/eina_log'
5
+ #
6
+ module Efl
7
+ #
8
+ module EinaLog
9
+ #
10
+ COLOR_LIGHTRED ="\033[31;1m"
11
+ COLOR_RED ="\033[31m"
12
+ COLOR_LIGHTBLUE ="\033[34;1m"
13
+ COLOR_BLUE ="\033[34m"
14
+ COLOR_GREEN ="\033[32;1m"
15
+ COLOR_YELLOW ="\033[33;1m"
16
+ COLOR_ORANGE ="\033[0;33m"
17
+ COLOR_WHITE ="\033[37;1m"
18
+ COLOR_LIGHTCYAN ="\033[36;1m"
19
+ COLOR_CYAN ="\033[36m"
20
+ COLOR_RESET ="\033[0m"
21
+ COLOR_HIGH ="\033[1m"
22
+ #
23
+ def self.log_dom_crit dom, lvl, msg
24
+ file, line, func = caller[1].split ':'
25
+ Native.eina_log_print dom, lvl, file, func, line.to_i, msg
26
+ end
27
+ def self.log_dom_crit dom, msg
28
+ self._log_dom dom, :eina_log_level_critical, msg
29
+ end
30
+ def self.log_dom_err dom, msg
31
+ self._log_dom dom, :eina_log_level_err, msg
32
+ end
33
+ def self.log_dom_info dom, msg
34
+ self._log_dom dom, :eina_log_level_info, msg
35
+ end
36
+ def self.log_dom_warn dom, msg
37
+ self._log_dom dom, :eina_log_level_warn, msg
38
+ end
39
+ def self.log_dom_dbg dom, msg
40
+ self._log_dom dom, :eina_log_level_dbg, msg
41
+ end
42
+ # should never be called directly
43
+ def self._log lvl, msg
44
+ file, line, func = caller[1].split ':'
45
+ Native.eina_log_print Native.EINA_LOG_DOMAIN_GLOBAL, lvl, file, func, line.to_i, msg
46
+ end
47
+ #
48
+ def self.log_crit msg
49
+ self._log :eina_log_level_critical, msg
50
+ end
51
+ def self.log_err msg
52
+ self._log :eina_log_level_err, msg
53
+ end
54
+ def self.log_info msg
55
+ self._log :eina_log_level_info, msg
56
+ end
57
+ def self.log_warn msg
58
+ self._log :eina_log_level_warn, msg
59
+ end
60
+ def self.log_dbg msg
61
+ self._log :eina_log_level_dbg, msg
62
+ end
63
+ #
64
+ end
65
+ #
66
+ end
67
+ #
68
+ # EOF
@@ -4,10 +4,12 @@
4
4
  require 'efl/evas'
5
5
  require 'efl/native/elementary'
6
6
  #
7
- Efl::Evas::REvasObject.search_prefixes << 'elm_' # append not prepend !
8
- #
9
7
  module Efl
10
8
  module Elm
9
+ #
10
+ def self.version
11
+ Native::VersionStruct.new(Native.elm_version)
12
+ end
11
13
  #
12
14
  class << self
13
15
  def init *args
@@ -21,22 +23,152 @@ module Efl
21
23
  end
22
24
  end
23
25
  #
24
- class ElmWin
25
- include Efl::ClassHelper
26
- search_prefixes 'elm_win_', 'elm_'
27
- def initialize parent, title, type=:elm_win_basic
28
- @evas_object = Evas::REvasObject.new Native.elm_win_add parent, title, type
29
- @ptr = @evas_object.to_ptr
30
- yield self,@evas_object if block_given?
31
- end
32
- def add e
33
- eo = Evas::REvasObject.new Native.send "elm_#{e}_add", @ptr
34
- yield eo if block_given?
35
- eo
26
+ class ElmWin < Efl::Evas::REvasObject
27
+ #
28
+ search_prefixes 'elm_win_', 'elm_object_'
29
+ #
30
+ def initialize parent, title, type=:elm_win_basic, &block
31
+ super Native.method(:elm_win_add), parent, title, type, &block
36
32
  end
37
33
  def smart_callback_add event_str, cb, data=FFI::MemoryPointer::NULL
38
34
  Native.evas_object_smart_callback_add @ptr, event_str, cb, data
39
35
  end
36
+ def inwin_add
37
+ ElmInWin.new @ptr
38
+ end
39
+ def screen_position_get
40
+ x = FFI::MemoryPointer.new :int
41
+ y = FFI::MemoryPointer.new :int
42
+ Native.elm_win_screen_position_get @ptr, x, y
43
+ [ x.read_int, y.read_int ]
44
+ end
45
+ alias :screen_position :screen_position_get
46
+ end
47
+ #
48
+ class ElmInWin < Efl::Evas::REvasObject
49
+ #
50
+ search_prefixes 'elm_win_inwin_', 'elm_win_', 'elm_object_'
51
+ #
52
+ def initialize parent, &block
53
+ super Native.method(:elm_win_inwin_add), parent, &block
54
+ end
55
+ end
56
+ #
57
+ class ElmBg < Efl::Evas::REvasObject
58
+ #
59
+ search_prefixes 'elm_bg_', 'elm_object_'
60
+ #
61
+ def initialize parent, &block
62
+ super Native.method(:elm_bg_add), parent, &block
63
+ end
64
+ def file_get
65
+ f = FFI::MemoryPointer.new :pointer
66
+ g = FFI::MemoryPointer.new :pointer
67
+ Native.elm_bg_file_get @ptr, f, g
68
+ [ f.read_pointer.read_string, g.read_pointer.read_string ]
69
+ end
70
+ alias :file :file_get
71
+ def color_get
72
+ r = FFI::MemoryPointer.new :int
73
+ g = FFI::MemoryPointer.new :int
74
+ b = FFI::MemoryPointer.new :int
75
+ Native.elm_bg_color_get @ptr, r, g, b
76
+ [ r.read_int, g.read_int, b.read_int ]
77
+ end
78
+ alias :color :color_get
79
+ end
80
+ #
81
+ class ElmLayout < Efl::Evas::REvasObject
82
+ #
83
+ search_prefixes 'elm_layout_', 'elm_object_'
84
+ #
85
+ def initialize parent, &block
86
+ super Native.method(:elm_layout_add), parent, &block
87
+ end
88
+ #
89
+ def edje_get &block
90
+ Efl::Edje::REdje.new Native.method(:elm_layout_edje_get), @ptr, &block
91
+ end
92
+ alias :edje :edje_get
93
+ end
94
+ #
95
+ class ElmBox < Efl::Evas::REvasObject
96
+ #
97
+ search_prefixes 'elm_box_', 'elm_object_'
98
+ #
99
+ def initialize parent, &block
100
+ super Native.method(:elm_box_add), parent, &block
101
+ end
102
+ #
103
+ end
104
+ #
105
+ class ElmList < Efl::Evas::REvasObject
106
+ #
107
+ search_prefixes 'elm_list_', 'elm_object_'
108
+ #
109
+ def initialize parent, &block
110
+ super Native.method(:elm_list_add), parent, &block
111
+ end
112
+ #
113
+ end
114
+ #
115
+ class ElmIcon < Efl::Evas::REvasObject
116
+ #
117
+ search_prefixes 'elm_icon_', 'elm_object_'
118
+ #
119
+ def initialize parent, &block
120
+ super Native.method(:elm_icon_add), parent, &block
121
+ end
122
+ #
123
+ def scale_set args
124
+ Native.elm_icon_scale_set @ptr, *args
125
+ end
126
+ alias :scale= :scale_set
127
+ end
128
+ #
129
+ class ElmLabel < Efl::Evas::REvasObject
130
+ #
131
+ search_prefixes 'elm_label_', 'elm_object_'
132
+ #
133
+ def initialize parent, &block
134
+ super Native.method(:elm_label_add), parent, &block
135
+ end
136
+ end
137
+ #
138
+ class ElmPager < Efl::Evas::REvasObject
139
+ #
140
+ search_prefixes 'elm_pager_', 'elm_object_'
141
+ #
142
+ def initialize parent, &block
143
+ super Native.method(:elm_pager_add), parent, &block
144
+ end
145
+ end
146
+ #
147
+ class ElmPanel < Efl::Evas::REvasObject
148
+ #
149
+ search_prefixes 'elm_panel_', 'elm_object'
150
+ #
151
+ def initialize parent, &block
152
+ super Native.method(:elm_panel_add), parent, &block
153
+ end
154
+ end
155
+ #
156
+ class ElmDiskSelector < Efl::Evas::REvasObject
157
+ #
158
+ search_prefixes 'elm_diskselector_', 'elm_object'
159
+ #
160
+ def initialize parent, &block
161
+ super Native.method(:elm_diskselector_add), parent, &block
162
+ end
163
+ end
164
+ #
165
+ class ElmNotify < Efl::Evas::REvasObject
166
+ #
167
+ search_prefixes 'elm_notify_', 'elm_object'
168
+ #
169
+ def initialize parent, &block
170
+ super Native.method(:elm_notify_add), parent, &block
171
+ end
40
172
  end
41
173
  #
42
174
  end
data/lib/efl/evas.rb CHANGED
@@ -45,6 +45,13 @@ module Efl
45
45
  EVAS_ENGINE_BUFFER_DEPTH_BGR24 = 3
46
46
  EVAS_ENGINE_BUFFER_DEPTH_RGB32 = 4
47
47
  #
48
+ EVAS_HINT_FILL = -1.0
49
+ EVAS_HINT_EXPAND = 1.0
50
+ #
51
+ def self.version
52
+ Native::VersionStruct.new(Native.evas_version)
53
+ end
54
+ #
48
55
  class REvas
49
56
  #
50
57
  include Efl::ClassHelper
@@ -125,17 +132,15 @@ module Efl
125
132
  include Efl::ClassHelper
126
133
  search_prefixes 'evas_object_', 'evas_'
127
134
  #
128
- def initialize *args
135
+ def initialize a, *args
129
136
  @ptr = (
130
- case args[0]
131
- when NilClass
132
- FFI::AutoPointer.new Native.evas_new, REvasObject.method(:release)
137
+ case a
133
138
  when FFI::Pointer
134
- args[0]
139
+ a
135
140
  when Method
136
- FFI::AutoPointer.new args[0].call(args[1]), REvasObject.method(:release)
141
+ FFI::AutoPointer.new a.call(*args), REvasObject.method(:release)
137
142
  else
138
- raise ArgumentError.new "wrong argument #{args[0].class.name}"
143
+ raise ArgumentError.new "wrong argument #{a.class.name}"
139
144
  end
140
145
  )
141
146
  yield self if block_given?
@@ -234,6 +239,10 @@ module Efl
234
239
  [ Native.enum_type(:evas_aspect_control)[a.read_int], w.read_int, h.read_int ]
235
240
  end
236
241
  alias :size_hint_aspect :size_hint_aspect_get
242
+ def size_hint_align_set_fill
243
+ Native.evas_object_size_hint_align_set @ptr, EVAS_HINT_FILL, EVAS_HINT_FILL
244
+ end
245
+ alias :size_hint_align_fill :size_hint_align_set_fill
237
246
  def size_hint_align_get
238
247
  w = FFI::MemoryPointer.new :double
239
248
  h = FFI::MemoryPointer.new :double
@@ -241,6 +250,10 @@ module Efl
241
250
  [ w.read_double, h.read_double ]
242
251
  end
243
252
  alias :size_hint_align :size_hint_align_get
253
+ def size_hint_weight_set_expand
254
+ Native.evas_object_size_hint_weight_set @ptr, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND
255
+ end
256
+ alias :size_hint_weight_expand :size_hint_weight_set_expand
244
257
  def size_hint_weight_get
245
258
  w = FFI::MemoryPointer.new :double
246
259
  h = FFI::MemoryPointer.new :double
data/lib/efl/ffi.rb CHANGED
@@ -4,6 +4,19 @@
4
4
  require 'ffi'
5
5
  #
6
6
  module Efl
7
+ #
8
+ module Native
9
+ class VersionStruct < FFI::Struct
10
+ layout :major, :int,
11
+ :minor, :int,
12
+ :micro, :int,
13
+ :revision, :int
14
+
15
+ def full
16
+ [:major,:minor,:micro,:revision].collect { |e| self[e].to_s }.join '.'
17
+ end
18
+ end
19
+ end
7
20
  #
8
21
  module FFIHelper
9
22
  #
@@ -68,8 +81,12 @@ module Efl
68
81
  end
69
82
  #
70
83
  module ClassHelper
84
+ def to_a; [self] end
85
+ def to_ary; [self] end
86
+ def to_s; Object.instance_method(:to_s).bind(self).call+' ['+self.to_ptr.to_s+']' end
71
87
  def to_ptr; @ptr; end
72
88
  def === o; @ptr === o.to_ptr; end
89
+ def null?; @ptr.null?; end
73
90
  def address; @ptr.address; end
74
91
  def self.included kls
75
92
  # create class instance @search_prefixes
@@ -95,7 +112,7 @@ module Efl
95
112
  else
96
113
  args_s = '*args'
97
114
  end
98
- self.class.search_prefixes.each do |p|
115
+ (['']+self.class.search_prefixes).each do |p|
99
116
  sym = p+m_s
100
117
  meth = (
101
118
  if Efl::Native.respond_to? sym
@@ -115,7 +132,6 @@ module Efl
115
132
  return self.send m, *args, &block
116
133
  end
117
134
  end
118
- return [self.to_s+' ['+self.to_ptr.to_s+']'] if m_s=~/^to_ary$/
119
135
  Kernel.raise NameError.new "#{self.class.name} is unable to resolve #{m} within #{self.class.search_prefixes.inspect}"
120
136
  end
121
137
  end
@@ -27,6 +27,7 @@ module Efl
27
27
  # TYPEDEFS
28
28
  # typedef struct _Ecore_Version Ecore_Version;
29
29
  typedef :pointer, :ecore_version
30
+ typedef :pointer, :ecore_version_p
30
31
  # typedef enum _Ecore_Fd_Handler_Flags Ecore_Fd_Handler_Flags;
31
32
  typedef :pointer, :ecore_fd_handler_flags
32
33
  # typedef enum _Ecore_Exe_Flags Ecore_Exe_Flags;
@@ -134,14 +135,20 @@ module Efl
134
135
  # typedef Eina_Bool (*Ecore_Win32_Handle_Cb) (void *data, Ecore_Win32_Handler *wh);
135
136
  callback :ecore_win32_handle_cb, [ :void_p, :ecore_win32_handler_p ], :eina_bool
136
137
  #
138
+ # VARIABLES
139
+ # EAPI extern Ecore_Version *ecore_version;
140
+ attach_variable :ecore_version, :ecore_version_p
141
+ # EAPI extern int ECORE_EXE_EVENT_ADD;
142
+ attach_variable :ECORE_EXE_EVENT_ADD, :int
143
+ # EAPI extern int ECORE_EXE_EVENT_DEL;
144
+ attach_variable :ECORE_EXE_EVENT_DEL, :int
145
+ # EAPI extern int ECORE_EXE_EVENT_DATA;
146
+ attach_variable :ECORE_EXE_EVENT_DATA, :int
147
+ # EAPI extern int ECORE_EXE_EVENT_ERROR;
148
+ attach_variable :ECORE_EXE_EVENT_ERROR, :int
149
+ #
137
150
  # FUNCTIONS
138
151
  fcts = [
139
- # EAPI extern Ecore_Version *ecore_version;
140
- # FIXME
141
- # EAPI extern int ECORE_EXE_EVENT_ADD; /**< A child process has been added */ EAPI extern int ECORE_EXE_EVENT_DEL; /**< A child process has been deleted (it exited, naming consistent with the rest of ecore). */
142
- # FIXME
143
- # EAPI extern int ECORE_EXE_EVENT_DATA; /**< Data from a child process. */ EAPI extern int ECORE_EXE_EVENT_ERROR; /**< Errors from a child process. */
144
- # FIXME
145
152
  # EAPI int ecore_init(void);
146
153
  [ :ecore_init, [ ], :int ],
147
154
  # EAPI int ecore_shutdown(void);
@@ -283,8 +290,7 @@ module Efl
283
290
  # EAPI Ecore_Thread *ecore_thread_run(Ecore_Thread_Cb func_blocking, Ecore_Thread_Cb func_end, Ecore_Thread_Cb func_cancel, const void *data);
284
291
  [ :ecore_thread_run, [ :ecore_thread_cb, :ecore_thread_cb, :ecore_thread_cb, :void_p ], :ecore_thread_p ],
285
292
  # EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy, Ecore_Thread_Notify_Cb func_notify, Ecore_Thread_Cb func_end, Ecore_Thread_Cb func_cancel, const void *data, Eina_Bool try_no_queue);
286
- [ :ecore_thread_feedback_run, [ :ecore_thread_cb, :ecore_thread_notify_cb, :ecore_thread_cb, :ecore_thread_cb, :void_p, :eina_bool ],
287
- :ecore_thread_p ],
293
+ [ :ecore_thread_feedback_run, [ :ecore_thread_cb, :ecore_thread_notify_cb, :ecore_thread_cb, :ecore_thread_cb, :void_p, :eina_bool ], :ecore_thread_p ],
288
294
  # EAPI Eina_Bool ecore_thread_cancel(Ecore_Thread *thread);
289
295
  [ :ecore_thread_cancel, [ :ecore_thread_p ], :eina_bool ],
290
296
  # EAPI Eina_Bool ecore_thread_check(Ecore_Thread *thread);
@@ -25,16 +25,15 @@ module Efl
25
25
  # ENUMS
26
26
  # typedef enum _Ecore_Evas_Engine_Type {...} Ecore_Evas_Engine_Type;
27
27
  enum :ecore_evas_engine_type, [ :ecore_evas_engine_software_buffer, :ecore_evas_engine_software_xlib, :ecore_evas_engine_xrender_x11,
28
- :ecore_evas_engine_opengl_x11, :ecore_evas_engine_software_xcb, :ecore_evas_engine_xrender_xcb, :ecore_evas_engine_software_gdi,
29
- :ecore_evas_engine_software_ddraw, :ecore_evas_engine_direct3d, :ecore_evas_engine_opengl_glew, :ecore_evas_engine_cocoa,
30
- :ecore_evas_engine_software_sdl, :ecore_evas_engine_directfb, :ecore_evas_engine_software_fb, :ecore_evas_engine_software_8_x11,
31
- :ecore_evas_engine_software_16_x11, :ecore_evas_engine_software_16_ddraw, :ecore_evas_engine_software_16_wince, :ecore_evas_engine_opengl_sdl ]
28
+ :ecore_evas_engine_opengl_x11, :ecore_evas_engine_software_xcb, :ecore_evas_engine_xrender_xcb, :ecore_evas_engine_software_gdi, :ecore_evas_engine_software_ddraw,
29
+ :ecore_evas_engine_direct3d, :ecore_evas_engine_opengl_glew, :ecore_evas_engine_cocoa, :ecore_evas_engine_software_sdl, :ecore_evas_engine_directfb,
30
+ :ecore_evas_engine_software_fb, :ecore_evas_engine_software_8_x11, :ecore_evas_engine_software_16_x11, :ecore_evas_engine_software_16_ddraw,
31
+ :ecore_evas_engine_software_16_wince, :ecore_evas_engine_opengl_sdl ]
32
32
  # typedef enum _Ecore_Evas_Avoid_Damage_Type {...} Ecore_Evas_Avoid_Damage_Type;
33
- enum :ecore_evas_avoid_damage_type, [ :ecore_evas_avoid_damage_none, 0, :ecore_evas_avoid_damage_expose, 1, :ecore_evas_avoid_damage_built_in,
34
- 2 ]
33
+ enum :ecore_evas_avoid_damage_type, [ :ecore_evas_avoid_damage_none, 0, :ecore_evas_avoid_damage_expose, 1, :ecore_evas_avoid_damage_built_in, 2 ]
35
34
  # typedef enum _Ecore_Evas_Object_Associate_Flags {...} Ecore_Evas_Object_Associate_Flags;
36
- enum :ecore_evas_object_associate_flags, [ :ecore_evas_object_associate_base, 0, :ecore_evas_object_associate_stack, 1,
37
- :ecore_evas_object_associate_layer, 1, :ecore_evas_object_associate_del, 1 ]
35
+ enum :ecore_evas_object_associate_flags, [ :ecore_evas_object_associate_base, 0, :ecore_evas_object_associate_stack, 1, :ecore_evas_object_associate_layer, 1,
36
+ :ecore_evas_object_associate_del, 1 ]
38
37
  #
39
38
  # TYPEDEFS
40
39
  # typedef unsigned int Ecore_X_Window;
@@ -56,6 +55,7 @@ module Efl
56
55
  # void (*func) (Ecore_Evas *ee)
57
56
  callback :ecore_evas_event_cb, [:ecore_evas_p], :void
58
57
  #
58
+ # VARIABLES
59
59
  #
60
60
  # FUNCTIONS
61
61
  fcts = [
@@ -179,8 +179,6 @@ module Efl
179
179
  [ :ecore_evas_software_wince_gdi_new, [ :ecore_wince_window_p, :int, :int, :int, :int ], :ecore_evas_p ],
180
180
  # EAPI Ecore_WinCE_Window *ecore_evas_software_wince_window_get(const Ecore_Evas *ee);
181
181
  [ :ecore_evas_software_wince_window_get, [ :ecore_evas_p ], :ecore_wince_window_p ],
182
- # EAPI Ecore_Evas *ecore_evas_cocoa_new(const char* name, int w, int h);
183
- [ :ecore_evas_cocoa_new, [ :string, :int, :int ], :ecore_evas_p ],
184
182
  # EAPI const char *ecore_evas_engine_name_get(const Ecore_Evas *ee);
185
183
  [ :ecore_evas_engine_name_get, [ :ecore_evas_p ], :string ],
186
184
  # EAPI Ecore_Evas *ecore_evas_ecore_evas_get(const Evas *e);
@@ -356,8 +354,7 @@ module Efl
356
354
  # EAPI Evas_Object *ecore_evas_object_associate_get(const Ecore_Evas *ee);
357
355
  [ :ecore_evas_object_associate_get, [ :ecore_evas_p ], :evas_object_p ],
358
356
  # EAPI unsigned char ecore_getopt_callback_ecore_evas_list_engines(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, const char *str, void *data, Ecore_Getopt_Value *storage);
359
- [ :ecore_getopt_callback_ecore_evas_list_engines, [ :ecore_getopt_p, :ecore_getopt_desc_p, :string, :void_p, :ecore_getopt_value_p ], :uchar
360
- ],
357
+ [ :ecore_getopt_callback_ecore_evas_list_engines, [ :ecore_getopt_p, :ecore_getopt_desc_p, :string, :void_p, :ecore_getopt_value_p ], :eina_bool ],
361
358
  # EAPI Eina_List *ecore_evas_ecore_evas_list_get(void);
362
359
  [ :ecore_evas_ecore_evas_list_get, [ ], :eina_list_p ],
363
360
  # EAPI void ecore_evas_x11_leader_set(Ecore_Evas *ee, Ecore_X_Window win);
@@ -379,6 +376,10 @@ module Efl
379
376
  # EAPI void ecore_evas_x11_shape_input_apply(Ecore_Evas *ee);
380
377
  [ :ecore_evas_x11_shape_input_apply, [ :ecore_evas_p ], :void ],
381
378
  ]
379
+ if RUBY_PLATFORM =~ /darwin/
380
+ # EAPI Ecore_Evas *ecore_evas_cocoa_new(const char* name, int w, int h);
381
+ fcts << [ :ecore_evas_cocoa_new, [ :string, :int, :int ], :ecore_evas_p ]
382
+ end
382
383
  #
383
384
  attach_fcts fcts
384
385
  #
@@ -24,12 +24,12 @@ module Efl
24
24
  #
25
25
  # ENUMS
26
26
  # typedef enum {...} Ecore_Getopt_Action;
27
- enum :ecore_getopt_action, [ :ecore_getopt_action_store, :ecore_getopt_action_store_const, :ecore_getopt_action_store_true,
28
- :ecore_getopt_action_store_false, :ecore_getopt_action_choice, :ecore_getopt_action_append, :ecore_getopt_action_count, :ecore_getopt_action_callback,
29
- :ecore_getopt_action_help, :ecore_getopt_action_version, :ecore_getopt_action_copyright, :ecore_getopt_action_license ]
27
+ enum :ecore_getopt_action, [ :ecore_getopt_action_store, :ecore_getopt_action_store_const, :ecore_getopt_action_store_true, :ecore_getopt_action_store_false,
28
+ :ecore_getopt_action_choice, :ecore_getopt_action_append, :ecore_getopt_action_count, :ecore_getopt_action_callback, :ecore_getopt_action_help,
29
+ :ecore_getopt_action_version, :ecore_getopt_action_copyright, :ecore_getopt_action_license ]
30
30
  # typedef enum {...} Ecore_Getopt_Type;
31
- enum :ecore_getopt_type, [ :ecore_getopt_type_str, :ecore_getopt_type_bool, :ecore_getopt_type_short, :ecore_getopt_type_int,
32
- :ecore_getopt_type_long, :ecore_getopt_type_ushort, :ecore_getopt_type_uint, :ecore_getopt_type_ulong, :ecore_getopt_type_double ]
31
+ enum :ecore_getopt_type, [ :ecore_getopt_type_str, :ecore_getopt_type_bool, :ecore_getopt_type_short, :ecore_getopt_type_int, :ecore_getopt_type_long,
32
+ :ecore_getopt_type_ushort, :ecore_getopt_type_uint, :ecore_getopt_type_ulong, :ecore_getopt_type_double ]
33
33
  # typedef enum {...} Ecore_Getopt_Desc_Arg_Requirement;
34
34
  enum :ecore_getopt_desc_arg_requirement, [ :ecore_getopt_desc_arg_requirement_no, 0, :ecore_getopt_desc_arg_requirement_yes, 1,
35
35
  :ecore_getopt_desc_arg_requirement_optional, 3 ]
@@ -51,6 +51,8 @@ module Efl
51
51
  #
52
52
  # CALLBACKS
53
53
  #
54
+ # VARIABLES
55
+ #
54
56
  # FUNCTIONS
55
57
  fcts = [
56
58
  # EAPI void ecore_getopt_help(FILE *fp, const Ecore_Getopt *info);
@@ -49,24 +49,26 @@ module Efl
49
49
  #
50
50
  # CALLBACKS
51
51
  #
52
- # FUNCTIONS
53
- fcts = [
52
+ # VARIABLES
54
53
  # EAPI extern int ECORE_EVENT_KEY_DOWN;
55
- # FIXME
54
+ attach_variable :ECORE_EVENT_KEY_DOWN, :int
56
55
  # EAPI extern int ECORE_EVENT_KEY_UP;
57
- # FIXME
56
+ attach_variable :ECORE_EVENT_KEY_UP, :int
58
57
  # EAPI extern int ECORE_EVENT_MOUSE_BUTTON_DOWN;
59
- # FIXME
58
+ attach_variable :ECORE_EVENT_MOUSE_BUTTON_DOWN, :int
60
59
  # EAPI extern int ECORE_EVENT_MOUSE_BUTTON_UP;
61
- # FIXME
60
+ attach_variable :ECORE_EVENT_MOUSE_BUTTON_UP, :int
62
61
  # EAPI extern int ECORE_EVENT_MOUSE_MOVE;
63
- # FIXME
62
+ attach_variable :ECORE_EVENT_MOUSE_MOVE, :int
64
63
  # EAPI extern int ECORE_EVENT_MOUSE_WHEEL;
65
- # FIXME
64
+ attach_variable :ECORE_EVENT_MOUSE_WHEEL, :int
66
65
  # EAPI extern int ECORE_EVENT_MOUSE_IN;
67
- # FIXME
66
+ attach_variable :ECORE_EVENT_MOUSE_IN, :int
68
67
  # EAPI extern int ECORE_EVENT_MOUSE_OUT;
69
- # FIXME
68
+ attach_variable :ECORE_EVENT_MOUSE_OUT, :int
69
+ #
70
+ # FUNCTIONS
71
+ fcts = [
70
72
  # EAPI int ecore_event_init(void);
71
73
  [ :ecore_event_init, [ ], :int ],
72
74
  # EAPI int ecore_event_shutdown(void);