From d628ac057ad367c7332fda91c7504ac2fd82cf0e Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Wed, 30 Dec 2009 17:22:10 +0100 Subject: Python-Elementary: List Example - part_swallow works, list is swallowed into edje-part 'list' - mouse-events of edje-part 'list' are activated - function huhu() is called by clicking on a list-element - Positioning of list doesn't work Signed-off-by: Nicole Vreden --- src/YalpClients/EflClient/list_test.edc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/YalpClients') diff --git a/src/YalpClients/EflClient/list_test.edc b/src/YalpClients/EflClient/list_test.edc index f3b42e0..079d8d5 100644 --- a/src/YalpClients/EflClient/list_test.edc +++ b/src/YalpClients/EflClient/list_test.edc @@ -2,7 +2,8 @@ collections { group { - name: "list"; + name: "huhu"; + min: 100 100; parts { part @@ -12,7 +13,7 @@ collections mouse_events: 0; description { - state:"default" 0.0; + state: "default" 0.0; rel1 { relative: 0.0 0.0; @@ -27,21 +28,21 @@ collections } part { - name: "video"; + name: "list"; type: SWALLOW; + mouse_events: 1; description { - state: "default"0.0; - aspect: 1.7 1.8; + state: "default" 0.0; + color: 30 89 114 175; + rel1 { - relative: 0.0 0.0; - offset: 0 0; + relative: 0.5 0.5; } rel2 { relative: 1.0 1.0; - offset: 0 0; } } } -- cgit v1.2.3 From 230bf74449135e7c0984453cd05d34c0c8b2093d Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Wed, 30 Dec 2009 17:29:59 +0100 Subject: First Corba Example Signed-off-by: Nicole Vreden --- src/YalpClients/EflClient/corba_test.py | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/YalpClients/EflClient/corba_test.py (limited to 'src/YalpClients') diff --git a/src/YalpClients/EflClient/corba_test.py b/src/YalpClients/EflClient/corba_test.py new file mode 100644 index 0000000..095062c --- /dev/null +++ b/src/YalpClients/EflClient/corba_test.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python + +import sys +from omniORB import CORBA, PortableServer +import Example +import CosNaming, YalpInterfaces YalpInterfaces__POA + +orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) +poa = orb.resolve_initial_references("RootPOA") + +obj = orb.resolve_initial_references("NameService") +root_context = obj._narrow(CosNaming.NamingContext) + +if root_context is None: + print "Failed to narrow the root naming context" + sys.exit(1) + +name = "YALP_Server" + +try: + yalp = root_context.resolve(name) + print "new aptd:apt object bound" + +except CosNaming.NamingContext.NotFound, ex: + print "Name not found" + sys.exit(1) + +if yalp is None: + print "Object reference is not an Example::Echo" + sys.exit(1) + +message = "Hello from Python" + +result = yalp.ping(err) + +poaManager = poa._get_the_POAManager() +poaManager.activate() + +orb.run() + -- cgit v1.2.3 From 97ecea2efaff1daa73492ecbc56835f985be62f3 Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Wed, 30 Dec 2009 18:09:44 +0100 Subject: Python-Elementary: List Example - added minimal group-size in edc-file - Positioning of List works correctly - Function huhu() is called by clicking on a list-item --- src/YalpClients/EflClient/list_test.edc | 6 +- src/YalpClients/EflClient/list_test_elem.py | 91 ++++++++++++++--------------- 2 files changed, 48 insertions(+), 49 deletions(-) mode change 100644 => 100755 src/YalpClients/EflClient/list_test_elem.py (limited to 'src/YalpClients') diff --git a/src/YalpClients/EflClient/list_test.edc b/src/YalpClients/EflClient/list_test.edc index 079d8d5..22e4e17 100644 --- a/src/YalpClients/EflClient/list_test.edc +++ b/src/YalpClients/EflClient/list_test.edc @@ -3,7 +3,7 @@ collections group { name: "huhu"; - min: 100 100; + min: 800 600; parts { part @@ -38,11 +38,11 @@ collections rel1 { - relative: 0.5 0.5; + relative: 0.0 0.5; } rel2 { - relative: 1.0 1.0; + relative: 0.5 1.0; } } } diff --git a/src/YalpClients/EflClient/list_test_elem.py b/src/YalpClients/EflClient/list_test_elem.py old mode 100644 new mode 100755 index a3fcc91..91b223c --- a/src/YalpClients/EflClient/list_test_elem.py +++ b/src/YalpClients/EflClient/list_test_elem.py @@ -9,49 +9,48 @@ import emotion import evas import elementary -def huhu(obj, it): - print "guck guck"; - -elementary.init() -win = elementary.Window("test", elementary.ELM_WIN_BASIC); - -edje_file = os.path.join(os.path.dirname(sys.argv[0]),"list_test.edj") -c = edje.Edje(win.canvas,file=edje_file,group="list") - -vid = emotion.Emotion(win.canvas,module_filename="xine"); -vid.file_set("/home/manut/Videos/2009-2.avi"); - -c.part_swallow("video", vid) - -vid.resize(80,60); -vid.show(); -vid.play = True; - -items = [("huhu",huhu), - ("haha", huhu), - ("hoho", huhu), - ("hehe", huhu), - ("hihi", huhu)]; - -medialist = elementary.List(win); -medialist.size_hint_weight_set(1.0, 1.0) -medialist.size_hint_align_set(-1.0, -1.0) - -box0 = elementary.Box(win); -box0.size_hint_weight_set(1.0, 1.0) -win.resize_object_add(box0); -box0.show(); -box0.pack_end(medialist); -medialist.show(); - -for item in items: - print item[0] - medialist.item_append(item[0], None, None, item[1]); - -medialist.go(); - -win.resize(320,520); -box0.show(); -win.show() -#ecore.main_loop_begin(); -elementary.run(); +#from omniORB import CORBA, PortableServer +#import CosNaming, YalpInterfaces, YalpInterfaces__POA + +def huhu(obj, it, xyz): + print "guck guck" + + +def gui(): + elementary.init() + win = elementary.Window("test", elementary.ELM_WIN_BASIC) + + edje_file = os.path.join(os.path.dirname(sys.argv[0]), "list_test.edj") + c = edje.Edje(win.canvas, file = edje_file, group = "huhu") + + + items = [("huhu", huhu), + ("haha", huhu), + ("hoho", huhu), + ("hehe", huhu), + ("hihi", huhu)] + + medialist = elementary.List(win); + medialist.size_hint_weight_set(1.0, 1.0) + medialist.size_hint_align_set(-1.0, -1.0) + + box0 = elementary.Box(win) + win.resize_object_add(box0) + c.part_swallow("list", medialist) + + box0.pack_end(medialist) + medialist.show() + + for item in items: + print item[0] + medialist.item_append(item[0], None, None, item[1]) + + medialist.go() + + win.resize(800, 600) + + box0.show() + win.show() + elementary.run() + +gui() -- cgit v1.2.3 From 0933267609a286b96daeea91c8eee2a4f231f261 Mon Sep 17 00:00:00 2001 From: Nicole Vreden Date: Wed, 30 Dec 2009 20:17:21 +0100 Subject: Python-EFL GUI: Added List - Part "Medialist" contains Elementary.List - changed Main Window to Elementary.Window Signed-off-by: Nicole Vreden --- src/YalpClients/EflClient/main.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/YalpClients') diff --git a/src/YalpClients/EflClient/main.py b/src/YalpClients/EflClient/main.py index 476023f..de731e9 100755 --- a/src/YalpClients/EflClient/main.py +++ b/src/YalpClients/EflClient/main.py @@ -53,10 +53,16 @@ def gui(): #c.size = win.canvas.size items = [("huhu",huhu), - ("haha", huhu), - ("hoho", huhu), - ("hehe", huhu), - ("hihi", huhu)] + ("haha", huhu), + ("hoho", huhu), + ("hehe", huhu), + ("hihi", huhu), + ("12345", huhu), + ("abcde", huhu), + ("fghij", huhu), + ("klmno", huhu), + ("pqrst", huhu), + ("uvwxyz", huhu)] #ee = ecore.evas.SoftwareX11(w=800, h=600) win.title_set("YALP") -- cgit v1.2.3