aboutsummaryrefslogtreecommitdiffstats
path: root/examples/elementary
diff options
context:
space:
mode:
authorDavide Andreoli <dave@gurumeditation.it>2013-03-01 21:01:50 +0000
committerDavide Andreoli <dave@gurumeditation.it>2013-03-01 21:01:50 +0000
commit0873fe162131bf672245e51d2670fc1ce822cfdd (patch)
tree4fa8667a51105ad846560dafe7e8fe64d935e616 /examples/elementary
parentpython-efl: Skip build related code in setup.py when only generating (diff)
downloadpython-efl-0873fe162131bf672245e51d2670fc1ce822cfdd.tar.gz
Do not import EVERY widget while importing efl.elementary
Now the user is responsable of importing the widget used one by one, this should be a great speedup in the launch of the app. You have to import stuff in this way: from efl import evas from efl import elementary from efl.elementary.window import Window from efl.elementary.layout import Layout ...sorry for the inconvenience SVN revision: 84402
Diffstat (limited to 'examples/elementary')
-rw-r--r--examples/elementary/test.py41
-rw-r--r--examples/elementary/test_3d.py33
-rw-r--r--examples/elementary/test_actionslider.py16
-rw-r--r--examples/elementary/test_bg.py28
-rw-r--r--examples/elementary/test_box.py95
-rw-r--r--examples/elementary/test_bubble.py53
-rw-r--r--examples/elementary/test_button.py29
-rw-r--r--examples/elementary/test_calendar.py17
-rw-r--r--examples/elementary/test_check.py32
-rw-r--r--examples/elementary/test_clock.py25
-rw-r--r--examples/elementary/test_colorselector.py29
-rw-r--r--examples/elementary/test_core_evas_canvas_callbacks.py15
-rw-r--r--examples/elementary/test_core_evas_object_callbacks.py27
-rw-r--r--examples/elementary/test_core_evas_objects.py10
-rw-r--r--examples/elementary/test_ctxpopup.py43
-rw-r--r--examples/elementary/test_cursor.py106
-rw-r--r--examples/elementary/test_datetime.py17
-rw-r--r--examples/elementary/test_dayselector.py19
-rw-r--r--examples/elementary/test_diskselector.py28
-rw-r--r--examples/elementary/test_entry.py59
-rw-r--r--examples/elementary/test_external.py40
-rw-r--r--examples/elementary/test_fileselector.py95
-rw-r--r--examples/elementary/test_flip.py80
-rw-r--r--examples/elementary/test_flipselector.py30
-rw-r--r--examples/elementary/test_frame.py21
-rw-r--r--examples/elementary/test_gengrid.py68
-rw-r--r--examples/elementary/test_genlist.py144
-rw-r--r--examples/elementary/test_grid.py28
-rw-r--r--examples/elementary/test_hover.py79
-rw-r--r--examples/elementary/test_hoversel.py27
-rw-r--r--examples/elementary/test_icon.py53
-rw-r--r--examples/elementary/test_index.py37
-rw-r--r--examples/elementary/test_inwin.py14
-rw-r--r--examples/elementary/test_label.py44
-rw-r--r--examples/elementary/test_layout.py18
-rw-r--r--examples/elementary/test_list.py113
-rw-r--r--examples/elementary/test_map.py82
-rw-r--r--examples/elementary/test_map2.py90
-rw-r--r--examples/elementary/test_map3.py96
-rw-r--r--examples/elementary/test_mapbuf.py42
-rw-r--r--examples/elementary/test_menu.py11
-rw-r--r--examples/elementary/test_multibuttonentry.py39
-rw-r--r--examples/elementary/test_naviframe.py47
-rw-r--r--examples/elementary/test_notify.py41
-rw-r--r--examples/elementary/test_panel.py17
-rw-r--r--examples/elementary/test_panes.py20
-rw-r--r--examples/elementary/test_photo.py17
-rw-r--r--examples/elementary/test_popup.py68
-rw-r--r--examples/elementary/test_progressbar.py42
-rw-r--r--examples/elementary/test_radio.py33
-rw-r--r--examples/elementary/test_scroller.py27
-rw-r--r--examples/elementary/test_segment_control.py31
-rw-r--r--examples/elementary/test_separator.py68
-rw-r--r--examples/elementary/test_slideshow.py37
-rw-r--r--examples/elementary/test_spinner.py18
-rw-r--r--examples/elementary/test_table.py24
-rw-r--r--examples/elementary/test_thumb.py15
-rw-r--r--examples/elementary/test_toolbar.py26
-rw-r--r--examples/elementary/test_tooltip.py42
-rw-r--r--examples/elementary/test_video.py25
-rw-r--r--examples/elementary/test_web.py29
-rw-r--r--examples/elementary/test_win.py28
62 files changed, 1537 insertions, 1091 deletions
diff --git a/examples/elementary/test.py b/examples/elementary/test.py
index d866ff2..c9a552f 100644
--- a/examples/elementary/test.py
+++ b/examples/elementary/test.py
@@ -2,8 +2,19 @@
# encoding: utf-8
import os
-from efl import elementary
+
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.frame import Frame
+from efl.elementary.label import Label
+from efl.elementary.check import Check
+from efl.elementary.entry import Entry
+from efl.elementary.scroller import Scroller
+
from test_3d import evas3d_clicked
from test_actionslider import actionslider_clicked
@@ -213,14 +224,14 @@ items = [
def menu_create(search, win):
tbx.clear()
for category in items:
- frame = elementary.Frame(win)
+ frame = Frame(win)
frame.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
frame.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
frame.text = category[0]
frame.show()
tbx.pack_end(frame)
- tbx2 = elementary.Box(win)
+ tbx2 = Box(win)
tbx2.layout_set(elementary.ELM_BOX_LAYOUT_FLOW_HORIZONTAL)
tbx2.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
tbx2.size_hint_align_set(evas.EVAS_HINT_FILL, 0.0)
@@ -230,7 +241,7 @@ def menu_create(search, win):
cnt = 0
for test in category[1]:
if (search == None) or (test[0].lower().find(search.lower()) > -1):
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = test[0]
bt.callback_clicked_add(test[1])
bt.show()
@@ -254,52 +265,52 @@ def cb_filter(en, win):
if __name__ == "__main__":
elementary.init()
- win = elementary.Window("test", elementary.ELM_WIN_BASIC)
+ win = Window("test", elementary.ELM_WIN_BASIC)
win.title_set("python-elementary test application")
win.callback_delete_request_add(destroy, "test1", "test2", str3="test3", str4="test4")
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- box0 = elementary.Box(win)
+ box0 = Box(win)
box0.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(box0)
box0.show()
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.text_set("Information")
box0.pack_end(fr)
fr.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Please select a test from the list below<br>"
"by clicking the test button to show the<br>"
"test window.")
fr.content_set(lb)
lb.show()
- tg = elementary.Check(win)
+ tg = Check(win)
tg.style = "toggle"
tg.text = "UI-Mirroring:"
tg.callback_changed_add(cb_mirroring)
box0.pack_end(tg)
tg.show()
- bx1 = elementary.Box(win)
+ bx1 = Box(win)
bx1.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
bx1.size_hint_align_set(evas.EVAS_HINT_FILL, 0.0)
bx1.horizontal_set(True)
box0.pack_end(bx1)
bx1.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Filter:")
bx1.pack_end(lb)
lb.show()
- en = elementary.Entry(win)
+ en = Entry(win)
en.single_line_set(True)
en.scrollable_set(True)
en.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
@@ -309,14 +320,14 @@ if __name__ == "__main__":
en.show()
en.focus_set(True)
- sc = elementary.Scroller(win)
+ sc = Scroller(win)
sc.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
sc.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
sc.bounce_set(False, True)
sc.show()
box0.pack_end(sc)
- tbx = elementary.Box(win)
+ tbx = Box(win)
tbx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
tbx.size_hint_align_set(evas.EVAS_HINT_FILL, 0.0)
sc.content_set(tbx)
diff --git a/examples/elementary/test_3d.py b/examples/elementary/test_3d.py
index ff2e224..fd9fc96 100644
--- a/examples/elementary/test_3d.py
+++ b/examples/elementary/test_3d.py
@@ -1,8 +1,17 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+# from efl.elementary.button import Button
+# from efl.elementary.frame import Frame
+# from efl.elementary.label import Label
+# from efl.elementary.check import Check
+# from efl.elementary.entry import Entry
+from efl.elementary.slider import Slider
class Point(object):
@@ -42,7 +51,7 @@ class Cube(object):
self.z0v = 0.0
for i in range(6):
- self.sides.append(Side(win.evas_get()))
+ self.sides.append(Side(win.evas))
w -= (w / 2)
h -= (h / 2)
@@ -149,25 +158,25 @@ def ch_z0(sl, cube):
cube.update()
def evas3d_clicked(obj, item=None):
- win = elementary.Window("evas3d", elementary.ELM_WIN_BASIC)
+ win = Window("evas3d", elementary.ELM_WIN_BASIC)
win.title_set("Evas 3d test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
cube = Cube(win, 240, 240, 240)
- vbox = elementary.Box(win)
+ vbox = Box(win)
vbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(vbox)
vbox.show()
- sl = elementary.Slider(win)
+ sl = Slider(win)
sl.text = "Rot X"
sl.unit_format = "%1.0f units"
sl.span_size = 360
@@ -178,7 +187,7 @@ def evas3d_clicked(obj, item=None):
sl.callback_changed_add(ch_rot_x, cube)
sl.show()
- sl = elementary.Slider(win)
+ sl = Slider(win)
sl.text = "Rot Y"
sl.unit_format = "%1.0f units"
sl.span_size = 360
@@ -189,7 +198,7 @@ def evas3d_clicked(obj, item=None):
sl.callback_changed_add(ch_rot_y, cube)
sl.show()
- sl = elementary.Slider(win)
+ sl = Slider(win)
sl.text = "Rot Z"
sl.unit_format = "%1.0f units"
sl.span_size = 360
@@ -200,7 +209,7 @@ def evas3d_clicked(obj, item=None):
sl.callback_changed_add(ch_rot_z, cube)
sl.show()
- sl = elementary.Slider(win)
+ sl = Slider(win)
sl.text = "CX Off"
sl.unit_format = "%1.0f units"
sl.span_size = 360
@@ -212,7 +221,7 @@ def evas3d_clicked(obj, item=None):
sl.callback_changed_add(ch_cx, cube)
sl.show()
- sl = elementary.Slider(win)
+ sl = Slider(win)
sl.text = "CY Off"
sl.unit_format = "%1.0f units"
sl.span_size = 360
@@ -224,7 +233,7 @@ def evas3d_clicked(obj, item=None):
sl.callback_changed_add(ch_cy, cube)
sl.show()
- sl = elementary.Slider(win)
+ sl = Slider(win)
sl.text = "Foc"
sl.unit_format = "%1.0f units"
sl.span_size = 360
@@ -236,7 +245,7 @@ def evas3d_clicked(obj, item=None):
sl.callback_changed_add(ch_foc, cube)
sl.show()
- sl = elementary.Slider(win)
+ sl = Slider(win)
sl.text = "Z0"
sl.unit_format = "%1.0f units"
sl.span_size = 360
diff --git a/examples/elementary/test_actionslider.py b/examples/elementary/test_actionslider.py
index bc40e8d..4efe62a 100644
--- a/examples/elementary/test_actionslider.py
+++ b/examples/elementary/test_actionslider.py
@@ -1,8 +1,10 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.actionslider import Actionslider
+
def _pos_selected_cb(obj, event_info):
print(("Selection: %s" % (event_info)))
@@ -82,7 +84,7 @@ def actionslider_clicked(obj):
win.resize_object_add(bx)
bx.show()
- acts = elementary.Actionslider(win)
+ acts = Actionslider(win)
acts.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
acts.size_hint_align_set(evas.EVAS_HINT_FILL, 0.0)
acts.indicator_pos_set(elementary.ELM_ACTIONSLIDER_RIGHT)
@@ -96,7 +98,7 @@ def actionslider_clicked(obj):
bx.pack_end(acts)
acts.show()
- acts = elementary.Actionslider(win)
+ acts = Actionslider(win)
acts.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
acts.size_hint_align_set(evas.EVAS_HINT_FILL, 0.0)
acts.indicator_pos_set(elementary.ELM_ACTIONSLIDER_CENTER)
@@ -109,7 +111,7 @@ def actionslider_clicked(obj):
bx.pack_end(acts)
acts.show()
- acts = elementary.Actionslider(win)
+ acts = Actionslider(win)
acts.style_set("bar")
acts.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
acts.size_hint_align_set(evas.EVAS_HINT_FILL, 0.0)
@@ -123,7 +125,7 @@ def actionslider_clicked(obj):
bx.pack_end(acts)
acts.show()
- acts = elementary.Actionslider(win)
+ acts = Actionslider(win)
acts.style_set("bar")
acts.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
acts.size_hint_align_set(evas.EVAS_HINT_FILL, 0.0)
@@ -138,7 +140,7 @@ def actionslider_clicked(obj):
bx.pack_end(acts)
acts.show()
- acts = elementary.Actionslider(win)
+ acts = Actionslider(win)
acts.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
acts.size_hint_align_set(evas.EVAS_HINT_FILL, 0.0)
acts.indicator_pos_set(elementary.ELM_ACTIONSLIDER_LEFT)
@@ -151,7 +153,7 @@ def actionslider_clicked(obj):
bx.pack_end(acts)
acts.show()
- acts = elementary.Actionslider(win)
+ acts = Actionslider(win)
acts.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
acts.size_hint_align_set(evas.EVAS_HINT_FILL, 0.0)
acts.indicator_pos_set(elementary.ELM_ACTIONSLIDER_CENTER)
diff --git a/examples/elementary/test_bg.py b/examples/elementary/test_bg.py
index 5900652..5e18d10 100644
--- a/examples/elementary/test_bg.py
+++ b/examples/elementary/test_bg.py
@@ -2,16 +2,22 @@
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.frame import Frame
+from efl.elementary.label import Label
+from efl.elementary.list import List
def bg_plain_clicked(obj, item=None):
- win = elementary.Window("bg plain", elementary.ELM_WIN_BASIC)
+ win = Window("bg plain", elementary.ELM_WIN_BASIC)
win.title_set("Bg Plain")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
@@ -21,11 +27,11 @@ def bg_plain_clicked(obj, item=None):
def bg_image_clicked(obj, item=None):
- win = elementary.Window("bg-image", elementary.ELM_WIN_BASIC)
+ win = Window("bg-image", elementary.ELM_WIN_BASIC)
win.title_set("Bg Image")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.file_set("images/plant_01.jpg")
bg.option_set(elementary.ELM_BG_OPTION_SCALE)
@@ -47,26 +53,26 @@ if __name__ == "__main__":
elementary.exit()
elementary.init()
- win = elementary.Window("test", elementary.ELM_WIN_BASIC)
+ win = Window("test", elementary.ELM_WIN_BASIC)
win.title_set("python-elementary test application")
win.callback_delete_request_add(destroy)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- box0 = elementary.Box(win)
+ box0 = Box(win)
box0.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(box0)
box0.show()
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.text_set("Information")
box0.pack_end(fr)
fr.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Please select a test from the list below<br>"
"by clicking the test button to show the<br>"
"test window.")
@@ -76,7 +82,7 @@ if __name__ == "__main__":
items = [("Bg Plain", bg_plain_clicked),
("Bg Image", bg_image_clicked)]
- li = elementary.List(win)
+ li = List(win)
li.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
li.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
box0.pack_end(li)
diff --git a/examples/elementary/test_box.py b/examples/elementary/test_box.py
index 535fa47..b1df880 100644
--- a/examples/elementary/test_box.py
+++ b/examples/elementary/test_box.py
@@ -1,40 +1,49 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.frame import Frame
+from efl.elementary.label import Label
+from efl.elementary.list import List
+from efl.elementary.icon import Icon
+from efl.elementary.separator import Separator
def box_vert_clicked(obj, item=None):
- win = elementary.Window("box-vert", elementary.ELM_WIN_BASIC)
+ win = Window("box-vert", elementary.ELM_WIN_BASIC)
win.title_set("Box Vert")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.resizable_set(0, 0)
ic.size_hint_align_set(0.5, 0.5)
bx.pack_end(ic)
ic.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.resizable_set(0, 0)
ic.size_hint_align_set(0.0, 0.5)
bx.pack_end(ic)
ic.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.resizable_set(0, 0)
ic.size_hint_align_set(evas.EVAS_HINT_EXPAND, 0.5)
@@ -49,21 +58,21 @@ def boxvert2_del_cb(bt, bx):
bt.color_set(128, 64, 0, 128)
def box_vert2_clicked(obj, item=None):
- win = elementary.Window("box-vert2", elementary.ELM_WIN_BASIC)
+ win = Window("box-vert2", elementary.ELM_WIN_BASIC)
win.title_set("Box Vert 2")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight_set(0.0, 0.0)
bx.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 1")
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
bt.size_hint_weight_set(0.0, 0.0)
@@ -71,7 +80,7 @@ def box_vert2_clicked(obj, item=None):
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 2")
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
bt.size_hint_weight_set(0.0, 0.0)
@@ -79,7 +88,7 @@ def box_vert2_clicked(obj, item=None):
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 3")
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
bt.size_hint_weight_set(0.0, 0.0)
@@ -87,7 +96,7 @@ def box_vert2_clicked(obj, item=None):
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 4")
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
bt.size_hint_weight_set(0.0, 0.0)
@@ -95,7 +104,7 @@ def box_vert2_clicked(obj, item=None):
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 5")
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
bt.size_hint_weight_set(0.0, 0.0)
@@ -106,36 +115,36 @@ def box_vert2_clicked(obj, item=None):
win.show()
def box_horiz_clicked(obj, item=None):
- win = elementary.Window("box-horiz", elementary.ELM_WIN_BASIC)
+ win = Window("box-horiz", elementary.ELM_WIN_BASIC)
win.title_set("Box Horiz")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
bx.horizontal_set(True)
win.resize_object_add(bx)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.resizable_set(0, 0)
ic.size_hint_align_set(0.5, 0.5)
bx.pack_end(ic)
ic.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.resizable_set(0, 0)
ic.size_hint_align_set(0.5, 0.0)
bx.pack_end(ic)
ic.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.resizable_set(0, 0)
ic.size_hint_align_set(0.0, evas.EVAS_HINT_EXPAND)
@@ -161,55 +170,55 @@ def box_layout_button_cb(obj, box):
box.layout_set(current_layout)
def box_layout_clicked(obj, item=None):
- win = elementary.Window("box-layout", elementary.ELM_WIN_BASIC)
+ win = Window("box-layout", elementary.ELM_WIN_BASIC)
win.title_set("Box Layout")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
win.resize_object_add(vbox)
vbox.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
vbox.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbox.show()
- bx = elementary.Box(win)
+ bx = Box(win)
bx.layout_set(elementary.ELM_BOX_LAYOUT_HORIZONTAL)
bx.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbox.pack_end(bx)
bx.show()
- sep = elementary.Separator(win)
+ sep = Separator(win)
sep.horizontal_set(True)
vbox.pack_end(sep)
sep.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("layout: %s" % layout_list[current_layout])
bt.callback_clicked_add(box_layout_button_cb, bx)
vbox.pack_end(bt)
bt.show()
for i in range(5):
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.resizable_set(0, 0)
ic.size_hint_align_set(0.5, 0.5)
bx.pack_end(ic)
ic.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.resizable_set(0, 0)
ic.size_hint_align_set(1.0, 1.0)
bx.pack_end(ic)
ic.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.resizable_set(0, 0)
ic.size_hint_align_set(0.0, 0.0)
@@ -230,41 +239,41 @@ def box_transition_button_cb(obj, box):
box.layout_transition(0.4, from_ly, current_layout)
def box_transition_clicked(obj, item=None):
- win = elementary.Window("box-layout-transition", elementary.ELM_WIN_BASIC)
+ win = Window("box-layout-transition", elementary.ELM_WIN_BASIC)
win.title_set("Box Layout Transition")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
win.resize_object_add(vbox)
vbox.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
vbox.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbox.show()
- bx = elementary.Box(win)
+ bx = Box(win)
bx.layout_set(elementary.ELM_BOX_LAYOUT_HORIZONTAL)
bx.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbox.pack_end(bx)
bx.show()
- sep = elementary.Separator(win)
+ sep = Separator(win)
sep.horizontal_set(True)
vbox.pack_end(sep)
sep.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("layout: %s" % layout_list[current_layout])
bt.callback_clicked_add(box_transition_button_cb, bx)
vbox.pack_end(bt)
bt.show()
for i in range(4):
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.resizable_set(0, 0)
ic.size_hint_align_set(0.5, 0.5)
@@ -280,26 +289,26 @@ if __name__ == "__main__":
elementary.exit()
elementary.init()
- win = elementary.Window("test", elementary.ELM_WIN_BASIC)
+ win = Window("test", elementary.ELM_WIN_BASIC)
win.title_set("python-elementary test application")
win.callback_delete_request_add(destroy)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- box0 = elementary.Box(win)
+ box0 = Box(win)
box0.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(box0)
box0.show()
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.text_set("Information")
box0.pack_end(fr)
fr.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Please select a test from the list below<br>"
"by clicking the test button to show the<br>"
"test window.")
@@ -312,7 +321,7 @@ if __name__ == "__main__":
("Box Layout", box_layout_clicked),
("Box Layout Transition", box_transition_clicked)]
- li = elementary.List(win)
+ li = List(win)
li.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
li.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
box0.pack_end(li)
diff --git a/examples/elementary/test_bubble.py b/examples/elementary/test_bubble.py
index af9fd0c..944bb59 100644
--- a/examples/elementary/test_bubble.py
+++ b/examples/elementary/test_bubble.py
@@ -1,34 +1,41 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
-
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.frame import Frame
+from efl.elementary.icon import Icon
+from efl.elementary.label import Label
+from efl.elementary.list import List
+from efl.elementary.bubble import Bubble
def bubble_clicked(obj, item=None):
- win = elementary.Window("bubble", elementary.ELM_WIN_BASIC)
+ win = Window("bubble", elementary.ELM_WIN_BASIC)
win.title_set("Bubble")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.show()
# bb 1
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.size_hint_aspect_set(evas.EVAS_ASPECT_CONTROL_VERTICAL, 1, 1)
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Blah, Blah, Blah")
- bb = elementary.Bubble(win)
+ bb = Bubble(win)
bb.text_set("Message 1")
bb.part_text_set("info", "Corner: top_left")
bb.content_set(lb)
@@ -40,14 +47,14 @@ def bubble_clicked(obj, item=None):
bb.show()
# bb 2
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.size_hint_aspect_set(evas.EVAS_ASPECT_CONTROL_VERTICAL, 1, 1)
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Blah, Blah, Blah")
- bb = elementary.Bubble(win)
+ bb = Bubble(win)
bb.text_set("Message 2")
bb.part_text_set("info", "Corner: top_right")
bb.content_set(lb)
@@ -59,14 +66,14 @@ def bubble_clicked(obj, item=None):
bb.show()
# bb 3
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.size_hint_aspect_set(evas.EVAS_ASPECT_CONTROL_VERTICAL, 1, 1)
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Blah, Blah, Blah")
- bb = elementary.Bubble(win)
+ bb = Bubble(win)
bb.text_set("Message 3")
bb.part_text_set("info", "Corner: bottom_left")
bb.content_set(ic)
@@ -77,14 +84,14 @@ def bubble_clicked(obj, item=None):
bb.show()
# bb 4
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.size_hint_aspect_set(evas.EVAS_ASPECT_CONTROL_VERTICAL, 1, 1)
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Blah, Blah, Blah")
- bb = elementary.Bubble(win)
+ bb = Bubble(win)
bb.text_set("Message 4")
bb.part_text_set("info", "Corner: bottom_right")
bb.content_set(lb)
@@ -104,26 +111,26 @@ if __name__ == "__main__":
elementary.exit()
elementary.init()
- win = elementary.Window("test", elementary.ELM_WIN_BASIC)
+ win = Window("test", elementary.ELM_WIN_BASIC)
win.title_set("python-elementary test application")
win.callback_delete_request_add(destroy)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- box0 = elementary.Box(win)
+ box0 = Box(win)
box0.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(box0)
box0.show()
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.text_set("Information")
box0.pack_end(fr)
fr.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Please select a test from the list below<br>"
"by clicking the test button to show the<br>"
"test window.")
@@ -133,7 +140,7 @@ if __name__ == "__main__":
items = [("Bubble", bubble_clicked),
]
- li = elementary.List(win)
+ li = List(win)
li.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
li.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
box0.pack_end(li)
diff --git a/examples/elementary/test_button.py b/examples/elementary/test_button.py
index d8576aa..fca3430 100644
--- a/examples/elementary/test_button.py
+++ b/examples/elementary/test_button.py
@@ -1,57 +1,62 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
-
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.frame import Frame
+from efl.elementary.icon import Icon
+from efl.elementary.button import Button
def buttons_clicked(obj):
- win = elementary.Window("buttons", elementary.ELM_WIN_BASIC)
+ win = Window("buttons", elementary.ELM_WIN_BASIC)
win.title_set("Buttons")
win.focus_highlight_enabled_set(True)
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.size_hint_aspect_set(evas.EVAS_ASPECT_CONTROL_VERTICAL, 1, 1)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Icon sized to button")
bt.content_set(ic)
bx.pack_end(bt)
bt.show()
ic.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.resizable_set(0, 0)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Icon no scale")
bt.content_set(ic)
bx.pack_end(bt)
bt.show()
ic.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("No icon")
bx.pack_end(bt)
bt.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.resizable_set(0, 0)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.content_set(ic)
bx.pack_end(bt)
bt.show()
diff --git a/examples/elementary/test_calendar.py b/examples/elementary/test_calendar.py
index 7d5e338..8fc1884 100644
--- a/examples/elementary/test_calendar.py
+++ b/examples/elementary/test_calendar.py
@@ -1,9 +1,12 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
-
+from efl import elementary
+from efl.elementary.window import StandardWindow
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.calendar_elm import Calendar
from datetime import datetime
@@ -71,20 +74,20 @@ def api_bt_clicked(bt, a):
# A simple test, just displaying calendar in it's default state
def calendar_clicked(obj):
- win = elementary.StandardWindow("calendar", "Calendar")
+ win = StandardWindow("calendar", "Calendar")
win.autodel = True
- bxx = elementary.Box(win)
+ bxx = Box(win)
win.resize_object_add(bxx)
bxx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bxx.show()
- bx = elementary.Box(win)
+ bx = Box(win)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
api["box"] = bx
bx.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Next API function"
bt.callback_clicked_add(api_bt_clicked, api)
bxx.pack_end(bt)
@@ -94,7 +97,7 @@ def calendar_clicked(obj):
bxx.pack_end(bx)
- cal = elementary.Calendar(win)
+ cal = Calendar(win)
cal.first_day_of_week = elementary.ELM_DAY_MONDAY
cal.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.pack_end(cal)
diff --git a/examples/elementary/test_check.py b/examples/elementary/test_check.py
index e1c3c1d..a0fb997 100644
--- a/examples/elementary/test_check.py
+++ b/examples/elementary/test_check.py
@@ -1,9 +1,13 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
-
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.icon import Icon
+from efl.elementary.check import Check
def ck_1(obj):
print(("test check 1 state:", obj.state))
@@ -21,26 +25,26 @@ def ck_4(obj):
print(("test check 4 state:", obj.state))
def check_clicked(obj):
- win = elementary.Window("check", elementary.ELM_WIN_BASIC)
+ win = Window("check", elementary.ELM_WIN_BASIC)
win.title_set("Check test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(bx)
bx.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.size_hint_aspect_set(evas.EVAS_ASPECT_CONTROL_VERTICAL, 1, 1)
- ck = elementary.Check(win)
+ ck = Check(win)
ck.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
ck.size_hint_align_set(evas.EVAS_HINT_FILL, 0.5)
ck.text_set("Icon sized to check")
@@ -51,10 +55,10 @@ def check_clicked(obj):
ck.show()
ic.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.resizable_set(0, 0)
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text_set("Icon no scale")
ck.content_set(ic)
ck.callback_changed_add(ck_2)
@@ -62,16 +66,16 @@ def check_clicked(obj):
ck.show()
ic.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text_set("Label Only")
ck.callback_changed_add(ck_3)
bx.pack_end(ck)
ck.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.size_hint_aspect_set(evas.EVAS_ASPECT_CONTROL_VERTICAL, 1, 1)
- ck = elementary.Check(win)
+ ck = Check(win)
ck.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
ck.size_hint_align_set(evas.EVAS_HINT_FILL, 0.5)
ck.text_set("Disabled check")
@@ -83,11 +87,11 @@ def check_clicked(obj):
ck.show()
ic.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.size_hint_aspect_set(evas.EVAS_ASPECT_CONTROL_VERTICAL, 1, 1)
ic.resizable_set(0, 0)
- ck = elementary.Check(win)
+ ck = Check(win)
ck.content_set(ic)
ck.callback_changed_add(ck_4)
bx.pack_end(ck)
diff --git a/examples/elementary/test_clock.py b/examples/elementary/test_clock.py
index 107d887..198e050 100644
--- a/examples/elementary/test_clock.py
+++ b/examples/elementary/test_clock.py
@@ -1,50 +1,53 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
-
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.clock import Clock
def clock_clicked(obj):
- win = elementary.Window("clock", elementary.ELM_WIN_BASIC)
+ win = Window("clock", elementary.ELM_WIN_BASIC)
win.title_set("Clock")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.show()
- ck = elementary.Clock(win)
+ ck = Clock(win)
bx.pack_end(ck)
ck.show()
- ck = elementary.Clock(win)
+ ck = Clock(win)
ck.show_am_pm_set(True)
bx.pack_end(ck)
ck.show()
print((ck.time_get()))
- ck = elementary.Clock(win)
+ ck = Clock(win)
ck.show_seconds_set(True)
bx.pack_end(ck)
ck.show()
- ck = elementary.Clock(win)
+ ck = Clock(win)
ck.show_seconds_set(True)
ck.show_am_pm_set(True)
bx.pack_end(ck)
ck.show()
- ck = elementary.Clock(win)
+ ck = Clock(win)
ck.edit_set(True)
ck.show_seconds_set(True)
ck.show_am_pm_set(True)
@@ -52,7 +55,7 @@ def clock_clicked(obj):
bx.pack_end(ck)
ck.show()
- ck = elementary.Clock(win)
+ ck = Clock(win)
ck.edit_set(True)
ck.show_seconds_set(True)
ck.edit_mode = elementary.ELM_CLOCK_EDIT_HOUR_DECIMAL | \
diff --git a/examples/elementary/test_colorselector.py b/examples/elementary/test_colorselector.py
index 9d0c79b..fe790c8 100644
--- a/examples/elementary/test_colorselector.py
+++ b/examples/elementary/test_colorselector.py
@@ -1,9 +1,14 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
-
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.frame import Frame
+from efl.elementary.button import Button
+from efl.elementary.colorselector import Colorselector
def cb_cs_changed(cs, rect):
print("changed")
@@ -30,23 +35,23 @@ def cb_cs_item_lp(cs, item, rect):
rect.color = (r, g, b, a)
def colorselector_clicked(obj):
- win = elementary.Window("colorselector", elementary.ELM_WIN_BASIC)
+ win = Window("colorselector", elementary.ELM_WIN_BASIC)
win.title = "ColorSelector test"
win.autodel = True
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
vbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(vbox)
vbox.show()
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.text = "Color View"
fr.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
fr.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -58,14 +63,14 @@ def colorselector_clicked(obj):
fr.content = re
re.show()
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.text = "Color Selector"
fr.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
fr.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
vbox.pack_end(fr)
fr.show()
- cs = elementary.Colorselector(win)
+ cs = Colorselector(win)
cs.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
cs.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
cs.callback_changed_add(cb_cs_changed, re)
@@ -89,14 +94,14 @@ def colorselector_clicked(obj):
cs.palette_color_add(255, 255, 119, 255)
cs.palette_color_add(133, 100, 255, 255)
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal = True
hbox.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
hbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
vbox.pack_end(hbox)
hbox.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Palette"
bt.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
bt.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
@@ -104,7 +109,7 @@ def colorselector_clicked(obj):
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Components"
bt.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
bt.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
@@ -112,7 +117,7 @@ def colorselector_clicked(obj):
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Both"
bt.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
bt.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
diff --git a/examples/elementary/test_core_evas_canvas_callbacks.py b/examples/elementary/test_core_evas_canvas_callbacks.py
index 62e0db3..1cc7b51 100644
--- a/examples/elementary/test_core_evas_canvas_callbacks.py
+++ b/examples/elementary/test_core_evas_canvas_callbacks.py
@@ -1,9 +1,12 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
-
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
def btn_del_cbs_cb(button):
canvas = button.evas_get()
@@ -25,13 +28,13 @@ def events_cb2(rect, evtinfo, event_name):
def core_evas_canvas_callbacks_clicked(obj, item=None):
- win = elementary.Window("evascanvascbs", elementary.ELM_WIN_BASIC)
+ win = Window("evascanvascbs", elementary.ELM_WIN_BASIC)
win.title_set("Evas canvas callbacks")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -56,14 +59,14 @@ def core_evas_canvas_callbacks_clicked(obj, item=None):
r2 = evas.Rectangle(win.evas, size=(120,70), color=(0,100,0,100), pos=(70,70))
r2.show()
- hbox = elementary.Box(win)
+ hbox = Box(win)
win.resize_object_add(hbox)
hbox.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
hbox.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
hbox.horizontal = True
hbox.show()
- b = elementary.Button(win)
+ b = Button(win)
b.text = "del cbs"
b.size_hint_align_set(0.5, 1.0)
hbox.pack_end(b)
diff --git a/examples/elementary/test_core_evas_object_callbacks.py b/examples/elementary/test_core_evas_object_callbacks.py
index 481e94e..c2b439c 100644
--- a/examples/elementary/test_core_evas_object_callbacks.py
+++ b/examples/elementary/test_core_evas_object_callbacks.py
@@ -1,9 +1,12 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
-
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
def btn_del_cbs_cb(button, rect):
@@ -41,13 +44,13 @@ def events_cb2(rect, evtinfo, event_name):
def core_evas_object_callbacks_clicked(obj, item=None):
- win = elementary.Window("evas3d", elementary.ELM_WIN_BASIC)
+ win = Window("evas3d", elementary.ELM_WIN_BASIC)
win.title_set("Evas object callbacks")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -99,56 +102,56 @@ def core_evas_object_callbacks_clicked(obj, item=None):
r2 = evas.Rectangle(win.evas, size=(120,70), color=(0,100,0,100), pos=(70,70))
r2.show()
- hbox = elementary.Box(win)
+ hbox = Box(win)
win.resize_object_add(hbox)
hbox.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
hbox.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
hbox.horizontal = True
hbox.show()
- b = elementary.Button(win)
+ b = Button(win)
b.text = "show / hide"
b.size_hint_align_set(0.5, 1.0)
hbox.pack_end(b)
b.callback_clicked_add(lambda b, r: r.hide() if r.visible else r.show(), r)
b.show()
- b = elementary.Button(win)
+ b = Button(win)
b.text = "move"
b.size_hint_align_set(0.5, 1.0)
hbox.pack_end(b)
b.callback_clicked_add(lambda b, t: r.pos_set(r.pos[0] + 1, r.pos[1]), r)
b.show()
- b = elementary.Button(win)
+ b = Button(win)
b.text = "resize"
b.size_hint_align_set(0.5, 1.0)
hbox.pack_end(b)
b.callback_clicked_add(lambda b, r: r.size_set(r.size[0] + 1, r.size[1] + 1), r)
b.show()
- b = elementary.Button(win)
+ b = Button(win)
b.text = "delete"
b.size_hint_align_set(0.5, 1.0)
hbox.pack_end(b)
b.callback_clicked_add(lambda b, r: r.delete(), r)
b.show()
- b = elementary.Button(win)
+ b = Button(win)
b.text = "raise"
b.size_hint_align_set(0.5, 1.0)
hbox.pack_end(b)
b.callback_clicked_add(lambda b, r: r.raise_(), r)
b.show()
- b = elementary.Button(win)
+ b = Button(win)
b.text = "hints"
b.size_hint_align_set(0.5, 1.0)
hbox.pack_end(b)
b.callback_clicked_add(lambda b, r: r.size_hint_align_set(0.0, 0.0), r)
b.show()
- b = elementary.Button(win)
+ b = Button(win)
b.text = "del cbs"
b.size_hint_align_set(0.5, 1.0)
hbox.pack_end(b)
diff --git a/examples/elementary/test_core_evas_objects.py b/examples/elementary/test_core_evas_objects.py
index 5461004..d6ca46d 100644
--- a/examples/elementary/test_core_evas_objects.py
+++ b/examples/elementary/test_core_evas_objects.py
@@ -1,9 +1,10 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
-
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
def events_cb1(rect, event_name):
@@ -15,19 +16,18 @@ def events_cb2(rect, evtinfo, event_name):
def core_evas_objects_clicked(obj, item=None):
- win = elementary.Window("evasobjects", elementary.ELM_WIN_BASIC)
+ win = Window("evasobjects", elementary.ELM_WIN_BASIC)
win.title_set("Evas Objects Test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
bg.show()
-
rect = evas.Rectangle(win.evas, size=(120,70), color=(0,100,0,100), pos=(70,70))
rect.show()
diff --git a/examples/elementary/test_ctxpopup.py b/examples/elementary/test_ctxpopup.py
index dd6dc39..25b2eb3 100644
--- a/examples/elementary/test_ctxpopup.py
+++ b/examples/elementary/test_ctxpopup.py
@@ -1,16 +1,23 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
-
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.icon import Icon
+from efl.elementary.button import Button
+from efl.elementary.list import List
+from efl.elementary.ctxpopup import Ctxpopup
+from efl.elementary.scroller import Scroller
def cb_items(li, item):
print(("ctxpopup item selected: %s" % (item.text)))
def item_new(cp, label, icon = None):
if icon:
- ic = elementary.Icon(cp)
+ ic = Icon(cp)
ic.standard_set(icon)
ic.resizable_set(False, False)
return cp.item_append(label, ic, cb_items)
@@ -37,7 +44,7 @@ def cb_dismissed(cp):
cp.data["img"].delete()
def cb_item1(li, item):
- cp = elementary.Ctxpopup(li)
+ cp = Ctxpopup(li)
it = item_new(cp, "Go to home folder", "home")
it = item_new(cp, "Save file", "file")
it = item_new(cp, "Delete file", "delete")
@@ -52,7 +59,7 @@ def cb_item1(li, item):
cp.show()
def cb_item2(li, item):
- cp = elementary.Ctxpopup(li)
+ cp = Ctxpopup(li)
it = item_new(cp, "", "home")
it = item_new(cp, "", "file")
it = item_new(cp, "", "delete")
@@ -66,7 +73,7 @@ def cb_item2(li, item):
cp.show()
def cb_item3(li, item):
- cp = elementary.Ctxpopup(li)
+ cp = Ctxpopup(li)
it = item_new(cp, "Eina")
it = item_new(cp, "Eet")
it = item_new(cp, "Evas")
@@ -80,7 +87,7 @@ def cb_item3(li, item):
cp.show()
def cb_item4(li, item):
- cp = elementary.Ctxpopup(li)
+ cp = Ctxpopup(li)
cp.horizontal = True
it = item_new(cp, "", "home")
it = item_new(cp, "", "file")
@@ -94,39 +101,39 @@ def cb_item4(li, item):
cp.show()
def cb_item5(li, item):
- box = elementary.Box(li)
+ box = Box(li)
box.size_hint_min = (150, 150)
- sc = elementary.Scroller(li)
+ sc = Scroller(li)
sc.bounce = (False, True)
sc.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
sc.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
sc.show()
- bt = elementary.Button(li)
+ bt = Button(li)
bt.text = "Enlightenment"
bt.size_hint_min = (140, 140)
sc.content = bt
box.pack_end(sc)
- cp = elementary.Ctxpopup(li)
+ cp = Ctxpopup(li)
cp.content = box
(x, y) = li.evas.pointer_canvas_xy_get()
cp.move(x, y)
cp.show()
def cb_item6(li, item):
- box = elementary.Box(li)
+ box = Box(li)
box.size_hint_min = (200, 150)
- sc = elementary.Scroller(li)
+ sc = Scroller(li)
sc.bounce = (False, True)
sc.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
sc.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
sc.show()
- bt = elementary.Button(li)
+ bt = Button(li)
bt.text = "Ctxpop will be on the top of layer"
bt.callback_clicked_add(cb_btn)
bt.size_hint_min = (190, 140)
@@ -134,7 +141,7 @@ def cb_item6(li, item):
sc.content = bt
box.pack_end(sc)
- cp = elementary.Ctxpopup(li)
+ cp = Ctxpopup(li)
cp.callback_dismissed_add(cb_dismissed)
cp.content = box
(x, y) = li.evas.pointer_canvas_xy_get()
@@ -143,18 +150,18 @@ def cb_item6(li, item):
bt.data["ctxpopup"] = cp
def ctxpopup_clicked(obj):
- win = elementary.Window("ctxpopup", elementary.ELM_WIN_BASIC)
+ win = Window("ctxpopup", elementary.ELM_WIN_BASIC)
win.title = "Context popup test"
win.autodel = True
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- li = elementary.List(win)
+ li = List(win)
win.resize_object_add(li)
li.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
li.mode = elementary.ELM_LIST_COMPRESS
diff --git a/examples/elementary/test_cursor.py b/examples/elementary/test_cursor.py
index 9d4de95..d4b18e2 100644
--- a/examples/elementary/test_cursor.py
+++ b/examples/elementary/test_cursor.py
@@ -2,61 +2,69 @@
# encoding: utf-8
-from efl import elementary
-# from efl.elementary import cursors
from efl import evas
-
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.label import Label
+from efl.elementary.list import List
+from efl.elementary.frame import Frame
+from efl.elementary.clock import Clock
+from efl.elementary.entry import Entry
+from efl.elementary.toolbar import Toolbar
def cursor_clicked(obj, item=None):
- win = elementary.Window("cursors", elementary.ELM_WIN_BASIC)
+ win = Window("cursors", elementary.ELM_WIN_BASIC)
win.title_set("Cursors")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.show()
- ck = elementary.Clock(win)
- ck.cursor_set(elementary.ELM_CURSOR_CLOCK)
+ ck = Clock(win)
+ ck.cursor_set("clock")
bx.pack_end(ck)
ck.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Coffee Mug")
- bt.cursor_set(elementary.ELM_CURSOR_COFFEE_MUG)
+ bt.cursor_set("coffee_mug")
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Cursor unset")
- bt.cursor_set(elementary.ELM_CURSOR_BOGOSITY)
+ bt.cursor_set("bogosity")
bt.cursor_unset()
bx.pack_end(bt)
bt.show()
- lst = elementary.List(win)
+ lst = List(win)
lst.item_append("watch over list")
lst.item_append("watch over list")
lst.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
lst.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
- lst.cursor_set(elementary.ELM_CURSOR_WATCH)
+ lst.cursor_set("watch")
bx.pack_end(lst)
lst.go()
lst.show()
- en = elementary.Entry(win)
+ en = Entry(win)
en.scrollable_set(True)
en.single_line_set(True)
en.entry_set("Xterm cursor")
en.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
en.size_hint_align_set(evas.EVAS_HINT_FILL, 0.5)
- en.cursor_set(elementary.ELM_CURSOR_XTERM)
+ en.cursor_set("xterm")
bx.pack_end(en)
en.show()
@@ -65,41 +73,39 @@ def cursor_clicked(obj, item=None):
def cursor2_clicked(obj, item=None):
- win = elementary.Window("cursors", elementary.ELM_WIN_BASIC)
+ win = Window("cursors", elementary.ELM_WIN_BASIC)
win.title_set("Cursors 2")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.show()
- tb = elementary.Toolbar(win)
+ tb = Toolbar(win)
ti = tb.item_append("folder-new", "Bogosity", None, None)
- ti.cursor_set(elementary.ELM_CURSOR_BOGOSITY)
+ ti.cursor_set("bogosity")
ti = tb.item_append("clock", "Unset", None, None)
- ti.cursor_set(elementary.ELM_CURSOR_BOGOSITY)
ti.cursor_unset()
ti = tb.item_append("document-print", "Xterm", None, None)
- ti.cursor_set(elementary.ELM_CURSOR_XTERM)
+ ti.cursor_set("xterm")
tb.size_hint_weight_set(0.0, 0.0)
tb.size_hint_align_set(evas.EVAS_HINT_FILL, 0.0)
bx.pack_end(tb)
tb.show()
- lst = elementary.List(win)
+ lst = List(win)
li = lst.item_append("cursor bogosity")
- li.cursor_set(elementary.ELM_CURSOR_BOGOSITY)
+ li.cursor_set("bogosity")
li = lst.item_append("cursor unset")
- li.cursor_set(elementary.ELM_CURSOR_BOGOSITY)
li.cursor_unset()
li = lst.item_append("cursor xterm")
- li.cursor_set(elementary.ELM_CURSOR_XTERM)
+ li.cursor_set("xterm")
lst.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
lst.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
bx.pack_end(lst)
@@ -111,49 +117,49 @@ def cursor2_clicked(obj, item=None):
def cursor3_clicked(obj, item=None):
- win = elementary.Window("cursors", elementary.ELM_WIN_BASIC)
+ win = Window("cursors", elementary.ELM_WIN_BASIC)
win.title_set("Cursors 3")
win.autodel_set(True)
elementary.theme_extension_add("./cursors.edj")
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("hand1")
- bt.cursor_set(elementary.ELM_CURSOR_HAND1)
+ bt.cursor_set("hand1")
bt.cursor_theme_search_enabled_set(False)
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("hand2 x")
- bt.cursor_set(elementary.ELM_CURSOR_HAND2)
+ bt.cursor_set("hand2")
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("hand2")
- bt.cursor_set(elementary.ELM_CURSOR_HAND2)
+ bt.cursor_set("hand2")
bt.cursor_theme_search_enabled_set(False)
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("hand3")
bt.cursor_set("hand3")
bt.cursor_theme_search_enabled_set(False)
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("hand3")
bt.cursor_set("hand3")
bt.cursor_theme_search_enabled_set(False)
@@ -161,7 +167,7 @@ def cursor3_clicked(obj, item=None):
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("not existent")
bt.cursor_set("hand4")
bt.cursor_theme_search_enabled_set(False)
@@ -169,24 +175,24 @@ def cursor3_clicked(obj, item=None):
bt.show()
elementary.cursor_engine_only_set(False)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("hand 2 engine only config false")
bt.cursor_set("hand2")
bx.pack_end(bt)
bt.show()
elementary.cursor_engine_only_set(True)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("hand 2 engine only config true")
bt.cursor_set("hand2")
bx.pack_end(bt)
bt.show()
- lst = elementary.List(win)
+ lst = List(win)
li = lst.item_append("cursor hand2 x")
- li.cursor_set(elementary.ELM_CURSOR_HAND2)
+ li.cursor_set("hand2")
li = lst.item_append("cursor hand2")
- li.cursor_set(elementary.ELM_CURSOR_HAND2)
+ li.cursor_set("hand2")
li.cursor_engine_only_set(False)
li = lst.item_append("cursor hand3")
li.cursor_set("hand3")
@@ -210,26 +216,26 @@ if __name__ == "__main__":
elementary.exit()
elementary.init()
- win = elementary.Window("test", elementary.ELM_WIN_BASIC)
+ win = Window("test", elementary.ELM_WIN_BASIC)
win.title_set("python-elementary test application")
win.callback_delete_request_add(destroy)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- box0 = elementary.Box(win)
+ box0 = Box(win)
box0.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(box0)
box0.show()
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.text_set("Information")
box0.pack_end(fr)
fr.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Please select a test from the list below<br>"
"by clicking the test button to show the<br>"
"test window.")
@@ -240,7 +246,7 @@ if __name__ == "__main__":
("Cursor 2", cursor2_clicked),
("Cursor 3", cursor3_clicked)]
- li = elementary.List(win)
+ li = List(win)
li.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
li.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
box0.pack_end(li)
diff --git a/examples/elementary/test_datetime.py b/examples/elementary/test_datetime.py
index 3c2ed12..0aff5cb 100644
--- a/examples/elementary/test_datetime.py
+++ b/examples/elementary/test_datetime.py
@@ -2,8 +2,13 @@
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import StandardWindow
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.datetime_elm import Datetime
+
from datetime import datetime
@@ -12,17 +17,17 @@ def changed_cb(obj):
printf("Datetime value is changed\n")
def datetime_clicked(obj):
- win = elementary.StandardWindow("dt", "DateTime")
+ win = StandardWindow("dt", "DateTime")
win.autodel = True
- bx = elementary.Box(win)
+ bx = Box(win)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(bx)
bx.horizontal = False
bx.show()
bx.size_hint_min_set(360, 240)
- dt = elementary.Datetime(bx)
+ dt = Datetime(bx)
dt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
dt.size_hint_align_set(evas.EVAS_HINT_FILL, 0.5)
dt.field_visible_set(elementary.ELM_DATETIME_HOUR, False)
@@ -31,7 +36,7 @@ def datetime_clicked(obj):
bx.pack_end(dt)
dt.show()
- dt = elementary.Datetime(bx)
+ dt = Datetime(bx)
dt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
dt.size_hint_align_set(evas.EVAS_HINT_FILL, 0.5)
dt.field_visible_set(elementary.ELM_DATETIME_YEAR, False)
@@ -40,7 +45,7 @@ def datetime_clicked(obj):
bx.pack_end(dt)
dt.show()
- dt = elementary.Datetime(bx)
+ dt = Datetime(bx)
dt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
dt.size_hint_align_set(evas.EVAS_HINT_FILL, 0.5)
diff --git a/examples/elementary/test_dayselector.py b/examples/elementary/test_dayselector.py
index 3a6f829..ed4460f 100644
--- a/examples/elementary/test_dayselector.py
+++ b/examples/elementary/test_dayselector.py
@@ -1,9 +1,12 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
-
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.dayselector import Dayselector
def cb_changed(ds):
print("\nSelected Days:")
@@ -17,25 +20,25 @@ def cb_changed(ds):
def dayselector_clicked(obj):
- win = elementary.Window("dayselector", elementary.ELM_WIN_BASIC)
+ win = Window("dayselector", elementary.ELM_WIN_BASIC)
win.title = "Dayselector test"
win.autodel = True
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- box = elementary.Box(win)
+ box = Box(win)
box.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
box.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
win.resize_object_add(box)
box.show()
# default
- ds = elementary.Dayselector(win)
+ ds = Dayselector(win)
ds.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
ds.size_hint_align = (evas.EVAS_HINT_FILL, 0.5)
box.pack_end(ds)
@@ -43,7 +46,7 @@ def dayselector_clicked(obj):
ds.callback_dayselector_changed_add(cb_changed)
# Sunday first
- ds = elementary.Dayselector(win)
+ ds = Dayselector(win)
ds.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
ds.size_hint_align = (evas.EVAS_HINT_FILL, 0.5)
box.pack_end(ds)
@@ -56,7 +59,7 @@ def dayselector_clicked(obj):
print("BUG HERE !!!")
# Monday first
- ds = elementary.Dayselector(win)
+ ds = Dayselector(win)
ds.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
ds.size_hint_align = (evas.EVAS_HINT_FILL, 0.5)
ds.callback_dayselector_changed_add(cb_changed)
diff --git a/examples/elementary/test_diskselector.py b/examples/elementary/test_diskselector.py
index e898d70..953013c 100644
--- a/examples/elementary/test_diskselector.py
+++ b/examples/elementary/test_diskselector.py
@@ -1,16 +1,20 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
-
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.icon import Icon
+from efl.elementary.diskselector import Diskselector
months=["January", "February", "March", "April", "May", "June", "August", "September", "October", "November", "December"]
weekdays=["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
months_short=["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
def disk_create(win, rnd):
- di = elementary.Diskselector(win)
+ di = Diskselector(win)
for m in months:
if m == "August":
it = di.item_append(m)
@@ -27,18 +31,18 @@ def cb_sel(ds, item):
def diskselector_clicked(obj):
- win = elementary.Window("diskselector", elementary.ELM_WIN_BASIC)
+ win = Window("diskselector", elementary.ELM_WIN_BASIC)
win.title = "Diskselector test"
win.autodel = True
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
vbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(vbox)
vbox.show()
@@ -67,9 +71,9 @@ def diskselector_clicked(obj):
di.show()
di.side_text_max_length = 4
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file = "images/logo_small.png"
- di = elementary.Diskselector(win)
+ di = Diskselector(win)
di.item_append("Sunday", ic)
for day in weekdays:
di.item_append(day)
@@ -79,9 +83,9 @@ def diskselector_clicked(obj):
vbox.pack_end(di)
di.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file = "images/logo_small.png"
- di = elementary.Diskselector(win)
+ di = Diskselector(win)
di.item_append("머리스타일", ic)
for lan in ["プロが伝授する", "生上访要求政府", "English", "والشريعة", "עִבְרִית", "Grüßen"]:
di.item_append(lan)
@@ -92,7 +96,7 @@ def diskselector_clicked(obj):
vbox.pack_end(di)
di.show()
- di = elementary.Diskselector(win)
+ di = Diskselector(win)
di.display_item_num = 5
for m in months_short:
di.item_append(m)
@@ -104,7 +108,7 @@ def diskselector_clicked(obj):
di.show()
di.last_item.selected = True
- di = elementary.Diskselector(win)
+ di = Diskselector(win)
di.display_item_num = 7
for i in range(31):
di.item_append(str(i))
diff --git a/examples/elementary/test_entry.py b/examples/elementary/test_entry.py
index 135e276..00f354c 100644
--- a/examples/elementary/test_entry.py
+++ b/examples/elementary/test_entry.py
@@ -1,9 +1,16 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
-
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.entry import Entry
+from efl.elementary.list import List
+from efl.elementary.frame import Frame
+from efl.elementary.label import Label
def my_entry_bt_1(bt, en):
en.entry_set("")
@@ -24,21 +31,21 @@ def my_entry_anchor_test(obj, anchor, en, *args, **kwargs):
def entry_clicked(obj, item=None):
- win = elementary.Window("entry", elementary.ELM_WIN_BASIC)
+ win = Window("entry", elementary.ELM_WIN_BASIC)
win.title_set("Entry")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.show()
- en = elementary.Entry(win)
+ en = Entry(win)
en.line_wrap_set(False)
en.entry_set("This is an entry widget in this window that<br>"
"uses markup <b>like this</> for styling and<br>"
@@ -53,12 +60,12 @@ def entry_clicked(obj, item=None):
bx.pack_end(en)
en.show()
- bx2 = elementary.Box(win)
+ bx2 = Box(win)
bx2.horizontal_set(True)
bx2.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
bx2.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Clear")
bt.callback_clicked_add(my_entry_bt_1, en)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -66,7 +73,7 @@ def entry_clicked(obj, item=None):
bx2.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Print")
bt.callback_clicked_add(my_entry_bt_2, en)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -74,7 +81,7 @@ def entry_clicked(obj, item=None):
bx2.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Selection")
bt.callback_clicked_add(my_entry_bt_3, en)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -82,7 +89,7 @@ def entry_clicked(obj, item=None):
bx2.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Insert")
bt.callback_clicked_add(my_entry_bt_4, en)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -98,16 +105,16 @@ def entry_clicked(obj, item=None):
def entry_scrolled_clicked(obj, item=None):
- win = elementary.Window("entry", elementary.ELM_WIN_BASIC)
+ win = Window("entry", elementary.ELM_WIN_BASIC)
win.title_set("Scrolled Entry")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- en = elementary.Entry(win)
+ en = Entry(win)
win.resize_object_add(en)
en.scrollable_set(True)
en.line_wrap_set(False)
@@ -137,26 +144,26 @@ def anchor_hover_opened(obj, event_info):
print(("We should have EntryAnchorHoverInfo here: %s" % (event_info)))
print(("EntryAnchorHoverInfo has the following properties and methods: %s" % (dir(event_info))))
print(event_info.anchor_info.name)
- btn = elementary.Button(obj)
+ btn = Button(obj)
btn.text_set("Testing entry anchor")
event_info.hover.part_content_set("middle", btn)
btn.show()
def entry_anchor_clicked(obj, item=None):
- win = elementary.Window("entry", elementary.ELM_WIN_BASIC)
+ win = Window("entry", elementary.ELM_WIN_BASIC)
win.title_set("Entry Anchor")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
bg.size_hint_weight_set(1.0, 1.0)
win.resize_object_add(bg)
bg.show()
- box = elementary.Box(win)
+ box = Box(win)
box.size_hint_weight_set(1.0, 1.0)
win.resize_object_add(box)
- entry = elementary.Entry(win)
+ entry = Entry(win)
entry.text_set("<a href=url:http://www.enlightenment.org/>Enlightenment</a>")
entry.callback_anchor_clicked_add(anchor_clicked)
entry.anchor_hover_style_set("popout")
@@ -164,7 +171,7 @@ def entry_anchor_clicked(obj, item=None):
entry.callback_anchor_hover_opened_add(anchor_hover_opened)
entry.show()
- frame = elementary.Frame(win)
+ frame = Frame(win)
frame.size_hint_align_set(-1.0, -1.0)
frame.text_set("Entry test")
frame.content_set(entry)
@@ -182,26 +189,26 @@ if __name__ == "__main__":
elementary.exit()
elementary.init()
- win = elementary.Window("test", elementary.ELM_WIN_BASIC)
+ win = Window("test", elementary.ELM_WIN_BASIC)
win.title_set("python-elementary test application")
win.callback_delete_request_add(destroy)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- box0 = elementary.Box(win)
+ box0 = Box(win)
box0.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(box0)
box0.show()
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.text_set("Information")
box0.pack_end(fr)
fr.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Please select a test from the list below<br>"
"by clicking the test button to show the<br>"
"test window.")
@@ -213,7 +220,7 @@ if __name__ == "__main__":
("Entry Anchor", entry_anchor_clicked)
]
- li = elementary.List(win)
+ li = List(win)
li.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
li.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
box0.pack_end(li)
diff --git a/examples/elementary/test_external.py b/examples/elementary/test_external.py
index 8f5fea1..97da8b7 100644
--- a/examples/elementary/test_external.py
+++ b/examples/elementary/test_external.py
@@ -4,17 +4,23 @@
from efl import evas
from efl import ecore
from efl import elementary
-
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.layout import Layout
+from efl.elementary.box import Box
+from efl.elementary.frame import Frame
+from efl.elementary.label import Label
+from efl.elementary.list import List
def edje_external_button_clicked(obj, item=None):
- win = elementary.Window("edje-external-button", elementary.ELM_WIN_BASIC)
+ win = Window("edje-external-button", elementary.ELM_WIN_BASIC)
win.title_set("Edje External Button")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- ly = elementary.Layout(win)
+ ly = Layout(win)
ly.file_set("test_external.edj", "external/button")
ly.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(ly)
@@ -52,13 +58,13 @@ def cb_btn3_clicked(bt, ly):
ecore.timer_add(0.1, animate, ly)
def edje_external_pbar_clicked(obj, item=None):
- win = elementary.Window("edje-external-pbar", elementary.ELM_WIN_BASIC)
+ win = Window("edje-external-pbar", elementary.ELM_WIN_BASIC)
win.title_set("Edje External Progress Bar")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- ly = elementary.Layout(win)
+ ly = Layout(win)
ly.file_set("test_external.edj", "external/pbar")
ly.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(ly)
@@ -73,13 +79,13 @@ def edje_external_pbar_clicked(obj, item=None):
def edje_external_scroller_clicked(obj, item=None):
- win = elementary.Window("edje-external-scroller", elementary.ELM_WIN_BASIC)
+ win = Window("edje-external-scroller", elementary.ELM_WIN_BASIC)
win.title_set("Edje External Scroller")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- ly = elementary.Layout(win)
+ ly = Layout(win)
ly.file_set("test_external.edj", "external/scroller")
ly.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(ly)
@@ -90,13 +96,13 @@ def edje_external_scroller_clicked(obj, item=None):
def edje_external_slider_clicked(obj, item=None):
- win = elementary.Window("edje-external-slider", elementary.ELM_WIN_BASIC)
+ win = Window("edje-external-slider", elementary.ELM_WIN_BASIC)
win.title_set("Edje External Slider")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- ly = elementary.Layout(win)
+ ly = Layout(win)
ly.file_set("test_external.edj", "external/slider")
ly.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(ly)
@@ -107,13 +113,13 @@ def edje_external_slider_clicked(obj, item=None):
def edje_external_video_clicked(obj, item=None):
- win = elementary.Window("edje-external-video", elementary.ELM_WIN_BASIC)
+ win = Window("edje-external-video", elementary.ELM_WIN_BASIC)
win.title_set("Edje External Video")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- ly = elementary.Layout(win)
+ ly = Layout(win)
ly.file_set("test_external.edj", "external/video")
ly.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(ly)
@@ -129,26 +135,26 @@ if __name__ == "__main__":
elementary.exit()
elementary.init()
- win = elementary.Window("test", elementary.ELM_WIN_BASIC)
+ win = Window("test", elementary.ELM_WIN_BASIC)
win.title_set("python-elementary test application")
win.callback_delete_request_add(destroy)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- box0 = elementary.Box(win)
+ box0 = Box(win)
box0.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(box0)
box0.show()
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.text_set("Information")
box0.pack_end(fr)
fr.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Please select a test from the list below<br>"
"by clicking the test button to show the<br>"
"test window.")
@@ -161,7 +167,7 @@ if __name__ == "__main__":
("Ext Slider", edje_external_slider_clicked),
("Ext Video", edje_external_video_clicked)]
- li = elementary.List(win)
+ li = List(win)
li.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
li.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
box0.pack_end(li)
diff --git a/examples/elementary/test_fileselector.py b/examples/elementary/test_fileselector.py
index cfde09a..c4f51d0 100644
--- a/examples/elementary/test_fileselector.py
+++ b/examples/elementary/test_fileselector.py
@@ -2,9 +2,20 @@
# encoding: utf-8
import os
-from efl import elementary
from efl import evas
-
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.frame import Frame
+from efl.elementary.label import Label
+from efl.elementary.button import Button
+from efl.elementary.check import Check
+from efl.elementary.list import List
+from efl.elementary.fileselector import Fileselector
+from efl.elementary.fileselector_button import FileselectorButton
+from efl.elementary.fileselector_entry import FileselectorEntry
+from efl.elementary.separator import Separator
def fs_cb_done(fs, selected, win):
@@ -45,21 +56,21 @@ def bt_cb_mode_cycle(bt, fs):
def fileselector_clicked(obj, item=None):
- win = elementary.Window("fileselector", elementary.ELM_WIN_BASIC)
+ win = Window("fileselector", elementary.ELM_WIN_BASIC)
win.title_set("File selector test")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
win.resize_object_add(vbox)
vbox.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbox.show()
- fs = elementary.Fileselector(win)
+ fs = Fileselector(win)
fs.is_save_set(True)
fs.expandable_set(False)
fs.folder_only_set(False)
@@ -72,62 +83,62 @@ def fileselector_clicked(obj, item=None):
vbox.pack_end(fs)
fs.show()
- sep = elementary.Separator(win)
+ sep = Separator(win)
sep.horizontal_set(True)
vbox.pack_end(sep)
sep.show()
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal_set(True)
vbox.pack_end(hbox)
hbox.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text_set("is_save")
ck.state_set(fs.is_save)
ck.callback_changed_add(ck_cb_is_save, fs)
hbox.pack_end(ck)
ck.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text_set("folder_only")
ck.state_set(fs.folder_only)
ck.callback_changed_add(ck_cb_folder_only, fs)
hbox.pack_end(ck)
ck.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text_set("expandable")
ck.state_set(fs.expandable)
ck.callback_changed_add(ck_cb_expandable, fs)
hbox.pack_end(ck)
ck.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text_set("buttons")
ck.state_set(fs.buttons_ok_cancel)
ck.callback_changed_add(ck_cb_buttons, fs)
hbox.pack_end(ck)
ck.show()
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal_set(True)
vbox.pack_end(hbox)
hbox.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("selected_get")
bt.callback_clicked_add(bt_cb_sel_get, fs)
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("path_get")
bt.callback_clicked_add(bt_cb_path_get, fs)
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("mode cycle")
bt.callback_clicked_add(bt_cb_mode_cycle, fs)
hbox.pack_end(bt)
@@ -138,21 +149,21 @@ def fileselector_clicked(obj, item=None):
def fileselector_button_clicked(obj, item=None):
- win = elementary.Window("fileselector", elementary.ELM_WIN_BASIC)
+ win = Window("fileselector", elementary.ELM_WIN_BASIC)
win.title_set("File selector test")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
win.resize_object_add(vbox)
vbox.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbox.show()
- fse = elementary.FileselectorButton(win)
+ fse = FileselectorButton(win)
fse.text_set("Select a file")
fse.inwin_mode_set(False)
fse.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -160,39 +171,39 @@ def fileselector_button_clicked(obj, item=None):
vbox.pack_end(fse)
fse.show()
- sep = elementary.Separator(win)
+ sep = Separator(win)
sep.horizontal_set(True)
vbox.pack_end(sep)
sep.show()
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal_set(True)
hbox.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbox.pack_end(hbox)
hbox.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text_set("inwin")
ck.state_set(fse.inwin_mode)
ck.callback_changed_add(ck_entry_cb_inwin, fse)
hbox.pack_end(ck)
ck.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text_set("folder_only")
ck.state_set(fse.folder_only)
ck.callback_changed_add(ck_entry_cb_folder_only, fse)
hbox.pack_end(ck)
ck.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text_set("is_save")
ck.state_set(fse.is_save)
ck.callback_changed_add(ck_entry_cb_is_save, fse)
hbox.pack_end(ck)
ck.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text_set("expandable")
ck.state_set(fse.expandable)
ck.callback_changed_add(ck_entry_cb_expandable, fse)
@@ -221,21 +232,21 @@ def ck_entry_cb_expandable(bt, fse):
def fileselector_entry_clicked(obj, item=None):
- win = elementary.Window("fileselector", elementary.ELM_WIN_BASIC)
+ win = Window("fileselector", elementary.ELM_WIN_BASIC)
win.title_set("File selector test")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
win.resize_object_add(vbox)
vbox.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbox.show()
- fse = elementary.FileselectorEntry(win)
+ fse = FileselectorEntry(win)
fse.text_set("Select a file")
fse.inwin_mode_set(False)
fse.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -243,39 +254,39 @@ def fileselector_entry_clicked(obj, item=None):
vbox.pack_end(fse)
fse.show()
- sep = elementary.Separator(win)
+ sep = Separator(win)
sep.horizontal_set(True)
vbox.pack_end(sep)
sep.show()
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal_set(True)
hbox.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbox.pack_end(hbox)
hbox.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text_set("inwin")
ck.state_set(fse.inwin_mode)
ck.callback_changed_add(ck_entry_cb_inwin, fse)
hbox.pack_end(ck)
ck.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text_set("folder_only")
ck.state_set(fse.folder_only)
ck.callback_changed_add(ck_entry_cb_folder_only, fse)
hbox.pack_end(ck)
ck.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text_set("is_save")
ck.state_set(fse.is_save)
ck.callback_changed_add(ck_entry_cb_is_save, fse)
hbox.pack_end(ck)
ck.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text_set("expandable")
ck.state_set(fse.expandable)
ck.callback_changed_add(ck_entry_cb_expandable, fse)
@@ -291,26 +302,26 @@ if __name__ == "__main__":
elementary.exit()
elementary.init()
- win = elementary.Window("test", elementary.ELM_WIN_BASIC)
+ win = Window("test", elementary.ELM_WIN_BASIC)
win.title_set("python-elementary test application")
win.callback_delete_request_add(destroy)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- box0 = elementary.Box(win)
+ box0 = Box(win)
box0.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(box0)
box0.show()
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.text_set("Information")
box0.pack_end(fr)
fr.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Please select a test from the list below<br>"
"by clicking the test button to show the<br>"
"test window.")
@@ -322,7 +333,7 @@ if __name__ == "__main__":
("Fileselector Entry", fileselector_entry_clicked),
]
- li = elementary.List(win)
+ li = List(win)
li.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
li.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
box0.pack_end(li)
diff --git a/examples/elementary/test_flip.py b/examples/elementary/test_flip.py
index f7be694..1be125c 100644
--- a/examples/elementary/test_flip.py
+++ b/examples/elementary/test_flip.py
@@ -1,8 +1,18 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.frame import Frame
+from efl.elementary.label import Label
+from efl.elementary.button import Button
+from efl.elementary.layout import Layout
+from efl.elementary.list import List
+from efl.elementary.radio import Radio
+from efl.elementary.flip import Flip
def my_flip_go(bt, fl, mode):
@@ -16,24 +26,24 @@ def my_flip_animate_done(fl):
def flip_clicked(obj, item=None):
# window
- win = elementary.Window("flip", elementary.ELM_WIN_BASIC)
+ win = Window("flip", elementary.ELM_WIN_BASIC)
win.autodel_set(True)
win.title_set("Flip")
# background
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
# main vertical box
- box = elementary.Box(win)
+ box = Box(win)
box.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(box)
box.show()
# flip object
- fl = elementary.Flip(win)
+ fl = Flip(win)
fl.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
fl.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
fl.callback_animate_begin_add(my_flip_animate_begin)
@@ -43,36 +53,36 @@ def flip_clicked(obj, item=None):
# front content (image)
- o = elementary.Background(win)
+ o = Background(win)
o.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
o.file_set("images/sky_01.jpg")
fl.part_content_set("front", o)
o.show()
# back content (layout)
- ly = elementary.Layout(win)
+ ly = Layout(win)
ly.file_set("test.edj", "layout")
ly.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
fl.part_content_set("back", ly)
ly.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 1")
ly.part_content_set("element1", bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 2")
ly.part_content_set("element2", bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 3")
ly.part_content_set("element3", bt)
bt.show()
# flip buttons (first row)
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
hbox.size_hint_align_set(evas.EVAS_HINT_FILL, 0.0)
hbox.horizontal_set(True)
@@ -84,7 +94,7 @@ def flip_clicked(obj, item=None):
elementary.ELM_FLIP_ROTATE_Y_CENTER_AXIS,
elementary.ELM_FLIP_ROTATE_XZ_CENTER_AXIS,
elementary.ELM_FLIP_ROTATE_YZ_CENTER_AXIS]:
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
bt.text_set(str(count))
@@ -94,7 +104,7 @@ def flip_clicked(obj, item=None):
count += 1
# flip buttons (second row)
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
hbox.size_hint_align_set(evas.EVAS_HINT_FILL, 0.0)
hbox.horizontal_set(True)
@@ -105,7 +115,7 @@ def flip_clicked(obj, item=None):
elementary.ELM_FLIP_CUBE_RIGHT,
elementary.ELM_FLIP_CUBE_UP,
elementary.ELM_FLIP_CUBE_DOWN]:
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
bt.text_set(str(count))
@@ -115,7 +125,7 @@ def flip_clicked(obj, item=None):
count += 1
# flip buttons (third row)
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
hbox.size_hint_align_set(evas.EVAS_HINT_FILL, 0.0)
hbox.horizontal_set(True)
@@ -126,7 +136,7 @@ def flip_clicked(obj, item=None):
elementary.ELM_FLIP_PAGE_RIGHT,
elementary.ELM_FLIP_PAGE_UP,
elementary.ELM_FLIP_PAGE_DOWN]:
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
bt.text_set(str(count))
@@ -146,24 +156,24 @@ def my_cb_radios (rd, fl):
def flip_interactive_clicked(obj, item=None):
# window
- win = elementary.Window("flip", elementary.ELM_WIN_BASIC)
+ win = Window("flip", elementary.ELM_WIN_BASIC)
win.autodel_set(True)
win.title_set("Flip")
# background
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
# main vertical box
- box = elementary.Box(win)
+ box = Box(win)
box.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(box)
box.show()
# flip object
- fl = elementary.Flip(win)
+ fl = Flip(win)
fl.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
fl.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
fl.interaction_set(elementary.ELM_FLIP_INTERACTION_NONE);
@@ -181,37 +191,37 @@ def flip_interactive_clicked(obj, item=None):
fl.show()
# front content (image)
- o = elementary.Background(win)
+ o = Background(win)
o.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
o.file_set("images/sky_01.jpg")
fl.part_content_set("front", o)
o.show()
# back content (layout)
- ly = elementary.Layout(win)
+ ly = Layout(win)
ly.file_set("test.edj", "layout")
ly.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
fl.part_content_set("back", ly)
ly.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 1")
ly.part_content_set("element1", bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 2")
ly.part_content_set("element2", bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 3")
ly.part_content_set("element3", bt)
bt.show()
# radio buttons
- rd = elementary.Radio(win)
+ rd = Radio(win)
rd.state_value_set(elementary.ELM_FLIP_INTERACTION_NONE)
rd.text_set("None")
rd.callback_changed_add(my_cb_radios, fl)
@@ -219,7 +229,7 @@ def flip_interactive_clicked(obj, item=None):
rd.show()
rdg = rd
- rd = elementary.Radio(win)
+ rd = Radio(win)
rd.state_value_set(elementary.ELM_FLIP_INTERACTION_ROTATE)
rd.text_set("Rotate")
rd.callback_changed_add(my_cb_radios, fl)
@@ -227,7 +237,7 @@ def flip_interactive_clicked(obj, item=None):
box.pack_end(rd)
rd.show()
- rd = elementary.Radio(win)
+ rd = Radio(win)
rd.state_value_set(elementary.ELM_FLIP_INTERACTION_CUBE)
rd.text_set("Cube")
rd.callback_changed_add(my_cb_radios, fl)
@@ -235,7 +245,7 @@ def flip_interactive_clicked(obj, item=None):
box.pack_end(rd)
rd.show()
- rd = elementary.Radio(win)
+ rd = Radio(win)
rd.state_value_set(elementary.ELM_FLIP_INTERACTION_PAGE)
rd.text_set("Page")
rd.callback_changed_add(my_cb_radios, fl)
@@ -253,26 +263,26 @@ if __name__ == "__main__":
elementary.exit()
elementary.init()
- win = elementary.Window("test", elementary.ELM_WIN_BASIC)
+ win = Window("test", elementary.ELM_WIN_BASIC)
win.title_set("python-elementary test application")
win.callback_delete_request_add(destroy)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- box0 = elementary.Box(win)
+ box0 = Box(win)
box0.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(box0)
box0.show()
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.text_set("Information")
box0.pack_end(fr)
fr.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Please select a test from the list below<br>"
"by clicking the test button to show the<br>"
"test window.")
@@ -283,7 +293,7 @@ if __name__ == "__main__":
("Flip Interactive", flip_interactive_clicked),
]
- li = elementary.List(win)
+ li = List(win)
li.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
li.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
box0.pack_end(li)
diff --git a/examples/elementary/test_flipselector.py b/examples/elementary/test_flipselector.py
index 6fdec19..f2fcaeb 100644
--- a/examples/elementary/test_flipselector.py
+++ b/examples/elementary/test_flipselector.py
@@ -1,8 +1,14 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import StandardWindow
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.slider import Slider
+from efl.elementary.flipselector import FlipSelector
def sel_cb(fp, *args):
@@ -45,15 +51,15 @@ def flipselector_clicked(obj):
"Edbus"
)
- win = elementary.StandardWindow("flipselector", "Flip Selector")
+ win = StandardWindow("flipselector", "Flip Selector")
win.autodel = True
- bx = elementary.Box(win)
+ bx = Box(win)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(bx)
bx.show()
- fp = elementary.FlipSelector(win)
+ fp = FlipSelector(win)
fp.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
fp.callback_selected_add(sel_cb)
fp.callback_underflowed_add(overflow_cb)
@@ -66,20 +72,20 @@ def flipselector_clicked(obj):
bx.pack_end(fp)
fp.show()
- bx2 = elementary.Box(win)
+ bx2 = Box(win)
bx2.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx2.horizontal = True
bx.pack_end(bx2)
bx2.show()
- fp = elementary.FlipSelector(win)
+ fp = FlipSelector(win)
fp.callback_underflowed_add(overflow_cb)
fp.callback_overflowed_add(underflow_cb)
fp.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
for i in range(1990, 2100):
fp.item_append(str(i), sel_cb)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Flip Prev"
bt.callback_clicked_add(flip_prev_cb, fp)
@@ -89,13 +95,13 @@ def flipselector_clicked(obj):
bx2.pack_end(fp)
fp.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Flip Next"
bt.callback_clicked_add(flip_next_cb, fp)
bx2.pack_end(bt)
bt.show()
- sl = elementary.Slider(win)
+ sl = Slider(win)
sl.text = "Flip Iterval:"
sl.unit_format = "%1.2f"
sl.min_max = (0.0, 3.0)
@@ -106,19 +112,19 @@ def flipselector_clicked(obj):
sl.show()
sl.callback_changed_add(slider_change_cb, fp)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Select Last"
bt.callback_clicked_add(last_cb, fp)
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Select 2097"
bt.callback_clicked_add(third_from_end_cb, fp)
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Unselect year"
bt.callback_clicked_add(unsel_cb, fp)
bx.pack_end(bt)
diff --git a/examples/elementary/test_frame.py b/examples/elementary/test_frame.py
index 73131a0..6c5cccf 100644
--- a/examples/elementary/test_frame.py
+++ b/examples/elementary/test_frame.py
@@ -1,32 +1,37 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.frame import Frame
+from efl.elementary.icon import Icon
def frame_clicked(obj):
- win = elementary.Window("frame", elementary.ELM_WIN_BASIC)
+ win = Window("frame", elementary.ELM_WIN_BASIC)
win.title_set("Frame test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
vbox.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(vbox)
vbox.show()
# frame 1
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
fr.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
fr.text_set("Frame title")
@@ -35,10 +40,10 @@ def frame_clicked(obj):
fr.show()
# frame 2 (collapsable)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
fr.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
fr.autocollapse_set(True)
diff --git a/examples/elementary/test_gengrid.py b/examples/elementary/test_gengrid.py
index 97c940b..9788534 100644
--- a/examples/elementary/test_gengrid.py
+++ b/examples/elementary/test_gengrid.py
@@ -3,8 +3,16 @@
import random
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.button import Button
+from efl.elementary.check import Check
+from efl.elementary.image import Image
+from efl.elementary.gengrid import Gengrid, GengridItemClass
+from efl.elementary.slider import Slider
+from efl.elementary.table import Table
images = ["panel_01.jpg", "plant_01.jpg", "rock_01.jpg", "rock_02.jpg",
@@ -16,7 +24,7 @@ def gg_text_get(obj, part, item_data):
def gg_content_get(obj, part, data):
if part == "elm.swallow.icon":
- im = elementary.Image(obj)
+ im = Image(obj)
im.file_set("images/" + random.choice(images))
im.size_hint_aspect_set(evas.EVAS_ASPECT_CONTROL_BOTH, 1, 1)
return im
@@ -47,32 +55,32 @@ def gengrid_clicked(obj):
item_count = 5#25
# window
- win = elementary.Window("gengrid", elementary.ELM_WIN_BASIC)
+ win = Window("gengrid", elementary.ELM_WIN_BASIC)
win.title_set("Gengrid")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
# background
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
# main table
- tb = elementary.Table(win)
+ tb = Table(win)
win.resize_object_add(tb)
tb.homogeneous_set(0)
tb.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
tb.show()
# gengrid
- itc = elementary.GengridItemClass(item_style="default",
+ itc = GengridItemClass(item_style="default",
text_get_func=gg_text_get,
content_get_func=gg_content_get,
state_get_func=gg_state_get,
del_func=gg_del)
- gg = elementary.Gengrid(win)
+ gg = Gengrid(win)
gg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
gg.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
gg.horizontal_set(False)
@@ -95,7 +103,7 @@ def gengrid_clicked(obj):
gg.multi_select_set(bt.state)
print((gg.multi_select_get()))
- bt = elementary.Check(win)
+ bt = Check(win)
bt.text = "MultiSelect"
bt.state = gg.multi_select_get()
bt.callback_changed_add(multi_select_changed, gg)
@@ -106,7 +114,7 @@ def gengrid_clicked(obj):
def horizontal_changed(bt, gg):
gg.horizontal_set(bt.state)
- bt = elementary.Check(win)
+ bt = Check(win)
bt.text_set("Horizontal")
bt.callback_changed_add(horizontal_changed, gg)
tb.pack(bt, 1, 1, 1, 1)
@@ -118,7 +126,7 @@ def gengrid_clicked(obj):
gg.bounce_set(bt.state, v_bounce)
print((gg.bounce_get()))
- bt = elementary.Check(win)
+ bt = Check(win)
bt.text_set("BounceH")
(h_bounce, v_bounce) = gg.bounce_get()
bt.state = h_bounce
@@ -132,7 +140,7 @@ def gengrid_clicked(obj):
gg.bounce_set(h_bounce, bt.state)
print((gg.bounce_get()))
- bt = elementary.Check(win)
+ bt = Check(win)
bt.text_set("BounceV")
(h_bounce, v_bounce) = gg.bounce_get()
bt.state = v_bounce
@@ -151,7 +159,7 @@ def gengrid_clicked(obj):
gg.item_size_set(w, sl.value)
print((gg.item_size_get()))
- sl = elementary.Slider(win)
+ sl = Slider(win)
sl.text_set("ItemSizeW")
sl.min_max_set(0, 500)
sl.indicator_format_set("%.0f")
@@ -163,7 +171,7 @@ def gengrid_clicked(obj):
tb.pack(sl, 0, 2, 2, 1)
sl.show()
- sl = elementary.Slider(win)
+ sl = Slider(win)
sl.text_set("ItemSizeH")
sl.min_max_set(0, 500)
sl.indicator_format_set("%.0f")
@@ -186,7 +194,7 @@ def gengrid_clicked(obj):
gg.align_set(ax, sl.value)
print((gg.align_get()))
- sl = elementary.Slider(win)
+ sl = Slider(win)
sl.text_set("AlignX")
sl.min_max_set(0.0, 1.0)
sl.indicator_format_set("%.2f")
@@ -198,7 +206,7 @@ def gengrid_clicked(obj):
tb.pack(sl, 0, 4, 2, 1)
sl.show()
- sl = elementary.Slider(win)
+ sl = Slider(win)
sl.text_set("AlignY")
sl.min_max_set(0.0, 1.0)
sl.indicator_format_set("%.2f")
@@ -215,7 +223,7 @@ def gengrid_clicked(obj):
ggi = gg.first_item
ggi.selected = not ggi.selected
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, 0)
bt.text_set("Select first")
bt.callback_clicked_add(select_first_clicked, gg)
@@ -227,7 +235,7 @@ def gengrid_clicked(obj):
ggi = gg.last_item
ggi.selected = not ggi.selected
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, 0)
bt.text_set("Select last")
bt.callback_clicked_add(select_last_clicked, gg)
@@ -239,7 +247,7 @@ def gengrid_clicked(obj):
for ggi in gg.selected_items_get():
ggi.delete()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, 0)
bt.text_set("Sel del")
bt.callback_clicked_add(seldel_clicked, gg)
@@ -252,7 +260,7 @@ def gengrid_clicked(obj):
item_count = 0
gg.clear()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, 0)
bt.text_set("Clear")
bt.callback_clicked_add(clear_clicked, gg)
@@ -264,14 +272,14 @@ def gengrid_clicked(obj):
ggi = gg.first_item if first else gg.last_item
ggi.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, 0)
bt.text_set("Show first")
bt.callback_clicked_add(show_clicked, gg, True)
tb.pack(bt, 2, 3, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, 0)
bt.text_set("Show last")
bt.callback_clicked_add(show_clicked, gg, False)
@@ -283,14 +291,14 @@ def gengrid_clicked(obj):
ggi = gg.first_item if first else gg.last_item
ggi.bring_in()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, 0)
bt.text_set("BringIn first")
bt.callback_clicked_add(bring_in_clicked, gg, True)
tb.pack(bt, 4, 3, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, 0)
bt.text_set("BringIn last")
bt.callback_clicked_add(bring_in_clicked, gg, False)
@@ -305,28 +313,28 @@ def gengrid_clicked(obj):
gg.item_append(itc, item_count, None)
n -= 1
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, 0)
bt.text_set("Append 1")
bt.callback_clicked_add(append_clicked, gg, 1)
tb.pack(bt, 2, 4, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, 0)
bt.text_set("Append 100")
bt.callback_clicked_add(append_clicked, gg, 100)
tb.pack(bt, 3, 4, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, 0)
bt.text_set("Append 1000")
bt.callback_clicked_add(append_clicked, gg, 1000)
tb.pack(bt, 4, 4, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, 0)
bt.text_set("Append 10000 :)")
bt.callback_clicked_add(append_clicked, gg, 10000)
@@ -339,7 +347,7 @@ def gengrid_clicked(obj):
item_count += 1
gg.item_prepend(itc, item_count)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, 0)
bt.text_set("Prepend")
bt.callback_clicked_add(prepend_clicked, gg)
@@ -356,7 +364,7 @@ def gengrid_clicked(obj):
else:
print("nothing selected")
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, 0)
bt.text_set("Ins before")
bt.callback_clicked_add(ins_before_clicked, gg)
@@ -373,7 +381,7 @@ def gengrid_clicked(obj):
else:
print("nothing selected")
- bt = elementary.Button(win)
+ bt = Button(win)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, 0)
bt.text_set("Ins after")
bt.callback_clicked_add(ins_after_clicked, gg)
diff --git a/examples/elementary/test_genlist.py b/examples/elementary/test_genlist.py
index 654b686..6427733 100644
--- a/examples/elementary/test_genlist.py
+++ b/examples/elementary/test_genlist.py
@@ -3,15 +3,25 @@
import time
-from efl import elementary
from efl import evas
+from efl import ecore
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.frame import Frame
+from efl.elementary.label import Label
+from efl.elementary.button import Button
+from efl.elementary.list import List
+from efl.elementary.icon import Icon
+from efl.elementary.genlist import Genlist, GenlistItem, GenlistItemClass
def gl_text_get(obj, part, item_data):
return "Item # %i" % (item_data,)
def gl_content_get(obj, part, data):
- ic = elementary.Icon(obj)
+ ic = Icon(obj)
ic.file_set("images/logo_small.png")
ic.size_hint_aspect_set(evas.EVAS_ASPECT_CONTROL_VERTICAL, 1, 1)
return ic
@@ -45,7 +55,7 @@ def glg_text_get(obj, part, item_data):
return "Group # %i" % (item_data,)
def glg_content_get(obj, part, data):
- ic = elementary.Icon(obj)
+ ic = Icon(obj)
ic.file_set("images/logo.png")
ic.size_hint_aspect_set(evas.EVAS_ASPECT_CONTROL_VERTICAL, 1, 1)
return ic
@@ -81,21 +91,21 @@ def _gl_over_click(evas, evt, gl):
def genlist_clicked(obj, item=None):
- win = elementary.Window("Genlist", elementary.ELM_WIN_BASIC)
+ win = Window("Genlist", elementary.ELM_WIN_BASIC)
win.title_set("Genlist test")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.show()
- gl = elementary.Genlist(win)
+ gl = Genlist(win)
gl.callback_selected_add(_gl_selected, "arg1", "arg2", kwarg1="kwarg1", kwarg2="kwarg2")
gl.callback_clicked_double_add(_gl_clicked_double, "arg1", "arg2", kwarg1="kwarg1", kwarg2="kwarg2")
gl.callback_longpressed_add(_gl_longpressed, "arg1", "arg2", kwarg1="kwarg1", kwarg2="kwarg2")
@@ -112,22 +122,22 @@ def genlist_clicked(obj, item=None):
over.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(over)
- vbx = elementary.Box(win)
+ vbx = Box(win)
vbx.horizontal_set(True)
bx.pack_end(vbx)
vbx.show()
- itc1 = elementary.GenlistItemClass(item_style="default",
- text_get_func=gl_text_get,
- content_get_func=gl_content_get,
- state_get_func=gl_state_get)
+ itc1 = GenlistItemClass(item_style="default",
+ text_get_func=gl_text_get,
+ content_get_func=gl_content_get,
+ state_get_func=gl_state_get)
- bt_50 = elementary.Button(win)
+ bt_50 = Button(win)
bt_50.text_set("Go to 50")
vbx.pack_end(bt_50)
bt_50.show()
- bt_1500 = elementary.Button(win)
+ bt_1500 = Button(win)
bt_1500.text_set("Go to 1500")
vbx.pack_end(bt_1500)
bt_1500.show()
@@ -144,30 +154,30 @@ def genlist_clicked(obj, item=None):
def genlist2_clicked(obj, item=None):
- win = elementary.Window("Genlist", elementary.ELM_WIN_BASIC)
+ win = Window("Genlist", elementary.ELM_WIN_BASIC)
win.title_set("Genlist test 2")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.file_set("images/plant_01.jpg")
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.show()
- gl = elementary.Genlist(win)
+ gl = Genlist(win)
gl.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
gl.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
gl.show()
- itc1 = elementary.GenlistItemClass(item_style="default",
- text_get_func=gl_text_get,
- content_get_func=gl_content_get,
- state_get_func=gl_state_get)
+ itc1 = GenlistItemClass(item_style="default",
+ text_get_func=gl_text_get,
+ content_get_func=gl_content_get,
+ state_get_func=gl_state_get)
gl.item_append(itc1, 1001, func=gl_item_sel)
gl.item_append(itc1, 1002, func=gl_item_sel)
@@ -179,7 +189,7 @@ def genlist2_clicked(obj, item=None):
bx.pack_end(gl)
- bx2 = elementary.Box(win)
+ bx2 = Box(win)
bx2.horizontal_set(True)
bx2.homogeneous_set(True)
bx2.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
@@ -192,7 +202,7 @@ def genlist2_clicked(obj, item=None):
gli.show()
gli.selected = True
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("/\\")
bt.callback_clicked_add(my_gl_first, gl)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -207,7 +217,7 @@ def genlist2_clicked(obj, item=None):
gli.show()
gli.selected = True
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("\\/")
bt.callback_clicked_add(my_gl_last, gl)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -225,7 +235,7 @@ def genlist2_clicked(obj, item=None):
else:
print("no item selected")
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("#")
bt.callback_clicked_add(my_gl_disable, gl)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -243,7 +253,7 @@ def genlist2_clicked(obj, item=None):
i = i + 1
gli = gli.next_get()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("U")
bt.callback_clicked_add(my_gl_update_all, gl)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -255,7 +265,7 @@ def genlist2_clicked(obj, item=None):
bx2.show()
- bx2 = elementary.Box(win)
+ bx2 = Box(win)
bx2.horizontal_set(True)
bx2.homogeneous_set(True)
bx2.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
@@ -265,7 +275,7 @@ def genlist2_clicked(obj, item=None):
def my_gl_clear(bt, gl):
gl.clear()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("X")
bt.callback_clicked_add(my_gl_clear, gl)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -280,7 +290,7 @@ def genlist2_clicked(obj, item=None):
gl.item_append(itc1, MyGlAdd.i, func=gl_item_sel)
MyGlAdd.i = MyGlAdd.i + 1
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("+")
bt.callback_clicked_add(my_gl_add, gl, itc1)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -296,7 +306,7 @@ def genlist2_clicked(obj, item=None):
else:
print("no item selected")
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("-")
bt.callback_clicked_add(my_gl_del, gl)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -307,7 +317,7 @@ def genlist2_clicked(obj, item=None):
bx.pack_end(bx2)
bx2.show()
- bx2 = elementary.Box(win)
+ bx2 = Box(win)
bx2.horizontal_set(True)
bx2.homogeneous_set(True)
bx2.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
@@ -324,7 +334,7 @@ def genlist2_clicked(obj, item=None):
else:
print("no item selected")
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("+ before")
bt.callback_clicked_add(my_gl_insert_before, gl, itc1)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -343,7 +353,7 @@ def genlist2_clicked(obj, item=None):
else:
print("no item selected")
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("+ after")
bt.callback_clicked_add(my_gl_insert_after, gl, itc1)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -356,7 +366,7 @@ def genlist2_clicked(obj, item=None):
def my_gl_flush_delay():
elm_cache_all_flush()
ecore.timer_add(1.2, my_gl_flush_delay)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Flush")
bt.callback_clicked_add(my_gl_flush, gl)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -372,29 +382,29 @@ def genlist2_clicked(obj, item=None):
def genlist3_clicked(obj, item=None):
- win = elementary.Window("Genlist", elementary.ELM_WIN_BASIC)
+ win = Window("Genlist", elementary.ELM_WIN_BASIC)
win.title_set("Genlist Group test")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- gl = elementary.Genlist(win)
+ gl = Genlist(win)
win.resize_object_add(gl)
gl.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
gl.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
gl.show()
- itc_i = elementary.GenlistItemClass(item_style="default",
- text_get_func=gl_text_get,
- content_get_func=gl_content_get,
- state_get_func=gl_state_get)
+ itc_i = GenlistItemClass(item_style="default",
+ text_get_func=gl_text_get,
+ content_get_func=gl_content_get,
+ state_get_func=gl_state_get)
- itc_g = elementary.GenlistItemClass(item_style="group_index",
- text_get_func=glg_text_get,
- content_get_func=glg_content_get)
+ itc_g = GenlistItemClass(item_style="group_index",
+ text_get_func=glg_text_get,
+ content_get_func=glg_content_get)
for i in range(300):
if i % 10 == 0:
@@ -407,58 +417,58 @@ def genlist3_clicked(obj, item=None):
win.show()
def genlist4_clicked(obj, item=None):
- win = elementary.Window("Genlist", elementary.ELM_WIN_BASIC)
+ win = Window("Genlist", elementary.ELM_WIN_BASIC)
win.title_set("Genlist sorted insert test")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- gl = elementary.Genlist(win)
+ gl = Genlist(win)
win.resize_object_add(gl)
gl.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
gl.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
gl.show()
- itc_i = elementary.GenlistItemClass(item_style="default",
- text_get_func=gl_text_get,
- content_get_func=gl_content_get,
- state_get_func=gl_state_get)
+ itc_i = GenlistItemClass(item_style="default",
+ text_get_func=gl_text_get,
+ content_get_func=gl_content_get,
+ state_get_func=gl_state_get)
for i in range(100,-1,-1):
- elementary.GenlistItem(itc_i, None, 0, None, i).sorted_insert(gl, gl_comp_func)
+ GenlistItem(itc_i, None, 0, None, i).sorted_insert(gl, gl_comp_func)
win.resize(320, 320)
win.show()
def genlist5_clicked(obj, item=None):
- win = elementary.Window("Genlist", elementary.ELM_WIN_BASIC)
+ win = Window("Genlist", elementary.ELM_WIN_BASIC)
win.title_set("Genlist iteration test")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- gl = elementary.Genlist(win)
+ gl = Genlist(win)
win.resize_object_add(gl)
gl.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
gl.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
gl.show()
- itc_i = elementary.GenlistItemClass(item_style="default",
- text_get_func=gl_text_get,
- content_get_func=gl_content_get,
- state_get_func=gl_state_get)
+ itc_i = GenlistItemClass(item_style="default",
+ text_get_func=gl_text_get,
+ content_get_func=gl_content_get,
+ state_get_func=gl_state_get)
item_count = 10000
t1 = time.time()
for i in xrange(item_count):
- elementary.GenlistItem(itc_i, None, 0, None, i).append_to(gl)
+ GenlistItem(itc_i, None, 0, None, i).append_to(gl)
t2 = time.time()
j = gl.first_item
@@ -482,26 +492,26 @@ if __name__ == "__main__":
elementary.exit()
elementary.init()
- win = elementary.Window("test", elementary.ELM_WIN_BASIC)
+ win = Window("test", elementary.ELM_WIN_BASIC)
win.title_set("python-elementary test application")
win.callback_delete_request_add(destroy)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- box0 = elementary.Box(win)
+ box0 = Box(win)
box0.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(box0)
box0.show()
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.text_set("Information")
box0.pack_end(fr)
fr.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Please select a test from the list below<br>"
"by clicking the test button to show the<br>"
"test window.")
@@ -516,7 +526,7 @@ if __name__ == "__main__":
("Genlist Iteration", genlist5_clicked),
]
- li = elementary.List(win)
+ li = List(win)
li.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
li.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
box0.pack_end(li)
diff --git a/examples/elementary/test_grid.py b/examples/elementary/test_grid.py
index f81d768..7f4dddb 100644
--- a/examples/elementary/test_grid.py
+++ b/examples/elementary/test_grid.py
@@ -1,8 +1,14 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.entry import Entry
+from efl.elementary.grid import Grid
def cb_change(bt, grid):
@@ -10,57 +16,57 @@ def cb_change(bt, grid):
grid.pack_set(bt, x - 2, y - 2, w + 4, h + 4)
def grid_clicked(obj):
- win = elementary.Window("grid", elementary.ELM_WIN_BASIC)
+ win = Window("grid", elementary.ELM_WIN_BASIC)
win.title = "Grid test"
win.autodel = True
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- gd = elementary.Grid(win)
+ gd = Grid(win)
gd.size = (100, 100)
win.resize_object_add(gd)
gd.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
gd.show()
- en = elementary.Entry(win)
+ en = Entry(win)
en.scrollable = True
en.text = "Entry text 2"
en.single_line = True
gd.pack(en, 60, 20, 30, 10)
en.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Next API function"
gd.pack(bt, 30, 0, 40, 10)
bt.disabled = True
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Button"
gd.pack(bt, 0, 0, 20, 20)
bt.show()
- bt = elementary.Button(win);
+ bt = Button(win);
bt.text = "Button"
gd.pack(bt, 10, 10, 40, 20)
bt.show()
- bt = elementary.Button(win);
+ bt = Button(win);
bt.text = "Button"
gd.pack(bt, 10, 30, 20, 50)
bt.show()
- bt = elementary.Button(win);
+ bt = Button(win);
bt.text = "Button"
gd.pack(bt, 80, 80, 20, 20)
bt.show()
- bt = elementary.Button(win);
+ bt = Button(win);
bt.text = "Change"
bt.callback_clicked_add(cb_change, gd)
gd.pack(bt, 40, 40, 20, 20)
diff --git a/examples/elementary/test_hover.py b/examples/elementary/test_hover.py
index c430205..3c58fbc 100644
--- a/examples/elementary/test_hover.py
+++ b/examples/elementary/test_hover.py
@@ -1,31 +1,40 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.frame import Frame
+from efl.elementary.hover import Hover
+from efl.elementary.label import Label
+from efl.elementary.list import List
+from efl.elementary.icon import Icon
def hover_bt1_clicked(bt, hv):
hv.show()
def hover_clicked(obj, item=None):
- win = elementary.Window("hover", elementary.ELM_WIN_BASIC)
+ win = Window("hover", elementary.ELM_WIN_BASIC)
win.title_set("Hover")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.show()
- hv = elementary.Hover(win)
+ hv = Hover(win)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button")
bt.callback_clicked_add(hover_bt1_clicked, hv)
bx.pack_end(bt)
@@ -33,30 +42,30 @@ def hover_clicked(obj, item=None):
hv.parent_set(win)
hv.target_set(bt)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Popup")
hv.part_content_set("middle", bt)
bt.show()
- bx = elementary.Box(win)
+ bx = Box(win)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.resizable_set(0, 0)
bx.pack_end(ic)
ic.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Top 1")
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Top 2")
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Top 3")
bx.pack_end(bt)
bt.show()
@@ -65,17 +74,17 @@ def hover_clicked(obj, item=None):
hv.part_content_set("top", bx)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Bottom")
hv.part_content_set("bottom", bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Left")
hv.part_content_set("left", bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Right")
hv.part_content_set("right", bt)
bt.show()
@@ -88,24 +97,24 @@ def hover_clicked(obj, item=None):
def hover2_clicked(obj, item=None):
- win = elementary.Window("hover2", elementary.ELM_WIN_BASIC)
+ win = Window("hover2", elementary.ELM_WIN_BASIC)
win.title_set("Hover 2")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.show()
- hv = elementary.Hover(win)
+ hv = Hover(win)
hv.style_set("popout")
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button")
bt.callback_clicked_add(hover_bt1_clicked, hv)
bx.pack_end(bt)
@@ -113,30 +122,30 @@ def hover2_clicked(obj, item=None):
hv.parent_set(win)
hv.target_set(bt)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Popup")
hv.part_content_set("middle", bt)
bt.show()
- bx = elementary.Box(win)
+ bx = Box(win)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo_small.png")
ic.resizable_set(0, 0)
bx.pack_end(ic)
ic.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Top 1")
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Top 2")
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Top 3")
bx.pack_end(bt)
bt.show()
@@ -144,17 +153,17 @@ def hover2_clicked(obj, item=None):
bx.show()
hv.part_content_set("top", bx)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Bot")
hv.part_content_set("bottom", bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Left")
hv.part_content_set("left", bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Right")
hv.part_content_set("right", bt)
bt.show()
@@ -170,26 +179,26 @@ if __name__ == "__main__":
elementary.exit()
elementary.init()
- win = elementary.Window("test", elementary.ELM_WIN_BASIC)
+ win = Window("test", elementary.ELM_WIN_BASIC)
win.title_set("python-elementary test application")
win.callback_delete_request_add(destroy)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- box0 = elementary.Box(win)
+ box0 = Box(win)
box0.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(box0)
box0.show()
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.text_set("Information")
box0.pack_end(fr)
fr.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Please select a test from the list below<br>"
"by clicking the test button to show the<br>"
"test window.")
@@ -199,7 +208,7 @@ if __name__ == "__main__":
items = [("Hover", hover_clicked),
("Hover 2", hover2_clicked)]
- li = elementary.List(win)
+ li = List(win)
li.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
li.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
box0.pack_end(li)
diff --git a/examples/elementary/test_hoversel.py b/examples/elementary/test_hoversel.py
index 253bccf..a99e105 100644
--- a/examples/elementary/test_hoversel.py
+++ b/examples/elementary/test_hoversel.py
@@ -1,28 +1,33 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.hoversel import Hoversel
+from efl.elementary.icon import Icon
def hoversel_clicked(obj):
- win = elementary.Window("hoversel", elementary.ELM_WIN_BASIC)
+ win = Window("hoversel", elementary.ELM_WIN_BASIC)
win.title_set("Hoversel")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.show()
- bt = elementary.Hoversel(win)
+ bt = Hoversel(win)
bt.hover_parent_set(win)
bt.text_set("Labels")
bt.item_add("Item 1")
@@ -34,7 +39,7 @@ def hoversel_clicked(obj):
bx.pack_end(bt)
bt.show()
- bt = elementary.Hoversel(win)
+ bt = Hoversel(win)
bt.hover_parent_set(win)
bt.text_set("Some Icons")
bt.item_add("Item 1")
@@ -46,7 +51,7 @@ def hoversel_clicked(obj):
bx.pack_end(bt)
bt.show()
- bt = elementary.Hoversel(win)
+ bt = Hoversel(win)
bt.hover_parent_set(win)
bt.text_set("All Icons")
bt.item_add("Item 1", "apps", elementary.ELM_ICON_STANDARD)
@@ -58,7 +63,7 @@ def hoversel_clicked(obj):
bx.pack_end(bt)
bt.show()
- bt = elementary.Hoversel(win)
+ bt = Hoversel(win)
bt.hover_parent_set(win)
bt.text_set("All Icons")
bt.item_add("Item 1", "apps", elementary.ELM_ICON_STANDARD)
@@ -70,7 +75,7 @@ def hoversel_clicked(obj):
bx.pack_end(bt)
bt.show()
- bt = elementary.Hoversel(win)
+ bt = Hoversel(win)
bt.hover_parent_set(win)
bt.text_set("Disabled Hoversel")
bt.item_add("Item 1", "apps", elementary.ELM_ICON_STANDARD)
@@ -81,11 +86,11 @@ def hoversel_clicked(obj):
bx.pack_end(bt)
bt.show()
- bt = elementary.Hoversel(win)
+ bt = Hoversel(win)
bt.hover_parent_set(win)
bt.text_set("Icon + Label")
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/sky_03.jpg")
bt.content_set(ic)
ic.show()
diff --git a/examples/elementary/test_icon.py b/examples/elementary/test_icon.py
index b09f781..620671f 100644
--- a/examples/elementary/test_icon.py
+++ b/examples/elementary/test_icon.py
@@ -1,8 +1,17 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.frame import Frame
+from efl.elementary.label import Label
+from efl.elementary.check import Check
+from efl.elementary.list import List
+from efl.elementary.icon import Icon
def aspect_fixed_cb(obj, ic):
@@ -15,16 +24,16 @@ def smooth_cb(obj, ic):
ic.smooth_set(obj.state_get())
def bt_clicked(obj):
- win = elementary.Window("preload-prescale", elementary.ELM_WIN_BASIC)
+ win = Window("preload-prescale", elementary.ELM_WIN_BASIC)
win.title_set("Preload & Prescale")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(bg)
bg.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
win.resize_object_add(ic)
ic.file_set("images/insanely_huge_test_image.jpg")
@@ -41,28 +50,28 @@ def bt_clicked(obj):
def icon_clicked(obj, item=None):
- win = elementary.Window("icon test", elementary.ELM_WIN_BASIC)
+ win = Window("icon test", elementary.ELM_WIN_BASIC)
win.title_set("Icon Test")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(bg)
bg.show()
- box = elementary.Box(win)
+ box = Box(win)
win.resize_object_add(box)
box.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
box.show()
- content_box = elementary.Box(win)
+ content_box = Box(win)
win.resize_object_add(content_box)
content_box.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
content_box.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
box.pack_end(content_box)
content_box.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set("images/logo.png")
ic.resizable_set(True, True)
ic.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
@@ -71,14 +80,14 @@ def icon_clicked(obj, item=None):
content_box.pack_end(ic)
ic.show()
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal_set(True)
content_box.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
box.pack_end(hbox)
hbox.show()
# Test Aspect Fixed
- tg = elementary.Check(win)
+ tg = Check(win)
tg.text_set("Aspect Fixed")
tg.state_set(True)
tg.callback_changed_add(aspect_fixed_cb, ic)
@@ -86,14 +95,14 @@ def icon_clicked(obj, item=None):
tg.show()
# Test Fill Outside
- tg = elementary.Check(win)
+ tg = Check(win)
tg.text_set("Fill Outside")
tg.callback_changed_add(fill_outside_cb, ic)
hbox.pack_end(tg)
tg.show()
# Test Smooth
- tg = elementary.Check(win)
+ tg = Check(win)
tg.text_set("Smooth")
tg.state_set(True)
tg.callback_changed_add(smooth_cb, ic)
@@ -101,7 +110,7 @@ def icon_clicked(obj, item=None):
tg.show()
# Test Preload, Prescale
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Preload & Prescale")
bt.callback_clicked_add(bt_clicked)
hbox.pack_end(bt)
@@ -112,14 +121,14 @@ def icon_clicked(obj, item=None):
def icon_transparent_clicked(obj, item=None):
- win = elementary.Window("icon-transparent", elementary.ELM_WIN_BASIC)
+ win = Window("icon-transparent", elementary.ELM_WIN_BASIC)
win.title_set("Icon Transparent")
win.autodel_set(True)
win.alpha_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- icon = elementary.Icon(win)
+ icon = Icon(win)
icon.file_set("images/logo.png")
icon.resizable_set(0, 0)
win.resize_object_add(icon)
@@ -133,26 +142,26 @@ if __name__ == "__main__":
elementary.exit()
elementary.init()
- win = elementary.Window("test", elementary.ELM_WIN_BASIC)
+ win = Window("test", elementary.ELM_WIN_BASIC)
win.title_set("python-elementary test application")
win.callback_delete_request_add(destroy)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- box0 = elementary.Box(win)
+ box0 = Box(win)
box0.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(box0)
box0.show()
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.text_set("Information")
box0.pack_end(fr)
fr.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Please select a test from the list below<br>"
"by clicking the test button to show the<br>"
"test window.")
@@ -162,7 +171,7 @@ if __name__ == "__main__":
items = [("Icon", icon_clicked),
("Icon transparent", icon_transparent_clicked)]
- li = elementary.List(win)
+ li = List(win)
li.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
li.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
box0.pack_end(li)
diff --git a/examples/elementary/test_index.py b/examples/elementary/test_index.py
index 4bb5ff5..aa0ee0e 100644
--- a/examples/elementary/test_index.py
+++ b/examples/elementary/test_index.py
@@ -1,8 +1,15 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.check import Check
+from efl.elementary.index import Index
+from efl.elementary.genlist import Genlist, GenlistItem, GenlistItemClass
+from efl.elementary.separator import Separator
def gl_text_get(gl, part, data):
@@ -26,24 +33,24 @@ def cb_idx_selected(idx, item):
def index_clicked(obj):
- win = elementary.Window("index", elementary.ELM_WIN_BASIC)
+ win = Window("index", elementary.ELM_WIN_BASIC)
win.title_set("Index test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
vbox.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(vbox)
vbox.show()
# index
- idx = elementary.Index(win)
+ idx = Index(win)
idx.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
idx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
idx.callback_delay_changed_add(cb_idx_delay_changed)
@@ -53,11 +60,11 @@ def index_clicked(obj):
idx.show()
# genlist
- itc = elementary.GenlistItemClass(item_style="default",
- text_get_func=gl_text_get)
- # content_get_func=gl_content_get,
- # state_get_func=gl_state_get)
- gl = elementary.Genlist(win)
+ itc = GenlistItemClass(item_style="default",
+ text_get_func=gl_text_get)
+ # content_get_func=gl_content_get,
+ # state_get_func=gl_state_get)
+ gl = Genlist(win)
gl.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
gl.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbox.pack_end(gl)
@@ -77,30 +84,30 @@ def index_clicked(obj):
idx.level_go(0)
- sep = elementary.Separator(win)
+ sep = Separator(win)
sep.horizontal = True
vbox.pack_end(sep)
sep.show()
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal = True
hbox.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
vbox.pack_end(hbox)
hbox.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text = "autohide_disabled"
ck.callback_changed_add(lambda ck: idx.autohide_disabled_set(ck.state))
hbox.pack_end(ck)
ck.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text = "indicator_disabled"
ck.callback_changed_add(lambda ck: idx.indicator_disabled_set(ck.state))
hbox.pack_end(ck)
ck.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text = "horizontal"
ck.callback_changed_add(lambda ck: idx.horizontal_set(ck.state))
hbox.pack_end(ck)
diff --git a/examples/elementary/test_inwin.py b/examples/elementary/test_inwin.py
index b3aa810..cb1c240 100644
--- a/examples/elementary/test_inwin.py
+++ b/examples/elementary/test_inwin.py
@@ -1,30 +1,34 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.label import Label
+from efl.elementary.innerwindow import InnerWindow
def inner_window_clicked(obj):
- win = elementary.Window("inner-window", elementary.ELM_WIN_BASIC)
+ win = Window("inner-window", elementary.ELM_WIN_BASIC)
win.title_set("InnerWindow test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("This is an \"inwin\" - a window in a<br/>"
"window. This is handy for quick popups<br/>"
"you want centered, taking over the window<br/>"
"until dismissed somehow. Unlike hovers they<br/>"
"don't hover over their target.")
- iw = elementary.InnerWindow(win)
+ iw = InnerWindow(win)
iw.content_set(lb)
iw.show()
diff --git a/examples/elementary/test_label.py b/examples/elementary/test_label.py
index e0afca5..d03f583 100644
--- a/examples/elementary/test_label.py
+++ b/examples/elementary/test_label.py
@@ -1,8 +1,16 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.grid import Grid
+from efl.elementary.label import Label
+from efl.elementary.radio import Radio
+from efl.elementary.separator import Separator
+from efl.elementary.slider import Slider
def cb_slide_radio(radio, lb):
@@ -14,30 +22,30 @@ def cb_slider_duration(slider, lb):
lb.slide = True
def label_clicked(obj):
- win = elementary.Window("label", elementary.ELM_WIN_BASIC)
+ win = Window("label", elementary.ELM_WIN_BASIC)
win.title = "Label test"
win.autodel = True
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
vbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbox.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
win.resize_object_add(vbox)
vbox.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text = "<b>This is a small label</b>"
lb.size_hint_align = (0.0, 0.5)
vbox.pack_end(lb)
lb.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text = "This is a larger label with newlines<br/>" \
"to make it bigger, bit it won't expand or wrap<br/>" \
"just be a block of text that can't change its<br/>" \
@@ -46,7 +54,7 @@ def label_clicked(obj):
vbox.pack_end(lb)
lb.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.line_wrap_set(elementary.ELM_WRAP_CHAR)
lb.text = "<b>This is more text designed to line-wrap here as " \
"This object is resized horizontally. As it is " \
@@ -58,26 +66,26 @@ def label_clicked(obj):
vbox.pack_end(lb)
lb.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text = "This small label set to wrap"
lb.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
lb.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
vbox.pack_end(lb)
lb.show()
- sp = elementary.Separator(win)
+ sp = Separator(win)
sp.horizontal = True
vbox.pack_end(sp)
sp.show()
- gd = elementary.Grid(win)
+ gd = Grid(win)
gd.size = (100, 100)
gd.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
gd.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
vbox.pack_end(gd)
gd.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text = "Test Label Ellipsis:"
lb.size_hint_align = (0.0, 0.5)
gd.pack(lb, 5, 5, 90, 15)
@@ -88,7 +96,7 @@ def label_clicked(obj):
gd.pack(rect, 5, 15, 90, 15)
rect.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text = "This is a label set to ellipsis. " \
"If set ellipsis to true and the text doesn't fit " \
"in the label an ellipsis(\"...\") will be shown " \
@@ -98,7 +106,7 @@ def label_clicked(obj):
gd.pack(lb, 5, 15, 90, 15)
lb.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text = "Test Label Slide:"
lb.size_hint_align = (0.0, 0.5)
gd.pack(lb, 5, 40, 90, 15)
@@ -109,7 +117,7 @@ def label_clicked(obj):
gd.pack(rect, 5, 50, 90, 15)
rect.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text = "This is a label set to slide. " \
"If set slide to true the text of the label " \
"will slide/scroll through the length of label." \
@@ -121,7 +129,7 @@ def label_clicked(obj):
gd.pack(lb, 5, 50, 90, 15)
lb.show()
- rd = elementary.Radio(win)
+ rd = Radio(win)
rd.state_value = 1
rd.text = "slide_short"
gd.pack(rd, 5, 65, 30, 15)
@@ -129,7 +137,7 @@ def label_clicked(obj):
rd.show()
rdg = rd
- rd = elementary.Radio(win)
+ rd = Radio(win)
rd.group_add(rdg)
rd.state_value = 2
rd.text = "slide_long"
@@ -137,7 +145,7 @@ def label_clicked(obj):
rd.callback_changed_add(cb_slide_radio, lb)
rd.show()
- rd = elementary.Radio(win)
+ rd = Radio(win)
rd.group_add(rdg)
rd.state_value = 3
rd.text = "slide_bounce"
@@ -145,7 +153,7 @@ def label_clicked(obj):
rd.callback_changed_add(cb_slide_radio, lb)
rd.show()
- sl = elementary.Slider(win)
+ sl = Slider(win)
sl.text = "Slide Duration"
sl.unit_format = "%1.1f units"
sl.min_max = (1, 20)
diff --git a/examples/elementary/test_layout.py b/examples/elementary/test_layout.py
index 799f2f3..a43aa87 100644
--- a/examples/elementary/test_layout.py
+++ b/examples/elementary/test_layout.py
@@ -1,45 +1,49 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.button import Button
+from efl.elementary.layout import Layout
def _event(*args, **kargs):
print((args, kargs))
def layout_clicked(obj):
- win = elementary.Window("layout", elementary.ELM_WIN_BASIC)
+ win = Window("layout", elementary.ELM_WIN_BASIC)
win.title_set("Layout")
win.elm_event_callback_add(_event)
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- ly = elementary.Layout(win)
+ ly = Layout(win)
ly.file_set("test.edj", "layout")
ly.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(ly)
ly.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 1")
ly.part_content_set("element1", bt)
bt.elm_event_callback_add(_event)
bt.elm_event_callback_del(_event)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 2")
ly.part_content_set("element2", bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 3")
ly.part_content_set("element3", bt)
bt.show()
diff --git a/examples/elementary/test_list.py b/examples/elementary/test_list.py
index 44b58e6..3ce86bb 100644
--- a/examples/elementary/test_list.py
+++ b/examples/elementary/test_list.py
@@ -1,69 +1,78 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.frame import Frame
+from efl.elementary.label import Label
+from efl.elementary.list import List
+from efl.elementary.icon import Icon
+from efl.elementary.table import Table
def my_list_show_it(obj, it):
it.show()
def list_clicked(obj, item=None):
- win = elementary.Window("list", elementary.ELM_WIN_BASIC)
+ win = Window("list", elementary.ELM_WIN_BASIC)
win.title_set("List")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- li = elementary.List(win)
+ li = List(win)
win.resize_object_add(li)
li.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.resizable_set(1, 1)
it1 = li.item_append("Hello", ic)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.resizable_set(0, 0)
li.item_append("Hello", ic)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.standard_set("edit")
ic.resizable_set(0, 0)
- ic2 = elementary.Icon(win)
+ ic2 = Icon(win)
ic2.standard_set("clock")
ic2.resizable_set(0, 0)
li.item_append(".", ic, ic2)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.standard_set("delete")
ic.resizable_set(0, 0)
- ic2 = elementary.Icon(win)
+ ic2 = Icon(win)
ic2.standard_set("clock")
ic2.resizable_set(0, 0)
it2 = li.item_append("How", ic, ic2)
- bx = elementary.Box(win)
+ bx = Box(win)
bx.horizontal_set(True)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.resizable_set(0, 0)
ic.size_hint_align_set(0.5, 0.5)
bx.pack_end(ic)
ic.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.resizable_set(0, 0)
ic.size_hint_align_set(0.5, 0.0)
bx.pack_end(ic)
ic.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.resizable_set(0, 0)
ic.size_hint_align_set(0.0, evas.EVAS_HINT_EXPAND)
@@ -89,11 +98,11 @@ def list_clicked(obj, item=None):
li.show()
- tb2 = elementary.Table(win)
+ tb2 = Table(win)
tb2.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(tb2)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Hello")
bt.callback_clicked_add(my_list_show_it, it1)
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
@@ -101,7 +110,7 @@ def list_clicked(obj, item=None):
tb2.pack(bt, 0, 0, 1, 1);
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("How")
bt.callback_clicked_add(my_list_show_it, it2)
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
@@ -109,7 +118,7 @@ def list_clicked(obj, item=None):
tb2.pack(bt, 0, 1, 1, 1);
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("doing")
bt.callback_clicked_add(my_list_show_it, it3)
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
@@ -117,7 +126,7 @@ def list_clicked(obj, item=None):
tb2.pack(bt, 0, 2, 1, 1);
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Here")
bt.callback_clicked_add(my_list_show_it, it4)
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
@@ -125,7 +134,7 @@ def list_clicked(obj, item=None):
tb2.pack(bt, 0, 3, 1, 1);
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Maybe this...")
bt.callback_clicked_add(my_list_show_it, it5)
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
@@ -148,58 +157,58 @@ def my_list2_sel(obj, it):
it.selected_set(False)
def list2_clicked(obj, item=None):
- win = elementary.Window("list-2", elementary.ELM_WIN_BASIC)
+ win = Window("list-2", elementary.ELM_WIN_BASIC)
win.title_set("List 2")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
bg.file_set('images/plant_01.jpg')
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(bx)
bx.show()
- li = elementary.List(win)
+ li = List(win)
li.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
li.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
li.mode_set(elementary.ELM_LIST_LIMIT)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
it = li.item_append("Hello", ic, callback=my_list2_sel)
it.selected_set(True)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.resizable_set(0, 0)
ic.file_set('images/logo_small.png')
li.item_append("world", ic)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.standard_set("edit")
ic.resizable_set(0, 0)
li.item_append(".", ic)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.standard_set("delete")
ic.resizable_set(0, 0)
- ic2 = elementary.Icon(win)
+ ic2 = Icon(win)
ic2.standard_set("clock")
ic2.resizable_set(0, 0)
it2 = li.item_append("How", ic, ic2)
- bx2 = elementary.Box(win)
+ bx2 = Box(win)
bx2.horizontal_set(True)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.resizable_set(0, 0)
ic.size_hint_align_set(0.5, 0.5)
bx2.pack_end(ic)
ic.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.resizable_set(0, 0)
ic.size_hint_align_set(0.5, 0.0)
@@ -226,13 +235,13 @@ def list2_clicked(obj, item=None):
bx.pack_end(li)
li.show()
- bx2 = elementary.Box(win)
+ bx2 = Box(win)
bx2.horizontal_set(True)
bx2.homogeneous_set(True)
bx2.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
bx2.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Clear")
bt.callback_clicked_add(my_list2_clear, li)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -248,58 +257,58 @@ def list2_clicked(obj, item=None):
def list3_clicked(obj, item=None):
- win = elementary.Window("list-3", elementary.ELM_WIN_BASIC)
+ win = Window("list-3", elementary.ELM_WIN_BASIC)
win.title_set("List 3")
win.autodel_set(True)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- li = elementary.List(win)
+ li = List(win)
win.resize_object_add(li)
li.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
li.mode_set(elementary.ELM_LIST_COMPRESS)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
li.item_append("Hello", ic)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.resizable_set(0, 0)
li.item_append("world", ic)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.standard_set("edit")
ic.resizable_set(0, 0)
li.item_append(".", ic)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.standard_set("delete")
ic.resizable_set(0, 0)
- ic2 = elementary.Icon(win)
+ ic2 = Icon(win)
ic2.standard_set("clock")
ic2.resizable_set(0, 0)
it2 = li.item_append("How", ic, ic2)
- bx = elementary.Box(win)
+ bx = Box(win)
bx.horizontal_set(True)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.resizable_set(0, 0)
ic.size_hint_align_set(0.5, 0.5)
bx.pack_end(ic)
ic.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.resizable_set(0, 0)
ic.size_hint_align_set(0.5, 0.0)
bx.pack_end(ic)
ic.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.resizable_set(0, 0)
ic.size_hint_align_set(0.0, evas.EVAS_HINT_EXPAND)
@@ -334,26 +343,26 @@ if __name__ == "__main__":
elementary.exit()
elementary.init()
- win = elementary.Window("test", elementary.ELM_WIN_BASIC)
+ win = Window("test", elementary.ELM_WIN_BASIC)
win.title_set("python-elementary test application")
win.callback_delete_request_add(destroy)
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- box0 = elementary.Box(win)
+ box0 = Box(win)
box0.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(box0)
box0.show()
- fr = elementary.Frame(win)
+ fr = Frame(win)
fr.text_set("Information")
box0.pack_end(fr)
fr.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Please select a test from the list below<br>"
"by clicking the test button to show the<br>"
"test window.")
@@ -364,7 +373,7 @@ if __name__ == "__main__":
("List 2", list2_clicked),
("List 3", list3_clicked)]
- li = elementary.List(win)
+ li = List(win)
li.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
li.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
box0.pack_end(li)
diff --git a/examples/elementary/test_map.py b/examples/elementary/test_map.py
index 1419da2..1ed3684 100644
--- a/examples/elementary/test_map.py
+++ b/examples/elementary/test_map.py
@@ -1,8 +1,16 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.check import Check
+from efl.elementary.hoversel import Hoversel
+from efl.elementary.map import Map
+from efl.elementary.slider import Slider
def print_map_info(Map):
@@ -41,103 +49,103 @@ def cb_hovsel_selected(hov, item, Map, type):
hov.text = "Tiles: %s" % (item.text)
def map_clicked(obj):
- win = elementary.Window("map", elementary.ELM_WIN_BASIC)
+ win = Window("map", elementary.ELM_WIN_BASIC)
win.title = "Map test"
win.autodel = True
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
vbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbox.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
win.resize_object_add(vbox)
vbox.show()
- Map = elementary.Map(win)
- Map.zoom = 2
- Map.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
- Map.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
- # Map.callback_clicked_add(cb_map_clicked)
- vbox.pack_end(Map)
- Map.show()
+ map_obj = Map(win)
+ map_obj.zoom = 2
+ map_obj.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
+ map_obj.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
+ # map_obj.callback_clicked_add(cb_map_clicked)
+ vbox.pack_end(map_obj)
+ map_obj.show()
# view
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal = True
hbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
hbox.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
vbox.pack_end(hbox)
hbox.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Zoom +"
- bt.callback_clicked_add(cb_btn_zoom, Map, 1)
+ bt.callback_clicked_add(cb_btn_zoom, map_obj, 1)
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Zoom -"
- bt.callback_clicked_add(cb_btn_zoom, Map, -1)
+ bt.callback_clicked_add(cb_btn_zoom, map_obj, -1)
hbox.pack_end(bt)
bt.show()
- sl = elementary.Slider(win)
+ sl = Slider(win)
sl.text = "Rotation:"
sl.min_max = (0, 360)
sl.value = 0
sl.indicator_format = "%3.0f"
- sl.callback_changed_add(cb_slider_rot, Map)
+ sl.callback_changed_add(cb_slider_rot, map_obj)
hbox.pack_end(sl)
sl.show()
- ho = elementary.Hoversel(win)
+ ho = Hoversel(win)
ho.hover_parent_set(win)
type = elementary.ELM_MAP_SOURCE_TYPE_TILE
- ho.text_set("Tiles: %s" % (Map.source_get(type)))
- for src in Map.sources_get(type):
+ ho.text_set("Tiles: %s" % (map_obj.source_get(type)))
+ for src in map_obj.sources_get(type):
ho.item_add(src)
- ho.callback_selected_add(cb_hovsel_selected, Map, type)
+ ho.callback_selected_add(cb_hovsel_selected, map_obj, type)
hbox.pack_end(ho)
ho.show()
# show / bring in
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal = True
hbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
hbox.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
vbox.pack_end(hbox)
hbox.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Show Sydney"
- bt.callback_clicked_add(cb_btn_show, Map, 151.175274, -33.859126)
+ bt.callback_clicked_add(cb_btn_show, map_obj, 151.175274, -33.859126)
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Show Paris"
- bt.callback_clicked_add(cb_btn_show, Map, 2.342913, 48.853701)
+ bt.callback_clicked_add(cb_btn_show, map_obj, 2.342913, 48.853701)
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "BringIn Sydney"
- bt.callback_clicked_add(cb_btn_bringin, Map, 151.175274, -33.859126)
+ bt.callback_clicked_add(cb_btn_bringin, map_obj, 151.175274, -33.859126)
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "BringIn Paris"
- bt.callback_clicked_add(cb_btn_bringin, Map, 2.342913, 48.853701)
+ bt.callback_clicked_add(cb_btn_bringin, map_obj, 2.342913, 48.853701)
hbox.pack_end(bt)
bt.show()
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal = True
hbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
hbox.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
@@ -145,19 +153,19 @@ def map_clicked(obj):
hbox.show()
# options
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text = "wheel_disabled"
- ck.callback_changed_add(lambda bt: Map.wheel_disabled_set(bt.state))
+ ck.callback_changed_add(lambda bt: map_obj.wheel_disabled_set(bt.state))
hbox.pack_end(ck)
ck.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text = "paused"
- ck.callback_changed_add(lambda bt: Map.paused_set(bt.state))
+ ck.callback_changed_add(lambda bt: map_obj.paused_set(bt.state))
hbox.pack_end(ck)
ck.show()
- print_map_info(Map)
+ print_map_info(map_obj)
win.resize(600, 600)
win.show()
diff --git a/examples/elementary/test_map2.py b/examples/elementary/test_map2.py
index 61fe274..7796dca 100644
--- a/examples/elementary/test_map2.py
+++ b/examples/elementary/test_map2.py
@@ -1,8 +1,40 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
+import random
+
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.check import Check
+from efl.elementary.ctxpopup import Ctxpopup
+# from efl.elementary.entry import Entry
+# from efl.elementary.frame import Frame
+# from efl.elementary.grid import Grid
+# from efl.elementary.hover import Hover
+# from efl.elementary.hoversel import Hoversel
+# from efl.elementary.label import Label
+# from efl.elementary.layout import Layout
+# from efl.elementary.list import List
+from efl.elementary.icon import Icon
+# from efl.elementary.index import Index
+# from efl.elementary.innerwindow import InnerWindow
+# from efl.elementary.image import Image
+from efl.elementary.map import Map
+# from efl.elementary.fileselector import Fileselector
+# from efl.elementary.fileselector_button import FileselectorButton
+# from efl.elementary.fileselector_entry import FileselectorEntry
+# from efl.elementary.flip import Flip
+# from efl.elementary.gengrid import Gengrid, GengridItemClass
+# from efl.elementary.genlist import Genlist, GenlistItem, GenlistItemClass
+# from efl.elementary.radio import Radio
+# from efl.elementary.separator import Separator
+# from efl.elementary.slider import Slider
+# from efl.elementary.table import Table
+# from efl.elementary.flipselector import FlipSelector
def cb_btn_clear_overlays(bt, Map):
@@ -13,7 +45,7 @@ def cb_btn_clear_overlays(bt, Map):
def cb_btn_ungroup_overlays(bt, Map):
for ov in Map.overlays:
- if isinstance(ov, elementary.MapOverlayClass):
+ if isinstance(ov, MapOverlayClass):
print ov
# TODO ungroup instead
for ov2 in ov.members:
@@ -45,7 +77,7 @@ def cb_ctx_overlay_add(li, item, Map, lon, lat, min_zoom = 0, icon = None):
def cb_ctx_overlay_add_custom(li, item, Map, lon, lat):
item.widget_get().dismiss()
- cont = elementary.Icon(Map)
+ cont = Icon(Map)
cont.file_set("images/sky_01.jpg")
cont.size_hint_min = (50, 50)
cont.show()
@@ -74,18 +106,18 @@ def cb_ctx_overlay_bubble(li, item, Map, lon, lat):
bub = Map.overlay_bubble_add()
bub.follow(ov)
- lb = elementary.Label(Map)
+ lb = Label(Map)
lb.text = "You can push contents here"
bub.content_append(lb)
lb.show()
- ic = elementary.Icon(Map)
+ ic = Icon(Map)
ic.file_set("images/sky_01.jpg")
ic.size_hint_min = (50, 50)
bub.content_append(ic)
ic.show()
- bt = elementary.Button(Map)
+ bt = Button(Map)
bt.text = "clear me"
bt.callback_clicked_add(lambda bt:bub.content_clear())
bub.content_append(bt)
@@ -121,10 +153,10 @@ def test(li, item, Map, lon, lat):
def cb_map_clicked(Map):
(x, y) = Map.evas.pointer_canvas_xy_get()
(lon, lat) = Map.canvas_to_region_convert(x, y)
- cp = elementary.Ctxpopup(Map)
+ cp = Ctxpopup(Map)
cp.item_append("%f %f" % (lon, lat), None, None).disabled = True
cp.item_append("Add Overlay here", None, cb_ctx_overlay_add, Map, lon, lat)
- ic = elementary.Icon(Map)
+ ic = Icon(Map)
ic.file_set("images/logo.png")
cp.item_append("Add Overlay with icon", None, cb_ctx_overlay_add, Map, lon, lat, 0, ic)
cp.item_append("Add Overlay custom content", None, cb_ctx_overlay_add_custom, Map, lon, lat)
@@ -140,66 +172,66 @@ def cb_map_clicked(Map):
cp.show()
def map_overlays_clicked(obj):
- win = elementary.Window("map2", elementary.ELM_WIN_BASIC)
+ win = Window("map2", elementary.ELM_WIN_BASIC)
win.title = "Map Overlay test"
win.autodel = True
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
vbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbox.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
win.resize_object_add(vbox)
vbox.show()
- Map = elementary.Map(win)
- Map.zoom = 2
- Map.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
- Map.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
- Map.callback_clicked_add(cb_map_clicked)
- vbox.pack_end(Map)
- Map.show()
+ map_obj = Map(win)
+ map_obj.zoom = 2
+ map_obj.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
+ map_obj.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
+ map_obj.callback_clicked_add(cb_map_clicked)
+ vbox.pack_end(map_obj)
+ map_obj.show()
# overlays
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal = True
hbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
hbox.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
vbox.pack_end(hbox)
hbox.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text = "overlays hidden"
- ck.callback_changed_add(cb_chk_overlays_hidden, Map)
+ ck.callback_changed_add(cb_chk_overlays_hidden, map_obj)
hbox.pack_end(ck)
ck.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text = "overlays paused"
- ck.callback_changed_add(cb_chk_overlays_paused, Map)
+ ck.callback_changed_add(cb_chk_overlays_paused, map_obj)
hbox.pack_end(ck)
ck.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "clear overlays"
- bt.callback_clicked_add(cb_btn_clear_overlays, Map)
+ bt.callback_clicked_add(cb_btn_clear_overlays, map_obj)
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "ungroup (BROKEN)"
- bt.callback_clicked_add(cb_btn_ungroup_overlays, Map)
+ bt.callback_clicked_add(cb_btn_ungroup_overlays, map_obj)
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "overlays_show()"
- bt.callback_clicked_add(cb_btn_show_overlays, Map)
+ bt.callback_clicked_add(cb_btn_show_overlays, map_obj)
hbox.pack_end(bt)
bt.show()
diff --git a/examples/elementary/test_map3.py b/examples/elementary/test_map3.py
index 0c76361..f853b4c 100644
--- a/examples/elementary/test_map3.py
+++ b/examples/elementary/test_map3.py
@@ -1,8 +1,18 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.ctxpopup import Ctxpopup
+from efl.elementary.entry import Entry
+from efl.elementary.hoversel import Hoversel
+from efl.elementary.label import Label
+from efl.elementary.map import Map
+from efl.elementary.separator import Separator
_from = None
@@ -94,7 +104,7 @@ def cb_btn_clear_overlays(btn, Map):
def cb_map_clicked(Map):
(x, y) = Map.evas.pointer_canvas_xy_get()
(lon, lat) = Map.canvas_to_region_convert(x, y)
- cp = elementary.Ctxpopup(Map)
+ cp = Ctxpopup(Map)
cp.item_append("%f %f" % (lon, lat)).disabled = True
cp.item_append("Set start point", None, cb_ctx_set_from, Map, lon, lat)
cp.item_append("Set end point", None, cb_ctx_set_to, Map, lon, lat)
@@ -110,47 +120,47 @@ def cb_hovsel_selected(hov, item, Map, type, name):
hov.text = "%s: %s" % (name, item.text)
def map_route_clicked(obj):
- win = elementary.Window("maproute", elementary.ELM_WIN_BASIC)
+ win = Window("maproute", elementary.ELM_WIN_BASIC)
win.title = "Map Route test"
win.autodel = True
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
vbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbox.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
win.resize_object_add(vbox)
vbox.show()
- Map = elementary.Map(win)
- Map.zoom = 2
- Map.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
- Map.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
- Map.callback_clicked_add(cb_map_clicked)
- Map.callback_tile_load_add(cb_map_load)
- Map.callback_tile_loaded_add(cb_map_load)
- vbox.pack_end(Map)
- Map.show()
-
- lb = elementary.Label(win)
+ map_obj = Map(win)
+ map_obj.zoom = 2
+ map_obj.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
+ map_obj.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
+ map_obj.callback_clicked_add(cb_map_clicked)
+ map_obj.callback_tile_load_add(cb_map_load)
+ map_obj.callback_tile_loaded_add(cb_map_load)
+ vbox.pack_end(map_obj)
+ map_obj.show()
+
+ lb = Label(win)
lb.text = "load_status: 0 / 0"
vbox.pack_end(lb)
lb.show()
- Map.data["lb_load_status"] = lb
+ map_obj.data["lb_load_status"] = lb
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text = "First set Start and End point and then click 'Calc Route !'"
vbox.pack_end(lb)
lb.show()
- Map.data["lb_distance"] = lb
+ map_obj.data["lb_distance"] = lb
# info
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal = True
hbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
hbox.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
@@ -158,57 +168,57 @@ def map_route_clicked(obj):
hbox.show()
# route
- ho = elementary.Hoversel(win)
+ ho = Hoversel(win)
ho.hover_parent_set(win)
type = elementary.ELM_MAP_SOURCE_TYPE_ROUTE
- ho.text_set("Routes: %s" % (Map.source_get(type)))
- for src in Map.sources_get(type):
+ ho.text_set("Routes: %s" % (map_obj.source_get(type)))
+ for src in map_obj.sources_get(type):
ho.item_add(src)
- ho.callback_selected_add(cb_hovsel_selected, Map, type, "Routes")
+ ho.callback_selected_add(cb_hovsel_selected, map_obj, type, "Routes")
hbox.pack_end(ho)
ho.show()
- sep = elementary.Separator(win)
+ sep = Separator(win)
sep.show()
hbox.pack_end(sep)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "GOTO"
- bt.callback_clicked_add(cb_btn_goto, Map)
+ bt.callback_clicked_add(cb_btn_goto, map_obj)
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Calc Route !"
- bt.callback_clicked_add(cb_btn_calc_route, Map)
+ bt.callback_clicked_add(cb_btn_calc_route, map_obj)
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "clear route overlays"
- bt.callback_clicked_add(cb_btn_clear_overlays, Map)
+ bt.callback_clicked_add(cb_btn_clear_overlays, map_obj)
hbox.pack_end(bt)
bt.show()
# names
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal = True
hbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
hbox.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
vbox.pack_end(hbox)
hbox.show()
- ho = elementary.Hoversel(win)
+ ho = Hoversel(win)
ho.hover_parent_set(win)
type = elementary.ELM_MAP_SOURCE_TYPE_NAME
- ho.text_set("Names: %s" % (Map.source_get(type)))
- for src in Map.sources_get(type):
+ ho.text_set("Names: %s" % (map_obj.source_get(type)))
+ for src in map_obj.sources_get(type):
ho.item_add(src)
- ho.callback_selected_add(cb_hovsel_selected, Map, type, "Names")
+ ho.callback_selected_add(cb_hovsel_selected, map_obj, type, "Names")
hbox.pack_end(ho)
ho.show()
- en = elementary.Entry(win)
+ en = Entry(win)
en.scrollable = True
# en.single_line = True
en.text = "type an address here"
@@ -217,20 +227,20 @@ def map_route_clicked(obj):
hbox.pack_end(en)
en.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Search Address !"
- bt.callback_clicked_add(cb_btn_search_name, Map, en)
+ bt.callback_clicked_add(cb_btn_search_name, map_obj, en)
hbox.pack_end(bt)
bt.show()
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal = True
hbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
hbox.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
vbox.pack_end(hbox)
hbox.show()
- en = elementary.Entry(win)
+ en = Entry(win)
en.scrollable = True
# en.single_line = True
en.disabled = True
@@ -240,9 +250,9 @@ def map_route_clicked(obj):
hbox.pack_end(en)
en.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Search start point Region"
- bt.callback_clicked_add(cb_btn_search_region, Map, en)
+ bt.callback_clicked_add(cb_btn_search_region, map_obj, en)
hbox.pack_start(bt)
bt.show()
diff --git a/examples/elementary/test_mapbuf.py b/examples/elementary/test_mapbuf.py
index 39db81a..495796c 100644
--- a/examples/elementary/test_mapbuf.py
+++ b/examples/elementary/test_mapbuf.py
@@ -1,8 +1,18 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.check import Check
+from efl.elementary.label import Label
+from efl.elementary.icon import Icon
+from efl.elementary.mapbuf import Mapbuf
+from efl.elementary.scroller import Scroller
+from efl.elementary.table import Table
names = [ "Hello", "World", "Spam", "Egg", "Ham", "Good", "Bad", "Milk",
@@ -32,39 +42,39 @@ def cb_ck_fs(ck, win):
def mapbuf_clicked(obj, item=None):
global mb_list
- win = elementary.Window("mapbuf", elementary.ELM_WIN_BASIC)
+ win = Window("mapbuf", elementary.ELM_WIN_BASIC)
win.title_set("Mapbuf test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
bg.file = "images/sky_04.jpg"
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
vbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbox.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
win.resize_object_add(vbox)
vbox.show()
# launcher
- sc = elementary.Scroller(win);
+ sc = Scroller(win);
sc.bounce = (True, False)
sc.policy = (elementary.ELM_SCROLLER_POLICY_OFF, elementary.ELM_SCROLLER_POLICY_OFF)
sc.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
sc.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbox.pack_end(sc)
- bx = elementary.Box(win)
+ bx = Box(win)
bx.horizontal = True
bx.homogeneous = True
bx.show()
for k in range(8):
- tb = elementary.Table(win)
+ tb = Table(win)
tb.size_hint_align = (0.5, 0.5)
tb.size_hint_weight = (0.0, 0.0)
tb.show()
@@ -101,7 +111,7 @@ def mapbuf_clicked(obj, item=None):
pad.show()
tb.pack(pad, 6, 1, 1, 10)
- mb = elementary.Mapbuf(win)
+ mb = Mapbuf(win)
mb_list.append(mb)
mb.content = tb
bx.pack_end(mb)
@@ -110,7 +120,7 @@ def mapbuf_clicked(obj, item=None):
n = m = 0
for j in range(5):
for i in range(5):
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.scale_set(0.5)
ic.file_set("images/icon_%02d.png" % (n));
ic.resizable_set(0, 0)
@@ -119,7 +129,7 @@ def mapbuf_clicked(obj, item=None):
tb.pack(ic, 1 + i, 1 + (j * 2), 1, 1)
ic.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.style = "marker"
lb.text = names[m]
tb.pack(lb, 1 + i, 1 + (j * 2) + 1, 1, 1)
@@ -133,7 +143,7 @@ def mapbuf_clicked(obj, item=None):
sc.show()
# controls
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal = True
hbox.homogeneous = True
hbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
@@ -141,35 +151,35 @@ def mapbuf_clicked(obj, item=None):
vbox.pack_start(hbox)
hbox.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text = "Map"
ck.state = False
ck.callback_changed_add(cb_ck_map)
hbox.pack_end(ck)
ck.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.callback_changed_add(cb_ck_alpha)
ck.text = "Alpha"
ck.state = True
hbox.pack_end(ck)
ck.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.callback_changed_add(cb_ck_smooth)
ck.text = "Smooth"
ck.state = True
hbox.pack_end(ck)
ck.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.callback_changed_add(cb_ck_fs, win)
ck.text = "FS"
ck.state = False
hbox.pack_end(ck)
ck.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Close"
bt.callback_clicked_add(cb_btn_close, win)
bt.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
diff --git a/examples/elementary/test_menu.py b/examples/elementary/test_menu.py
index e4b0953..b815973 100644
--- a/examples/elementary/test_menu.py
+++ b/examples/elementary/test_menu.py
@@ -1,8 +1,11 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.menu import Menu
def menu_show(rect, evtinfo, menu):
@@ -60,13 +63,13 @@ def menu_populate_1(menu, item):
menu_populate_2(menu, item2)
def menu_clicked(obj):
- win = elementary.Window("menu", elementary.ELM_WIN_BASIC)
+ win = Window("menu", elementary.ELM_WIN_BASIC)
win.title_set("Menu test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
@@ -77,7 +80,7 @@ def menu_clicked(obj):
rect.color_set(0, 0, 0, 0)
rect.show()
- menu = elementary.Menu(win)
+ menu = Menu(win)
item = menu.item_add(None, "first item", "clock")
item = menu.item_add(None, "second item", "mail-send")
diff --git a/examples/elementary/test_multibuttonentry.py b/examples/elementary/test_multibuttonentry.py
index 9113f0f..efaa3a7 100644
--- a/examples/elementary/test_multibuttonentry.py
+++ b/examples/elementary/test_multibuttonentry.py
@@ -1,8 +1,15 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.entry import Entry
+from efl.elementary.multibuttonentry import MultiButtonEntry
+from efl.elementary.scroller import Scroller
counter = 0
@@ -46,23 +53,23 @@ def cb_filter1(mbe, text):
return True
def multibuttonentry_clicked(obj, item=None):
- win = elementary.Window("multibuttonentry", elementary.ELM_WIN_BASIC)
+ win = Window("multibuttonentry", elementary.ELM_WIN_BASIC)
win.title_set("MultiButtonEntry test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
vbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(vbox)
vbox.show()
- sc = elementary.Scroller(win)
+ sc = Scroller(win)
sc.bounce = (False, True)
sc.policy = (elementary.ELM_SCROLLER_POLICY_OFF, elementary.ELM_SCROLLER_POLICY_AUTO)
sc.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -70,7 +77,7 @@ def multibuttonentry_clicked(obj, item=None):
vbox.pack_end(sc)
sc.show()
- mbe = elementary.MultiButtonEntry(win)
+ mbe = MultiButtonEntry(win)
mbe.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
mbe.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
mbe.text = "To: "
@@ -81,13 +88,13 @@ def multibuttonentry_clicked(obj, item=None):
print mbe.entry
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal = True
hbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
vbox.pack_end(hbox)
hbox.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "item_append"
bt.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
bt.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
@@ -95,7 +102,7 @@ def multibuttonentry_clicked(obj, item=None):
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "item_prepend"
bt.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
bt.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
@@ -103,7 +110,7 @@ def multibuttonentry_clicked(obj, item=None):
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "item_insert_after"
bt.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
bt.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
@@ -111,7 +118,7 @@ def multibuttonentry_clicked(obj, item=None):
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "item_insert_before"
bt.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
bt.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
@@ -120,13 +127,13 @@ def multibuttonentry_clicked(obj, item=None):
bt.show()
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal = True
hbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
vbox.pack_end(hbox)
hbox.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "delete selected item"
bt.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
bt.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
@@ -134,7 +141,7 @@ def multibuttonentry_clicked(obj, item=None):
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "clear"
bt.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
bt.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
@@ -142,7 +149,7 @@ def multibuttonentry_clicked(obj, item=None):
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "clear2"
bt.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
bt.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
@@ -150,7 +157,7 @@ def multibuttonentry_clicked(obj, item=None):
hbox.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "toggle expand"
bt.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
bt.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
diff --git a/examples/elementary/test_naviframe.py b/examples/elementary/test_naviframe.py
index 44839db..0d8b5b5 100644
--- a/examples/elementary/test_naviframe.py
+++ b/examples/elementary/test_naviframe.py
@@ -1,12 +1,19 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.icon import Icon
+from efl.elementary.naviframe import Naviframe
+from efl.elementary.photo import Photo
def content_new(parent, img):
- photo = elementary.Photo(parent)
+ photo = Photo(parent)
photo.file_set(img)
photo.fill_inside_set(True)
photo.style_set("shadow")
@@ -22,9 +29,9 @@ def title_visible(obj, item):
item.title_visible = not item.title_visible
def page2(bt, nf):
- ic = elementary.Icon(nf)
+ ic = Icon(nf)
ic.file_set("images/icon_right_arrow.png")
- bt = elementary.Button(nf)
+ bt = Button(nf)
bt.callback_clicked_add(page3, nf)
bt.content_set(ic)
@@ -33,30 +40,30 @@ def page2(bt, nf):
item.part_text_set("subtitle", "Here is sub-title part!")
def page3(bt, nf):
- bt = elementary.Button(nf)
+ bt = Button(nf)
bt.callback_clicked_add(navi_pop, nf)
bt.text_set("Prev")
- bt2 = elementary.Button(nf)
+ bt2 = Button(nf)
bt2.callback_clicked_add(page4, nf)
bt2.text_set("Next")
content = content_new(nf, "images/rock_01.jpg");
item = nf.item_push("Page 3", bt, bt2, content, "basic")
- ic = elementary.Icon(nf)
+ ic = Icon(nf)
ic.file_set("images/logo_small.png")
item.part_content_set("icon", ic)
def page4(bt, nf):
- ic = elementary.Icon(nf)
+ ic = Icon(nf)
ic.file_set("images/icon_right_arrow.png")
- bt = elementary.Button(nf)
+ bt = Button(nf)
bt.callback_clicked_add(page5, nf)
bt.content_set(ic)
content = content_new(nf, "images/rock_02.jpg");
item = nf.item_push("Page 4", None, bt, content, "basic")
- ic = elementary.Icon(nf)
+ ic = Icon(nf)
ic.file_set("images/logo_small.png")
item.part_content_set("icon", ic)
item.part_text_set("subtitle", "Title area visibility test")
@@ -64,11 +71,11 @@ def page4(bt, nf):
content.callback_clicked_add(title_visible, item)
def page5(bt, nf):
- bt = elementary.Button(nf)
+ bt = Button(nf)
bt.callback_clicked_add(navi_pop, nf)
bt.text_set("Page 4")
- bt2 = elementary.Button(nf)
+ bt2 = Button(nf)
bt2.callback_clicked_add(page6, nf)
bt2.text_set("Page 6")
@@ -77,11 +84,11 @@ def page5(bt, nf):
item.part_text_set("subtitle", "This page is inserted without transition (TODO)")
def page6(bt, nf):
- bt = elementary.Button(nf)
+ bt = Button(nf)
bt.callback_clicked_add(navi_pop, nf)
bt.text_set("Page 5")
- bt2 = elementary.Button(nf)
+ bt2 = Button(nf)
bt2.callback_clicked_add(page7, nf)
bt2.text_set("Page 7")
@@ -90,11 +97,11 @@ def page6(bt, nf):
item.part_text_set("subtitle", "Overlap style!")
def page7(bt, nf):
- bt = elementary.Button(nf)
+ bt = Button(nf)
bt.callback_clicked_add(navi_pop, nf)
bt.text_set("Page 6")
- bt2 = elementary.Button(nf)
+ bt2 = Button(nf)
bt2.callback_clicked_add(navi_promote, nf, nf.data["page1"])
bt2.text_set("Page 1")
@@ -104,25 +111,25 @@ def page7(bt, nf):
def naviframe_clicked(obj):
- win = elementary.Window("naviframe", elementary.ELM_WIN_BASIC)
+ win = Window("naviframe", elementary.ELM_WIN_BASIC)
win.title_set("Naviframe test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
bg.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
win.resize_object_add(bg)
bg.show()
- nf = elementary.Naviframe(win)
+ nf = Naviframe(win)
nf.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
nf.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
win.resize_object_add(nf)
nf.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.callback_clicked_add(page2, nf)
bt.text_set("Next")
diff --git a/examples/elementary/test_notify.py b/examples/elementary/test_notify.py
index 28f2c24..e7150e7 100644
--- a/examples/elementary/test_notify.py
+++ b/examples/elementary/test_notify.py
@@ -1,31 +1,38 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.label import Label
+from efl.elementary.notify import Notify
+from efl.elementary.table import Table
def notify_close(bt, notify):
notify.hide()
def notify_show(bt, win, orient):
- notify = elementary.Notify(win)
+ notify = Notify(win)
notify.repeat_events_set(False)
notify.timeout_set(5)
notify.orient_set(orient)
- bx = elementary.Box(win)
+ bx = Box(win)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.horizontal_set(True)
notify.content_set(bx)
bx.show()
- lb = elementary.Label(win)
+ lb = Label(win)
lb.text_set("Text notification")
bx.pack_end(lb)
lb.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Close")
bt.callback_clicked_add(notify_close, notify)
bx.pack_end(bt)
@@ -33,7 +40,7 @@ def notify_show(bt, win, orient):
notify.show()
def notify_clicked(obj):
- win = elementary.Window("notify", elementary.ELM_WIN_BASIC)
+ win = Window("notify", elementary.ELM_WIN_BASIC)
win.title_set("Notify test")
win.autodel_set(True)
win.size_hint_min_set(160, 160)
@@ -42,65 +49,65 @@ def notify_clicked(obj):
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- tb = elementary.Table(win)
+ tb = Table(win)
tb.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(tb)
tb.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Top")
bt.callback_clicked_add(notify_show, win, elementary.ELM_NOTIFY_ORIENT_TOP)
tb.pack(bt, 1, 0, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Center")
bt.callback_clicked_add(notify_show, win, elementary.ELM_NOTIFY_ORIENT_CENTER)
tb.pack(bt, 1, 1, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Bottom")
bt.callback_clicked_add(notify_show, win, elementary.ELM_NOTIFY_ORIENT_BOTTOM)
tb.pack(bt, 1, 2, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Left")
bt.callback_clicked_add(notify_show, win, elementary.ELM_NOTIFY_ORIENT_LEFT)
tb.pack(bt, 0, 1, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Top Left")
bt.callback_clicked_add(notify_show, win, elementary.ELM_NOTIFY_ORIENT_TOP_LEFT)
tb.pack(bt, 0, 0, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Bottom Left")
bt.callback_clicked_add(notify_show, win, elementary.ELM_NOTIFY_ORIENT_BOTTOM_LEFT)
tb.pack(bt, 0, 2, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Right")
bt.callback_clicked_add(notify_show, win, elementary.ELM_NOTIFY_ORIENT_RIGHT)
tb.pack(bt, 2, 1, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Top Right")
bt.callback_clicked_add(notify_show, win, elementary.ELM_NOTIFY_ORIENT_TOP_RIGHT)
tb.pack(bt, 2, 0, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Bottom Right")
bt.callback_clicked_add(notify_show, win, elementary.ELM_NOTIFY_ORIENT_BOTTOM_RIGHT)
tb.pack(bt, 2, 2, 1, 1)
diff --git a/examples/elementary/test_panel.py b/examples/elementary/test_panel.py
index cc03a41..970f725 100644
--- a/examples/elementary/test_panel.py
+++ b/examples/elementary/test_panel.py
@@ -1,33 +1,38 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.panel import Panel
def panel_clicked(obj):
- win = elementary.Window("panel", elementary.ELM_WIN_BASIC)
+ win = Window("panel", elementary.ELM_WIN_BASIC)
win.title_set("Panel test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(bx)
bx.show()
- panel = elementary.Panel(win)
+ panel = Panel(win)
panel.orient = elementary.ELM_PANEL_ORIENT_LEFT
panel.size_hint_weight_set(0.0, evas.EVAS_HINT_EXPAND);
panel.size_hint_align_set(0.0, evas.EVAS_HINT_FILL);
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("HIDE ME :)")
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND);
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL);
diff --git a/examples/elementary/test_panes.py b/examples/elementary/test_panes.py
index 9b33140..f3edb6c 100644
--- a/examples/elementary/test_panes.py
+++ b/examples/elementary/test_panes.py
@@ -1,26 +1,30 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.button import Button
+from efl.elementary.panes import Panes
def cb_panes(panes, event):
print(("Event: %s" % (event)))
def panes_clicked(obj):
- win = elementary.Window("panes", elementary.ELM_WIN_BASIC)
+ win = Window("panes", elementary.ELM_WIN_BASIC)
win.title_set("Panes test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- panes = elementary.Panes(win)
+ panes = Panes(win)
win.resize_object_add(panes)
panes.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
panes.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -30,24 +34,24 @@ def panes_clicked(obj):
panes.callback_unpress_add(cb_panes, "unpress")
panes.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Left"
panes.part_content_set("left", bt)
bt.show()
- panes_h = elementary.Panes(win)
+ panes_h = Panes(win)
panes_h.horizontal = True
panes_h.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
panes_h.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
panes.part_content_set("right", panes_h)
panes_h.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Up"
panes_h.part_content_set("left", bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Down"
panes_h.part_content_set("right", bt)
bt.show()
diff --git a/examples/elementary/test_photo.py b/examples/elementary/test_photo.py
index da56685..a5839bc 100644
--- a/examples/elementary/test_photo.py
+++ b/examples/elementary/test_photo.py
@@ -1,8 +1,13 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.photo import Photo
+from efl.elementary.scroller import Scroller
+from efl.elementary.table import Table
images = ["panel_01.jpg",
@@ -16,25 +21,25 @@ images = ["panel_01.jpg",
"wood_01.jpg"]
def photo_clicked(obj):
- win = elementary.Window("photo", elementary.ELM_WIN_BASIC)
+ win = Window("photo", elementary.ELM_WIN_BASIC)
win.title_set("Photo test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- sc = elementary.Scroller(win)
+ sc = Scroller(win)
sc.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(sc)
sc.show()
elementary.need_ethumb()
- tb = elementary.Table(win)
+ tb = Table(win)
tb.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
sc.content = tb
tb.show()
@@ -42,7 +47,7 @@ def photo_clicked(obj):
n = 0
for j in range(12):
for i in range(12):
- ph = elementary.Photo(win)
+ ph = Photo(win)
name = "images/%s" % (images[n])
n += 1
if n >= 9: n = 0
diff --git a/examples/elementary/test_popup.py b/examples/elementary/test_popup.py
index dca315b..dd5c69c 100644
--- a/examples/elementary/test_popup.py
+++ b/examples/elementary/test_popup.py
@@ -1,8 +1,14 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.button import Button
+from efl.elementary.list import List
+from efl.elementary.icon import Icon
+from efl.elementary.popup import Popup
def cb_bnt_close(btn, popup):
@@ -21,37 +27,37 @@ def cb_btn_restack(btn, popup):
popup.raise_()
def cb_popup_center_text(li, item, win):
- popup = elementary.Popup(win)
+ popup = Popup(win)
popup.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
popup.text = "This Popup has content area and timeout value is 3 seconds"
popup.timeout = 3.0
popup.show()
def cb_popup_center_title_text_1button(li, item, win):
- popup = elementary.Popup(win)
+ popup = Popup(win)
popup.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
popup.text = "This Popup has content area and " \
"action area set, action area has one button Close"
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Close"
bt.callback_clicked_add(cb_bnt_close, popup)
popup.part_content_set("button1", bt)
popup.show()
def cb_popup_center_title_text_1button(li, item, win):
- popup = elementary.Popup(win)
+ popup = Popup(win)
popup.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
popup.text = "This Popup has title area, content area and " \
"action area set, action area has one button Close"
popup.part_text_set("title,text", "Title")
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Close"
bt.callback_clicked_add(cb_bnt_close, popup)
popup.part_content_set("button1", bt)
popup.show()
def cb_popup_center_title_text_block_clicked_event(li, item, win):
- popup = elementary.Popup(win)
+ popup = Popup(win)
popup.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
popup.text = "This Popup has title area and content area. " \
"When clicked on blocked event region, popup gets deleted"
@@ -60,7 +66,7 @@ def cb_popup_center_title_text_block_clicked_event(li, item, win):
popup.show()
def cb_popup_bottom_title_text_3button(li, item, win):
- popup = elementary.Popup(win)
+ popup = Popup(win)
popup.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
popup.text = "This Popup has title area, content area and " \
"action area set with content being character wrapped. " \
@@ -68,19 +74,19 @@ def cb_popup_bottom_title_text_3button(li, item, win):
popup.content_text_wrap_type = elementary.ELM_WRAP_CHAR
popup.part_text_set("title,text", "Title")
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file = "images/logo_small.png"
popup.part_content_set("title,icon", ic)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "OK"
popup.part_content_set("button1", bt)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Cancel"
popup.part_content_set("button2", bt)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Close"
bt.callback_clicked_add(cb_bnt_close, popup)
popup.part_content_set("button3", bt)
@@ -88,26 +94,26 @@ def cb_popup_bottom_title_text_3button(li, item, win):
popup.show()
def cb_popup_center_title_content_3button(li, item, win):
- popup = elementary.Popup(win)
+ popup = Popup(win)
popup.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
popup.part_text_set("title,text", "Title")
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file = "images/logo_small.png"
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Content"
bt.content = ic
popup.content = bt
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "OK"
popup.part_content_set("button1", bt)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Cancel"
popup.part_content_set("button2", bt)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Close"
bt.callback_clicked_add(cb_bnt_close, popup)
popup.part_content_set("button3", bt)
@@ -115,27 +121,27 @@ def cb_popup_center_title_content_3button(li, item, win):
popup.show()
def cb_popup_center_title_item_3button(li, item, win):
- popup = elementary.Popup(win)
+ popup = Popup(win)
popup.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
popup.part_text_set("title,text", "Title")
for i in range(1, 11):
if i in [3, 5, 6]:
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file = "images/logo_small.png"
popup.item_append("item"+str(i), ic)
else:
popup.item_append("item"+str(i))
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "OK"
popup.part_content_set("button1", bt)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Cancel"
popup.part_content_set("button2", bt)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Close"
bt.callback_clicked_add(cb_bnt_close, popup)
popup.part_content_set("button3", bt)
@@ -143,18 +149,18 @@ def cb_popup_center_title_item_3button(li, item, win):
popup.show()
def cb_popup_center_title_text_2button_restack(li, item, win):
- popup = elementary.Popup(win)
+ popup = Popup(win)
popup.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
popup.text = "When you click the 'Restack' button, " \
"an image will be located under this popup"
popup.part_text_set("title,text", "Title")
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Restack"
bt.callback_clicked_add(cb_btn_restack, popup)
popup.part_content_set("button1", bt)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Close"
bt.callback_clicked_add(cb_bnt_close, popup)
popup.part_content_set("button3", bt)
@@ -174,12 +180,12 @@ def cb_popup_center_text_1button_hide_show(li, item, win):
g_popup.show()
return
- g_popup = elementary.Popup(win)
+ g_popup = Popup(win)
g_popup.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
g_popup.text = "Hide this popup by using the button." \
"When you click list item again, you will see this popup again."
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Hide"
bt.callback_clicked_add(lambda b: g_popup.hide())
g_popup.part_content_set("button1", bt)
@@ -188,18 +194,18 @@ def cb_popup_center_text_1button_hide_show(li, item, win):
def popup_clicked(obj):
- win = elementary.Window("popup", elementary.ELM_WIN_BASIC)
+ win = Window("popup", elementary.ELM_WIN_BASIC)
win.title_set("Popup test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- li = elementary.List(win)
+ li = List(win)
li.mode = elementary.ELM_LIST_LIMIT
li.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
li.callback_selected_add(lambda li, it: it.selected_set(False))
diff --git a/examples/elementary/test_progressbar.py b/examples/elementary/test_progressbar.py
index c17628d..84047ba 100644
--- a/examples/elementary/test_progressbar.py
+++ b/examples/elementary/test_progressbar.py
@@ -1,9 +1,15 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
-from efl import ecore
from efl import evas
+from efl import ecore
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.icon import Icon
+from efl.elementary.progressbar import Progressbar
my_progressbar_run = False
@@ -52,28 +58,28 @@ def my_progressbar_destroy(obj, *args):
obj.delete()
def progressbar_clicked(obj):
- win = elementary.Window("progressbar", elementary.ELM_WIN_BASIC)
+ win = Window("progressbar", elementary.ELM_WIN_BASIC)
win.title_set("Progressbar test")
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.show()
- pb1 = elementary.Progressbar(win)
+ pb1 = Progressbar(win)
pb1.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
pb1.size_hint_align_set(evas.EVAS_HINT_FILL, 0.5)
bx.pack_end(pb1)
pb1.show()
- pb2 = elementary.Progressbar(win)
+ pb2 = Progressbar(win)
pb2.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
pb2.size_hint_align_set(evas.EVAS_HINT_FILL, 0.5)
pb2.text_set("Infinite bounce")
@@ -81,11 +87,11 @@ def progressbar_clicked(obj):
bx.pack_end(pb2)
pb2.show()
- ic1 = elementary.Icon(win)
+ ic1 = Icon(win)
ic1.file_set('images/logo_small.png')
ic1.size_hint_aspect_set(evas.EVAS_ASPECT_CONTROL_VERTICAL, 1, 1)
- pb3 = elementary.Progressbar(win)
+ pb3 = Progressbar(win)
pb3.text_set("Label")
pb3.content_set(ic1)
pb3.inverted_set(True)
@@ -97,14 +103,14 @@ def progressbar_clicked(obj):
ic1.show()
pb3.show()
- hbx = elementary.Box(win)
+ hbx = Box(win)
hbx.horizontal_set(True)
hbx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
hbx.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
bx.pack_end(hbx)
hbx.show()
- pb4 = elementary.Progressbar(win)
+ pb4 = Progressbar(win)
pb4.horizontal_set(False)
pb4.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
pb4.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
@@ -113,7 +119,7 @@ def progressbar_clicked(obj):
pb4.text_set("percent")
pb4.show()
- pb5 = elementary.Progressbar(win)
+ pb5 = Progressbar(win)
pb5.horizontal_set(False)
pb5.size_hint_align_set(evas.EVAS_HINT_FILL, 0.5)
pb5.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
@@ -124,11 +130,11 @@ def progressbar_clicked(obj):
hbx.pack_end(pb5)
pb5.show()
- ic2 = elementary.Icon(win)
+ ic2 = Icon(win)
ic2.file_set('images/logo_small.png')
ic2.size_hint_aspect_set(evas.EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1)
- pb6 = elementary.Progressbar(win)
+ pb6 = Progressbar(win)
pb6.horizontal_set(False)
pb6.text_set("Label")
pb6.content_set(ic2)
@@ -141,7 +147,7 @@ def progressbar_clicked(obj):
ic2.show()
pb6.show()
- pb7 = elementary.Progressbar(win)
+ pb7 = Progressbar(win)
pb7.style_set("wheel")
pb7.text_set("Style: wheel")
pb7.size_hint_align_set(evas.EVAS_HINT_FILL, 0.5)
@@ -149,7 +155,7 @@ def progressbar_clicked(obj):
bx.pack_end(pb7)
pb7.show()
- bt_bx = elementary.Box(win)
+ bt_bx = Box(win)
bt_bx.horizontal_set(True)
bt_bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.pack_end(bt_bx)
@@ -157,13 +163,13 @@ def progressbar_clicked(obj):
pbt = (pb1, pb2, pb3, pb4, pb5, pb6, pb7)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Start")
bt.callback_clicked_add(my_progressbar_test_start, *pbt)
bt_bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Stop")
bt.callback_clicked_add(my_progressbar_test_stop, *pbt)
bt_bx.pack_end(bt)
diff --git a/examples/elementary/test_radio.py b/examples/elementary/test_radio.py
index e611560..fd3d050 100644
--- a/examples/elementary/test_radio.py
+++ b/examples/elementary/test_radio.py
@@ -1,31 +1,36 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.icon import Icon
+from efl.elementary.radio import Radio
def radio_clicked(obj):
- win = elementary.Window("radio", elementary.ELM_WIN_BASIC)
+ win = Window("radio", elementary.ELM_WIN_BASIC)
win.title_set("Radio test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(bx)
bx.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.size_hint_aspect_set(evas.EVAS_ASPECT_CONTROL_VERTICAL, 1, 1)
- rd = elementary.Radio(win)
+ rd = Radio(win)
rd.state_value_set(0)
rd.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
rd.size_hint_align_set(evas.EVAS_HINT_FILL, 0.5)
@@ -36,10 +41,10 @@ def radio_clicked(obj):
ic.show()
rdg = rd
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.resizable_set(0, 0)
- rd = elementary.Radio(win)
+ rd = Radio(win)
rd.state_value_set(1)
rd.group_add(rdg)
rd.text_set("Icon no scale")
@@ -48,14 +53,14 @@ def radio_clicked(obj):
rd.show()
ic.show()
- rd = elementary.Radio(win)
+ rd = Radio(win)
rd.state_value_set(2)
rd.group_add(rdg)
rd.text_set("Label Only")
bx.pack_end(rd)
rd.show()
- rd = elementary.Radio(win)
+ rd = Radio(win)
rd.state_value_set(3)
rd.group_add(rdg)
rd.text_set("Disabled")
@@ -63,10 +68,10 @@ def radio_clicked(obj):
bx.pack_end(rd)
rd.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.resizable_set(0, 0)
- rd = elementary.Radio(win)
+ rd = Radio(win)
rd.state_value_set(4)
rd.group_add(rdg)
rd.content_set(ic)
@@ -74,10 +79,10 @@ def radio_clicked(obj):
rd.show()
ic.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file_set('images/logo_small.png')
ic.resizable_set(0, 0)
- rd = elementary.Radio(win)
+ rd = Radio(win)
rd.state_value_set(5)
rd.group_add(rdg)
rd.content_set(ic)
diff --git a/examples/elementary/test_scroller.py b/examples/elementary/test_scroller.py
index 6e2b0fa..933b277 100644
--- a/examples/elementary/test_scroller.py
+++ b/examples/elementary/test_scroller.py
@@ -1,8 +1,13 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.button import Button
+from efl.elementary.scroller import Scroller
+from efl.elementary.table import Table
def my_scroller_go_300_300(bt, sc):
@@ -27,18 +32,18 @@ def cb_anims(obj, action):
print(("Anim callback:", action))
def scroller_clicked(obj):
- win = elementary.Window("scroller", elementary.ELM_WIN_BASIC)
+ win = Window("scroller", elementary.ELM_WIN_BASIC)
win.title_set("Scroller")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- tb = elementary.Table(win)
+ tb = Table(win)
tb.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
img = ["images/panel_01.jpg",
@@ -54,7 +59,7 @@ def scroller_clicked(obj):
n = 0
for j in range(12):
for i in range(12):
- bg2 = elementary.Background(win)
+ bg2 = Background(win)
bg2.file_set(img[n])
n = n + 1
@@ -66,7 +71,7 @@ def scroller_clicked(obj):
tb.pack(bg2, i, j, 1, 1)
bg2.show()
- sc = elementary.Scroller(win)
+ sc = Scroller(win)
sc.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
sc.callback_edge_top_add(cb_edges, "top")
sc.callback_edge_bottom_add(cb_edges, "bottom")
@@ -84,11 +89,11 @@ def scroller_clicked(obj):
sc.page_relative_set(1.0, 1.0)
sc.show()
- tb2 = elementary.Table(win)
+ tb2 = Table(win)
tb2.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(tb2)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("to 300 300")
bt.callback_clicked_add(my_scroller_go_300_300, sc)
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
@@ -96,7 +101,7 @@ def scroller_clicked(obj):
tb2.pack(bt, 0, 0, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("to 900 300")
bt.callback_clicked_add(my_scroller_go_900_300, sc)
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
@@ -104,7 +109,7 @@ def scroller_clicked(obj):
tb2.pack(bt, 1, 0, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("to 300 900")
bt.callback_clicked_add(my_scroller_go_300_900, sc)
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
@@ -112,7 +117,7 @@ def scroller_clicked(obj):
tb2.pack(bt, 0, 1, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("to 900 900")
bt.callback_clicked_add(my_scroller_go_900_900, sc)
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
diff --git a/examples/elementary/test_segment_control.py b/examples/elementary/test_segment_control.py
index 7bd1b1d..3c60ddf 100644
--- a/examples/elementary/test_segment_control.py
+++ b/examples/elementary/test_segment_control.py
@@ -1,8 +1,13 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.icon import Icon
+from efl.elementary.segment_control import SegmentControl
def cb_seg_changed(seg, item):
@@ -10,32 +15,32 @@ def cb_seg_changed(seg, item):
print item
def segment_control_clicked(obj):
- win = elementary.Window("segment-control", elementary.ELM_WIN_BASIC)
+ win = Window("segment-control", elementary.ELM_WIN_BASIC)
win.title_set("Segment Control test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
vbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbox.size_hint_align = (evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
win.resize_object_add(vbox)
vbox.show()
# segment 1
- seg = elementary.SegmentControl(win)
+ seg = SegmentControl(win)
seg.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
seg.size_hint_align = (evas.EVAS_HINT_FILL,0.5)
seg.item_add(None, "Only Text")
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file = "images/logo_small.png"
it = seg.item_add(ic)
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file = "images/logo_small.png"
seg.item_add(ic, "Text + Icon")
seg.item_add(None, "Seg4")
@@ -47,7 +52,7 @@ def segment_control_clicked(obj):
seg.show()
# segment 2
- seg = elementary.SegmentControl(win)
+ seg = SegmentControl(win)
seg.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
seg.size_hint_align = (evas.EVAS_HINT_FILL, 0.5)
seg.item_add(None, "SegmentItem")
@@ -61,12 +66,12 @@ def segment_control_clicked(obj):
seg.show()
# segment 3
- seg = elementary.SegmentControl(win)
+ seg = SegmentControl(win)
seg.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
seg.size_hint_align = (0.5, 0.5)
for i in range(3):
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file = "images/logo_small.png"
if i == 1:
it = seg.item_add(ic)
@@ -78,18 +83,18 @@ def segment_control_clicked(obj):
seg.show()
# segment 4
- seg = elementary.SegmentControl(win)
+ seg = SegmentControl(win)
seg.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
seg.size_hint_align = (evas.EVAS_HINT_FILL, 0.5)
seg.item_add(None, "Disabled")
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file = "images/logo_small.png"
seg.item_add(ic, "Disabled")
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file = "images/logo_small.png"
seg.item_add(ic)
diff --git a/examples/elementary/test_separator.py b/examples/elementary/test_separator.py
index c11531a..f505868 100644
--- a/examples/elementary/test_separator.py
+++ b/examples/elementary/test_separator.py
@@ -1,70 +1,112 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+# from efl.elementary.check import Check
+# from efl.elementary.ctxpopup import Ctxpopup
+# from efl.elementary.entry import Entry
+# from efl.elementary.frame import Frame
+# from efl.elementary.flip import Flip
+# from efl.elementary.gengrid import Gengrid, GengridItemClass
+# from efl.elementary.genlist import Genlist, GenlistItem, GenlistItemClass
+# from efl.elementary.grid import Grid
+# from efl.elementary.hover import Hover
+# from efl.elementary.hoversel import Hoversel
+# from efl.elementary.label import Label
+# from efl.elementary.layout import Layout
+# from efl.elementary.list import List
+# from efl.elementary.icon import Icon
+# from efl.elementary.index import Index
+# from efl.elementary.innerwindow import InnerWindow
+# from efl.elementary.image import Image
+# from efl.elementary.map import Map
+# from efl.elementary.mapbuf import Mapbuf
+# from efl.elementary.menu import Menu
+# from efl.elementary.multibuttonentry import MultiButtonEntry
+# from efl.elementary.naviframe import Naviframe
+# from efl.elementary.notify import Notify
+# from efl.elementary.fileselector import Fileselector
+# from efl.elementary.fileselector_button import FileselectorButton
+# from efl.elementary.fileselector_entry import FileselectorEntry
+# from efl.elementary.panel import Panel
+# from efl.elementary.panes import Panes
+# from efl.elementary.photo import Photo
+# from efl.elementary.popup import Popup
+# from efl.elementary.progressbar import Progressbar
+# from efl.elementary.radio import Radio
+# from efl.elementary.scroller import Scroller
+# from efl.elementary.segment_control import SegmentControl
+from efl.elementary.separator import Separator
+# from efl.elementary.slider import Slider
+# from efl.elementary.table import Table
+# from efl.elementary.flipselector import FlipSelector
def separator_clicked(obj):
- win = elementary.Window("separators", elementary.ELM_WIN_BASIC)
+ win = Window("separators", elementary.ELM_WIN_BASIC)
win.title_set("Separators")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx0 = elementary.Box(win)
+ bx0 = Box(win)
bx0.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx0.horizontal_set(True)
win.resize_object_add(bx0)
bx0.show()
- bx = elementary.Box(win)
+ bx = Box(win)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx0.pack_end(bx)
bx.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Left upper corner")
bx.pack_end(bt)
bt.show()
- sp = elementary.Separator(win)
+ sp = Separator(win)
sp.horizontal_set(True)
bx.pack_end(sp)
sp.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Left lower corner")
bt.disabled_set(True)
bx.pack_end(bt)
bt.show()
- sp = elementary.Separator(win)
+ sp = Separator(win)
bx0.pack_end(sp)
sp.show()
- bx = elementary.Box(win)
+ bx = Box(win)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx0.pack_end(bx)
bx.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Right upper corner")
bt.disabled_set(True)
bx.pack_end(bt)
bt.show()
- sp = elementary.Separator(win)
+ sp = Separator(win)
sp.horizontal_set(True)
bx.pack_end(sp)
sp.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Right lower corner")
bx.pack_end(bt)
bt.show()
diff --git a/examples/elementary/test_slideshow.py b/examples/elementary/test_slideshow.py
index 5c25bed..4c2a76d 100644
--- a/examples/elementary/test_slideshow.py
+++ b/examples/elementary/test_slideshow.py
@@ -1,8 +1,17 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import StandardWindow
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.hoversel import Hoversel
+from efl.elementary.notify import Notify
+from efl.elementary.photo import Photo
+from efl.elementary.spinner import Spinner
+from efl.elementary.slideshow import Slideshow, SlideshowItemClass
img1 = "images/logo.png"
@@ -60,9 +69,9 @@ def slide_transition(ss, slide_it, slide_last_it):
if (slide_last_it == slide_it):
print("Reaches to End of slides\n")
-class ssClass(elementary.SlideshowItemClass):
+class ssClass(SlideshowItemClass):
def get(self, obj, *args, **kwargs):
- photo = elementary.Photo(obj)
+ photo = Photo(obj)
photo.file = args[0]
photo.fill_inside = True
photo.style = "shadow"
@@ -70,10 +79,10 @@ class ssClass(elementary.SlideshowItemClass):
return photo
def slideshow_clicked(obj):
- win = elementary.StandardWindow("slideshow", "Slideshow")
+ win = StandardWindow("slideshow", "Slideshow")
win.autodel = True
- ss = elementary.Slideshow(win)
+ ss = Slideshow(win)
ss.loop = True
win.resize_object_add(ss)
ss.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
@@ -91,13 +100,13 @@ def slideshow_clicked(obj):
slide_last_it = ss.item_add(ssc, img8)
ss.callback_transition_end_add(slide_transition, slide_last_it)
- no = elementary.Notify(win)
+ no = Notify(win)
no.orient = elementary.ELM_NOTIFY_ORIENT_BOTTOM
no.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(no)
no.timeout = 3.0
- bx = elementary.Box(win)
+ bx = Box(win)
bx.horizontal = True
no.content = bx
bx.show()
@@ -105,19 +114,19 @@ def slideshow_clicked(obj):
bx.event_callback_add(evas.EVAS_CALLBACK_MOUSE_IN, mouse_in, no)
bx.event_callback_add(evas.EVAS_CALLBACK_MOUSE_OUT, mouse_out, no)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Previous"
bt.callback_clicked_add(previous, ss)
bx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Next"
bt.callback_clicked_add(next, ss)
bx.pack_end(bt)
bt.show()
- hv = elementary.Hoversel(win)
+ hv = Hoversel(win)
bx.pack_end(hv)
hv.hover_parent = win
for transition in ss.transitions:
@@ -126,7 +135,7 @@ def slideshow_clicked(obj):
hv.text_set(ss.transitions[0])
hv.show()
- hv = elementary.Hoversel(win)
+ hv = Hoversel(win)
bx.pack_end(hv)
hv.hover_parent = win
for layout in ss.layouts:
@@ -134,7 +143,7 @@ def slideshow_clicked(obj):
hv.text = ss.layout
hv.show()
- sp = elementary.Spinner(win)
+ sp = Spinner(win)
sp.label_format = "%2.0f secs."
sp.callback_changed_add(spin, ss)
sp.step = 1
@@ -143,8 +152,8 @@ def slideshow_clicked(obj):
bx.pack_end(sp)
sp.show()
- bt_start = elementary.Button(win)
- bt_stop = elementary.Button(win)
+ bt_start = Button(win)
+ bt_stop = Button(win)
bt = bt_start
bt.text = "Start"
diff --git a/examples/elementary/test_spinner.py b/examples/elementary/test_spinner.py
index 169fc6f..2e8379b 100644
--- a/examples/elementary/test_spinner.py
+++ b/examples/elementary/test_spinner.py
@@ -1,28 +1,32 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.spinner import Spinner
def spinner_clicked(obj):
- win = elementary.Window("spinner", elementary.ELM_WIN_BASIC)
+ win = Window("spinner", elementary.ELM_WIN_BASIC)
win.title_set("Spinner test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(bx)
bx.show()
- sp = elementary.Spinner(win)
+ sp = Spinner(win)
sp.label_format_set("%1.1f units")
sp.step_set(1.3)
sp.wrap_set(1)
@@ -32,7 +36,7 @@ def spinner_clicked(obj):
bx.pack_end(sp)
sp.show()
- sp = elementary.Spinner(win)
+ sp = Spinner(win)
sp.label_format_set("%1.1f units")
sp.step_set(1.3)
sp.wrap_set(1)
@@ -43,7 +47,7 @@ def spinner_clicked(obj):
bx.pack_end(sp)
sp.show()
- sp = elementary.Spinner(win)
+ sp = Spinner(win)
sp.label_format_set("Disabled %.0f")
sp.disabled_set(1)
sp.min_max_set(-50.0, 250.0)
diff --git a/examples/elementary/test_table.py b/examples/elementary/test_table.py
index 9319c75..f1cb9dd 100644
--- a/examples/elementary/test_table.py
+++ b/examples/elementary/test_table.py
@@ -1,63 +1,67 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.button import Button
+from efl.elementary.table import Table
def table_clicked(obj):
- win = elementary.Window("table", elementary.ELM_WIN_BASIC)
+ win = Window("table", elementary.ELM_WIN_BASIC)
win.title_set("Table")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- tb = elementary.Table(win)
+ tb = Table(win)
win.resize_object_add(tb)
tb.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
tb.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 1")
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
tb.pack(bt, 0, 0, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 2")
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
tb.pack(bt, 1, 0, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 3")
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
tb.pack(bt, 2, 0, 1, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 4")
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
tb.pack(bt, 0, 1, 2, 1)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 5")
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
tb.pack(bt, 2, 1, 1, 3)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Button 6")
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
diff --git a/examples/elementary/test_thumb.py b/examples/elementary/test_thumb.py
index 87f198d..d8422d4 100644
--- a/examples/elementary/test_thumb.py
+++ b/examples/elementary/test_thumb.py
@@ -1,8 +1,13 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import StandardWindow
+from efl.elementary.background import Background
+from efl.elementary.scroller import Scroller
+from efl.elementary.table import Table
+from efl.elementary.thumb import Thumb
def thumb_clicked(obj):
@@ -24,18 +29,18 @@ def thumb_clicked(obj):
"mystrale_2.jpg"
)
- win = elementary.StandardWindow("thumb", "Thumb")
+ win = StandardWindow("thumb", "Thumb")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- tb = elementary.Table(win)
+ tb = Table(win)
tb.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
n = 0
for j in range(12):
for i in range(12):
- th = elementary.Thumb(win)
+ th = Thumb(win)
n = (n + 1) % 11
th.file = "images/%s" % (images[n])
th.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
@@ -44,7 +49,7 @@ def thumb_clicked(obj):
th.editable = True
th.show()
- sc = elementary.Scroller(win)
+ sc = Scroller(win)
sc.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(sc)
diff --git a/examples/elementary/test_toolbar.py b/examples/elementary/test_toolbar.py
index 01256b8..de318a6 100644
--- a/examples/elementary/test_toolbar.py
+++ b/examples/elementary/test_toolbar.py
@@ -1,8 +1,14 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.photo import Photo
+from efl.elementary.table import Table
+from efl.elementary.toolbar import Toolbar
def tb_1(obj, it, ph):
@@ -21,31 +27,31 @@ def tb_5(obj, it, ph):
ph.file_set(None)
def toolbar_clicked(obj):
- win = elementary.Window("toolbar", elementary.ELM_WIN_BASIC)
+ win = Window("toolbar", elementary.ELM_WIN_BASIC)
win.title_set("Toolbar")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.show()
- tb = elementary.Toolbar(win)
+ tb = Toolbar(win)
tb.homogeneous = False
tb.size_hint_weight_set(0.0, 0.0)
tb.size_hint_align_set(evas.EVAS_HINT_FILL, 0.0)
- ph1 = elementary.Photo(win)
- ph2 = elementary.Photo(win)
- ph3 = elementary.Photo(win)
- ph4 = elementary.Photo(win)
+ ph1 = Photo(win)
+ ph2 = Photo(win)
+ ph3 = Photo(win)
+ ph4 = Photo(win)
item = tb.item_append("document-print", "Hello", tb_1)
item.disabled = True
@@ -75,7 +81,7 @@ def toolbar_clicked(obj):
bx.pack_end(tb)
tb.show()
- tb = elementary.Table(win)
+ tb = Table(win)
tb.size_hint_weight_set(0.0, evas.EVAS_HINT_EXPAND)
tb.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
diff --git a/examples/elementary/test_tooltip.py b/examples/elementary/test_tooltip.py
index f7e4451..b98dec9 100644
--- a/examples/elementary/test_tooltip.py
+++ b/examples/elementary/test_tooltip.py
@@ -1,12 +1,20 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import ecore
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.entry import Entry
+from efl.elementary.list import List
+from efl.elementary.toolbar import Toolbar
def _tt_icon(obj, *args, **kargs):
- ic = elementary.Icon(obj)
+ ic = Icon(obj)
ic.file_set("images/logo_small.png")
ic.resizable_set(0, 0)
ic.resize(64, 64)
@@ -16,7 +24,7 @@ def _tt_item_icon(obj, item, *args, **kargs):
return _tt_icon(obj,item, *args, **kargs)
def _tt_icon2(obj, *args, **kargs):
- ic = elementary.Icon(obj)
+ ic = Icon(obj)
ic.file_set("images/icon_00.png")
ic.resizable_set(0, 0)
ic.resize(64, 64)
@@ -30,23 +38,23 @@ def _tt_timer_del(obj, data, *args):
def tooltip_clicked(obj):
- win = elementary.Window("tooltips", elementary.ELM_WIN_BASIC)
+ win = Window("tooltips", elementary.ELM_WIN_BASIC)
win.title_set("Tooltips")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- bx = elementary.Box(win)
+ bx = Box(win)
win.resize_object_add(bx)
bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bx.show()
- tb = elementary.Toolbar(win)
+ tb = Toolbar(win)
tb.homogeneous_set(False)
tb.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
tb.size_hint_align_set(evas.EVAS_HINT_FILL, 0.0)
@@ -60,7 +68,7 @@ def tooltip_clicked(obj):
ti.tooltip_content_cb_set(_tt_item_icon, None)
ti.tooltip_style_set("transparent")
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Simple text tooltip");
bt.tooltip_text_set("Simple text tooltip")
bx.pack_end(bt)
@@ -74,7 +82,7 @@ def tooltip_clicked(obj):
value += 1
data["value"] = value
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Simple text tooltip, click to change");
bt.tooltip_text_set("Initial")
data = dict()
@@ -97,7 +105,7 @@ def tooltip_clicked(obj):
data)
obj.text_set("Simple text tooltip, click to stop changed timed")
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Simple text tooltip, click to start changed timed");
bt.tooltip_text_set("Initial")
data = dict()
@@ -106,7 +114,7 @@ def tooltip_clicked(obj):
bt.show()
bt.on_del_add(_tt_timer_del, data)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Icon tooltip");
bt.tooltip_content_cb_set(_tt_icon, None)
bx.pack_end(bt)
@@ -132,7 +140,7 @@ def tooltip_clicked(obj):
data)
obj.text_set("Icon tooltip, click to stop changed timed")
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Icon tooltip, click to start changed timed");
bt.tooltip_content_cb_set(_tt_icon)
data = dict()
@@ -141,7 +149,7 @@ def tooltip_clicked(obj):
bt.show()
bt.on_del_add(_tt_timer_del, data)
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Transparent Icon tooltip");
bt.tooltip_content_cb_set(_tt_icon, None)
bt.tooltip_style_set("transparent")
@@ -168,7 +176,7 @@ def tooltip_clicked(obj):
data)
obj.text_set("Icon tooltip, click to stop changed timed")
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Icon tooltip style, click to start changed timed");
bt.tooltip_content_cb_set(_tt_icon, None)
data = dict()
@@ -187,7 +195,7 @@ def tooltip_clicked(obj):
obj.text_set("Locked tooltip visibility");
obj.tooltip_show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Unlocked tooltip visibility");
bt.tooltip_text_set("This tooltip is unlocked visible,<br> clock the button to lock!")
data = dict()
@@ -195,7 +203,7 @@ def tooltip_clicked(obj):
bx.pack_end(bt)
bt.show()
- en = elementary.Entry(win)
+ en = Entry(win)
en.scrollable_set(True)
en.single_line_set(True)
en.entry_set("Hello, some scrolled entry here!")
@@ -205,7 +213,7 @@ def tooltip_clicked(obj):
bx.pack_end(en)
en.show()
- lst = elementary.List(win)
+ lst = List(win)
li = lst.item_append("Hello")
li.tooltip_text_set("Something useful here?")
li = lst.item_append("Icon Tooltip")
diff --git a/examples/elementary/test_video.py b/examples/elementary/test_video.py
index 8519eae..64d6a3b 100644
--- a/examples/elementary/test_video.py
+++ b/examples/elementary/test_video.py
@@ -1,8 +1,17 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import ecore
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.notify import Notify
+from efl.elementary.fileselector_button import FileselectorButton
+from efl.elementary.table import Table
+from efl.elementary.video import Video, Player
def my_bt_open(bt, file, video):
@@ -22,35 +31,35 @@ def notify_unblock(video, event, no):
no.show()
def video_clicked(obj):
- win = elementary.Window("video", elementary.ELM_WIN_BASIC)
+ win = Window("video", elementary.ELM_WIN_BASIC)
win.title = "video"
win.autodel = True
win.alpha = True # Needed to turn video fast path on
- bg = elementary.Background(win)
+ bg = Background(win)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(bg)
bg.show()
- video = elementary.Video(win)
+ video = Video(win)
video.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(video)
video.show()
- notify = elementary.Notify(win)
+ notify = Notify(win)
notify.orient = elementary.ELM_NOTIFY_ORIENT_BOTTOM
notify.timeout = 3.0
- player = elementary.Player(win)
+ player = Player(win)
player.content = video
notify.content = player
player.show()
- tb = elementary.Table(win)
+ tb = Table(win)
tb.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(tb)
- bt = elementary.FileselectorButton(win)
+ bt = FileselectorButton(win)
bt.text = "Select Video"
bt.callback_file_chosen_add(my_bt_open, video)
bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
diff --git a/examples/elementary/test_web.py b/examples/elementary/test_web.py
index ec8e007..1b81631 100644
--- a/examples/elementary/test_web.py
+++ b/examples/elementary/test_web.py
@@ -1,8 +1,15 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import ecore
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.entry import Entry
+from efl.elementary.web import Web
def web_clicked(obj):
@@ -10,23 +17,23 @@ def web_clicked(obj):
print("EFL-webkit not available!")
return
- win = elementary.Window("web", elementary.ELM_WIN_BASIC)
+ win = Window("web", elementary.ELM_WIN_BASIC)
win.title_set("Web")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbx = elementary.Box(win)
+ vbx = Box(win)
win.resize_object_add(vbx)
vbx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
vbx.show()
- web = elementary.Web(win)
+ web = Web(win)
web.uri_set("http://enlightenment.org/")
web.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
web.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)
@@ -54,38 +61,38 @@ def web_clicked(obj):
web.console_message_hook_set(console_msg)
# navigation bar:
- hbx = elementary.Box(win)
+ hbx = Box(win)
hbx.horizontal_set(True)
hbx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0)
hbx.size_hint_align_set(evas.EVAS_HINT_FILL, 0.0)
vbx.pack_start(hbx)
hbx.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Back")
bt.callback_clicked_add(lambda x: web.back())
hbx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Forward")
bt.callback_clicked_add(lambda x: web.forward())
hbx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Reload")
bt.callback_clicked_add(lambda x: web.reload())
hbx.pack_end(bt)
bt.show()
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text_set("Stop")
bt.callback_clicked_add(lambda x: web.stop())
hbx.pack_end(bt)
bt.show()
- en = elementary.Entry(win)
+ en = Entry(win)
en.scrollable_set(True)
en.editable_set(True)
en.single_line_set(True)
diff --git a/examples/elementary/test_win.py b/examples/elementary/test_win.py
index 1f44aef..141bdb9 100644
--- a/examples/elementary/test_win.py
+++ b/examples/elementary/test_win.py
@@ -1,8 +1,16 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import ecore
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.box import Box
+from efl.elementary.button import Button
+from efl.elementary.check import Check
+from efl.elementary.slider import Slider
+
def cb_alpha(bt, win, bg, on):
@@ -22,24 +30,24 @@ def cb_win_moved(win):
print(("MOVE - win geom:", win.geometry))
def window_states_clicked(obj):
- win = elementary.Window("window-states", elementary.ELM_WIN_BASIC)
+ win = Window("window-states", elementary.ELM_WIN_BASIC)
win.title = "Window States test"
win.autodel = True
win.callback_moved_add(cb_win_moved)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
vbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(vbox)
vbox.show()
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal = True
hbox.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
hbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
@@ -47,7 +55,7 @@ def window_states_clicked(obj):
hbox.show()
for state in [True, False]:
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Alpha " + ("On" if state else "Off")
bt.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
bt.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
@@ -55,7 +63,7 @@ def window_states_clicked(obj):
hbox.pack_end(bt)
bt.show()
- sl = elementary.Slider(win)
+ sl = Slider(win)
sl.text = "Visual test"
sl.indicator_format = "%3.0f"
sl.min_max = (50, 150)
@@ -66,13 +74,13 @@ def window_states_clicked(obj):
vbox.pack_end(sl)
sl.show()
- ck = elementary.Check(win)
+ ck = Check(win)
ck.text = "Resize on rotate"
ck.size_hint_align = (0.0, 0.0)
vbox.pack_end(ck)
ck.show()
- hbox = elementary.Box(win)
+ hbox = Box(win)
hbox.horizontal = True
hbox.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
hbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)
@@ -80,7 +88,7 @@ def window_states_clicked(obj):
hbox.show()
for rot in [0, 90, 180, 270]:
- bt = elementary.Button(win)
+ bt = Button(win)
bt.text = "Rot " + str(rot)
bt.size_hint_align = (evas.EVAS_HINT_FILL, 0.0)
bt.size_hint_weight = (evas.EVAS_HINT_EXPAND, 0.0)