summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-05-04 23:42:07 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-05-04 23:42:07 +0200
commite4baccaefd209a25daa3ff8d5277fe86aca1d379 (patch)
treeeb2744b7a8624a7538cb0224d40879074c819653 /test
parent3974ea1fb3734cbf4150c759eebdf8a93d77dc8b (diff)
downloadffi-efl-e4baccaefd209a25daa3ff8d5277fe86aca1d379.zip
ffi-efl-e4baccaefd209a25daa3ff8d5277fe86aca1d379.tar.gz
FFI are in separate namespaces (Efl::Evas::Native), ruby classes are in upper level (Efl::Evas)seperate-natives
Diffstat (limited to 'test')
-rw-r--r--test/test_elm_win.rb35
-rw-r--r--test/test_evas.rb6
2 files changed, 21 insertions, 20 deletions
diff --git a/test/test_elm_win.rb b/test/test_elm_win.rb
index 24c4d6c..23164cf 100644
--- a/test/test_elm_win.rb
+++ b/test/test_elm_win.rb
@@ -2,34 +2,35 @@
# -*- coding: UTF-8 -*-
#
require 'efl/elementary'
+require 'efl/native'
#
Efl::Elm.init
#
win_del = Proc.new { |data,evas_object,event_info|
- Efl::Elm.elm_exit();
+ Efl::Elm::Native.elm_exit();
}
#
-win = Efl::Elm.elm_win_add FFI::MemoryPointer::NULL, "App name", :elm_win_basic
-Efl::Elm.elm_win_title_set win, "Window title"
-Efl::Evas.evas_object_smart_callback_add win, "delete,request", win_del, FFI::MemoryPointer::NULL
+win = Efl::Elm::Native.elm_win_add FFI::MemoryPointer::NULL, "App name", :elm_win_basic
+Efl::Elm::Native.elm_win_title_set win, "Window title"
+Efl::Evas::Native.evas_object_smart_callback_add win, "delete,request", win_del, FFI::MemoryPointer::NULL
#
-bg = Efl::Elm.elm_bg_add win
-Efl::Evas.evas_object_size_hint_weight_set bg, 1.0, 1.0
-Efl::Elm.elm_win_resize_object_add win, bg
-Efl::Evas.evas_object_show bg
+bg = Efl::Elm::Native.elm_bg_add win
+Efl::Evas::Native.evas_object_size_hint_weight_set bg, 1.0, 1.0
+Efl::Elm::Native.elm_win_resize_object_add win, bg
+Efl::Evas::Native.evas_object_show bg
#
-lb = Efl::Elm.elm_label_add win
-Efl::Elm.elm_label_label_set lb, "Hello World!"
-Efl::Evas.evas_object_size_hint_weight_set lb, 1.0, 1.0
-Efl::Elm.elm_win_resize_object_add win, lb
-Efl::Evas.evas_object_show lb
+lb = Efl::Elm::Native.elm_label_add win
+Efl::Elm::Native.elm_label_label_set lb, "Hello World!"
+Efl::Evas::Native.evas_object_size_hint_weight_set lb, 1.0, 1.0
+Efl::Elm::Native.elm_win_resize_object_add win, lb
+Efl::Evas::Native.evas_object_show lb
#
-Efl::Evas.evas_object_move win, 300, 300
-Efl::Evas.evas_object_resize win, 200, 100
+Efl::Evas::Native.evas_object_move win, 300, 300
+Efl::Evas::Native.evas_object_resize win, 200, 100
#
-Efl::Evas.evas_object_show win
+Efl::Evas::Native.evas_object_show win
#
Efl::Elm.run
-Efl::Elm.shutdown
+Efl::Elm::Native.elm_shutdown
#
# EOF
diff --git a/test/test_evas.rb b/test/test_evas.rb
index 3fabb42..34f32fb 100644
--- a/test/test_evas.rb
+++ b/test/test_evas.rb
@@ -13,8 +13,8 @@ def create_canvas w, h
e.output_method_set Evas::render_method_lookup("buffer")
e.output_viewport_set 0, 0, w, h
e.output_size_set w, h
- einfo = Efl::Evas::EngineInfoBufferStruct.new e.engine_info_get
- einfo[:info][:depth_type] = Efl::Evas::EVAS_ENGINE_BUFFER_DEPTH_ARGB32
+ einfo = Evas::Native::EngineInfoBufferStruct.new e.engine_info_get
+ einfo[:info][:depth_type] = Evas::EVAS_ENGINE_BUFFER_DEPTH_ARGB32
einfo[:info][:dest_buffer] = pixels
einfo[:info][:dest_buffer_row_bytes] = w * FFI::type_size(:int);
einfo[:info][:use_color_key] = 0;
@@ -44,7 +44,7 @@ def draw_scene c
end
#
def save_scene canvas, dest
- einfo = Efl::Evas::EngineInfoBufferStruct.new canvas.engine_info_get
+ einfo = Evas::Native::EngineInfoBufferStruct.new canvas.engine_info_get
w, h = canvas.output_size_get
# PPM P6 format is dead simple to write:
p = FFI::Pointer.new :int, einfo[:info][:dest_buffer]