The information contained within this document is considered to be the property of Stardock Systems,   Inc.  This information is provided 'as-is' and only for use by skin designers / authors to produce UIS2 plugins to be embedded into UIS2 skins for use with WindowBlinds.  All other uses of this information are strictly prohibited.

Although the format is very powerful and flexible, you should also find it quite easy to use as most  features are optional & WindowBlinds will use it's own defaults if you do not specify any section.

 
Background Information
 
Starting with WindowBlinds 0.80 you can create your own button objects which can be used in the place of standard titlebar buttons.  This allows you to create your own applets which are embedded in the titlebar.

These applets are treated just like titlebar buttons and the resulting output from the plugin can be passed to WindowBlinds' alpha blender or transparent blitter.  This lets the plugin intergrate perfectly with the titlebar.

The usual visibility codes can be used to specify when the plugin is visible.

 
How the plugin works
 
Basically when the titlebar needs to be redrawn, WindowBlinds passes a HDC to the plugin and asks it to draw into it.  This is then drawn into the correct location on the screen automatically.

There are a number of other functions which are used to let the user interact with the plugin.  Basically these are functions relating to the mouse & clicking of the plugin.

One last function is used to let multiple plugins use timers & not prevent each other working.

Functions Required
 
The following functions are required:-
DllMain
- This is as with any dll file.  You should do your allocation & deallocation of memory and bitmaps etc 
BOOL WBDraw (HWND hWnd, HDC DC, RECT* r, int state, BOOL active)
- This function is called when the plugin needs redrawing.
- If state > 0 then the plugin has been clicked
- The state of the window (active & inactive) is specified by active
There is a 2nd version of this function which is used for plugins which are designed to have multiple instances of the plugin on one window.

BOOL WBDrawMulti (HWND hWnd, HDC DC, RECT* r, int state, BOOL active, int button)

- As WBDraw, but button indicates the button number this item is.  This lets you support multiple buttons of this type at once.

- The best way to implement the functions is to only implement this one.  This allows your plugin to be more compatible

BOOL WBPress (HWND hWnd, int x, int y, int state)
- This function is called when the left mouse button is pressed down when the mouse pointer is over the button
BOOL WBRelease (HWND hWnd, int x, int y, int state)
- This function is called when the left mouse button is released when the mouse pointer is over the button and when the button had originally been pressed down over the plugin.
BOOL WBQuery (long hWnd)
- This function is called when a plugin calls the TellServer function exported by wblind.dll

- If the plugin requires a timer to update its display, it should call TellServer in it's timer routine and do the updating of internal values.  WindowBlinds will automatically update the titlebars after processing of WBQuery has been completed.

 
Example Code
 
The WindowBlinds UIS2 SDK includes source code to a simple sample UIS2 Plugin.

You can look at the source and use it as a base for your own plugins

Final Notes
 
If you create a plugin please tell us!

You can post information about your UIS2 plugin in the stardock.windowblinds.development newsgroup on the stardock newserver (news.stardock.com)

If you have any problems making a UIS2 plugin or skin then feel free to post in the above newsgroup and we will try and help you.

 The WindowBlinds UIS2 Plugin Interface is ©1999 Stardock Systems, Inc