About the implementation
The classes taskbarInterface
and threadFunc
declares all (appropriate) variables as local. No (super) global variables are used expect for the class names.
taskbarInterface
uses SetWinEventHook
to monitor when script owned windows are destroyed (EVENT_OBJECT_DESTROY
) for the purpose of clean up. If templates are used it will also monitor EVENT_OBJECT_SHOW
. These are in general very non-intrusive hooks. Hooks can be disabled by setting static hookWindowClose:=false
or switched on and off by calling taskbarInterface.UnhookWinEvent()
and taskbarInterface.SetWinEventHook()
. Hooks are automatically started and stopped as needed, eg, when the last reference to an interface is released, the hooks are disabled.
For button callbacks, the message WM_COMMAND:=0x111
is monitored. To turn off or on button monitoring, call taskbarInterface.stopAllButtonMonitor()
and taskbarInterface.restartAllButtonMonitor()
.
For custom thumbnail previews, the message WM_DWMSENDICONICTHUMBNAIL=0x0323
is monitored.
For custom peek previews, the message WM_DWMSENDICONICLIVEPREVIEWBITMAP:=0x326
is monitored.
For the purpose of keeping buttons and icon overlays persistent, RegisterWindowMessage
is used to monitor TaskbarCreated
and TaskbarButtonCreated
events. The message monitoring is automatically stopped when no interfaces requires them.
By default, exeptions are thrown on failures such as invalid input or failed API calls. To supress exceptions thrown by explicit throw
s, specify mute:=true
when attaching an interface. Not recommended during development and debugging. The user is responsible for handling compabillity issues, see Compabillity below
- Buttons progress bars and icon overlay uses ITaskbarList3 methods.
- Previews uses DWM functions.
- DWM functions requires Windows Vista or newer.
- ITaskbarList3 methods requires Windows 7 or newer.