home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
CSAPE32.ARJ
/
INCLUDE
/
KBRECORD.H
< prev
next >
Wrap
Text File
|
1990-12-05
|
2KB
|
78 lines
/*
kbrecord.h
% Header for kbrecord function
OWL 1.2
Copyright (c) 1988-1990, by Oakland Group, Inc.
ALL RIGHTS RESERVED.
Revision History:
-----------------
9/13/88 jmd Changed KB_LEARN to KB_RECORD
3/28/90 jmd ansi-fied
8/15/90 jdc added kb_Macro stuff
8/29/90 jdc added KB_MACSTART and KB_MACPLAY modes
9/03/90 jdc added MAXNEST check
9/21/90 pmcm changed extern to OEXTERN for kb_keylist
10/28/90 jdc fixed boolean/int ret conflict
12/05/90 ted changed 'scancode' to '_scancode' in macromsg_func macro.
*/
typedef struct keyS_tag {
int scan; /* never == 0 */
char *name;
int size; /* no macro allowed for key if size == -1 */
iarray macro; /* not set by programmer always == NULL */
} key_struct;
#define KB_NAME_MAXLEN 22
#define KB_LIST_END 0, "", 0, NULL
/* KBLIST.C */
OEXTERN key_struct kb_keylist[];
/* kb_Record modes */
#define KB_STOP 0
#define KB_RECORD 1
#define KB_PLAY 2
/* KBRECORD.C */
extern void kb_Record(FILE *fp, int mode, int delay);
/* kb_Macro modes */
#define KB_MACRO 0
#define KB_MACKEY 1
#define KB_MACLEARN 2
#define KB_MACSTOP 3
#define KB_MACOFF 4
#define KB_MACRESET 5
#define KB_MACCLEAR 6
#define KB_MACSTART 7
#define KB_MACPLAY 8
#define KB_MAXNEST 9
#define macromsg_func(fname) boolean fname(int _msg, int _scancode)
typedef macromsg_func ((*macromsg_fptr));
/* KBMACRO.C */
extern boolean kb_Macro(int mode, int key, moupos_struct *mposp, macromsg_fptr macromsg);
extern int key_GetCurrKey(void);
extern int key_GetLearnKey(void);
extern int key_GetMode(void);
extern char *key_GetName(int key);
extern boolean key_IsMacro(int key);
extern boolean key_SetMacroStr(char *str);
extern boolean key_GetMacroStr(int key, char *str);
#define key_GetCurrName() key_GetName(key_GetCurrKey())
#define key_IsCurrMacro() key_IsMacro(key_GetCurrKey())