×
Namespaces

Variants
Actions
Revision as of 07:02, 27 July 2012 by hamishwillee (Talk | contribs)

Archived:Basic canvas application in PySymbian

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: diegodobelo (04 Aug 2008)
Last edited: hamishwillee (27 Jul 2012)

Here is a basic canvas application in pys60:

import appuifw
import sysinfo
import graphics
import e32
 
class Basic:
def __init__(self):
appuifw.app.screen = 'full'
self.display_size = sysinfo.display_pixels()
self.img = graphics.Image.new(self.display_size)
self.canvas = appuifw.Canvas(redraw_callback=self.handle_redraw)
appuifw.app.body = self.canvas
appuifw.app.exit_key_handler = self.quit
 
def handle_redraw(self,rect):
self.canvas.blit(self.img)
 
def quit(self):
del self.canvas
lock.signal()
 
lock = e32.Ao_lock()
basic = Basic()
lock.wait()
45 page views in the last 30 days.