You are hereWindowWatcher Help - Plugins

WindowWatcher Help - Plugins


 

Welcome to WindowWatcher's help pages. To navigate the sections, use the above menu. On this Plugins page, you'll see what they can do and which actions they can listen for.

Plugins are required when windows that are being viewed don't quite respond as normal windows controls do. They can respond to one, or all of the exposed events at their discretion. By responding to these events they can employ specific knowledge to make the window perform as expected and enable WindowWatcher to provide a richer user experience.

Two plugin examples are available in the pluginsrc directory of the WindowWatcher installation. These are the code and Visual Studio project files for the bundled iexplore.exe.dll and firefox.exe.dll plugins.

To install a plugin, place the resulting dll file into the plugins directory where WindowWatcher.exe is, or create the %LOCALAPPDATA%\WindowWatcher\ folder and place them in there.


Plugins can be made in any technology that can create Windows DLLs and can export functions using the stdcall calling convention. Being able to send Windows messages is also a requirement as that is the primary means of interacting with the source application.

Plugins must also be named with the file name of the program they are intended for with '.dll' appended. For instance, the Firefox plugin is named "firefox.exe.dll" and the Internet Explorer one is "iexplore.exe.dll".


All event functions should return a Windows BOOL (4-byte int). The function should return of FALSE/0 if it didn't handle the specific case of the event, in which case WindowWatcher will perform default behaviour. Any other nonzero return indicates the function handled the event and that WindowWatcher should perform no further action.

The current list of exposed events are:

OnMouseWheel

Called when the user has scrolled the mouse wheel up or down.

BOOL __stdcall OnMouseWheel(HWND hwndParent, HWND hwndChild, int xPosChild, int yPosChild, int delta, UINT keyFlags);

Parameters:

HWND hwndParent - The handle of the viewed windows' top level window
HWND hwndChild - The handle of the child window the mouse was over when the scrolling occurred
int xPosChild - The x coordinate of the mouse in hwndChild's client area
int yPosChild - The y coordinate of the mouse in hwndChild's client area
int delta - The distance the wheel was scrolled in multiples of WHEEL_DELTA (120), exactly the same value given by WM_MOUSEWHEEL
UINT keyFlags - Bitfield of additional keys that were held when the scroll happened, exactly the same value given by WM_MOUSEWHEEL
OnMouseHWheel

Called when the user has scrolled the mouse wheel left or right.

BOOL __stdcall OnMouseHWheel(HWND hwndParent, HWND hwndChild, int xPosChild, int yPosChild, int delta, UINT keyFlags);

Parameters:

HWND hwndParent - The handle of the viewed windows' top level window
HWND hwndChild - The handle of the child window the mouse was over when the scrolling occurred
int xPosChild - The x coordinate of the mouse in hwndChild's client area
int yPosChild - The y coordinate of the mouse in hwndChild's client area
int delta - The distance the wheel was scrolled in multiples of WHEEL_DELTA (120), exactly the same value given by WM_MOUSEHWHEEL
UINT keyFlags - Bitfield of additional keys that were held when the scroll happened, exactly the same value given by WM_MOUSEHWHEEL
OnMouseMove

Called when the user has moved the mouse.

BOOL __stdcall OnMouseMove(HWND hwndChild, int xPos, int yPos, UINT keyFlags);

Parameters:

HWND hwndChild - The handle of the child window the mouse is over
int xPos - The x coordinate of the mouse in hwndChild's client area
int yPos - The y coordinate of the mouse in hwndChild's client area
UINT keyflags - Bitfield of additional keys that were held when the move happened, exactly the same value given by WM_MOUSEMOVE
OnMouseHover

Called when the mouse has been stationary over the window for a short period of time.

BOOL __stdcall OnMouseHover(HWND hwndChild, int xPos, int yPos, UINT keyFlags);

Parameters:

HWND hwndChild - The handle of the child window the mouse is over
int xPos - The x coordinate of the mouse in hwndChild's client area
int yPos - The y coordinate of the mouse in hwndChild's client area
UINT keyflags - Bitfield of additional keys that were held when the hover happened, exactly the same value given by WM_MOUSEHOVER
OnLClick

Called when the user has clicked (pressed and released) the left mouse button

BOOL __stdcall OnLClick(HWND hwndChild, int xPos, int yPos, UINT keyFlags);

Parameters:

HWND hwndChild - The handle of the child window the mouse is over
int xPos - The x coordinate of the mouse in hwndChild's client area
int yPos - The y coordinate of the mouse in hwndChild's client area
UINT keyflags - Bitfield of additional keys that were held when the click happened, exactly the same value given by WM_LBUTTONUP
OnRClick

Called when the user has invoked a right-click

BOOL __stdcall OnRClick(HWND hwndChild, int xPos, int yPos, UINT keyFlags);

Parameters:

HWND hwndChild - The handle of the child window the mouse is over
int xPos - The x coordinate of the mouse in hwndChild's client area
int yPos - The y coordinate of the mouse in hwndChild's client area
UINT keyflags - Bitfield of additional keys that were held when the click happened, this is the value given by the original click message (whether that was WM_LBUTTONUP or WM_MBUTTONUP) minus MK_CONTROL.
OnKeyDown

Called when a key is pressed

BOOL __stdcall OnKeyDown(HWND hwndFocus, DWORD vk, int repeat, BYTE scancode, BOOL extended);

Parameters:

HWND hwndFocus - The handle of the child window with the keyboard focus
DWORD vk - The virtual key pressed
int repeat - Number of times the key has been autorepeated
BYTE scancode - The physical code of the key that is being pressed. (Bits 16-23 of WM_KEYDOWN's lParam)
BOOL extended - Whether the key is an extended key (Bit 24 of WM_KEYDOWN's lParam)
OnKeyUp

Called when a key is released

BOOL __stdcall OnKeyUp(HWND hwndFocus, DWORD vk, int repeat, BYTE scancode, BOOL extended);

Parameters:

HWND hwndFocus - The handle of the child window with the keyboard focus
DWORD vk - The virtual key pressed
int repeat - Number of times the key has been autorepeated, always 1
BYTE scancode - The physical code of the key that is being released. (Bits 16-23 of WM_KEYUP's lParam)
BOOL extended - Whether the key is an extended key (Bit 24 of WM_KEYUP's lParam)

Recent News