[Contents] [index] [Help] [Retrace] [browse <] [Browse >]

The example program below shows the use of idcmp_mousebuttons,
idcmp_mousemove and doubleclick().  doubleclick() is used to test the
interval between two times and determine if the interval is within the
user specified time for double clicking as set in the Preferences Input
editor.

    BOOL DoubleClick( unsigned long sSeconds, unsigned long sMicros,
                      unsigned long cSeconds, unsigned long cMicros );

The sSeconds and sMicros arguments specify a timestamp value describing
the start of the double click time interval to be tested.  The cSeconds
and cMicros arguments specify a timestamp value describing the end of the
double click time interval to be tested.

doubleclick() returns true if the time interval was short enough to
qualify as a double-click.  A FALSE return indicates that the time
interval between presses took too long.  The button presses should be
treated as separate events in that case.

     mousetest.c