GESTURES.DLL 1.1
----------------


1. What is it?
--------------

Gestures implements simple mouse stroke controlling system, same
that can be found in Opera browser, at system level.



2. How it works?
----------------

1. Right click with your mouse everywhere on desktop or any window
and start drag (or "paint") your gesture
(You can define another mouse button, define keyboard hotkey or even
combine mouse-click with hotkeys).

2. As long as underlying window is not in list of excluded windows
(hardcoded or defined, see below), you can see that your gesture is
painted onto screen as thin line.

3. To finish your gesture, you will release mouse button (or release
hotkey).

4. Now, if you managed to draw your gesture correctly, module will
search predefined list of gestures and will do appropriate action,
if any match has been found.

5. The line symbolising the gesture is cleared up.

6. If timeout expires during gesture drawing or gesture is not found
in the list, nothing happens.



3. Notes
--------

1. If you interrupt drawing your gesture for too long, timeout will
expire and nothing happens. You will be notified with the sound about
this. Sound and timeout values are configurable.


2. Gestures module will capture your mouse click. If you like to drag
with your right mouse button (files in explorer, for example), there are
several ways how to avoid conflicts:

a) You can just right-click and wait a moment for timeout to expire
(it is very short time period) and after you hear the timeout sound,
you can drag your files as usual. Simple right click (without dragging)
works just normal, as usual.

b) You can also define different mouse-button (though right button is
default) or define keyboard hotkeys that may be used standalone or
in combination with mouse-click.

c) You can add Explorer file-management-area to windows exclusion list
so gestures module will be inactive if your mouse is over Eplorer window
(see example below).


3. As you will see later in the document, there are some predefined
actions for every mouse gesture.


4. How to define gestures?
--------------------------

To define gestures, imagine 3 to 3 matrix:

 1 2 3
 4 5 6
 7 8 9

and imaginary put your mouse movement into it, you will get resulting
sequence:

so, to define "L" gesture, it is 14789
to define "U" gesture, it is 1478963
to define "Z" gesture, it is 1235789
and so on.

you may define more gestures on one line, first gesture recognized
will be used. it is useful when you have more complex (or circular)
gestures that may be recognized in more ways, for example for "L"
gesture, it may be 14789, 1478, or 4789, depending on its symmetric
proportions.

same as for "C", it may be 3214789, or 32489, or 324789 or 321489, or
214789... etc.


5. How to set gestures in STEP.RC?
----------------------------------

See enclosed EXAMPLE.RC file for more complex examples.

Notice I named all commands beginning with "stroke" here, which
is synonym for "gesture". Don't ask my why, I don't remember... ;-)

Parameters:
------------------

StrokeDrawing
	Switch gesture drawing (painting) on.

StrokeColor 0000FF
	Color of gesture line.
	Default is FF0000 (red).

StrokeNotifySound c:\sounds\down.wav
	Sound that will be played after successful gesture recognition.

StrokeTimeoutSound c:\sounds\msgback.wav
	Sound that will be played after gesture-timeout.

StrokeTimeout 400
	Gesture timeout in milliseconds.
	Default is 500ms.

StrokeReversed
	Reverse definition matrix in Y-axe, so you can easily use
	numeric-keypad as visual reference for creating new gestures.
	The matrix is then as follows:

 7 8 9
 4 5 6
 1 2 3

StrokeNoExcludes
	Disables checking for window in exclusion list.

StrokeNoDefaultExcludes
	Disables checking for default hard-coded window exclusions
	(for instance excluding wharf, desktop, shortcut, popup from
	.close action, etc.).

StrokeExcludeSound c:\sounds\exclude.wav
	Sound that will be played when underlying window has been found
	in exclusion list.

StrokeButton 0|1|2|3
	Define mouse button that must be pressed to iniciate stroke.
		0 = No button. In this case, hotkey should be defined
		1 = Left button
		2 = Right button
		3 = Middle button
	Button combinations are not supported.
	Default is 2.

StrokeHotkey hotkey|hotkey_combination
	Define keyboard key that must be pressed to iniciate stroke.
	It can be Shift, Alt, Ctrl or combination of these
	(use + or | as separator).
	It can be used in combination with StrokeButton, or may work
	as standalone activation key if StrokeButton is 0.
	Default is no-hotkey.


Definition:
------------

*stroke "gesture_name" gesture_sequence [gesture_sequence2 ...]
*stroke action action_parameter [command_parameters]
*stroke ~

Actions:
--------
action_parameter can be bang-command, or one of predefined actions:

.maximize
	Maximize window under cursor

.minimize
	Minimize window under cursor

.restore
	Restore window under cursor to its normal size

.close
	Close window (application) under cursor

.browseBack
	Browser back function - actually sends Alt+Left to window under cursor

.browseForward
	Browser forward function - actually sends Alt+Right to window under cursor

.browseReload
	Browser reload function - actually sends Ctrl+R to window under cursor

.exec c:\dev\shutdown.lnk
	Execute program or document


Commands:
---------

*StrokeExcludeWin "window_executable" "window_class_name" "window_title"

	Define window/application that will not react on gestures. Wildcards
	(*,?) may be used. Window is matched if all parameters match.

	For instance, you can exclude Explorer windows file management area:

		*StrokeExcludeWin "*\explorer.exe" "Sys????View32" ""

	These exclusions are used by default (hardcoded):

		*StrokeExcludeWin "*\opera.exe" "" ""

	For spying windows executable-name, class and title, you can use
	Spy32 from http://come.to/kobik/.
	Though this program cannot display executable name (module name)
	under WindowsNT (v 2.70). If you know about another window-spying
	program that can, please let me know.


6. Acknowledgements
-------------------

Module uses GPLed library LIBSTROKE:
http://www.etla.net/~willey/projects/libstroke/

If you are interested in gesture recognition techniques, here are some
links:
http://www.etla.net/~willey/
http://www.mit.edu/people/cadet/strokes-algorithm.html
http://www.etla.net/libstroke/libstroke.pdf
http://www.etla.net/libstroke/sloppy.html
http://www.stressbunny.com/wayv/
http://sa-1.enteract.com/~mghall/tcltk/tcltk.html


7. Credits
----------

author: Pavel Vitis, (c)2001-2002
e-mail: pavel.vitis@seznam.cz
web   : http://come.to/lsg/
