Wallpaper clocks - specs for software developers
If you have software related to desktop management, I encourage you to add WCZ support to your app - your users will get tons of nice desktops!
What your software should do with wallpaper clock
Your software should run in the background, take user-selected WCZ package, generate an image from this package with current time information, and set this image as desktop wallpaper, every minute.
What is WCZ
WCZ is "Wallpaper Clock Zip"-file. It is ZIP file containing the following files:
REQUIRED:
- clock.ini - text file with settings (see details below)
- bg.jpg - background image
- preview200x150.jpg
OPTIONAL:
- am.png
- pm.png
- day1.png - day31.png
- hour0.png - hour23.png (or hour0.png - hour59.png, see below)
- minute0.png - minute59.png
- moonphase1.png - moonphase30.png
- month1.png - month12.png
- weekday1.png - weekday7.png
- zodiacAquarius.png
- zodiacAries.png
- zodiacCancer.png
- zodiacCapricorn.png
- zodiacGemini.png
- zodiacLeo.png
- zodiacLibra.png
- zodiacPisces.png
- zodiacSagittarius.png
- zodiacScorpio.png
- zodiacTaurus.png
- zodiacVirgo.png
All images will have the same dimensions.
WCZ settings (clock.ini)
CLOCK.INI EXAMPLE:
[Settings]
name=Big Ben
width=800
height=600
author=Vlad Gerasimov
email=vladstudio@gmail.com
description=
homepageURL=http://www.vladstudio.com
downloadURL=test (NOT USED, IGNORE)
refreshhourinterval=12
hourimages=60
ampmenabled=0
[Animation] (NOT USED, IGNORE)
[WallpaperClock] (NOT USED, IGNORE)
Explanation of variables:
- name - Name of package
width - number (from 800 to 2560)
- height - number (from 600 to 1600): screen size that this package was designed for. All designs will be available as many packages, f.e. sample-800x600.wcz to sample-2560x1600.wcz.
- author - author name
email - author email
description - description :-)
- ampmenabled - number (1 or 0)
- refreshhourinterval - can be 12 or 60. This is interval (in minutes), how often hour image should refresh.
- hourimages - number of 'hourXX.png' images in skin. Can be 24 (hour0...hour23.png) or 60 (hour0...hour59.png).
How wallpaper should be generated
Every minute program should calculate: current minute, hour, day, weekday, month, am/pm, zodiac sign, moon phase.
From these values, program takes appropriate PNG files from WCZ package, and overlays them into image from BG.JPG, generating new image.
Example: suppose we have 12:34 AM Monday 5 June, (that means zodiac is Gemini and moon phase... let it be 15 of 30 :-)). Program should compose image from the following files (in this order):
- bg.jpg
- zodiacGemini.png
- moonphase15.png
- month6.png
- weekday1.png
- day5.png
- hour12.png
- minute34.png
- am.png
If any image does not exist in skin, simply skip it (without error).
Last step is: set generated image as desktop background.
More about HOUR0..HOUR59 images
you may be confused with my explanations of how to treat 'hour' images. Let me try to sum up the different scenarios of working with hour images.
----------
variant 1: clock.ini has
- refreshhourinterval=12
- hourimages=60
- ampmenabled=0 (or ampmenabled not present in INI file)
That means that the skin includes hour0...hour59.png and you should rotate hour image every 12 minutes.
----------
variant 2: clock.ini has
- refreshhourinterval=60
- hourimages=24
- ampmenabled=0 (or ampmenabled not present in INI file)
That means that the skin includes hour0...hour23.png and you should rotate hour image every 60 minutes.
----------
variant 3: clock.ini has
- refreshhourinterval=60
- hourimages=24
- ampmenabled=1 (AND 'use AM/PM checked in Options')
That means that the skin includes hour0...hour23.png but you should only take hour0...hour12.png and rotate hour image every 60 minutes (0..12, then 1..11).
----------
variant 4: clock.ini has
- refreshhourinterval=60
- hourimages=24
- ampmenabled=1 (BUT 'use AM/PM NOT checked in Options') - treat the same way as variant 2.
Interface - tray icon menu
When user clicks (or right-clicks) tray icon, the following menu should appear:
- Change Wallpaper Clock
- Download More Clocks (link to http://www.vladstudio.com/wallpaperclock/)
- Options
- About
- Exit
Example:
"Change Wallpaper Clock" WINDOW
There should be a folder where all WCZ files are stored. "Change Wallpaper Clock" window should list all WCZ files.
Example:
"Options" window
Example:

Resources
TIP: Calculating moon phase
The function below may give you idea of calculating moon phase.
{Function MoonAge }
{Computes age of Moon (in days) }
{INPUT: }
{ y - year }
{ m - month }
{ d - day }
Function MoonAge(y,m,d:word):Extended;
const
Moon_Orbit_Time = 29.53058;
Moon_Orbit_Speed = 4.867;
var
j:LongInt;
Age:Extended;
begin
j:=JulianDay(y,m,d);
Age := ( J+Moon_Orbit_Speed)/ Moon_Orbit_Time;
Age := 2*(Age-Int(Age))-1;
if Age < 0 then
Age:=Moon_Orbit_Time*(1+Age/2)
else
Age:=Age*Moon_Orbit_Time/2;
if Age>=29.53058 then Age := 0 ;
result:=Age;
end;
Notes
- Register WCZ file type to open with the program.
- When user double-clicks (opens) WCZ file, program should "install" design (copy it to folder and apply).
- It is good idea to generate wallpaper somewhere in the middle of each minute, and set it to desktop at minute start
- Any questions? Please contact me, I'll be happy to answer!
Return to wallpaper clocks gallery