XIAMultiTheme

Theme Guidelines

Always download Nightly build! to ensure you are updated!

Components


XIAMultiTheme load plugins dll and Unload at exit or when you disable the today theme.
  • xmt_XXXX.dll XXXX is the name to invoke in XML, these are GUI components
  • xmt_sensor_YYYY.dll YYYY is the name of sensor or backend where load data
  • xmt_sensor_image.dll let's load images (default backend is ImageFactory of WM2005)
  • xmt_sensor_command.dll execute OnClick and OnEvents founded on XML

Tips:
- There are many differences between Popup launcher interface and Today plugin feature, be carefully
- To debug your skin use the POPUP launcher and set autoclose to 10 :)
- Before start writing your skin.xml please LOOK at examples!
Before start reading components and make the skin.xml I would like to spend 2 words about XMT tools. When Users install XMT it will have the following default configuration:
  • XMT files, tools, dlls into a user choosen folder
  • Registry entries: Today Plugin, Default User info, XMT Paths and "selected" themes
It's very important you know how to use "Tools" bundled into XMT package, because you need to use them to write "theme current status" or "User Info" at runtime, or simply change the backlight or bluetooth status. What's next? A good starting point is writing a mortscript "install" script for end user theme installation.




Please LOOK at examples before start!
Gui Objects Name is GUI or Sensor Attributes is Container Sub Childs supported
Today GUI Window must be the 1° element to create HWND
  • visible="1" or "0" I think you need only "1" :)
  • alignment="center" or center,top,bottom,left,right on popup version the window will be aligned=do not care about x,y!
  • x,y when you use it as popup
  • isontop="1" or "0" put the Windows On top of other windows (popup version) = background cannot be always repainted!
  • isfullscreen="1" or "0" on popup version use this to COVER the task/menu bar to simulate "Fake to Unlock" :)
  • width, height if you do not specify the width/height the Window will be a max(w,h),max(w,h)
  • autoclose="*seconds*" (popup autoclose)
  • attachto="*window title*" (popup) let's you paint into an already existent window :) fanny effects!
  • refresh="*milli seconds*" refresh polling from 100 to 32000
  • slidex, slidey = virtual size, you can scroll the window!!
  • scrollmode=*integer* specify how to use slidex,slidey, 0=noscroll 1=Vertical Scroll
  • drawable=*integer* size of brush to take handwrite notes on the window (when ready!)
  • dndmode=*integer* set 1 to enable the DnD support
Yes Any other component and: (popup) OnLostFocus set action="minimize"
  • minimize: on event
"close" "hide" "none" [Warning! this event can be used on OvEvent]
If you enable dndmode or scrollmode you are going to enable the 32bit alpha blending engine which is not faster!
AnalogClock Draw an image
  • visible="1" or "0"
  • group="*group name to be used on invisiblegroup*"
  • name="*name to be used on commands*
  • x,y position on the window
  • width, height to force the resize of the image
  • size=*integer* size of the clock if omitted xmt will use the face image size
  • clockface="clockface.png" image used to draw the background of the clock
No SecondHand, MinuteHand, HourHand with show="true" color="RGB(0,0,0)"
Image Draw an image
  • visible="1" or "0"
  • group="*group name to be used on invisiblegroup*"
  • name="*name to be used on commands*
  • x,y position on the window
  • width, height to force the resize of the image
  • alignment="left" right or center the x,y point alignment
  • source="path of image" can be absolute or relative
  • gaugetype="0" can be "0" or "1" which is Horizontal Fill gauge
  • gaugemin=*integer*
  • gaugemax=*integer* min,max of the sensor to calculate the % of the gauge lenght
No You can use Convert to adjust the value of the attached sensor if any
About gaugetype:
  • 0) Standard Image without gauge or animation
  • 1) Horizontal Gauge, remember to specify the gaugemin and max
Vertical Film Animation which has the PNG frames on vertical [1*W,n*H] squares, but if you specify the gaugemax=n the W,H may be free:
[x,y] frame 1 + [x,y] frame 1 + .... frame 1 n= [W,n*y] put gaugemax=n if X!=Y!!
  • 8) is for Y film w/o autostart and w/o loop
  • 9) is for Y film w/_ autostart and w/o loop
  • 10) is for Y film w/o autostart and w/_ loop
  • 11) 11 is for Y film w/_ autostart and w/_ loop
  • 16)
  • 17)
  • 18)
  • 19)
Very Important! When the animation is at end the Image gui object will generate to itself XMT_ONEVENT_INT_OBJ_DONE, this can be trapped to hide the image/animation or doing some things. Always give a look to events!
Area GUI Invisible object
  • group="*group name to be used on invisiblegroup*"
  • name="*name to be used on commands*
No This help you to add onclick zone on images!
Page GUI container this will help you to make page navigation
  • visible="1" or "0"
  • group="*group name to be used on invisiblegroup*"
  • name="*name to be used on commands*
Yes Any other component, and also OnEvent: this will help you to write potrait or landscape skin oriented
Text Draw a text or a BITMAP text
  • visible="1" or "0"
  • group="*group name to be used on invisiblegroup*"
  • name="*name to be used on commands*
  • x,y position on the window
  • text="" default text to display
  • alignment="left" right or center the x,y point alignment
  • color="RGB(255,255,255)" color for standard text
  • sensor="YYYY" polling for the next value every "refresh"
No
  • Font font="*Arial*" or font="folder:*themename with 0.png!*"
    Tip: put "MY Font.ttf" to your theme folder and specify font="My Font"!
  • Convert
Sensors
Sensor can be manually specified by sensor="YYYY" on GUI elements or the engine will perform implicit like this: 1) *XYZ Object* does not exist?
2) load TEXT as GUI and put sensor="XYZ"
so if you write Registry as entry or Text with sensor="registry" is the same thing. (xmt_text.dll + xmt_sensor_registry.dll)
Attributes
TIP: Every Object can use the common attribute "polling" this is very usefull to make very fast your theme: if you are going to draw a clock which does not have seconds you can set polling="60" and refresh="1000", or if it's a battery/signal menter and the today will refresh="100" put it very high like polling="30000"
Battery You can use convert to adjust or attach this sensor to Text+Folder:theme
Date
  • format="*string*" refer to Windows Mobile format like "YYYY ddd mm"
DigitalClock
  • format="*string*" refer to Windows Mobile format like "HH:mm.ss"
If you attach this to a Text+Folder:Theme take care about 0.png, dots.png, dot.png
Random
  • start_value=*integer*
  • end_value=*integer*
  • type: look on "type of random"
  • filter="*.*"
  • folder="" relative or absolute path
type of random:
  • 0 generate random integer between min and max no autostart
  • 1 generate random integer between min and max autostart
  • 2 list files from folder\filter without autostart
  • 3 list files from folder\filter with autostart
  • 4 list files from folder\filter without autostart step manually
random can be controlled by commands (OnEvent, OnClick File="..."):
  • setvalue:*rname*=start
  • setvalue:*rname*=stop
  • setvalue:*rname*=reset
  • setvalue:*rname*=step
  • setvalue:*rname*=pause
Registry
  • key="HKEY_CURRENT_USER\...." HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE
  • unknown="" if the value does not exists, "0" may be a good value if you use with Convert
StopWatch
  • max=*integer*
  • min=*integer*
  • type=*integer* specify the type:
    • 2) Min to Max than restart
    • 4) Max to Min than restart
    • 8) Min to Max than Max to Min
    • 16) Max to Min than Min to Max
    • 32) Current++
    • 64) Current--
    If you put N-1 (ex.: 2+1=3 8+1=9) the timer will start on theme load...
  • default=*integer* used to reset the counter
  • min=*integer*
  • min=*integer*
StopWatch is a very powerful engine which let's you animate gui and also make stopwatch or timers! tips:
  • attach sensor="stopwatch" to text+folder or image to create animations!
  • setup a good value for polling=*integer* for example if you put refresh=100 and you like to have 1fps set polling="10"
  • stopwatch can be controlled by commands (OnEvent, OnClick File="..."):
    • setvalue:*timername*=start
    • setvalue:*timername*=stop
    • setvalue:*timername*=reset
Sub Elements Attributes
Font Specify Font attribute for Text GUI object
  • size="integer" if it's a bitmap and you omit this the size will be the size of 0.png!
  • weight="light" light bold ... look on Windows Mobile Fonts styles
  • font=*Font Name* must be installed on Windows Mobile, to enable the bitmap font you need to specify the folder which contains the .png, for example: font="folder:clock" or font="folder:signal". The Text GUI object will do these steps:
    1) fetch the *value* from the sensor
    2) convert using converting rules
    3) check the font if it's bitmap go on folder and try to load:
    4) *folderfont*\*value*.png or
    5) *folderfont*\*A..Z,0..9*.png
    Tip: put always 0.png in folder!! this will help to calc the right height/width when you do not have *value*.
Convert Specify converting rules, this help you to make 1/0 sensor when you do not have 1/0 value, for example you can blink or turn on/off an image if registry value is greater than 1 or lower than 1 (sms incoming can be a good example)
TIP: do not overhead the engine with a lot of Convert! instead try asking developers to write a dll which read the value and perform the right action (battery meter dll is a good starting point, when ready :) )
  • when="equal" can be greater less or equal
  • from="*in value*" if you specify gt/less put an INTEGER!
  • to="*to value*" for example: off (so text may search for font\off.png)
  • blink="rate" if rate=0 do not blink, if rate less than 0 (negative) do not show the object and if it's positive it will be on Today.Refresh*Rate/2 lit and Today.Refresh*Rate/2 dark so put always an 2*integer
  • format="*format string*" go to look on formats strings
For example:
Convert when="equal" from="11" to="eleven" format="[%n=%s(%d%%)]" File="runme" Command="pars" blink="2" to a first Text
11 from sensor became [Text_0=eleven(11%)]
Convert when="notempty" from="" to="no eleven" format="[%n=%s]" File="runme" Command="pars" blink="2"
[Text_0=no eleven]
Tip: 1) Do NOT abuse or fill your theme with a lot of "Convert" INSTEAD use Text+Folder+a lot of pngs because Convert is slower
2) to="" is performed BEFORE format! if it's not empty!!!
3) take care about %% formats!
Convert Formats
%s Current Value
%d Current Value converted to integer so if string("000011") will be "11"
%n Object Name
%g Object Group
?? May be you need some extras, mail me, I will add them!
Events Attributes
Tap on object OnClick This will launch a shell command but it's very usefull to make page navigation skins: on tap set invisiblegroup to all pages and setvisible to 1 page at time, you will have done a page navigation with 2 events!
  • File
  • Command
  • event="0" 0 is single tap
  • event="1" 1 Tap and Hold
Tip: if visible=0 this is NOT parsed
Events OnEvent This help you writing skin with landscape or portrait support
  • File
  • Command
  • event="*integer*"
These are the Id for each event:
#define XMT_ONEVENT_INT_BUTTON			0	// to obj when user TAP
#define XMT_ONEVENT_INT_TAP				0	// to obj when user TAP
#define XMT_ONEVENT_INT_TAH				1	// to obj when user Tap And Hold (NO DnD!!)
#define XMT_ONEVENT_INT_START_DRAG		2	// to obj when user Start DnD
#define XMT_ONEVENT_INT_DROP			3	// to the container obj when user Drop
#define XMT_ONEVENT_INT_END_DRAG		41	// to source obj after dropped
#define XMT_ONEVENT_INT_GO_LANDSCAPE	33	// Display change and at startup
#define XMT_ONEVENT_INT_GO_PORTRAIT		34	// Display change and at startup
#define XMT_ONEVENT_INT_LOST_SELECTION	35	// while on today go on another today item
#define XMT_ONEVENT_INT_ACTION			36	// Action Key to the selcted obj
#define XMT_ONEVENT_INT_GO_LANDSCAPE640	37	// Like above + this is when there is a VGA
#define XMT_ONEVENT_INT_GO_PORTRAIT640	38	// Like above + this is when there is a VGA
#define XMT_ONEVENT_INT_GO_LANDSCAPEL320	39 // Like above + this is when there is a qVGA
#define XMT_ONEVENT_INT_GO_PORTRAITL320		40 // Like above + this is when there is a qVGA
#define XMT_ONEVENT_INT_ENABLE_24BIT		43 // The theme will be rendered WO Alpha channel
#define XMT_ONEVENT_INT_ENABLE_32BITALPHA	42 // The theme will be rendered W Alpha channel

#define XMT_ONEVENT_INT_LOSTFOCUS			44 // XMT Window go on background
#define XMT_ONEVENT_INT_GETFOCUS			45 // XMT Window go on foreground

#define XMT_ONEVENT_INT_POWER_RESUME		49 // Power events not all may fire on all pda
#define XMT_ONEVENT_INT_POWER_CHANGE		50 // Power events not all may fire on all pda
#define XMT_ONEVENT_INT_POWER_INFO			51 // Power events not all may fire on all pda
#define XMT_ONEVENT_INT_POWER_ON			52 // Power events not all may fire on all pda
#define XMT_ONEVENT_INT_POWER_OFF			53 // Power events not all may fire on all pda
#define XMT_ONEVENT_INT_POWER_CRITICAL		54 // Power events not all may fire on all pda
#define XMT_ONEVENT_INT_POWER_BOOT			55 // Power events not all may fire on all pda
#define XMT_ONEVENT_INT_POWER_IDLE			56 // Power events not all may fire on all pda
#define XMT_ONEVENT_INT_POWER_SUSPEND		57 // Power events not all may fire on all pda
#define XMT_ONEVENT_INT_POWER_RESET			58 // Power events not all may fire on all pda
#define XMT_ONEVENT_INT_PASSWORD			59 // Power events not all may fire on all pda

#define XMT_ONEVENT_INT_OBJ_SHOWED			60 // to the obj when isVisible=1
#define XMT_ONEVENT_INT_OBJ_HIDDEN			61 // to the obj when isVisible=0

#define XMT_ONEVENT_INT_OBJ_DONE			64 // to the obj: the same obj has done the "work"
// Keys events!
// Every Key of the pda is sent via WndProc of main Window
// you can trap in your skin via this OnEvent button="XX"
// YY is the scankey id + 0xF00 = 0xFyy
// 
#define XMT_ONEVENT_INT_KEY_BASE		0xF00


// Send Message to Main win - WM_TIMER
// TIP: the WindowText of the Main window for XMT popup are the same as
// the skin name so you can do this using FindWindow(_T("XIAMultiThemeMainTodayClass"),SkinName);
// than SendMessage(XMThWnd,WM_TIMER,idTimer);
#define XMT_HWND_TIMER_REFRESH		1	// refresh timer/10
#define XMT_HWND_TIMER_AUTOCLOSE	2	// this fire when the wnd need to be closed
#define XMT_HWND_TIMER_AFTER_500	3	// to turn of selection mark
#define XMT_HWND_TIMER_REPAINT		4	// this force repaint to the window
#define XMT_HWND_TIMER_DRAGGING_OFF 5	// to detach the DnD Obj	

Tip: if visible=0 this IS parsed!
Commands
File You can specify the "shell command" to run + Command="extra paramters" or one of these:
  • visible:*object name*
  • invisible:*object name*
  • invisiblegroup:*group name*
  • setvalue:*ObjectName*=*value*
  • closeme
  • top (bring XMT on TOP!)
  • close:*Window Caption*
  • activate:*Window Caption*
  • minimizeme
  • hideme
  • today (bring Today window to front)
  • missedcalls
  • incomingcalls
  • outgoingcalls
  • calls
  • refresh
  • setonclick:*ObjectName*=*value*
  • move:*name*=*x*,*y*
  • toggle:*object name* (invert visible flag)

Tip:
  • How to create page navigation? create Page containers and give to all a name and a common group, on the gui object which change the active page use invisiblegroup than visible of the page
  • How to create a PIN unlock? simply use the above tip: show/hide (may be invisible png!!! to do not show what is your pin) for example if you pin is 1359 and you have bck.png with keys and 1.png.... you can attach events to: background hide all but show 1, 1 will hide all but show 3... at 9 use closeme action!
  • use Convert and attach visible/no to show missed caller name for example!!
FileFormat if this is present is parsed like Conversion string! and the output is the "File"
These are very usefull when you need to change File or Command to be executed using the "current value" of the object, for example: if you are doing some slideshow you can make FileFormat="%s" tapping the image the shell will open your jpg
CommandFormat if this is present is parsed like Conversion string! and the output is the "Command"
These are very usefull when you need to change File or Command to be executed using the "current value" of the object, for example: if you are doing some slideshow you can make CommandFormat="%s" and File="path which open the jpg"