Code:
##This Software is made by Nishith##
import e32, os, appuifw, graphics, TopWindow,appswitch, time
from graphics import*
from appuifw import*
###########
app_lock = e32.Ao_lock()
###########
def quit():
global running
running=0
window.hide()
app_lock.signal()
appuifw.app.set_exit()
appswitch.kill_app(u'Desktop')
appuifw.app.exit_key_handler=quit
###########
def txt():
global Start
t=open('C:\\Desk.txt','r')
txt=t.read()
t.close()
text=appuifw.query(u'Enter Text(32)','text',unicode(txt))
f=open('C:\\Desk.txt','wr')
f.write(text)
f.close()
Start()
############
window = TopWindow.TopWindow()
Timer=e32.Ao_timer()
window.size = (200, 30)
window.fading=4
window.shadow = 1
window.corner_type = 'corner1'
###########
Phone=[u"Standby mode"]
running=1
###########
def Stnd():
global running
global Phone
if (appswitch.application_list(1)[0] in Phone):
running=1
window.show()
else:
visible=0
window.hide()
Timer.after(0.1,Stnd)
###########
def Position():
c=open('C:\\Set.txt','r')
a=c.read()
s=a.split ("|")
x=int(s[0])
y=int(s[1])
Dim=(x,y)
c.close()
global Start
x=appuifw.query(u'Enter X','number',Dim [0])
y=appuifw.query(u'Enter Y','number',Dim [1])
Dim=(x,y)
f=open('C:\\Set.txt','wr')
Cord= str(Dim [0]) + "|" +str(Dim [1])
f.write(Cord)
f.close()
Start()
###########
def Back():
appswitch.switch_to_bg(u'Desktop')
appswitch.switch_to_fg(u'Telephone')
##########
def TColor():
c=open('C:\\TColr.txt','r')
a=c.read()
s=a.split ("|")
r=int(s[0])
g=int(s[1])
b=int(s[2])
Dim=(r,g,b)
c.close()
global Strat
r=appuifw.query(u'Enter R','number',Dim [0])
g=appuifw.query(u'Enter G','number',Dim [1])
b=appuifw.query(u'Enter B','number',Dim [2])
Dim=(r,g,b)
f=open('C:\\TColr.txt','wr')
Cord= str(Dim [0]) + "|" +str(Dim [1])+ "|"+ str(Dim[2])
f.write(Cord)
f.close()
Start()
##########
def tohex(r,g,b):
hexchars="0123456789ABCDEF"
return "0x"+hexchars[r/16]+hexchars[r%16]+hexchars[g/16]+hexchars[g%16]+hexchars[b/16]+hexchars[b%16]
##########
def BColor():
c=open('C:\\BColr.txt','r')
a=c.read()
s=a.split ("|")
r=int(s[0])
g=int(s[1])
b=int(s[2])
Dim=(r,g,b)
c.close()
global Start
r=appuifw.query(u'Enter R','number',Dim [0])
g=appuifw.query(u'Enter G','number',Dim [1])
b=appuifw.query(u'Enter B','number',Dim [2])
Dim=(r,g,b)
f=open('C:\\BColr.txt','wr')
Cord= str(Dim [0]) + "|" +str(Dim [1])+ "|"+ str(Dim[2])
f.write(Cord)
f.close()
Start()
##########
def Start():
t=open('C:\\Desk.txt','r')
text=t.read()
t.close()
########
b=open('C:\\BColr.txt','r')
bcolr=b.read()
m=bcolr.split("|")
R=int(m[2])
G=int(m[1])
B=int(m[0])
b.close()
window.background_color =eval(tohex(R,G,B))
#########
col=open('C:\\TColr.txt','r')
colr=col.read()
n=colr.split("|")
r=int(n[0])
g=int(n[1])
b=int(n[2])
col.close()
img = graphics.Image.new((192, 24))
img.clear(0xdddddd)
window.add_image(img, (4, 3))
img.text((2, 18),unicode(text),(r,g,b))
#########
c=open('C:\\Set.txt','r')
a=c.read()
s=a.split ("|")
x=int(s[0])
y=int(s[1])
window.position=(x,y)
c.close()
#########
appswitch.switch_to_bg(u'Desktop')
appswitch.switch_to_fg(u'Telephone')
window.show()
Timer.after(0.1,Stnd)
###########
def Menu():
appuifw.app.screen='normal'
im=Image.open('C:\\data\\images\\main.jpg')
appuifw.app.body=k=appuifw.Canvas()
im.text((26,86), u'DeskNotes By Nishith',0xcccccc,'normal')
k.blit(im)
##########
def handle_redraw(rect):
canvas.blit(im)
running=1
canvas=appuifw.Canvas(event_callback=None, redraw_callback=handle_redraw)
appuifw.app.body=canvas
##########
appuifw.app.menu=[(u'Type Message',txt),(u'Change Position',Position),(u'Change Back Color',BColor),(u'Chagne Text Color',TColor),(u'Go Background',Back),(u'Exit',quit)]
##########
Menu()
Start()
app_lock.wait()