--- pmsdk/include/bsesub.h 2018/08/09 12:28:13 1.1.1.1 +++ pmsdk/include/bsesub.h 2018/08/09 12:28:36 1.1.1.2 @@ -4,8 +4,7 @@ * * OS/2 Base Include File * -* Copyright (c) 1987 Microsoft Corporation -* Copyright (c) 1987 IBM Corporation +* Copyright (c) 1987,1989 Microsoft Corporation * ***************************************************************************** * @@ -33,20 +32,20 @@ typedef HKBD far * PHKBD; USHORT APIENTRY KbdRegister (PSZ, PSZ, ULONG); -#define KR_KBDCHARIN 0x00000001 -#define KR_KBDPEEK 0x00000002 -#define KR_KBDFLUSHBUFFER 0x00000004 -#define KR_KBDGETSTATUS 0x00000008 -#define KR_KBDSETSTATUS 0x00000010 -#define KR_KBDSTRINGIN 0x00000020 -#define KR_KBDOPEN 0x00000040 -#define KR_KBDCLOSE 0x00000080 -#define KR_KBDGETFOCUS 0x00000100 -#define KR_KBDFREEFOCUS 0x00000200 -#define KR_KBDGETCP 0x00000400 -#define KR_KBDSETCP 0x00000800 -#define KR_KBDXLATE 0x00001000 -#define KR_KBDSETCUSTXT 0x00002000 +#define KR_KBDCHARIN 0x00000001L +#define KR_KBDPEEK 0x00000002L +#define KR_KBDFLUSHBUFFER 0x00000004L +#define KR_KBDGETSTATUS 0x00000008L +#define KR_KBDSETSTATUS 0x00000010L +#define KR_KBDSTRINGIN 0x00000020L +#define KR_KBDOPEN 0x00000040L +#define KR_KBDCLOSE 0x00000080L +#define KR_KBDGETFOCUS 0x00000100L +#define KR_KBDFREEFOCUS 0x00000200L +#define KR_KBDGETCP 0x00000400L +#define KR_KBDSETCP 0x00000800L +#define KR_KBDXLATE 0x00001000L +#define KR_KBDSETCUSTXT 0x00002000L #define IO_WAIT 0 #define IO_NOWAIT 1 @@ -80,6 +79,41 @@ USHORT APIENTRY KbdStringIn ( PCH, PSTRI USHORT APIENTRY KbdFlushBuffer ( HKBD ); +/* KBDINFO.fsMask */ + +#define KEYBOARD_ECHO_ON 0x0001 +#define KEYBOARD_ECHO_OFF 0x0002 +#define KEYBOARD_BINARY_MODE 0x0004 +#define KEYBOARD_ASCII_MODE 0x0008 +#define KEYBOARD_MODIFY_STATE 0x0010 +#define KEYBOARD_MODIFY_INTERIM 0x0020 +#define KEYBOARD_MODIFY_TURNAROUND 0x0040 +#define KEYBOARD_2B_TURNAROUND 0x0080 +#define KEYBOARD_SHIFT_REPORT 0x0100 + +#ifndef INCL_DOSDEVIOCTL /* following constants defined in bsedev.h */ + +/* KBDINFO.fsState/KBDKEYINFO.fsState/KBDTRANS.fsState */ + +#define RIGHTSHIFT 0x0001 +#define LEFTSHIFT 0x0002 +#define CONTROL 0x0004 +#define ALT 0x0008 +#define SCROLLLOCK_ON 0x0010 +#define NUMLOCK_ON 0x0020 +#define CAPSLOCK_ON 0x0040 +#define INSERT_ON 0x0080 +#define LEFTCONTROL 0x0100 +#define LEFTALT 0x0200 +#define RIGHTCONTROL 0x0400 +#define RIGHTALT 0x0800 +#define SCROLLLOCK 0x1000 +#define NUMLOCK 0x2000 +#define CAPSLOCK 0x4000 +#define SYSREQ 0x8000 + +#endif /* INCL_DOSDEVIOCTL */ + /* KBDINFO structure, for KbdSet/GetStatus */ typedef struct _KBDINFO { /* kbst */ USHORT cb; @@ -104,8 +138,17 @@ USHORT APIENTRY KbdFreeFocus ( HKBD ); USHORT APIENTRY KbdSynch ( USHORT ); +USHORT APIENTRY KbdSetFgnd( VOID ); + +/* KBDTRANS.fbStatus */ + +#define SHIFT_KEY_IN 0x01 +#define CONVERSION_REQUEST 0x20 +#define FINAL_CHAR_IN 0x40 +#define INTERIM_CHAR_IN 0x80 + /* structure for KbdXlate() */ -typedef struct _KBDXLATE { /* kbxl */ +typedef struct _KBDTRANS { /* kbxl */ UCHAR chChar; UCHAR chScan; UCHAR fbStatus; @@ -116,10 +159,10 @@ typedef struct _KBDXLATE { /* kbxl USHORT fsXlate; USHORT fsShift; USHORT sZero; - } KBDXLATE; -typedef KBDXLATE far *PKBDXLATE; + } KBDTRANS; +typedef KBDTRANS far *PKBDTRANS; -USHORT APIENTRY KbdXlate ( PKBDXLATE, HKBD ); +USHORT APIENTRY KbdXlate ( PKBDTRANS, HKBD ); USHORT APIENTRY KbdSetCustXt ( PUSHORT, HKBD ); #endif /* INCL_KBD */ @@ -131,6 +174,52 @@ typedef HVIO far * PHVIO; USHORT APIENTRY VioRegister ( PSZ, PSZ, ULONG, ULONG ); +/* first parameter registration constants */ +#define VR_VIOGETCURPOS 0x00000001L +#define VR_VIOGETCURTYPE 0x00000002L +#define VR_VIOGETMODE 0x00000004L +#define VR_VIOGETBUF 0x00000008L +#define VR_VIOGETPHYSBUF 0x00000010L +#define VR_VIOSETCURPOS 0x00000020L +#define VR_VIOSETCURTYPE 0x00000040L +#define VR_VIOSETMODE 0x00000080L +#define VR_VIOSHOWBUF 0x00000100L +#define VR_VIOREADCHARSTR 0x00000200L +#define VR_VIOREADCELLSTR 0x00000400L +#define VR_VIOWRTNCHAR 0x00000800L +#define VR_VIOWRTNATTR 0x00001000L +#define VR_VIOWRTNCELL 0x00002000L +#define VR_VIOWRTTTY 0x00004000L +#define VR_VIOWRTCHARSTR 0x00008000L + +#define VR_VIOWRTCHARSTRATT 0x00010000L +#define VR_VIOWRTCELLSTR 0x00020000L +#define VR_VIOSCROLLUP 0x00040000L +#define VR_VIOSCROLLDN 0x00080000L +#define VR_VIOSCROLLLF 0x00100000L +#define VR_VIOSCROLLRT 0x00200000L +#define VR_VIOSETANSI 0x00400000L +#define VR_VIOGETANSI 0x00800000L +#define VR_VIOPRTSC 0x01000000L +#define VR_VIOSCRLOCK 0x02000000L +#define VR_VIOSCRUNLOCK 0x04000000L +#define VR_VIOSAVREDRAWWAIT 0x08000000L +#define VR_VIOSAVREDRAWUNDO 0x10000000L +#define VR_VIOPOPUP 0x20000000L +#define VR_VIOENDPOPUP 0x40000000L +#define VR_VIOPRTSCTOGGLE 0x80000000L + +/* second parameter registration constants */ +#define VR_VIOMODEWAIT 0x00000001L +#define VR_VIOMODEUNDO 0x00000002L +#define VR_VIOGETFONT 0x00000004L +#define VR_VIOGETCONFIG 0x00000008L +#define VR_VIOSETCP 0x00000010L +#define VR_VIOGETCP 0x00000020L +#define VR_VIOSETFONT 0x00000040L +#define VR_VIOGETSTATE 0x00000080L +#define VR_VIOSETSTATE 0x00000100L + USHORT APIENTRY VioDeRegister ( void ); USHORT APIENTRY VioGetBuf ( PULONG, PUSHORT, HVIO ); @@ -150,6 +239,12 @@ typedef VIOCURSORINFO FAR *PVIOCURSORINF USHORT APIENTRY VioGetCurType ( PVIOCURSORINFO, HVIO ); USHORT APIENTRY VioSetCurType ( PVIOCURSORINFO, HVIO ); +/* VIOMODEINFO.color constants */ + +#define COLORS_2 0x0001 +#define COLORS_4 0x0002 +#define COLORS_16 0x0004 + /* structure for VioSet/GetMode() */ typedef struct _VIOMODEINFO { /* viomi */ USHORT cb; @@ -159,8 +254,6 @@ typedef struct _VIOMODEINFO { /* viomi USHORT row; USHORT hres; USHORT vres; - UCHAR fmt_ID; - UCHAR attrib; } VIOMODEINFO; typedef VIOMODEINFO FAR *PVIOMODEINFO; @@ -226,7 +319,6 @@ USHORT APIENTRY VioPrtScToggle ( HVIO ); #define UNDOK_ERRORCODE 0 #define UNDOK_TERMINATE 1 -USHORT APIENTRY VioRedrawSize ( PULONG ); USHORT APIENTRY VioSavRedrawWait ( USHORT, PUSHORT, USHORT); USHORT APIENTRY VioSavRedrawUndo ( USHORT, USHORT, USHORT ); @@ -250,9 +342,26 @@ USHORT APIENTRY VioScrUnLock ( HVIO ); #define VP_OPAQUE 0x0000 #define VP_TRANSPARENT 0x0002 -USHORT APIENTRY VioPopUp ( PUSHORT, HVIO ); /* !!! doesn't match documentation */ +USHORT APIENTRY VioPopUp ( PUSHORT, HVIO ); USHORT APIENTRY VioEndPopUp ( HVIO ); +/* VIOCONFIGINFO.adapter constants */ + +#define DISPLAY_MONOCHROME 0x0000 +#define DISPLAY_CGA 0x0001 +#define DISPLAY_EGA 0x0002 +#define DISPLAY_VGA 0x0003 +#define DISPLAY_8514A 0x0007 + +/* VIOCONFIGINFO.display constants */ + +#define MONITOR_MONOCHROME 0x0000 +#define MONITOR_COLOR 0x0001 +#define MONITOR_ENHANCED 0x0002 +#define MONITOR_8503 0x0003 +#define MONITOR_851X_COLOR 0x0004 +#define MONITOR_8514 0x0009 + /* structure for VioGetConfig() */ typedef struct _VIOCONFIGINFO { /* vioin */ @@ -319,6 +428,26 @@ typedef HMOU far * PHMOU; USHORT APIENTRY MouRegister ( PSZ, PSZ, ULONG ); +#define MR_MOUGETNUMBUTTONS 0x00000001L +#define MR_MOUGETNUMMICKEYS 0x00000002L +#define MR_MOUGETDEVSTATUS 0x00000004L +#define MR_MOUGETNUMQUEEL 0x00000008L +#define MR_MOUREADEVENTQUE 0x00000010L +#define MR_MOUGETSCALEFACT 0x00000020L +#define MR_MOUGETEVENTMASK 0x00000040L +#define MR_MOUSETSCALEFACT 0x00000080L +#define MR_MOUSETEVENTMASK 0x00000100L +#define MR_MOUOPEN 0x00000800L +#define MR_MOUCLOSE 0x00001000L +#define MR_MOUGETPTRSHAPE 0x00002000L +#define MR_MOUSETPTRSHAPE 0x00004000L +#define MR_MOUDRAWPTR 0x00008000L +#define MR_MOUREMOVEPTR 0x00010000L +#define MR_MOUGETPTRPOS 0x00020000L +#define MR_MOUSETPTRPOS 0x00040000L +#define MR_MOUINITREAL 0x00080000L +#define MR_MOUSETDEVSTATUS 0x00100000L + USHORT APIENTRY MouDeRegister ( void ); USHORT APIENTRY MouFlushQue ( HMOU ); @@ -327,9 +456,6 @@ USHORT APIENTRY MouFlushQue ( HMOU ); #define MHK_BUTTON2 0x0002 #define MHK_BUTTON3 0x0004 -USHORT APIENTRY MouGetHotKey ( PUSHORT, HMOU ); -USHORT APIENTRY MouSetHotKey ( PUSHORT, HMOU ); - /* structure for MouGet/SetPtrPos() */ typedef struct _PTRLOC { /* moupl */ USHORT row; @@ -353,11 +479,25 @@ typedef PTRSHAPE far *PPTRSHAPE; USHORT APIENTRY MouSetPtrShape ( PBYTE, PPTRSHAPE, HMOU ); USHORT APIENTRY MouGetPtrShape ( PBYTE, PPTRSHAPE, HMOU ); +/* MouGetDevStatus/MouSetDevStatus device status constants */ + +#define MOUSE_QUEUEBUSY 0x0001 +#define MOUSE_BLOCKREAD 0x0002 +#define MOUSE_FLUSH 0x0004 +#define MOUSE_UNSUPPORTED_MODE 0x0008 +#define MOUSE_DISABLED 0x0100 +#define MOUSE_MICKEYS 0x0200 + USHORT APIENTRY MouGetDevStatus ( PUSHORT, HMOU ); USHORT APIENTRY MouGetNumButtons ( PUSHORT, HMOU ); USHORT APIENTRY MouGetNumMickeys ( PUSHORT, HMOU ); +/* MouReadEventQue */ + +#define MOU_NOWAIT 0x0000 +#define MOU_WAIT 0x0001 + /* structure for MouReadEventQue() */ typedef struct _MOUEVENTINFO { /* mouev */ USHORT fs; @@ -378,6 +518,17 @@ typedef MOUQUEINFO far *PMOUQUEINFO; USHORT APIENTRY MouGetNumQueEl ( PMOUQUEINFO, HMOU ); +/* MouGetEventMask/MouSetEventMask events */ + +#define MOUSE_MOTION 0x0001 +#define MOUSE_MOTION_WITH_BN1_DOWN 0x0002 +#define MOUSE_BN1_DOWN 0x0004 +#define MOUSE_MOTION_WITH_BN2_DOWN 0x0008 +#define MOUSE_BN2_DOWN 0x0010 +#define MOUSE_MOTION_WITH_BN3_DOWN 0x0020 +#define MOUSE_BN3_DOWN 0x0040 + + USHORT APIENTRY MouGetEventMask ( PUSHORT, HMOU ); USHORT APIENTRY MouSetEventMask ( PUSHORT, HMOU ); @@ -415,4 +566,6 @@ USHORT APIENTRY MouDrawPtr ( HMOU ); USHORT APIENTRY MouSetDevStatus ( PUSHORT, HMOU ); USHORT APIENTRY MouInitReal ( PSZ ); +USHORT APIENTRY MouSynch( USHORT ); + #endif /* INCL_MOU */