aboutsummaryrefslogtreecommitdiffstats
path: root/examples/elementary/test_video.py
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/test_video.py
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/test_video.py')
-rw-r--r--examples/elementary/test_video.py25
1 files changed, 17 insertions, 8 deletions
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)