Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # app_icon2home_screen.py -- have not tested this out myself as of yet
- from appuifw import app,e32
- import fgimage
- import sysinfo
- import applist
- import appswitch,graphics
- try:
- from geticon import get
- except ImportError,e:
- raise ImportError("no module name"+e)
- w,h=sysinfo.display_pixels()
- ICON_SIZE=(50,50)
- CENTERX=(w/2)-(ICON_SIZE[0]/2)
- CENTERY=(h/2)-(ICON_SIZE[1]/2)
- im=graphics.Image.new(ICON_SIZE)
- def onExit():
- lock=false
- app.set_exit()
- fg=fgimage.FGImage()
- lock=1
- apps=applist.applist()
- def getUidFromName(n):
- for uid,name,path in apps:
- if name==n:return uid
- def getIconFromUid(uid):
- return get(uid,ICON_SIZE)
- img,mask=getIconFromUid("X-plore")
- app.exit_key_handler=onExit
- while lock:
- try:im.blit(img,mask=mask)
- except:im.blit(img)
- if appswitch.application_list(1)[0] in [u"Telephone"]:fg.set(CENTERX,CENTERY,im._bitmapapi())
- else:fg.unset()
- e32.ao_sleep(1E-3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement