X-Git-Url: http://git.maemo.org/git/?p=remotepc;a=blobdiff_plain;f=pcremote-client-n8x0%2Fpcremote-client.py;fp=pcremote-client-n8x0%2Fpcremote-client.py;h=14e5a9e5d2efb5c1907ea3089b06ba01fd4604ee;hp=0000000000000000000000000000000000000000;hb=8eeea3225c010dea378cdc71c4e91294e04a6e9c;hpb=e8447209e336f2a6845027f50b84cc914fa2c796 diff --git a/pcremote-client-n8x0/pcremote-client.py b/pcremote-client-n8x0/pcremote-client.py new file mode 100755 index 0000000..14e5a9e --- /dev/null +++ b/pcremote-client-n8x0/pcremote-client.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# **************************************************************************** +# Copyright (c) 2008 Zagaia - INdT/Fucapi. +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. + +# You should have received a copy of the GNU Lesser General Public License +# along with this program. If not, see . + +# ============================================================================ +# Project Name :PC Remote +# Author :Andre Portela +# Email :andre_portela_@hotmail.com +# Version :1.0 +# Module :main +# Class :PCRemote custom Edje object with it's own call backs for the +# main screen +# ============================================================================ + +from ecore import main_loop_begin +import ecore.evas +import sys +import os +from edje_objects import * +from connection.iconnection import Iconnection +from screenmanager import ScreenManager + +width, height = 800, 480 + +#any argument deactivates fullscreen +if sys.argv.__len__() > 1: + screen = False +else: + screen = True +#if x11_16 is present, get it, otherwise get x11 +if ecore.evas.engine_type_supported_get("software_x11_16"): + engine = ecore.evas.SoftwareX11_16 +else: + engine = ecore.evas.SoftwareX11 +#create the evas canvas +canvas = EvasCanvas(fullscreen=screen,engine=engine,size=(width, height)) +#main .edj path +edje_file = os.path.join(os.path.dirname(sys.argv[0]), "pcremote.edj") +#the bluetooth socket object shared by all screens +sock = Iconnection('bluetooth') +#main edje object +main = MainScreen(canvas=canvas, file=edje_file, group="Main",name="Main", connection = sock) +main.show() +#future edje objects +tablet, slide, player, torrent = None, None, None, None +#focus on main edje object +main.focus = True +#this object connects all screens together +manager = ScreenManager(main, tablet, slide, player, torrent, sock) + +ecore.main_loop_begin() +