FT_SLEEP

FT_SLEEP
 Wait for a specified amount of time

 Syntax

      FT_SLEEP( <nSeconds>, [<nInitial>] ) -> nil

 Arguments

    <nSeconds> is the number of seconds to pause

    <nInitial> is an optional clock value (from a call to SECONDS())
               from which the <nSeconds> seconds are to elapse. Useful
               for setting a minimum time between the start of events
               which could take a variable amount of time due to the
               execution of intervening code.

 Returns

     NIL

 Description

     This routine will wait a specified period of time. It provides
     resolution based upon the execution of the SECONDS() function.
     It does not use an input state such as INKEY(). The specified time
     is the minimum time sleeping and will usually be slightly longer.

     The second optional argument allows one to begin timing an event
     prior to executing some operation. This is useful when, for example,
     you input a key or mouse click and wish to do something but still want
     to note if the user double entered (mouse or key) within a certain time
     which in turn may have meaning within your program's context.

     The routine correctly handles passing through midnight but will not
     work for more than 24 hours.

 Examples

     Example 1:
         FT_SLEEP(10.0)    && Sleep for 10.0 seconds
     Example 2:
         nTime=SECONDS()   && usually after some interupt from mouse or
                           && keyboard

         ... intervening code ...

         FT_SLEEP(0.5, nTime) && Sleep until the sytem clock is
                              && nTime+0.5 seconds.

 Source: SLEEP.PRG

 Author: Leo Letendre

 

FT Keyboard-Mouse

 FT_ALT()         Determine status of the Alt key
 FT_CAPLOCK()     Determine and optionally change the status of CapLock key
 FT_CTRL()        Determine status of the Ctrl key
 FT_LASTKEY()     Force LastKey() to return a programmer-defined value.
 FT_MBUTPRS()     Retrieve button press status
 FT_MBUTREL()     Get mouse button release information
 FT_MCONOFF()     Turn mouse cursur off if in specified region
 FT_MCURSOR()     Set the mouse cursor
 FT_MDBLCLK()     Return true if a double click was detected
 FT_MDEFCRS()     Define the mouse cursor
 FT_MGETCOORD()   Get mouse cursor position (text coord.) and button status
 FT_MGETPAGE()    Get the display page for the mouse pointer
 FT_MGETPOS()     Get mouse cursor position and button status
 FT_MGETSENS()    Get the mouse sensitivity parameters
 FT_MGETX()       Get mouse cursor row position
 FT_MGETY()       Get mouse cursor column position
 FT_MHIDECRS()    Decrement internal mouse cursor flag and hide mouse cursor
 FT_MINIT()       Initialize the mouse driver, vars and return status of mouse
 FT_MINREGION()   Test if the mouse cursor is in the passed region
 FT_MMICKEYS()    Get mickeys
 FT_MRESET()      Reset mouse driver and return status of mouse
 FT_MSETCOORD()   Position the mouse cursor using text screen coordinates
 FT_MSETPAGE()    Set the display page for the mouse pointer
 FT_MSETPOS()     Position the mouse cursor using virtual screen coordinates
 FT_MSETSENS()    Set the mouse sensitivity parameters
 FT_MSHOWCRS()    Increment internal cursor flag and display mouse cursor
 FT_MVERSION()    Get the mouse driver version
 FT_MXLIMIT()     Set vertical bounds of mouse using virtual screen coord.
 FT_MYLIMIT()     Set horiz. bounds of mouse using virtual screen coordinates
 FT_NUMLOCK()     Return status of NumLock key
 FT_PRTSCR()      Enable or disable the Print Screen key
 FT_PUTKEY()      Stuff a keystroke into the keyboard buffer
 FT_SCANCODE()    Wait for keypress and return keyboard scan code
 FT_SETKEYS()     Get array of keys redirected via the SetKey() or SET KEY
 FT_SETRATE()     Set the keyboard delay and repeat rate on PC/AT & PS/2
 FT_SHIFT()       Determine status of shift key
 FT_SINKEY()      Replacement for INKEY() that tests for SET KEY procedures

 

FT_SINKEY

FT_SINKEY()
 Replacement for INKEY() that tests for SET KEY procedures

 Syntax

      FT_SINKEY( [ <nWaitTime> ] ) -> nKey

 Arguments

     <nWaitTime> is the number of seconds to wait.  If zero,
     FT_SINKEY() will wait indefinitely for a keypress.  If not
     passed, FT_SINKEY() does not wait for a keypress.  If NIL,
     it is treated the same as 0.

 Returns

     The INKEY() value of the key pressed.

 Description

     FT_SINKEY() is similar to the function provided by Nantucket in
     KEYBOARD.PRG, with one significant difference: you can pass NIL
     to INKEY(), which will be treated as a zero (i.e., wait indefinitely
     for keypress).  Therefore, it is necessary to differentiate between
     an explicit NIL and one that is a result of a formal parameter NOT
     being received.

     FT_SINKEY() differs from the standard INKEY() in that it will
     respond to any keys set with SET KEY TO or SetKey().

 Examples

     SetKey( K_F1, {|n,l,r| Help(n,l,r) } )
     nKey := FT_SINKEY(0)       // Help() will be called if F1 pressed

 Source: SINKEY.PRG

 Author: Greg Lief