ffi-efl 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/Changelog CHANGED
@@ -1,11 +1,22 @@
1
- 2011-05-XX Jérémy Zurcher <jeremy@asynk.ch>
1
+ 2011-05-06 Jérémy Zurcher <jeremy@asynk.ch>
2
+ * release 0.0.5
3
+ * add REvasText class + specs
4
+ * add REvasBox class + specs
5
+ * add EinaRectangleStruct
6
+ * add REvasPolygon#<<
7
+ * add REvasObject#center set/get/=
8
+ * update REvasObject#initialize
9
+ * bugfix REvasObject#free
10
+ * bugfix evas_spec and test_evas
11
+
12
+ 2011-05-05 Jérémy Zurcher <jeremy@asynk.ch>
2
13
  * release 0.0.4
3
14
  * ruby 1.8.7 compatible
4
15
  * FFI::AutoPointer usage fixed, constructors cleaned
5
16
  * module Efl::Native used for all FFI => require 'efl/native'
6
17
  * ClassHelper#method_missing enhanced
7
18
  * REinaList and REinaHash cleaned
8
- * EcoreEvas specs completed
19
+ * EcoreEvas specs completed
9
20
  * REvas and REvasObject spec completed
10
21
  * REvasRectanlge, REvasLine, EvasPolygon classes added
11
22
  * more test/*.rb
data/lib/efl.rb CHANGED
@@ -4,7 +4,7 @@
4
4
  #
5
5
  module Efl
6
6
  #
7
- VERSION = '0.0.4'
7
+ VERSION = '0.0.5'
8
8
  #
9
9
  autoload :EcoreEvas, './lib/efl/ecore_evas.rb'
10
10
  autoload :EcoreGetopt, './lib/efl/ecore_getopt.rb'
data/lib/efl/edje.rb CHANGED
@@ -11,6 +11,7 @@ module Efl
11
11
  class REdje < Efl::Evas::REvasObject
12
12
  #
13
13
  search_prefixes 'edje_object_'
14
+ #
14
15
  def part_object_get part
15
16
  # EAPI const Evas_Object *edje_object_part_object_get (const Evas_Object *obj, const char *part);
16
17
  Evas::RevasObject.new Native.edje_object_part_object_get @ptr, part
@@ -39,6 +40,16 @@ module Efl
39
40
  # EAPI Evas_Object *edje_object_part_table_child_get (Evas_Object *obj, const char *part, unsigned int col, unsigned int row);
40
41
  Evas::RevasObject.new Native.edje_object_part_table_child_get @ptr, part, col, row
41
42
  end
43
+ def file_get
44
+ f = FFI::MemoryPointer.new :pointer
45
+ g = FFI::MemoryPointer.new :pointer
46
+ Native.edje_object_file_get @ptr, f, g
47
+ [ f.read_pointer.read_string, g.read_pointer.read_string ]
48
+ end
49
+ def data_get k
50
+ Native.edje_object_data_get @ptr, k
51
+ end
52
+ alias :data :data_get
42
53
  end
43
54
  #
44
55
  end
data/lib/efl/eina_list.rb CHANGED
@@ -9,7 +9,7 @@ module Efl
9
9
  #
10
10
  class EinaListStruct < FFI::Struct
11
11
  layout :data, :pointer,
12
- :next, :pointer,
12
+ :next, :pointer,
13
13
  :prev, :pointer,
14
14
  :accounting, :pointer,
15
15
  :magic, :uint
@@ -0,0 +1,20 @@
1
+ #! /usr/bin/env ruby
2
+ # -*- coding: UTF-8 -*-
3
+ #
4
+ require 'ffi'
5
+ #
6
+ module Efl
7
+ #
8
+ module Native
9
+ #
10
+ class EinaRectangleStruct < FFI::Struct
11
+ layout :x, :int,
12
+ :y, :int,
13
+ :w, :int,
14
+ :h, :int
15
+ end
16
+ end
17
+ #
18
+ end
19
+ #
20
+ # EOF
data/lib/efl/evas.rb CHANGED
@@ -71,22 +71,20 @@ module Efl
71
71
  REvas.release @ptr
72
72
  @ptr=nil
73
73
  end
74
- def object_add t
75
- ts = t.to_s
76
- o = (
77
- case ts
78
- when 'rectangle'
79
- Evas::REvasRectangle.new Native.evas_object_rectangle_add @ptr
80
- when 'line'
81
- Evas::REvasLine.new Native.evas_object_line_add @ptr
82
- when 'polygon'
83
- Evas::REvasPolygon.new Native.evas_object_polygon_add @ptr
84
- else
85
- raise NameError.new "unknown or not implemented yet evas_object type #{ts}"
86
- end
87
- )
88
- yield o if block_given?
89
- o
74
+ def object_rectangle_add &block
75
+ REvasRectangle.new Native.method(:evas_object_rectangle_add), @ptr, &block
76
+ end
77
+ def object_line_add &block
78
+ Evas::REvasLine.new Native.method(:evas_object_line_add), @ptr, &block
79
+ end
80
+ def object_polygon_add &block
81
+ Evas::REvasPolygon.new Native.method(:evas_object_polygon_add), @ptr, &block
82
+ end
83
+ def object_text_add &block
84
+ Evas::REvasText.new Native.method(:evas_object_text_add), @ptr, &block
85
+ end
86
+ def object_box_add &block
87
+ Evas::REvasBox.new Native.method(:evas_object_box_add), @ptr, &block
90
88
  end
91
89
  def output_size_get
92
90
  x = FFI::MemoryPointer.new :int
@@ -127,15 +125,17 @@ module Efl
127
125
  include Efl::ClassHelper
128
126
  search_prefixes 'evas_object_', 'evas_'
129
127
  #
130
- def initialize o=nil
128
+ def initialize *args
131
129
  @ptr = (
132
- case o
130
+ case args[0]
133
131
  when NilClass
134
132
  FFI::AutoPointer.new Native.evas_new, REvasObject.method(:release)
135
133
  when FFI::Pointer
136
- o
134
+ args[0]
135
+ when Method
136
+ FFI::AutoPointer.new args[0].call(args[1]), REvasObject.method(:release)
137
137
  else
138
- raise ArgumentError.new "wrong argument #{o.class.name}"
138
+ raise ArgumentError.new "wrong argument #{args[0].class.name}"
139
139
  end
140
140
  )
141
141
  yield self if block_given?
@@ -144,10 +144,15 @@ module Efl
144
144
  Native.evas_object_del p unless p.nil?
145
145
  end
146
146
  def free
147
- @ptr.autopointer=false if @ptr.is_a? FFI::AutoPointer
147
+ @ptr.autorelease=false if @ptr.is_a? FFI::AutoPointer
148
148
  REvasObject.release @ptr
149
149
  @ptr=nil
150
150
  end
151
+ def object_box_add
152
+ o = Evas::REvasBox.new FFI::AutoPointer.new Native.evas_object_box_add_to(@ptr), REvasObject.method(:release)
153
+ yield o if block_given?
154
+ o
155
+ end
151
156
  def evas_name
152
157
  Native.evas_object_name_get @ptr
153
158
  end
@@ -163,6 +168,16 @@ module Efl
163
168
  [ x.read_int, y.read_int, w.read_int, h.read_int ]
164
169
  end
165
170
  alias :geometry :geometry_get
171
+ def center_get
172
+ g = geometry_get
173
+ [ g[0]+(g[2]/2.0), g[1]+(g[3]/2.0) ]
174
+ end
175
+ alias :center :center_get
176
+ def center_set x, y
177
+ g = geometry_get
178
+ move x-(g[2]/2.0), y-(g[3]/2.0)
179
+ end
180
+ alias :center= :center_set
166
181
  def size
167
182
  geometry_get[2..-1]
168
183
  end
@@ -251,6 +266,7 @@ module Efl
251
266
  end
252
267
  #
253
268
  class REvasRectangle < REvasObject
269
+ #
254
270
  end
255
271
  #
256
272
  class REvasLine < REvasObject
@@ -271,8 +287,111 @@ module Efl
271
287
  #
272
288
  search_prefixes 'evas_object_polygon_'
273
289
  #
290
+ def point_add *args
291
+ Native.evas_object_polygon_point_add @ptr, *args
292
+ end
293
+ alias :<< :point_add
274
294
  end
275
295
  #
296
+ class REvasText < REvasObject
297
+ #
298
+ search_prefixes 'evas_object_text_'
299
+ #
300
+ def font_get
301
+ f = FFI::MemoryPointer.new :string
302
+ s = FFI::MemoryPointer.new :int
303
+ Native.evas_object_text_font_get @ptr, f, s
304
+ [ f.read_pointer.read_string, s.read_int ]
305
+ end
306
+ alias :font :font_get
307
+ def char_pos_get pos
308
+ cx = FFI::MemoryPointer.new :int
309
+ cy = FFI::MemoryPointer.new :int
310
+ cw = FFI::MemoryPointer.new :int
311
+ ch = FFI::MemoryPointer.new :int
312
+ Native.evas_object_text_char_pos_get @ptr, pos, cx, cy, cw, ch
313
+ return [ cx.read_int, cy.read_int, cw.read_int, ch.read_int ]
314
+ end
315
+ alias :char_pos :char_pos_get
316
+ def char_coords_get x, y
317
+ cx = FFI::MemoryPointer.new :int
318
+ cy = FFI::MemoryPointer.new :int
319
+ cw = FFI::MemoryPointer.new :int
320
+ ch = FFI::MemoryPointer.new :int
321
+ r = Native.evas_object_text_char_coords_get @ptr, x, y, cx, cy, cw, ch
322
+ return [ r, cx.read_int, cy.read_int, cw.read_int, ch.read_int ]
323
+ end
324
+ alias :char_coords :char_coords_get
325
+ def style_pad_get
326
+ l = FFI::MemoryPointer.new :int
327
+ r = FFI::MemoryPointer.new :int
328
+ t = FFI::MemoryPointer.new :int
329
+ b = FFI::MemoryPointer.new :int
330
+ Native.evas_object_text_shadow_color_get @ptr, l, r, t, b
331
+ return [ l.read_int, r.read_int, t.read_int, b.read_int ]
332
+ end
333
+ alias :style_pad :style_pad_get
334
+ def shadow_color_get
335
+ r = FFI::MemoryPointer.new :int
336
+ g = FFI::MemoryPointer.new :int
337
+ b = FFI::MemoryPointer.new :int
338
+ a = FFI::MemoryPointer.new :int
339
+ Native.evas_object_text_shadow_color_get @ptr, r, g, b, a
340
+ return [ r.read_int, g.read_int, b.read_int, a.read_int ]
341
+ end
342
+ alias :shadow_color :shadow_color_get
343
+ def glow_color_get
344
+ r = FFI::MemoryPointer.new :int
345
+ g = FFI::MemoryPointer.new :int
346
+ b = FFI::MemoryPointer.new :int
347
+ a = FFI::MemoryPointer.new :int
348
+ Native.evas_object_text_glow_color_get @ptr, r, g, b, a
349
+ return [ r.read_int, g.read_int, b.read_int, a.read_int ]
350
+ end
351
+ alias :glow_color :glow_color_get
352
+ def glow2_color_get
353
+ r = FFI::MemoryPointer.new :int
354
+ g = FFI::MemoryPointer.new :int
355
+ b = FFI::MemoryPointer.new :int
356
+ a = FFI::MemoryPointer.new :int
357
+ Native.evas_object_text_glow2_color_get @ptr, r, g, b, a
358
+ return [ r.read_int, g.read_int, b.read_int, a.read_int ]
359
+ end
360
+ alias :glow2_color :glow2_color_get
361
+ def outline_color_get
362
+ r = FFI::MemoryPointer.new :int
363
+ g = FFI::MemoryPointer.new :int
364
+ b = FFI::MemoryPointer.new :int
365
+ a = FFI::MemoryPointer.new :int
366
+ Native.evas_object_text_outline_color_get @ptr, r, g, b, a
367
+ return [ r.read_int, g.read_int, b.read_int, a.read_int ]
368
+ end
369
+ alias :outline_color :outline_color_get
370
+ end
371
+ #
372
+ class REvasBox < REvasObject
373
+ #
374
+ search_prefixes 'evas_object_box_'
375
+ #
376
+ def children_get
377
+ EinaList::REinaList.new Native.evas_object_box_children_get @ptr
378
+ end
379
+ alias :children :children_get
380
+ def align_get
381
+ h = FFI::MemoryPointer.new :double
382
+ v = FFI::MemoryPointer.new :double
383
+ Native.evas_object_box_align_get @ptr, h, v
384
+ [ h.read_double, v.read_double ]
385
+ end
386
+ alias :align :align_get
387
+ def padding_get
388
+ h = FFI::MemoryPointer.new :int
389
+ v = FFI::MemoryPointer.new :int
390
+ Native.evas_object_box_padding_get @ptr, h, v
391
+ [ h.read_int, v.read_int ]
392
+ end
393
+ alias :padding :padding_get
394
+ end
276
395
  end
277
396
  end
278
397
  #
@@ -62,7 +62,7 @@ describe Efl::EcoreEvas do
62
62
  before(:each) do
63
63
  @e = EcoreEvas::REcoreEvas.new :engine_name=>"software_x11", :x=>10, :y=>10, :w=>100, :h=>120
64
64
  @canvas = @e.evas
65
- @bg = @canvas.object_add(:rectangle) { |o|
65
+ @bg = @canvas.object_rectangle_add { |o|
66
66
  o.color = 100, 100, 255, 255
67
67
  o.size = @e.size
68
68
  }
data/spec/edje_spec.rb CHANGED
@@ -1,14 +1,56 @@
1
1
  #! /usr/bin/env ruby
2
2
  # -*- coding: UTF-8 -*-
3
3
  #
4
+ EDC_FILE=File.join '/tmp','edje_spec.edc'
5
+ EDJE_FILE=File.join '/tmp','edje_spec.edj'
6
+ #
7
+ if __FILE__==$0
8
+ File.open(EDC_FILE,'w') do |f| f << DATA.read end
9
+ system "edje_cc #{EDC_FILE}"
10
+ exit File.exists?(EDJE_FILE)
11
+ else
12
+ describe "generate #{EDJE_FILE}" do
13
+ it "" do
14
+ system("ruby #{__FILE__}").should be_true
15
+ end
16
+ end
17
+ end
18
+ #
19
+ require 'efl/eina_list'
20
+ require 'efl/evas'
4
21
  require 'efl/edje'
5
22
  #
6
23
  describe Efl::Edje do
24
+ #
25
+ def realize_evas
26
+ width = 300
27
+ height = 200
28
+ @pixels = FFI::MemoryPointer.new :int, width*height
29
+ @e = Efl::Evas::REvas.new
30
+ @e.output_method_set Efl::Evas::render_method_lookup("buffer")
31
+ @e.output_viewport_set 0, 0, width, height
32
+ @e.output_size_set width, height
33
+ einfo = Efl::Native::EngineInfoBufferStruct.new @e.engine_info
34
+ einfo[:info][:depth_type] = Efl::Evas::EVAS_ENGINE_BUFFER_DEPTH_ARGB32
35
+ einfo[:info][:dest_buffer] = @pixels
36
+ einfo[:info][:dest_buffer_row_bytes] = width * FFI::type_size(:int);
37
+ einfo[:info][:use_color_key] = 0;
38
+ einfo[:info][:alpha_threshold] = 0;
39
+ einfo[:info][:func][:new_update_region] = nil #FFI::Pointer::NULL;
40
+ einfo[:info][:func][:free_update_region] = nil #FFI::Pointer::NULL;
41
+ @e.engine_info_set einfo
42
+ end
7
43
  #
8
44
  before(:all) { Edje = Efl::Edje }
9
45
  #
46
+ before(:each) {
47
+ Edje.init
48
+ }
49
+ after(:each) {
50
+ Edje.shutdown
51
+ }
52
+ #
10
53
  it "should init" do
11
- Edje.init.should == 1
12
54
  Edje.init.should == 2
13
55
  Edje.init.should == 3
14
56
  end
@@ -16,7 +58,304 @@ describe Efl::Edje do
16
58
  it "should shutdown" do
17
59
  Edje.shutdown.should == 2
18
60
  Edje.shutdown.should == 1
19
- Edje.shutdown.should == 0
20
61
  end
21
62
  #
63
+ it "frametime get/set should work" do
64
+ Edje.frametime_set 10
65
+ Edje.frametime_get.should == 10
66
+ end
67
+ #
68
+ it "freeze and thaw should run" do
69
+ # Edje.freeze
70
+ Edje.thaw
71
+ end
72
+ #
73
+ it "font_set_append should work" do
74
+ Edje.fontset_append_set "my font"
75
+ Edje.fontset_append_get.should == "my font"
76
+ end
77
+ #
78
+ it "scale get/set should work" do
79
+ Edje.scale_set 0.3
80
+ Edje.scale_get.should == 0.3
81
+ end
82
+ #
83
+ it "file_collection_list should work" do
84
+ l = Efl::EinaList::REinaList.new Edje.file_collection_list EDJE_FILE
85
+ l.to_ary.length.should > 0
86
+ Edje.file_collection_list_free l
87
+ end
88
+ #
89
+ it "file_group_exists should work" do
90
+ Edje.file_group_exists(EDJE_FILE, "my_group").should be_true
91
+ Edje.file_group_exists(EDJE_FILE, "my_grup").should be_false
92
+ end
93
+ #
94
+ it "file_data_get should work" do
95
+ Edje.file_data_get(EDJE_FILE, "key1").should == "val1"
96
+ Edje.file_data_get(EDJE_FILE, "key2").should == nil
97
+ end
98
+ #
99
+ it "file_cache get/set should work" do
100
+ Edje.file_cache_set 2
101
+ Edje.file_cache_get.should == 2
102
+ Edje.file_cache_flush
103
+ end
104
+ #
105
+ it "collection_cache get/set should work" do
106
+ Edje.collection_cache_set 6
107
+ Edje.collection_cache_get.should == 6
108
+ Edje.collection_cache_flush
109
+ end
110
+ #
111
+ # TODO edje_color_class*
112
+ # TODO edje_text_class*
113
+ #
114
+ describe Efl::Edje::REdje do
115
+ before(:all) do
116
+ Efl::Evas.init
117
+ Efl::Edje.init
118
+ realize_evas
119
+ @ed = @e.edje_object_add
120
+ @ed.file_set EDJE_FILE, "my_group"
121
+ @ed.move 0, 0
122
+ @ed.resize 300, 200
123
+ @ed.show
124
+ end
125
+ after(:all) do
126
+ @e.free
127
+ @pixels.free
128
+ Efl::Edje.shutdown
129
+ Efl::Evas.shutdown
130
+ end
131
+ #
132
+ it "scale get/set should work" do
133
+ @ed.scale_set 0.3
134
+ @ed.scale_get.should == 0.3
135
+ end
136
+ #
137
+ it "mirrored get/set should work" do
138
+ @ed.mirrored_set true
139
+ @ed.mirrored_get.should be_true
140
+ @ed.mirrored = false
141
+ @ed.mirrored.should be_false
142
+ @ed.mirrored?.should be_false
143
+ @ed.mirrored_get.should be_false
144
+ end
145
+ #
146
+ it "data_get hould work" do
147
+ @ed.data("key2").should == "val2"
148
+ @ed.data_get("key2").should == "val2"
149
+ @ed.data_get("key1").should == nil
150
+ end
151
+ #
152
+ it "file_get should work" do
153
+ @ed.file_get[0].should == EDJE_FILE
154
+ @ed.file_get[1].should == "my_group"
155
+ end
156
+ # EAPI void edje_extern_object_min_size_set (Evas_Object *obj, Evas_Coord minw, Evas_Coord minh);
157
+ # EAPI void edje_extern_object_max_size_set (Evas_Object *obj, Evas_Coord maxw, Evas_Coord maxh);
158
+ # EAPI void edje_extern_object_aspect_set (Evas_Object *obj, Edje_Aspect_Control aspect, Evas_Coord aw, Evas_Coord ah);
159
+ # EAPI void edje_box_layout_register (const char *name, Evas_Object_Box_Layout func, void *(*layout_data_get)(void *), void (*layout_data_free)(void *), void (*free_data)(void *), void *data);
160
+ # EAPI Edje_Load_Error edje_object_load_error_get (const Evas_Object *obj);
161
+ # EAPI const char *edje_load_error_str (Edje_Load_Error error);
162
+ # EAPI Eina_Bool edje_object_preload (Evas_Object *obj, Eina_Bool cancel);
163
+ # EAPI void edje_object_signal_callback_add (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data);
164
+ # EAPI void *edje_object_signal_callback_del (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func);
165
+ # EAPI void *edje_object_signal_callback_del_full(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data);
166
+ # EAPI void edje_object_signal_emit (Evas_Object *obj, const char *emission, const char *source);
167
+ # EAPI void edje_object_play_set (Evas_Object *obj, Eina_Bool play);
168
+ # EAPI Eina_Bool edje_object_play_get (const Evas_Object *obj);
169
+ # EAPI void edje_object_animation_set (Evas_Object *obj, Eina_Bool on);
170
+ # EAPI Eina_Bool edje_object_animation_get (const Evas_Object *obj);
171
+ # EAPI int edje_object_freeze (Evas_Object *obj);
172
+ # EAPI int edje_object_thaw (Evas_Object *obj);
173
+ # EAPI Eina_Bool edje_object_color_class_set (Evas_Object *obj, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3);
174
+ # EAPI Eina_Bool edje_object_color_class_get (const Evas_Object *o, const char *color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3);
175
+ # EAPI void edje_object_color_class_del (Evas_Object *obj, const char *color_class);
176
+ # EAPI Eina_Bool edje_object_text_class_set (Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size);
177
+ # EAPI void edje_object_size_min_get (const Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
178
+ # EAPI void edje_object_size_max_get (const Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh);
179
+ # EAPI void edje_object_calc_force (Evas_Object *obj);
180
+ # EAPI void edje_object_size_min_calc (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
181
+ # EAPI Eina_Bool edje_object_parts_extends_calc (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
182
+ # EAPI void edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord restrictedh);
183
+ # EAPI Eina_Bool edje_object_part_exists (const Evas_Object *obj, const char *part);
184
+ # EAPI const Evas_Object *edje_object_part_object_get (const Evas_Object *obj, const char *part);
185
+ # EAPI Eina_Bool edje_object_part_geometry_get (const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
186
+ # EAPI void edje_object_item_provider_set (Evas_Object *obj, Edje_Item_Provider_Cb func, void *data);
187
+ # EAPI void edje_object_text_change_cb_set (Evas_Object *obj, Edje_Text_Change_Cb func, void *data);
188
+ # EAPI Eina_Bool edje_object_part_text_set (Evas_Object *obj, const char *part, const char *text);
189
+ # EAPI const char *edje_object_part_text_get (const Evas_Object *obj, const char *part);
190
+ # EAPI Eina_Bool edje_object_part_text_unescaped_set (Evas_Object *obj, const char *part, const char *text_to_escape);
191
+ # EAPI char *edje_object_part_text_unescaped_get (const Evas_Object *obj, const char *part);
192
+ # EAPI const char *edje_object_part_text_selection_get (const Evas_Object *obj, const char *part);
193
+ # EAPI void edje_object_part_text_select_none (const Evas_Object *obj, const char *part);
194
+ # EAPI void edje_object_part_text_select_all (const Evas_Object *obj, const char *part);
195
+ # EAPI void edje_object_part_text_insert (Evas_Object *obj, const char *part, const char *text);
196
+ # EAPI const Eina_List *edje_object_part_text_anchor_list_get (const Evas_Object *obj, const char *part);
197
+ # EAPI const Eina_List *edje_object_part_text_anchor_geometry_get (const Evas_Object *obj, const char *part, const char *anchor);
198
+ # EAPI const Eina_List *edje_object_part_text_item_list_get (const Evas_Object *obj, const char *part);
199
+ # EAPI Eina_Bool edje_object_part_text_item_geometry_get (const Evas_Object *obj, const char *part, const char *item, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
200
+ # EAPI void edje_object_part_text_cursor_geometry_get (const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
201
+ # EAPI void edje_object_part_text_select_allow_set (const Evas_Object *obj, const char *part, Eina_Bool allow);
202
+ # EAPI void edje_object_part_text_select_abort (const Evas_Object *obj, const char *part);
203
+ # EAPI void edje_object_part_text_select_begin (const Evas_Object *obj, const char *part);
204
+ # EAPI void edje_object_part_text_select_extend (const Evas_Object *obj, const char *part);
205
+ # EAPI Eina_Bool edje_object_part_text_cursor_next (Evas_Object *obj, const char *part, Edje_Cursor cur);
206
+ # EAPI Eina_Bool edje_object_part_text_cursor_prev (Evas_Object *obj, const char *part, Edje_Cursor cur);
207
+ # EAPI Eina_Bool edje_object_part_text_cursor_up (Evas_Object *obj, const char *part, Edje_Cursor cur);
208
+ # EAPI Eina_Bool edje_object_part_text_cursor_down (Evas_Object *obj, const char *part, Edje_Cursor cur);
209
+ # EAPI void edje_object_part_text_cursor_begin_set (Evas_Object *obj, const char *part, Edje_Cursor cur);
210
+ # EAPI void edje_object_part_text_cursor_end_set (Evas_Object *obj, const char *part, Edje_Cursor cur);
211
+ # EAPI void edje_object_part_text_cursor_copy (Evas_Object *obj, const char *part, Edje_Cursor src, Edje_Cursor dst);
212
+ # EAPI void edje_object_part_text_cursor_line_begin_set (Evas_Object *obj, const char *part, Edje_Cursor cur);
213
+ # EAPI void edje_object_part_text_cursor_line_end_set (Evas_Object *obj, const char *part, Edje_Cursor cur);
214
+ # EAPI Eina_Bool edje_object_part_text_cursor_coord_set (Evas_Object *obj, const char *part, Edje_Cursor cur, Evas_Coord x, Evas_Coord y);
215
+ # EAPI Eina_Bool edje_object_part_text_cursor_is_format_get (const Evas_Object *obj, const char *part, Edje_Cursor cur);
216
+ # EAPI Eina_Bool edje_object_part_text_cursor_is_visible_format_get(const Evas_Object *obj, const char *part, Edje_Cursor cur);
217
+ # EAPI const char *edje_object_part_text_cursor_content_get (const Evas_Object *obj, const char *part, Edje_Cursor cur);
218
+ # EAPI void edje_object_part_text_cursor_pos_set (Evas_Object *obj, const char *part, Edje_Cursor cur, int pos);
219
+ # EAPI int edje_object_part_text_cursor_pos_get (const Evas_Object *obj, const char *part, Edje_Cursor cur);
220
+ # EAPI void edje_object_text_insert_filter_callback_add (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data);
221
+ # EAPI void *edje_object_text_insert_filter_callback_del (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func);
222
+ # EAPI void *edje_object_text_insert_filter_callback_del_full (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data);
223
+ # EAPI Eina_Bool edje_object_part_swallow (Evas_Object *obj, const char *part, Evas_Object *obj_swallow);
224
+ # EAPI void edje_object_part_unswallow (Evas_Object *obj, Evas_Object *obj_swallow);
225
+ # EAPI Evas_Object *edje_object_part_swallow_get (const Evas_Object *obj, const char *part);
226
+ # EAPI const char *edje_object_part_state_get (const Evas_Object *obj, const char *part, double *val_ret);
227
+ # EAPI Edje_Drag_Dir edje_object_part_drag_dir_get (const Evas_Object *obj, const char *part);
228
+ # EAPI Eina_Bool edje_object_part_drag_value_set (Evas_Object *obj, const char *part, double dx, double dy);
229
+ # EAPI Eina_Bool edje_object_part_drag_value_get (const Evas_Object *obj, const char *part, double *dx, double *dy);
230
+ # EAPI Eina_Bool edje_object_part_drag_size_set (Evas_Object *obj, const char *part, double dw, double dh);
231
+ # EAPI Eina_Bool edje_object_part_drag_size_get (const Evas_Object *obj, const char *part, double *dw, double *dh);
232
+ # EAPI Eina_Bool edje_object_part_drag_step_set (Evas_Object *obj, const char *part, double dx, double dy);
233
+ # EAPI Eina_Bool edje_object_part_drag_step_get (const Evas_Object *obj, const char *part, double *dx, double *dy);
234
+ # EAPI Eina_Bool edje_object_part_drag_page_set (Evas_Object *obj, const char *part, double dx, double dy);
235
+ # EAPI Eina_Bool edje_object_part_drag_page_get (const Evas_Object *obj, const char *part, double *dx, double *dy);
236
+ # EAPI Eina_Bool edje_object_part_drag_step (Evas_Object *obj, const char *part, double dx, double dy);
237
+ # EAPI Eina_Bool edje_object_part_drag_page (Evas_Object *obj, const char *part, double dx, double dy);
238
+ # EAPI Evas_Object *edje_object_part_external_object_get (const Evas_Object *obj, const char *part);
239
+ # EAPI Eina_Bool edje_object_part_external_param_set (Evas_Object *obj, const char *part, const Edje_External_Param *param);
240
+ # EAPI Eina_Bool edje_object_part_external_param_get (const Evas_Object *obj, const char *part, Edje_External_Param *param);
241
+ # EAPI Evas_Object *edje_object_part_external_content_get (const Evas_Object *obj, const char *part, const char *content);
242
+ # EAPI Edje_External_Param_Type edje_object_part_external_param_type_get (const Evas_Object *obj, const char *part, const char *param);
243
+ # EAPI Eina_Bool edje_object_part_box_append (Evas_Object *obj, const char *part, Evas_Object *child);
244
+ # EAPI Eina_Bool edje_object_part_box_prepend (Evas_Object *obj, const char *part, Evas_Object *child);
245
+ # EAPI Eina_Bool edje_object_part_box_insert_before (Evas_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference);
246
+ # EAPI Eina_Bool edje_object_part_box_insert_at (Evas_Object *obj, const char *part, Evas_Object *child, unsigned int pos);
247
+ # EAPI Evas_Object *edje_object_part_box_remove (Evas_Object *obj, const char *part, Evas_Object *child);
248
+ # EAPI Evas_Object *edje_object_part_box_remove_at (Evas_Object *obj, const char *part, unsigned int pos);
249
+ # EAPI Eina_Bool edje_object_part_box_remove_all (Evas_Object *obj, const char *part, Eina_Bool clear);
250
+ # EAPI Evas_Object *edje_object_part_table_child_get (Evas_Object *obj, const char *part, unsigned int col, unsigned int row);
251
+ # EAPI Eina_Bool edje_object_part_table_pack (Evas_Object *obj, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
252
+ # EAPI Eina_Bool edje_object_part_table_unpack (Evas_Object *obj, const char *part, Evas_Object *child_obj);
253
+ # EAPI Eina_Bool edje_object_part_table_col_row_size_get (const Evas_Object *obj, const char *part, int *cols, int *rows);
254
+ # EAPI Eina_Bool edje_object_part_table_clear (Evas_Object *obj, const char *part, Eina_Bool clear);
255
+ # EAPI void edje_object_message_send (Evas_Object *obj, Edje_Message_Type type, int id, void *msg);
256
+ # EAPI void edje_object_message_handler_set (Evas_Object *obj, Edje_Message_Handler_Cb func, void *data);
257
+ # EAPI void edje_object_message_signal_process (Evas_Object *obj);
258
+ # EAPI void edje_message_signal_process (void);
259
+ # EAPI Eina_Bool edje_external_type_register (const char *type_name, const Edje_External_Type *type_info);
260
+ # EAPI Eina_Bool edje_external_type_unregister (const char *type_name);
261
+ # EAPI void edje_external_type_array_register (const Edje_External_Type_Info *array);
262
+ # EAPI void edje_external_type_array_unregister (const Edje_External_Type_Info *array);
263
+ # EAPI unsigned int edje_external_type_abi_version_get (void);
264
+ # EAPI Eina_Iterator *edje_external_iterator_get (void);
265
+ # EAPI Edje_External_Param *edje_external_param_find (const Eina_List *params, const char *key);
266
+ # EAPI Eina_Bool edje_external_param_int_get (const Eina_List *params, const char *key, int *ret);
267
+ # EAPI Eina_Bool edje_external_param_double_get (const Eina_List *params, const char *key, double *ret);
268
+ # EAPI Eina_Bool edje_external_param_string_get (const Eina_List *params, const char *key, const char **ret);
269
+ # EAPI Eina_Bool edje_external_param_bool_get (const Eina_List *params, const char *key, Eina_Bool *ret);
270
+ # EAPI Eina_Bool edje_external_param_choice_get (const Eina_List *params, const char *key, const char **ret);
271
+ # EAPI const Edje_External_Param_Info *edje_external_param_info_get (const char *type_name);
272
+ # EAPI const Edje_External_Type *edje_external_type_get (const char *type_name);
273
+ # EAPI Eina_Bool edje_module_load (const char *module);
274
+ # EAPI const Eina_List *edje_available_modules_get (void);
275
+ # EAPI Edje_Perspective *edje_perspective_new (Evas *e);
276
+ # EAPI void edje_perspective_free (Edje_Perspective *ps);
277
+ # EAPI void edje_perspective_set (Edje_Perspective *ps, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc);
278
+ # EAPI void edje_perspective_global_set (Edje_Perspective *ps, Eina_Bool global);
279
+ # EAPI Eina_Bool edje_perspective_global_get (const Edje_Perspective *ps);
280
+ # EAPI const Edje_Perspective *edje_evas_global_perspective_get(const Evas *e);
281
+ # EAPI void edje_object_perspective_set (Evas_Object *obj, Edje_Perspective *ps);
282
+ # EAPI const Edje_Perspective *edje_object_perspective_get (const Evas_Object *obj);
283
+ end
22
284
  end
285
+
286
+ __END__
287
+
288
+ data {
289
+ item: "key1" "val1";
290
+ }
291
+ collections {
292
+ group {
293
+ name: "my_group";
294
+ data {
295
+ item: "key2" "val2";
296
+ }
297
+ parts {
298
+ part {
299
+ name: "background";
300
+ type: RECT;
301
+ mouse_events: 0;
302
+ description {
303
+ state: "default" 0.0;
304
+ color: 255 255 255 255;
305
+ rel1 {
306
+ relative: 0.0 0.0;
307
+ offset: 0 0;
308
+ }
309
+ rel2 {
310
+ relative: 1.0 1.0;
311
+ offset: -1 -1;
312
+ }
313
+ }
314
+ }
315
+ part {
316
+ name: "text";
317
+ type: TEXT;
318
+ mouse_events: 1;
319
+ description {
320
+ state: "default" 0.0;
321
+ color: 255 0 0 255;
322
+ rel1 {
323
+ relative: 0.1 0.2;
324
+ offset: 5 10;
325
+ }
326
+ rel2 {
327
+ relative: 0.9 0.8;
328
+ offset: -6 -11;
329
+ }
330
+ text {
331
+ font: "Sans";
332
+ size: 10;
333
+ text: "hello world";
334
+ }
335
+ }
336
+ description {
337
+ state: "over" 0.0;
338
+ inherit: "default" 0.0;
339
+ color: 0 255 0 255;
340
+ }
341
+ }
342
+ programs {
343
+ program {
344
+ signal: "mouse,in";
345
+ source: "text";
346
+ action: STATE_SET "over" 0.0;
347
+ target: "text";
348
+ transition: LINEAR 0.1;
349
+ }
350
+ program {
351
+ signal: "mouse,out";
352
+ source: "text";
353
+ action: STATE_SET "default" 0.0;
354
+ target: "text";
355
+ transition: LINEAR 0.1;
356
+ }
357
+ }
358
+ }
359
+ }
360
+ }
361
+