home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / harbb30g.zip / INCLUDE / inkey.h < prev    next >
C/C++ Source or Header  |  1999-09-23  |  3KB  |  65 lines

  1. /*
  2.  * $Id: inkey.h,v 1.11 1999/09/23 09:13:26 vszel Exp $
  3.  */
  4.  
  5. /*
  6.  * Harbour Project source code:
  7.  * Header file for the Keyboard API
  8.  *
  9.  * Copyright 1999 David G. Holm <dholm@jsd-llc.com>
  10.  * www - http://www.harbour-project.org
  11.  *
  12.  * This program is free software; you can redistribute it and/or modify
  13.  * it under the terms of the GNU General Public License as published by
  14.  * the Free Software Foundation; either version 2 of the License, or
  15.  * (at your option) any later version, with one exception:
  16.  *
  17.  * The exception is that if you link the Harbour Runtime Library (HRL)
  18.  * and/or the Harbour Virtual Machine (HVM) with other files to produce
  19.  * an executable, this does not by itself cause the resulting executable
  20.  * to be covered by the GNU General Public License. Your use of that
  21.  * executable is in no way restricted on account of linking the HRL
  22.  * and/or HVM code into it.
  23.  *
  24.  * This program is distributed in the hope that it will be useful,
  25.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  26.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  27.  * GNU General Public License for more details.
  28.  *
  29.  * You should have received a copy of the GNU General Public License
  30.  * along with this program; if not, write to the Free Software
  31.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
  32.  * their web site at http://www.gnu.org/).
  33.  *
  34.  */
  35.  
  36. #ifndef HB_INKEY_H_
  37. #define HB_INKEY_H_
  38.  
  39. #include "hbdefs.h"
  40.  
  41. typedef enum
  42. {
  43.    INKEY_MOVE           = 1,    /* Mouse Events */
  44.    INKEY_LDOWN          = 2,    /* Mouse Left Click Down */
  45.    INKEY_LUP            = 4,    /* Mouse Left Click Up */
  46.    INKEY_RDOWN          = 8,    /* Mouse Right Click Down */
  47.    INKEY_RUP            = 16,   /* Mouse Right Click Up */
  48.    INKEY_KEYBOARD       = 128,  /* Keyboard Events */
  49.    INKEY_ALL            = 159,  /* All Mouse and Keyboard Events */
  50.    INKEY_EXTENDED       = 256   /* Extended Keyboard Events */
  51. } HB_inkey_enum;
  52.  
  53. /* Harbour keyboard support functions */
  54. extern int  hb_inkey ( double seconds, HB_inkey_enum event_mask, BOOL wait, BOOL forever ); /* Wait for keyboard input */
  55. extern int  hb_inkeyGet( void );            /* Extract the next key from the Harbour keyboard buffer */
  56. extern void hb_inkeyPut( int ch );          /* Inserts an inkey code into the keyboard buffer */
  57. extern int  hb_inkeyLast( void );           /* Return the value of the last key that was extracted */
  58. extern int  hb_inkeyNext( void );           /* Return the next key without extracting it */
  59. extern void hb_inkeyPoll( void );           /* Poll the console keyboard to stuff the Harbour buffer */
  60. extern void hb_inkeyReset( BOOL allocate ); /* Reset the Harbour keyboard buffer */
  61.  
  62. extern void hb_releaseCPU( void );          /* Attempt to release a CPU time slice */
  63.  
  64. #endif /* HB_INKEY_H_ */
  65.