diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2013-05-03 10:23:22 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2013-05-03 10:23:22 +0200 |
commit | 52885bcc3e08abfdf522350a6cb44d5f3f83c01b (patch) | |
tree | ebc79ab5293ab73c31cae93a1a998e4b2ed44a1b | |
parent | bd1c6ade69608ef3d659dd397d0543a66026a443 (diff) | |
download | ffi-efl-52885bcc3e08abfdf522350a6cb44d5f3f83c01b.zip ffi-efl-52885bcc3e08abfdf522350a6cb44d5f3f83c01b.tar.gz |
add test_elm_win native using MethodResolver
-rw-r--r-- | test/test_elm_win-native2.rb | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/test/test_elm_win-native2.rb b/test/test_elm_win-native2.rb new file mode 100644 index 0000000..85f4a6a --- /dev/null +++ b/test/test_elm_win-native2.rb @@ -0,0 +1,41 @@ +#! /usr/bin/env ruby +# -*- coding: UTF-8 -*- +# +require 'efl/native/elm/elm_win' +require 'efl/native/elm/elm_bg' +require 'efl/native/elm/elm_label' +require 'efl/native/elm/elm_object' +# +include Efl +# +Elm.init 0, FFI::MemoryPointer::NULL +# +win_del = Proc.new { |data,evas_object,event_info| + Elm.exit(); +} +# +win = ElmWin.add nil, "App name", :elm_win_basic +ElmWin.title_set win, "Window title" +Evas.object_smart_callback_add win, "delete,request", win_del, nil +# +bg = ElmBg.add win +Evas.object_size_hint_weight_set bg, 1.0, 1.0 +ElmWin.resize_object_add win, bg +Evas.object_show bg +# +lb = ElmLabel.add win +ElmObject.part_text_set lb, nil, "Hello World" +Evas.object_size_hint_weight_set lb, 1.0, 1.0 +ElmWin.resize_object_add win, lb +Evas.object_show lb +# +Evas.object_move win, 300, 300 +Evas.object_resize win, 200, 100 +# +Evas.object_show win +# + +Elm.run +Elm.shutdown +# +# EOF |