Simplify EvasCanvas.__init__() parameters
Rename f in EvasCanvas.__init__() to engine git-svn-id: http://www.neo1973-germany.de/svn@100 46df4e5c-bc4e-4628-a0fc-830ba316316d
This commit is contained in:
parent
974ba5cae1
commit
25495587d0
1 changed files with 10 additions and 10 deletions
|
@ -147,7 +147,7 @@ class dialer_main(edje_group):
|
||||||
class TestView(object):
|
class TestView(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
edje.frametime_set(FRAMETIME)
|
edje.frametime_set(FRAMETIME)
|
||||||
self.evas_canvas = EvasCanvas(fullscreen=FULLSCREEN, engine="x11-16", size="480x640")
|
self.evas_canvas = EvasCanvas(FULLSCREEN, "x11-16")
|
||||||
|
|
||||||
self.groups = {}
|
self.groups = {}
|
||||||
self.groups[EDJE_GROUP_NAME] = dialer_main(self)
|
self.groups[EDJE_GROUP_NAME] = dialer_main(self)
|
||||||
|
@ -156,24 +156,24 @@ class TestView(object):
|
||||||
self.groups[EDJE_GROUP_NAME].part_text_set("numberdisplay_text", "wait ...")
|
self.groups[EDJE_GROUP_NAME].part_text_set("numberdisplay_text", "wait ...")
|
||||||
|
|
||||||
class EvasCanvas(object):
|
class EvasCanvas(object):
|
||||||
def __init__(self, fullscreen, engine, size):
|
def __init__(self, fullscreen, engine_name):
|
||||||
if engine == "x11":
|
if engine_name == "x11":
|
||||||
f = ecore.evas.SoftwareX11
|
engine = ecore.evas.SoftwareX11
|
||||||
# elif engine == "x11-16":
|
# elif engine_name == "x11-16":
|
||||||
# if ecore.evas.engine_type_supported_get("software_x11_16"):
|
# if ecore.evas.engine_type_supported_get("software_x11_16"):
|
||||||
# f = ecore.evas.SoftwareX11_16
|
# engine = ecore.evas.SoftwareX11_16
|
||||||
else:
|
else:
|
||||||
print "warning: x11-16 is not supported, fallback to x11"
|
print "warning: x11-16 is not supported, falling back to x11"
|
||||||
f = ecore.evas.SoftwareX11
|
engine = ecore.evas.SoftwareX11
|
||||||
|
|
||||||
self.evas_obj = f(w=WIDTH, h=HEIGHT)
|
self.evas_obj = engine(w=WIDTH, h=HEIGHT)
|
||||||
self.evas_obj.callback_delete_request = self.on_delete_request
|
self.evas_obj.callback_delete_request = self.on_delete_request
|
||||||
self.evas_obj.callback_resize = self.on_resize
|
self.evas_obj.callback_resize = self.on_resize
|
||||||
|
|
||||||
self.evas_obj.title = TITLE
|
self.evas_obj.title = TITLE
|
||||||
self.evas_obj.name_class = WM_INFO
|
self.evas_obj.name_class = WM_INFO
|
||||||
self.evas_obj.fullscreen = fullscreen
|
self.evas_obj.fullscreen = fullscreen
|
||||||
# self.evas_obj.size = size
|
# self.evas_obj.size = str(WIDTH) + 'x' + str(HEIGHT)
|
||||||
self.evas_obj.show()
|
self.evas_obj.show()
|
||||||
|
|
||||||
def on_resize(self, evas_obj):
|
def on_resize(self, evas_obj):
|
||||||
|
|
Loading…
Reference in a new issue