2 # -*- coding: utf-8 -*-
4 # ****************************************************************************
5 # Copyright (c) 2008 Zagaia - INdT/Fucapi.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Lesser General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # ============================================================================
20 # Project Name :PC Remote
21 # Author :Andre Portela
22 # Email :andre_portela_@hotmail.com
25 # Class :PCRemote custom Edje object with it's own call backs for the
27 # ============================================================================
29 from ecore import main_loop_begin
33 from edje_objects import *
34 from connection.iconnection import Iconnection
35 from screenmanager import ScreenManager
37 width, height = 800, 480
39 #any argument deactivates fullscreen
40 if sys.argv.__len__() > 1:
44 #if x11_16 is present, get it, otherwise get x11
45 if ecore.evas.engine_type_supported_get("software_x11_16"):
46 engine = ecore.evas.SoftwareX11_16
48 engine = ecore.evas.SoftwareX11
49 #create the evas canvas
50 canvas = EvasCanvas(fullscreen=screen,engine=engine,size=(width, height))
52 edje_file = os.path.join(os.path.dirname(sys.argv[0]), "pcremote.edj")
53 #the bluetooth socket object shared by all screens
54 sock = Iconnection('bluetooth')
56 main = MainScreen(canvas=canvas, file=edje_file, group="Main",name="Main", connection = sock)
59 tablet, slide, player, torrent = None, None, None, None
60 #focus on main edje object
62 #this object connects all screens together
63 manager = ScreenManager(main, tablet, slide, player, torrent, sock)
65 ecore.main_loop_begin()