aboutsummaryrefslogtreecommitdiffstats
path: root/examples/evas_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/evas_test.py')
-rw-r--r--examples/evas_test.py32
1 files changed, 19 insertions, 13 deletions
diff --git a/examples/evas_test.py b/examples/evas_test.py
index fced191..2a15b9b 100644
--- a/examples/evas_test.py
+++ b/examples/evas_test.py
@@ -3,7 +3,7 @@ import sys
from base.eodefault import py_elm_init, elem_run
from eobase import EoBase
-from evas.py.py_evas import ElwWin, ElwBox, ElwButton, ElwBoxedbutton, EvasObject
+from evas.py.evas_py import ElwWin, ElwBox, ElwButton, ElwBoxedbutton, ExEvasObject
print "Initializing Elementary..."
@@ -41,19 +41,20 @@ def properties_cb(obj):
######################## setting data ##########################
def data_cb(obj):
- print "setting data"
+ print "setting data - int : 5"
i = 5
obj.data_set("int", i)
i = 999999
f = obj.data_get("int")
+ print "getting data"
print f, type(f)
f = obj.data_del("int")
#ebb.data_set("list", ["a", "bb", "cc", "asdfasfd", "1234124", "asdf", "123", "12"])
-#ebb.data_set("list", ["xx", "yy", "zz"])
-#f = ebb.data_get("list")
-#print f, type(f)
+ #ebb.data_set("list", ["xx", "yy", "zz"])
+ #f = ebb.data_get("list")
+ #print f, type(f)
#l = ["a", "b", "c", "asd", "123"]
#ebb.data_set("list2", l)
@@ -62,12 +63,14 @@ def data_cb(obj):
# f = obj.data_get("list2")
# print f, type(f)
+ print "setting data - char : string data"
obj.data_set("char", "string data")
f = obj.data_get("char")
print f, type(f)
obj.data_set("object",pb)
f = obj.data_get("object")
+ print "getting data"
print f, type(f)
#f.text_set("neeew name")
#f = ebb.data_del("object")
@@ -133,21 +136,21 @@ def num_cb(obj):
def cb_add(o):
- o.alert("obj: " + o.text_get() + "; Added: cb_add")
+ o.alert(" obj: " + o.text_get() + "; cb_added")
def cb_del(o):
- o.alert("obj: " + o.text_get() + "; Added: cb_del")
+ o.alert(" obj: " + o.text_get() + "; cb_deleted")
def thaw_ba(o):
- print "size:", o.size_get()
+ print " size:", o.size_get()
p_but.event_thaw()
def cb_clicked(o):
- o.alert("obj: " + o.text_get())
+ o.alert(" obj: " + o.text_get())
w1 = ElwWin(None)
-w1.size_set(270, 350)
+w1.size_set(370, 350)
w1.visibility_set(1)
@@ -160,11 +163,14 @@ bt.color_set(159, 245, 255, 255)
bt.text_set("Hello")
bt.visibility_set(1)
+print "> adding cb on CALLBACK_ADD"
bt.event_callback_priority_add(EoBase.CALLBACK_ADD, -100, cb_add)
+print "> adding cb on CALLBACK_DEL"
bt.event_callback_priority_add(EoBase.CALLBACK_DEL, 0, cb_del)
-print "adding clicked"
+print "> adding cb on CLICKED"
bt.event_callback_priority_add(ElwButton.CLICKED, -100, cb_clicked)
#bt.event_callback_priority_add(ElwButton.CLICKED, -200, thaw_ba)
+print "> adding cb on CLICKED"
bt.event_callback_priority_add(ElwButton.CLICKED, -200, properties_cb)
del w
@@ -206,7 +212,7 @@ but.visibility_set(1)
#but.position_set(250, 100)
but.size_set(90, 20)
but.color_set(255, 0, 255, 255)
-but.text_set("1st button in box")
+but.text_set("1st button in box - gl_thaw")
but.event_callback_priority_add(ElwButton.CLICKED, 0, thaw_global)
@@ -216,7 +222,7 @@ but2.visibility_set(1)
#but2.position_set(270, 150)
#but2.size_set(90, 50)
but2.color_set(255, 255, 0, 255)
-but2.text_set("2nd button in box")
+but2.text_set("2nd button in box - freeze cb")
but2.event_callback_priority_add(ElwButton.CLICKED, 0, freeze_me)