summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-02-27 15:48:45 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-02-27 15:48:45 +0100
commitef44077310b4ebf8d3cb31ccb57d15b96a94c9d3 (patch)
treec2bb690ccc1be37c03f6dcdcf892fbf3e17f5067 /spec
parentdbb2c5713e11489dfaeb318a82785017f1794dde (diff)
parentb030c490265bb13ee98a650da419a033495042ed (diff)
downloadffi-efl-ef44077310b4ebf8d3cb31ccb57d15b96a94c9d3.zip
ffi-efl-ef44077310b4ebf8d3cb31ccb57d15b96a94c9d3.tar.gz
Merge branch 'wip'
Conflicts: tools/genruby.rb
Diffstat (limited to 'spec')
-rw-r--r--spec/ecore_evas_spec.rb50
-rw-r--r--spec/edje_spec.rb9
-rw-r--r--spec/eina_hash_spec.rb1
-rw-r--r--spec/eina_list_spec.rb1
-rw-r--r--spec/eina_log_spec.rb18
-rw-r--r--spec/elm_spec.rb109
-rw-r--r--spec/evas_spec.rb257
-rw-r--r--spec/helper.rb31
8 files changed, 79 insertions, 397 deletions
diff --git a/spec/ecore_evas_spec.rb b/spec/ecore_evas_spec.rb
index 7ded12e..859e282 100644
--- a/spec/ecore_evas_spec.rb
+++ b/spec/ecore_evas_spec.rb
@@ -2,6 +2,7 @@
# -*- coding: UTF-8 -*-
#
require 'efl/eina_list'
+require 'efl/ecore'
require 'efl/ecore_evas'
require './spec/helper'
#
@@ -29,7 +30,6 @@ describe 'Efl::EcoreEvas' do
EcoreEvas.engines_free EcoreEvas.engines_get
l = EcoreEvas.engines_list
r = l.inject("\t") do |s,e| s+=e.read_string+' ' end
- puts r
EcoreEvas.engines_free l
end
#
@@ -52,16 +52,17 @@ describe 'Efl::EcoreEvas' do
EcoreEvas.init.should == 2
end
before(:each) do
- @e = EcoreEvas::REcoreEvas.new :engine_name=>"software_x11", :x=>10, :y=>10, :w=>100, :h=>120
+ @e = EcoreEvas::REcoreEvas.new :engine_name=>"software_x11", :x=>10, :y=>10, :w=>100, :h=>120 do
+ move 10, 10
+ show
+ end
@canvas = @e.evas
- @bg = @canvas.object_rectangle_add { |o|
- o.color = 100, 100, 255, 255
- o.size = @e.size
- }
- @bg.show
+ @bg = @canvas.object_rectangle_add do
+ color_set 100, 100, 255, 255
+ show
+ end
+ @bg.size = @e.size
@e.object_associate @bg, :ecore_evas_object_associate_base
- @e.move 10, 10
- @e.show
end
after(:each) do
@e.free
@@ -82,23 +83,34 @@ describe 'Efl::EcoreEvas' do
it "move, resize move_resize and geometry_get (and check association)" do
@e.geometry_get.should == [10,10,100,120]
@bg.geometry_get.should == [0,0,100,120]
- @e.move 20, 20
+ @e.move 50, 50
ecore_loop 3
g = @e.geometry_get
- g.delete_at 1
- g.should == [20,100,120]
+ g[0].should >=50
+ g[0].should <=60
+ g[1].should >=60
+ g[1].should <=80
+ g.delete_at 0
+ g.delete_at 0
+ g.should == [100,120]
@bg.geometry_get.should == [0,0,100,120]
@e.resize 200,150
ecore_loop 3
g = @e.geometry_get
- g.delete_at 1
- g.should == [20,200,150]
+ g.delete_at 0
+ g.delete_at 0
+ g.should == [200,150]
@bg.geometry_get.should == [0,0,200,150]
@e.move_resize 10, 0, 130, 100
ecore_loop 3
g = @e.geometry_get
- g.delete_at 1
- g.should == [10,130,100]
+ g[0].should >=10
+ g[0].should <=20
+ g[1].should >=20
+ g[1].should <=30
+ g.delete_at 0
+ g.delete_at 0
+ g.should == [130,100]
@bg.geometry_get.should == [0,0,130,100]
g = @e.geometry_get
end
@@ -203,12 +215,6 @@ describe 'Efl::EcoreEvas' do
bool_check @e, 'override'
end
#
- # FIXME maximized
- # ecore/src/lib/ecore_evas/ecore_evas.c => ecore_evas_maximized_set => IFC => return
- it "maximized set/get " do
- bool_check @e, 'maximized', 5
- end
- #
it "fullscreen set/get " do
bool_check @e, 'fullscreen', 5
end
diff --git a/spec/edje_spec.rb b/spec/edje_spec.rb
index 896c6bc..5ba5b8c 100644
--- a/spec/edje_spec.rb
+++ b/spec/edje_spec.rb
@@ -17,7 +17,6 @@ else
end
#
require 'efl/eina_list'
-require 'efl/evas'
require 'efl/edje'
require './spec/helper'
#
@@ -43,6 +42,14 @@ describe "Efl::Edje #{Efl::Edje.version.full}" do
Edje.shutdown.should == @init
end
#
+ it "enum edje_external_param_flags should be correct" do
+ [ :edje_external_param_flags_none, :edje_external_param_flags_get,
+ :edje_external_param_flags_set, :edje_external_param_flags_state,
+ :edje_external_param_flags_constructor, :edje_external_param_flags_regular ].zip([0,1,2,4,8,7]) do |s,v|
+ Efl::Native.enum_value(s).should == v
+ end
+ end
+ #
it "frametime get/set " do
Edje.frametime_set 10
Edje.frametime_get.should == 10
diff --git a/spec/eina_hash_spec.rb b/spec/eina_hash_spec.rb
index 736dae9..2d17680 100644
--- a/spec/eina_hash_spec.rb
+++ b/spec/eina_hash_spec.rb
@@ -1,7 +1,6 @@
#! /usr/bin/env ruby
# -*- coding: UTF-8 -*-
#
-require 'efl'
require 'efl/eina_hash'
#
describe 'Efl::EinaHash' do
diff --git a/spec/eina_list_spec.rb b/spec/eina_list_spec.rb
index 50db525..8bef1ac 100644
--- a/spec/eina_list_spec.rb
+++ b/spec/eina_list_spec.rb
@@ -1,7 +1,6 @@
#! /usr/bin/env ruby
# -*- coding: UTF-8 -*-
#
-require 'efl/eina'
require 'efl/eina_list'
#
describe 'Efl::EinaList' do
diff --git a/spec/eina_log_spec.rb b/spec/eina_log_spec.rb
index 62d54a1..03c51dd 100644
--- a/spec/eina_log_spec.rb
+++ b/spec/eina_log_spec.rb
@@ -1,7 +1,6 @@
#! /usr/bin/env ruby
# -*- coding: UTF-8 -*-
#
-require 'efl/eina'
require 'efl/eina_log'
require './spec/helper'
#
@@ -21,6 +20,16 @@ describe 'Efl::EinaLog' do
EinaLog.level.should == 3
end
#
+ it "eina_log_level enum should be well defined" do
+ Efl::Native.enum_value(:eina_log_level_critical).should == 0
+ Efl::Native.enum_value(:eina_log_level_err).should == 1
+ Efl::Native.enum_value(:eina_log_level_warn).should == 2
+ Efl::Native.enum_value(:eina_log_level_info).should == 3
+ Efl::Native.enum_value(:eina_log_level_dbg).should == 4
+ Efl::Native.enum_value(:eina_log_levels).should == 5
+ Efl::Native.enum_value(:eina_log_level_unknown).should == (-2147483647-1)
+ end
+ #
it "color_disable set/get" do
bool_check EinaLog, 'color_disable'
end
@@ -60,12 +69,5 @@ describe 'Efl::EinaLog' do
EinaLog.main_thread_check.should be_true
EinaLog.threads_enable
end
- # EAPI void eina_log_threads_enable(void);
- # EAPI void eina_log_print_cb_set(Eina_Log_Print_Cb cb, void *data);
#
- # EAPI void eina_log_print(int domain, Eina_Log_Level level, const char *file, const char *function, int line, const char *fmt, ...);
- # EAPI void eina_log_vprint(int domain, Eina_Log_Level level, const char *file, const char *fnc, int line, const char *fmt, va_list args);
- # EAPI void eina_log_print_cb_stdout(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc, int line, const char *fmt, void *data, va_list args);
- # EAPI void eina_log_print_cb_stderr(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc, int line, const char *fmt, void *data, va_list args);
- # EAPI void eina_log_print_cb_file(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc, int line, const char *fmt, void *data, va_list args);
end
diff --git a/spec/elm_spec.rb b/spec/elm_spec.rb
index 0ae7d93..45cf42c 100644
--- a/spec/elm_spec.rb
+++ b/spec/elm_spec.rb
@@ -1,7 +1,8 @@
#! /usr/bin/env ruby
# -*- coding: UTF-8 -*-
#
-require 'efl/elementary'
+require 'efl/ecore'
+require 'efl/elementary_all'
require './spec/helper'
#
describe "Efl::Elm #{Efl::Elm.version.full}" do
@@ -81,10 +82,6 @@ describe "Efl::Elm #{Efl::Elm.version.full}" do
it "fullscreen set/get" do
bool_check @win, 'fullscreen', 4
end
- # FIXME depends on issue: ecore-2
- it "maximized set/get" do
- bool_check @win, 'maximized', 3
- end
#
it "iconified set/get" do
bool_check @win, 'iconified'
@@ -176,28 +173,7 @@ describe "Efl::Elm #{Efl::Elm.version.full}" do
o2 = @win.inlined_image_object
o1.should === o2
end
- # TODO EAPI void elm_win_illume_command_send(Evas_Object *obj, Elm_Illume_Command command, void *params);;
- # TODO EAPI Ecore_X_Window elm_win_xwindow_get(const Evas_Object *obj);
- #
- describe 'Efl::Elm::ElmInWin' do
- it "activate, content set/get/unset" do
- @iwin = @win.inwin_add
- o1 = @win.evas.object_rectangle_add
- o2 = @win.evas.object_rectangle_add
- @iwin.activate
- @iwin.content_set o1
- @iwin.content.should == o1.to_ptr
- @iwin.content_get.should === o1.to_ptr
- @iwin.content= o2
- @iwin.content.should === o2.to_ptr
- @iwin.content_get.should === o2.to_ptr
- @iwin.content_unset
- @iwin.content.should == FFI::Pointer::NULL
- @iwin.content_get.should == FFI::Pointer::NULL
- o1.free
- o2.free
- end
- end
+ #
end
#
describe 'Efl::Elm::ElmBg' do
@@ -228,7 +204,7 @@ describe "Efl::Elm #{Efl::Elm.version.full}" do
@bg.color_get.should == [12,24,36]
@bg.color= 2,4,8
@bg.color.should == [2,4,8]
- @bg.class.superclass.instance_method(:color).bind(@bg).call.should == [200,255,100,150]
+# @bg.class.superclass.instance_method(:color_get).bind(@bg).call.should == [200,255,100,150]
end
#
end
@@ -283,82 +259,5 @@ describe "Efl::Elm #{Efl::Elm.version.full}" do
end
end
#
- describe 'Efl::Elm::ElmPager' do
- #
- before(:all) {
- realize_win
- @p = Elm::ElmPager.new @win
- @os = []
- 0.upto(3) do
- @os << @win.evas.object_rectangle_add
- end
- }
- after(:all) {
- @p.free
- @bg.free
- @win.free
- }
- #
- it "content push pop promote bottom_get top_get" do
- @os.each do |o|
- @p.content_push o
- end
- @p.content_top_get.should == @os[-1].to_ptr
- @p.content_bottom_get.should == @os[0].to_ptr
- @p.content_pop
- @p.content_top_get.should == @os[-2].to_ptr
- @p.content_bottom_get.should == @os[0].to_ptr
- @p.content_promote @os[0]
- @p.content_top_get.should == @os[0].to_ptr
- @p.content_bottom_get.should == @os[1].to_ptr
- end
- end
- #
- describe 'Efl::Elm::ElmPanel' do
- #
- before(:all) {
- realize_win
- @p = Elm::ElmPanel.new @win
- @os = []
- }
- after(:all) {
- @p.free
- @bg.free
- @win.free
- }
- #
- it "orient set/get" do
- @p.orient_set :elm_panel_orient_bottom
- @p.orient_get.should == :elm_panel_orient_bottom
- @p.orient= :elm_panel_orient_top
- @p.orient.should == :elm_panel_orient_top
- end
- #
- it "content set/get/unset" do
- o = @win.evas.object_rectangle_add
- @p.content_set o
- @p.content_get.should == o.to_ptr
- @p.content_unset.should == o.to_ptr
- o.free
- o = @win.evas.object_rectangle_add
- @p.content= o
- @p.content.should == o.to_ptr
- @p.content_unset.should == o.to_ptr
- o.free
- end
- #
- it "hidden set/get toggle" do
- @p.hidden_set true
- @p.hidden_get.should be_true
- @p.hidden=false
- @p.hidden.should be_false
- @p.toggle
- @p.hidden_get.should be_true
- @p.hidden.should be_true
- @p.toggle
- @p.hidden_get.should be_false
- @p.hidden.should be_false
- end
- end
end
diff --git a/spec/evas_spec.rb b/spec/evas_spec.rb
index f00a6ef..e7dbdf9 100644
--- a/spec/evas_spec.rb
+++ b/spec/evas_spec.rb
@@ -1,8 +1,6 @@
#! /usr/bin/env ruby
# -*- coding: UTF-8 -*-
#
-require 'efl/eina_list'
-require 'efl/ecore'
require 'efl/evas'
require './spec/helper'
#
@@ -29,6 +27,13 @@ describe "Efl::Evas #{Efl::Evas.version.full}" do
Evas.shutdown.should == @init
end
#
+ it "enum evas_bidi_direction should be correct" do
+ Efl::Native.enum_value(:evas_bidi_direction_natural).should == 0
+ Efl::Native.enum_value(:evas_bidi_direction_neutral).should == 0
+ Efl::Native.enum_value(:evas_bidi_direction_ltr).should == 1
+ Efl::Native.enum_value(:evas_bidi_direction_rtl).should == 2
+ end
+ #
it "evas alloc error enum is ok" do
Native.enum_value(:evas_alloc_error_none).should == 0
Native.enum_value(:evas_alloc_error_fatal).should == 1
@@ -68,8 +73,9 @@ describe "Efl::Evas #{Efl::Evas.version.full}" do
end
#
it "should be able to create and destroy evas" do
- e1 = Evas::REvas.new
- e1.address.should_not == 0
+ e1 = Evas::REvas.new do
+ address.should_not == 0
+ end
e2 = Evas::REvas.new e1.to_ptr
e1.address.should == e2.address
(e1==e2).should be_false
@@ -208,16 +214,6 @@ describe "Efl::Evas #{Efl::Evas.version.full}" do
@e.pointer_inside.should be_false
end
#
- # TODO evas_event_feed_*
- # evas_event_feed_multi_down
- # evas_event_feed_multi_up
- # evas_event_feed_multi_move
- # evas_event_feed_mouse_cancel
- # evas_event_feed_mouse_wheel
- # evas_event_feed_key_down
- # evas_event_feed_key_up
- # evas_event_feed_hold
- #
it "add/del event callback " do
@cb = false
kd_cb = Proc.new do |data, e, obj, event_info|
@@ -290,8 +286,7 @@ describe "Efl::Evas #{Efl::Evas.version.full}" do
@e.object_name_find("name").should == @o.to_ptr
@o.free
end
- # TODO evas_object_top_at_xy_get, evas_object_top_at_pointer_get, evas_object_top_in_rectangle_get
- # TODO evas_objects_at_xy_get, evas_objects_in_rectangle_get, evas_object_bottom_get, evas_object_top_get
+ #
end
#
describe 'Efl::Evas::REvasObject' do
@@ -634,7 +629,7 @@ describe "Efl::Evas #{Efl::Evas.version.full}" do
@t.horiz_advance_get.should > 0
@t.vert_advance_get.should > 0
@t.inset_get.should > 0
- @t.direction_get.should == :evas_bidi_direction_neutral
+ @t.direction_get.should == :evas_bidi_direction_ltr
@t.style_pad_get.length.should == 4
@t.ascent.should > 0
@t.descent.should > 0
@@ -643,7 +638,7 @@ describe "Efl::Evas #{Efl::Evas.version.full}" do
@t.horiz_advance.should > 0
@t.vert_advance.should > 0
@t.inset.should > 0
- @t.direction.should == :evas_bidi_direction_neutral
+ @t.direction.should == :evas_bidi_direction_ltr
@t.style_pad.length.should == 4
end
#
@@ -752,232 +747,6 @@ describe "Efl::Evas #{Efl::Evas.version.full}" do
@b.padding.should == [30,20]
end
#
-
- # EAPI void evas_object_box_smart_set (Evas_Object_Box_Api *api);
- # EAPI const Evas_Object_Box_Api *evas_object_box_smart_class_get (void);
- # EAPI void evas_object_box_layout_set (Evas_Object *o, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data));
-
- # EAPI void evas_object_box_layout_horizontal (Evas_Object *o, Evas_Object_Box_Data *priv, void *data);
- # EAPI void evas_object_box_layout_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data);
- # EAPI void evas_object_box_layout_homogeneous_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data);
- # EAPI void evas_object_box_layout_homogeneous_horizontal (Evas_Object *o, Evas_Object_Box_Data *priv, void *data);
- # EAPI void evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data);
- # EAPI void evas_object_box_layout_homogeneous_max_size_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data);
- # EAPI void evas_object_box_layout_flow_horizontal (Evas_Object *o, Evas_Object_Box_Data *priv, void *data);
- # EAPI void evas_object_box_layout_flow_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data);
- # EAPI void evas_object_box_layout_stack (Evas_Object *o, Evas_Object_Box_Data *priv, void *data);
-
- # EAPI Eina_Iterator *evas_object_box_iterator_new (const Evas_Object *o);
- # EAPI Eina_Accessor *evas_object_box_accessor_new (const Evas_Object *o);
-
- # EAPI const char *evas_object_box_option_property_name_get (Evas_Object *o, int property);
-
- # EAPI int evas_object_box_option_property_id_get (Evas_Object *o, const char *name);
- # EAPI Eina_Bool evas_object_box_option_property_set (Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...);
- # EAPI Eina_Bool evas_object_box_option_property_vset (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args);
- # EAPI Eina_Bool evas_object_box_option_property_get (Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...);
- # EAPI Eina_Bool evas_object_box_option_property_vget (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args);
end
#
- # EAPI Evas_Object *evas_object_image_filled_add (Evas *e);
- # EAPI void evas_object_image_memfile_set (Evas_Object *obj, void *data, int size, char *format, char *key);
- # EAPI void evas_object_image_file_set (Evas_Object *obj, const char *file, const char *key);
- # EAPI void evas_object_image_file_get (const Evas_Object *obj, const char **file, const char **key);
- # EAPI void evas_object_image_border_set (Evas_Object *obj, int l, int r, int t, int b);
- # EAPI void evas_object_image_border_get (const Evas_Object *obj, int *l, int *r, int *t, int *b);
- # EAPI void evas_object_image_border_center_fill_set (Evas_Object *obj, Evas_Border_Fill_Mode fill);
- # EAPI Evas_Border_Fill_Mode evas_object_image_border_center_fill_get (const Evas_Object *obj);
- # EAPI void evas_object_image_filled_set (Evas_Object *obj, Eina_Bool setting);
- # EAPI Eina_Bool evas_object_image_filled_get (const Evas_Object *obj);
- # EAPI void evas_object_image_border_scale_set (Evas_Object *obj, double scale);
- # EAPI double evas_object_image_border_scale_get (const Evas_Object *obj);
- # EAPI void evas_object_image_fill_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
- # EAPI void evas_object_image_fill_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
- # EAPI void evas_object_image_fill_spread_set (Evas_Object *obj, Evas_Fill_Spread spread);
- # EAPI Evas_Fill_Spread evas_object_image_fill_spread_get (const Evas_Object *obj);
- # EAPI void evas_object_image_size_set (Evas_Object *obj, int w, int h);
- # EAPI void evas_object_image_size_get (const Evas_Object *obj, int *w, int *h);
- # EAPI int evas_object_image_stride_get (const Evas_Object *obj);
- # EAPI Evas_Load_Error evas_object_image_load_error_get (const Evas_Object *obj);
- # EAPI void evas_object_image_data_set (Evas_Object *obj, void *data);
- # EAPI void *evas_object_image_data_convert (Evas_Object *obj, Evas_Colorspace to_cspace);
- # EAPI void *evas_object_image_data_get (const Evas_Object *obj, Eina_Bool for_writing);
- # EAPI void evas_object_image_data_copy_set (Evas_Object *obj, void *data);
- # EAPI void evas_object_image_data_update_add (Evas_Object *obj, int x, int y, int w, int h);
- # EAPI void evas_object_image_alpha_set (Evas_Object *obj, Eina_Bool has_alpha);
- # EAPI Eina_Bool evas_object_image_alpha_get (const Evas_Object *obj);
- # EAPI void evas_object_image_smooth_scale_set (Evas_Object *obj, Eina_Bool smooth_scale);
- # EAPI Eina_Bool evas_object_image_smooth_scale_get (const Evas_Object *obj);
- # EAPI void evas_object_image_preload (Evas_Object *obj, Eina_Bool cancel);
- # EAPI void evas_object_image_reload (Evas_Object *obj);
- # EAPI Eina_Bool evas_object_image_save (const Evas_Object *obj, const char *file, const char *key, const char *flags);
- # EAPI Eina_Bool evas_object_image_pixels_import (Evas_Object *obj, Evas_Pixel_Import_Source *pixels);
- # EAPI void evas_object_image_pixels_get_callback_set(Evas_Object *obj, Evas_Object_Image_Pixels_Get_Cb func, void *data);
- # EAPI void evas_object_image_pixels_dirty_set (Evas_Object *obj, Eina_Bool dirty);
- # EAPI Eina_Bool evas_object_image_pixels_dirty_get (const Evas_Object *obj);
- # EAPI void evas_object_image_load_dpi_set (Evas_Object *obj, double dpi);
- # EAPI double evas_object_image_load_dpi_get (const Evas_Object *obj);
- # EAPI void evas_object_image_load_size_set (Evas_Object *obj, int w, int h);
- # EAPI void evas_object_image_load_size_get (const Evas_Object *obj, int *w, int *h);
- # EAPI void evas_object_image_load_scale_down_set (Evas_Object *obj, int scale_down);
- # EAPI int evas_object_image_load_scale_down_get (const Evas_Object *obj);
- # EAPI void evas_object_image_load_region_set (Evas_Object *obj, int x, int y, int w, int h);
- # EAPI void evas_object_image_load_region_get (const Evas_Object *obj, int *x, int *y, int *w, int *h);
- # EAPI void evas_object_image_colorspace_set (Evas_Object *obj, Evas_Colorspace cspace);
- # EAPI Evas_Colorspace evas_object_image_colorspace_get (const Evas_Object *obj);
- # EAPI void evas_object_image_native_surface_set (Evas_Object *obj, Evas_Native_Surface *surf);
- # EAPI Evas_Native_Surface *evas_object_image_native_surface_get (const Evas_Object *obj);
- # EAPI void evas_object_image_scale_hint_set (Evas_Object *obj, Evas_Image_Scale_Hint hint);
- # EAPI Evas_Image_Scale_Hint evas_object_image_scale_hint_get (const Evas_Object *obj);
- # EAPI void evas_object_image_content_hint_set (Evas_Object *obj, Evas_Image_Content_Hint hint);
- # EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get (const Evas_Object *obj);
- # EAPI void evas_object_image_alpha_mask_set (Evas_Object *obj, Eina_Bool ismask);
- # EAPI Eina_Bool evas_object_image_source_set (Evas_Object *obj, Evas_Object *src);
- # EAPI Evas_Object *evas_object_image_source_get (Evas_Object *obj);
- # EAPI Eina_Bool evas_object_image_source_unset (Evas_Object *obj);
- # EAPI Evas_Object *evas_object_textblock_add(Evas *e);
- # EAPI const char *evas_textblock_escape_string_get(const char *escape);
- # EAPI const char *evas_textblock_string_escape_get(const char *string, int *len_ret);
- # EAPI const char *evas_textblock_escape_string_range_get(const char *escape_start, const char *escape_end);
- # EAPI Evas_Textblock_Style *evas_textblock_style_new(void);
- # EAPI void evas_textblock_style_free(Evas_Textblock_Style *ts);
- # EAPI void evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text);
- # EAPI const char *evas_textblock_style_get(const Evas_Textblock_Style *ts);
- # EAPI void evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts);
- # EAPI const Evas_Textblock_Style *evas_object_textblock_style_get(const Evas_Object *obj);
- # EAPI void evas_object_textblock_replace_char_set(Evas_Object *obj, const char *ch);
- # EAPI const char *evas_object_textblock_replace_char_get(Evas_Object *obj);
- # EAPI void evas_object_textblock_valign_set(Evas_Object *obj, double align);
- # EAPI double evas_object_textblock_valign_get(const Evas_Object *obj);
- # EAPI void evas_object_textblock_bidi_delimiters_set(Evas_Object *obj, const char *delim);
- # EAPI const char *evas_object_textblock_bidi_delimiters_get(const Evas_Object *obj);
- # EAPI void evas_object_textblock_newline_mode_set(Evas_Object *obj, Eina_Bool mode);
- # EAPI Eina_Bool evas_object_textblock_newline_mode_get(const Evas_Object *obj);
- # EAPI void evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text);
- # EAPI void evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char *text);
- # EAPI const char *evas_object_textblock_text_markup_get(const Evas_Object *obj);
- # EAPI const Evas_Textblock_Cursor *evas_object_textblock_cursor_get(const Evas_Object *obj);
- # EAPI Evas_Textblock_Cursor *evas_object_textblock_cursor_new(Evas_Object *obj);
- # EAPI void evas_textblock_cursor_free(Evas_Textblock_Cursor *cur);
- # EAPI void evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur);
- # EAPI void evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur);
- # EAPI Eina_Bool evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *cur);
- # EAPI Eina_Bool evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *cur);
- # EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_first_get(const Evas_Object *obj);
- # EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_last_get(const Evas_Object *obj);
- # EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_next_get(const Evas_Object_Textblock_Node_Format *n);
- # EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_prev_get(const Evas_Object_Textblock_Node_Format *n);
- # EAPI void evas_textblock_node_format_remove_pair(Evas_Object *obj, Evas_Object_Textblock_Node_Format *n);
- # EAPI void evas_textblock_cursor_set_at_format(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *n);
- # EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur);
- # EAPI const char *evas_textblock_node_format_text_get(const Evas_Object_Textblock_Node_Format *cur);
- # EAPI void evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *fmt);
- # EAPI Eina_Bool evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur);
- # EAPI Eina_Bool evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur);
- # EAPI Eina_Bool evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur);
- # EAPI Eina_Bool evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur);
- # EAPI Eina_Bool evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur);
- # EAPI Eina_Bool evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *cur);
- # EAPI void evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur);
- # EAPI void evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur);
- # EAPI void evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur);
- # EAPI void evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur);
- # EAPI int evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur);
- # EAPI void evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int pos);
- # EAPI Eina_Bool evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line);
- # EAPI int evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2);
- # EAPI void evas_textblock_cursor_copy(const Evas_Textblock_Cursor *cur, Evas_Textblock_Cursor *cur_dest);
- # EAPI int evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *text);
- # EAPI int evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *text);
- # EAPI Eina_Bool evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *format);
- # EAPI Eina_Bool evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *format);
- # EAPI void evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur);
- # EAPI void evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_Cursor *cur2);
- # EAPI const char *evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur);
- # EAPI int evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur);
- # EAPI char *evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2, Evas_Textblock_Text_Type format);
- # EAPI char *evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur);
- # EAPI int evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_BiDi_Direction *dir, Evas_Textblock_Cursor_Type ctype);
- # EAPI int evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
- # EAPI int evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cpen_x, Evas_Coord *cy, Evas_Coord *cadv, Evas_Coord *ch);
- # EAPI int evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
- # EAPI Eina_Bool evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y);
- # EAPI int evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y);
- # EAPI Eina_List *evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2);
- # EAPI Eina_Bool evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
- # EAPI Eina_Bool evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur);
- # EAPI Eina_Bool evas_object_textblock_line_number_geometry_get(const Evas_Object *obj, int line, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
- # EAPI void evas_object_textblock_clear(Evas_Object *obj);
- # EAPI void evas_object_textblock_size_formatted_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
- # EAPI void evas_object_textblock_size_native_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
- # EAPI void evas_object_textblock_style_insets_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b);
- # EAPI void evas_smart_free (Evas_Smart *s);
- # EAPI Evas_Smart *evas_smart_class_new (const Evas_Smart_Class *sc);
- # EAPI const Evas_Smart_Class *evas_smart_class_get (const Evas_Smart *s);
- # EAPI void *evas_smart_data_get (const Evas_Smart *s);
- # EAPI const Evas_Smart_Cb_Description **evas_smart_callbacks_descriptions_get(const Evas_Smart *s, unsigned int *count);
- # EAPI const Evas_Smart_Cb_Description *evas_smart_callback_description_find(const Evas_Smart *s, const char *name);
- # EAPI Eina_Bool evas_smart_class_inherit_full (Evas_Smart_Class *sc, const Evas_Smart_Class *parent_sc, unsigned int parent_sc_size);
- # EAPI Evas_Object *evas_object_smart_add (Evas *e, Evas_Smart *s);
- # EAPI void evas_object_smart_member_add (Evas_Object *obj, Evas_Object *smart_obj);
- # EAPI void evas_object_smart_member_del (Evas_Object *obj);
- # EAPI Evas_Object *evas_object_smart_parent_get (const Evas_Object *obj);
- # EAPI Eina_Bool evas_object_smart_type_check (const Evas_Object *obj, const char *type);
- # EAPI Eina_Bool evas_object_smart_type_check_ptr (const Evas_Object *obj, const char *type);
- # EAPI Eina_List *evas_object_smart_members_get (const Evas_Object *obj);
- # EAPI Evas_Smart *evas_object_smart_smart_get (const Evas_Object *obj);
- # EAPI void *evas_object_smart_data_get (const Evas_Object *obj);
- # EAPI void evas_object_smart_data_set (Evas_Object *obj, void *data);
- # EAPI void evas_object_smart_callback_add (Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data);
- # EAPI void *evas_object_smart_callback_del (Evas_Object *obj, const char *event, Evas_Smart_Cb func);
- # EAPI void evas_object_smart_callback_call (Evas_Object *obj, const char *event, void *event_info);
- # EAPI Eina_Bool evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_Cb_Description *descriptions);
- # EAPI void evas_object_smart_callbacks_descriptions_get(const Evas_Object *obj, const Evas_Smart_Cb_Description ***class_descriptions, unsigned int *class_count, const Evas_Smart_Cb_Description ***instance_descriptions, unsigned int *instance_count);
- # EAPI void evas_object_smart_callback_description_find(const Evas_Object *obj, const char *name, const Evas_Smart_Cb_Description **class_description, const Evas_Smart_Cb_Description **instance_description);
- # EAPI void evas_object_smart_changed (Evas_Object *obj);
- # EAPI void evas_object_smart_need_recalculate_set(Evas_Object *obj, Eina_Bool value);
- # EAPI Eina_Bool evas_object_smart_need_recalculate_get(const Evas_Object *obj);
- # EAPI void evas_object_smart_calculate (Evas_Object *obj);
- # EAPI void evas_smart_objects_calculate (Evas *e);
- # EAPI Evas_Object *evas_object_smart_clipped_clipper_get (Evas_Object *obj);
- # EAPI void evas_object_smart_clipped_smart_set (Evas_Smart_Class *sc);
- # EAPI const Evas_Smart_Class *evas_object_smart_clipped_class_get (void);
- # EAPI void evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy);
- # EAPI Evas_Object *evas_object_table_add (Evas *evas);
- # EAPI Evas_Object *evas_object_table_add_to (Evas_Object *parent);
- # EAPI void evas_object_table_homogeneous_set (Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous);
- # EAPI Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get (const Evas_Object *o);
- # EAPI void evas_object_table_padding_set (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical);
- # EAPI void evas_object_table_padding_get (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical);
- # EAPI void evas_object_table_align_set (Evas_Object *o, double horizontal, double vertical);
- # EAPI void evas_object_table_align_get (const Evas_Object *o, double *horizontal, double *vertical);
- # EAPI void evas_object_table_mirrored_set (Evas_Object *o, Eina_Bool mirrored);
- # EAPI Eina_Bool evas_object_table_mirrored_get (const Evas_Object *o);
- # EAPI Eina_Bool evas_object_table_pack (Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
- # EAPI Eina_Bool evas_object_table_unpack (Evas_Object *o, Evas_Object *child);
- # EAPI void evas_object_table_clear (Evas_Object *o, Eina_Bool clear);
- # EAPI void evas_object_table_col_row_size_get(const Evas_Object *o, int *cols, int *rows);
- # EAPI Eina_Iterator *evas_object_table_iterator_new (const Evas_Object *o);
- # EAPI Eina_Accessor *evas_object_table_accessor_new (const Evas_Object *o);
- # EAPI Eina_List *evas_object_table_children_get (const Evas_Object *o);
- # EAPI Evas_Object *evas_object_table_child_get (const Evas_Object *o, unsigned short col, unsigned short row);
- # EAPI Eina_Bool evas_object_filter_mode_set (Evas_Object *o, Evas_Filter_Mode mode);
- # EAPI Evas_Filter_Mode evas_object_filter_mode_get (Evas_Object *o);
- # EAPI Eina_Bool evas_object_filter_set (Evas_Object *o, Evas_Filter filter);
- # EAPI Evas_Filter evas_object_filter_get (Evas_Object *o);
- # EAPI Eina_Bool evas_object_filter_param_int_set (Evas_Object *o, const char *param, int val);
- # EAPI int evas_object_filter_param_int_get (Evas_Object *o, const char *param);
- # EAPI Eina_Bool evas_object_filter_param_str_set (Evas_Object *o, const char *param, const char *val);
- # EAPI const char *evas_object_filter_param_str_get (Evas_Object *o, const char *param);
- # EAPI Eina_Bool evas_object_filter_param_obj_set (Evas_Object *o, const char *param, Evas_Object *val);
- # EAPI Evas_Object *evas_object_filter_param_obj_get (Evas_Object *o, const char *param);
- # EAPI Eina_Bool evas_object_filter_param_float_set(Evas_Object *o, const char *param, double val);
- # EAPI double evas_object_filter_param_float_get(Evas_Object *o, const char *param);
- # EAPI Eina_Bool evas_cserve_want_get (void);
- # EAPI Eina_Bool evas_cserve_connected_get (void);
- # EAPI Eina_Bool evas_cserve_stats_get (Evas_Cserve_Stats *stats);
- # EAPI void evas_cserve_image_cache_contents_clean (Evas_Cserve_Image_Cache *cache);
- # EAPI Eina_Bool evas_cserve_config_get (Evas_Cserve_Config *config);
- # EAPI Eina_Bool evas_cserve_config_set (const Evas_Cserve_Config *config);
- # EAPI void evas_cserve_disconnect (void);
end
diff --git a/spec/helper.rb b/spec/helper.rb
index efdc2b3..eb98117 100644
--- a/spec/helper.rb
+++ b/spec/helper.rb
@@ -1,18 +1,19 @@
#! /usr/bin/env ruby
# -*- coding: UTF-8 -*-
#
-require 'efl/eina'
-require 'efl/evas'
-require 'efl/ecore'
+require 'efl/eina_log'
+Efl::Eina.init
+Efl::EinaLog.level_set :eina_log_level_critical
#
def realize_evas
width = 300
height = 200
@pixels = FFI::MemoryPointer.new :int, width*height
- @e = Efl::Evas::REvas.new
- @e.output_method_set Efl::Evas::render_method_lookup("buffer")
- @e.output_viewport_set 0, 0, width, height
- @e.output_size_set width, height
+ @e = Efl::Evas::REvas.new do
+ output_method_set Efl::Evas::render_method_lookup("buffer")
+ output_viewport_set 0, 0, width, height
+ output_size_set width, height
+ end
einfo = Efl::Native::EngineInfoBufferStruct.new @e.engine_info
einfo[:info][:depth_type] = Efl::Evas::EVAS_ENGINE_BUFFER_DEPTH_ARGB32
einfo[:info][:dest_buffer] = @pixels
@@ -58,15 +59,15 @@ def char_check t, fct, delay=nil
end
#
def realize_win
- @win = Elm::ElmWin.new(nil, 'TEST') do |w|
- w.title= 'spec win'
- w.move 100, 100
- w.resize 100, 100
+ @win = Elm::ElmWin.new(nil, 'TEST') do
+ title= 'spec win'
+ move 100, 100
+ resize 100, 100
end
- @bg = Elm::ElmBg.new(@win) do |bg|
- bg.size_hint_weight_set 1.0, 1.0
- bg.evas_object_color_set 200,255,100,150
- bg.show
+ @bg = Elm::ElmBg.new(@win) do
+ size_hint_weight_set 1.0, 1.0
+ evas_object_color_set 200,255,100,150
+ show
end
@win.show
end