⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bsesub.mh

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 MH
📖 第 1 页 / 共 2 页
字号:
/*
 *  bsesub.h    OS/2 Base subsystems include file for 32-bit development.
 *
:include crwatcnt.sp
 */

:include readonly.sp
:include cpluspro.sp

#ifdef INCL_SUB
    #define INCL_KBD
    #define INCL_MOU
    #define INCL_VIO
#endif

#ifdef INCL_KBD

#define Kbd16CharIn      KBD16CHARIN
#define Kbd16Close       KBD16CLOSE
#define Kbd16DeRegister  KBD16DEREGISTER
#define Kbd16FlushBuffer KBD16FLUSHBUFFER
#define Kbd16FreeFocus   KBD16FREEFOCUS
#define Kbd16GetCp       KBD16GETCP
#define Kbd16GetFocus    KBD16GETFOCUS
#define Kbd16GetHWID     KBD16GETHWID
#define Kbd16GetStatus   KBD16GETSTATUS
#define Kbd16Open        KBD16OPEN
#define Kbd16Peek        KBD16PEEK
#define Kbd16Register    KBD16REGISTER
#define Kbd16SetCp       KBD16SETCP
#define Kbd16SetCustXt   KBD16SETCUSTXT
#define Kbd16SetFgnd     KBD16SETFGND
#define Kbd16SetHWID     KBD16SETHWID
#define Kbd16SetStatus   KBD16SETSTATUS
#define Kbd16StringIn    KBD16STRINGIN
#define Kbd16Synch       KBD16SYNCH
#define Kbd16Xlate       KBD16XLATE

#define KbdCharIn        KBD16CHARIN
#define KbdClose         KBD16CLOSE
#define KbdDeRegister    KBD16DEREGISTER
#define KbdFlushBuffer   KBD16FLUSHBUFFER
#define KbdFreeFocus     KBD16FREEFOCUS
#define KbdGetCp         KBD16GETCP
#define KbdGetFocus      KBD16GETFOCUS
#define KbdGetHWID       KBD16GETHWID
#define KbdGetStatus     KBD16GETSTATUS
#define KbdOpen          KBD16OPEN
#define KbdPeek          KBD16PEEK
#define KbdRegister      KBD16REGISTER
#define KbdSetCp         KBD16SETCP
#define KbdSetCustXt     KBD16SETCUSTXT
#define KbdSetFgnd       KBD16SETFGND
#define KbdSetHWID       KBD16SETHWID
#define KbdSetStatus     KBD16SETSTATUS
#define KbdStringIn      KBD16STRINGIN
#define KbdSynch         KBD16SYNCH
#define KbdXlate         KBD16XLATE

#define KR_KBDCHARIN       0x0001
#define KR_KBDPEEK         0x0002
#define KR_KBDFLUSHBUFFER  0x0004
#define KR_KBDGETSTATUS    0x0008
#define KR_KBDSETSTATUS    0x0010
#define KR_KBDSTRINGIN     0x0020
#define KR_KBDOPEN         0x0040
#define KR_KBDCLOSE        0x0080
#define KR_KBDGETFOCUS     0x0100
#define KR_KBDFREEFOCUS    0x0200
#define KR_KBDGETCP        0x0400
#define KR_KBDSETCP        0x0800
#define KR_KBDXLATE        0x1000
#define KR_KBDSETCUSTXT    0x2000

#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

#define IO_WAIT   0
#define IO_NOWAIT 1

#define KBDTRF_SHIFT_KEY_IN       0x01
#define KBDTRF_CONVERSION_REQUEST 0x20
#define KBDTRF_FINAL_CHAR_IN      0x40
#define KBDTRF_INTERIM_CHAR_IN    0x80

#ifndef INCL_DOSDEVIOCTL

#define KBDSTF_RIGHTSHIFT    0x0001
#define KBDSTF_LEFTSHIFT     0x0002
#define KBDSTF_CONTROL       0x0004
#define KBDSTF_ALT           0x0008
#define KBDSTF_SCROLLLOCK_ON 0x0010
#define KBDSTF_NUMLOCK_ON    0x0020
#define KBDSTF_CAPSLOCK_ON   0x0040
#define KBDSTF_INSERT_ON     0x0080
#define KBDSTF_LEFTCONTROL   0x0100
#define KBDSTF_LEFTALT       0x0200
#define KBDSTF_RIGHTCONTROL  0x0400
#define KBDSTF_RIGHTALT      0x0800
#define KBDSTF_SCROLLLOCK    0x1000
#define KBDSTF_NUMLOCK       0x2000
#define KBDSTF_CAPSLOCK      0x4000
#define KBDSTF_SYSREQ        0x8000

#endif

typedef SHANDLE HKBD;
typedef HKBD    *PHKBD;

#pragma pack(2)

typedef struct _KBDKEYINFO {
    UCHAR  chChar;
    UCHAR  chScan;
    UCHAR  fbStatus;
    UCHAR  bNlsShift;
    USHORT fsState;
    ULONG  time;
}KBDKEYINFO, *PKBDKEYINFO;

typedef struct _KBDTRANS {
    UCHAR  chChar;
    UCHAR  chScan;
    UCHAR  fbStatus;
    UCHAR  bNlsShift;
    USHORT fsState;
    ULONG  time;
    USHORT fsDD;
    USHORT fsXlate;
    USHORT fsShift;
    USHORT sZero;
} KBDTRANS, *PKBDTRANS;

#pragma pack()

typedef struct _KBDHWID {
    USHORT length;
    USHORT kbd_id;
    USHORT reserved1;
    USHORT reserved2;
}KBDHWID, *PKBDHWID;

typedef struct _KBDINFO {
    USHORT cb;
    USHORT fsMask;
    USHORT chTurnAround;
    USHORT fsInterim;
    USHORT fsState;
} KBDINFO, *PKBDINFO;

typedef struct _STRINGINBUF {
    USHORT cb;
    USHORT cchIn;
} STRINGINBUF, *PSTRINGINBUF;

USHORT APIENTRY16 KbdCharIn(PKBDKEYINFO,USHORT,HKBD);
USHORT APIENTRY16 KbdClose(HKBD);
USHORT APIENTRY16 KbdDeRegister(VOID);
USHORT APIENTRY16 KbdFlushBuffer(HKBD);
USHORT APIENTRY16 KbdFreeFocus(HKBD);
USHORT APIENTRY16 KbdGetCp(ULONG,PUSHORT,HKBD);
USHORT APIENTRY16 KbdGetFocus(USHORT,HKBD);
USHORT APIENTRY16 KbdGetHWId(PKBDHWID,HKBD);
USHORT APIENTRY16 KbdGetStatus(PKBDINFO,HKBD);
USHORT APIENTRY16 KbdOpen(PHKBD);
USHORT APIENTRY16 KbdPeek(PKBDKEYINFO,HKBD);
USHORT APIENTRY16 KbdRegister(PSZ,PSZ,ULONG);
USHORT APIENTRY16 KbdSetCp(USHORT,USHORT,HKBD);
USHORT APIENTRY16 KbdSetCustXt(PUSHORT,HKBD);
USHORT APIENTRY16 KbdSetFgnd(VOID);
USHORT APIENTRY16 KbdSetStatus(PKBDINFO,HKBD);
USHORT APIENTRY16 KbdStringIn(PCH,PSTRINGINBUF,USHORT,HKBD);
USHORT APIENTRY16 KbdSynch(USHORT);
USHORT APIENTRY16 KbdXlate(PKBDTRANS,HKBD);

#endif

#ifdef INCL_MOU

#define Mou16Close         MOU16CLOSE
#define Mou16DeRegister    MOU16DEREGISTER
#define Mou16DrawPtr       MOU16DRAWPTR
#define Mou16FlushQue      MOU16FLUSHQUE
#define Mou16GetDevStatus  MOU16GETDEVSTATUS
#define Mou16GetEventMask  MOU16GETEVENTMASK
#define Mou16GetNumButtons MOU16GETNUMBUTTONS
#define Mou16GetNumMickeys MOU16GETNUMMICKEYS
#define Mou16GetNumQueEl   MOU16GETNUMQUEEL
#define Mou16GetPtrPos     MOU16GETPTRPOS
#define Mou16GetPtrShape   MOU16GETPTRSHAPE
#define Mou16GetScaleFact  MOU16GETSCALEFACT
#define Mou16GetThreshold  MOU16GETTHRESHOLD
#define Mou16InitReal      MOU16INITREAL
#define Mou16Open          MOU16OPEN
#define Mou16ReadEventQue  MOU16READEVENTQUE
#define Mou16Register      MOU16REGISTER
#define Mou16RemovePtr     MOU16REMOVEPTR
#define Mou16SetDevStatus  MOU16SETDEVSTATUS
#define Mou16SetEventMask  MOU16SETEVENTMASK
#define Mou16SetPtrPos     MOU16SETPTRPOS
#define Mou16SetPtrShape   MOU16SETPTRSHAPE
#define Mou16SetScaleFact  MOU16SETSCALEFACT
#define Mou16SetThreshold  MOU16SETTHRESHOLD
#define Mou16Synch         MOU16SYNCH

#define MouClose           MOU16CLOSE
#define MouDeRegister      MOU16DEREGISTER
#define MouDrawPtr         MOU16DRAWPTR
#define MouFlushQue        MOU16FLUSHQUE
#define MouGetDevStatus    MOU16GETDEVSTATUS
#define MouGetEventMask    MOU16GETEVENTMASK
#define MouGetNumButtons   MOU16GETNUMBUTTONS
#define MouGetNumMickeys   MOU16GETNUMMICKEYS
#define MouGetNumQueEl     MOU16GETNUMQUEEL
#define MouGetPtrPos       MOU16GETPTRPOS
#define MouGetPtrShape     MOU16GETPTRSHAPE
#define MouGetScaleFact    MOU16GETSCALEFACT
#define MouGetThreshold    MOU16GETTHRESHOLD
#define MouInitReal        MOU16INITREAL
#define MouOpen            MOU16OPEN
#define MouReadEventQue    MOU16READEVENTQUE
#define MouRegister        MOU16REGISTER
#define MouRemovePtr       MOU16REMOVEPTR
#define MouSetDevStatus    MOU16SETDEVSTATUS
#define MouSetEventMask    MOU16SETEVENTMASK
#define MouSetPtrPos       MOU16SETPTRPOS
#define MouSetPtrShape     MOU16SETPTRSHAPE
#define MouSetScaleFact    MOU16SETSCALEFACT
#define MouSetThreshold    MOU16SETTHRESHOLD
#define MouSynch           MOU16SYNCH

#define MR_MOUGETNUMBUTTONS 0x00000001
#define MR_MOUGETNUMMICKEYS 0x00000002
#define MR_MOUGETDEVSTATUS  0x00000004
#define MR_MOUGETNUMQUEEL   0x00000008
#define MR_MOUREADEVENTQUE  0x00000010
#define MR_MOUGETSCALEFACT  0x00000020
#define MR_MOUGETEVENTMASK  0x00000040
#define MR_MOUSETSCALEFACT  0x00000080
#define MR_MOUSETEVENTMASK  0x00000100
#define MR_MOUOPEN          0x00000800
#define MR_MOUCLOSE         0x00001000
#define MR_MOUGETPTRSHAPE   0x00002000
#define MR_MOUSETPTRSHAPE   0x00004000
#define MR_MOUDRAWPTR       0x00008000
#define MR_MOUREMOVEPTR     0x00010000
#define MR_MOUGETPTRPOS     0x00020000
#define MR_MOUSETPTRPOS     0x00040000
#define MR_MOUINITREAL      0x00080000
#define MR_MOUSETDEVSTATUS  0x00100000

#define MHK_BUTTON1 1
#define MHK_BUTTON2 2
#define MHK_BUTTON3 4

#define MOU_NODRAW  1
#define MOU_DRAW    0
#define MOU_MICKEYS 2
#define MOU_PELS    0

#define MOU_NOWAIT 0
#define MOU_WAIT   1

#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

#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

typedef SHANDLE  HMOU;
typedef HMOU     *PHMOU;

typedef struct _MOUQUEINFO {
    USHORT cEvents;
    USHORT cmaxEvents;
} MOUQUEINFO, *PMOUQUEINFO;

typedef struct _PTRLOC {
    USHORT row;
    USHORT col;
} PTRLOC, *PPTRLOC;

typedef struct _PTRSHAPE {
    USHORT cb;
    USHORT col;
    USHORT row;
    USHORT colHot;
    USHORT rowHot;
} PTRSHAPE, *PPTRSHAPE;

typedef struct _SCALEFACT {
    USHORT rowScale;
    USHORT colScale;
} SCALEFACT, *PSCALEFACT;

typedef _Packed struct _MOUEVENTINFO {
    USHORT fs;
    ULONG  time;
    SHORT  row;
    SHORT  col;
} MOUEVENTINFO, *PMOUEVENTINFO;

typedef struct _NOPTRRECT {
    USHORT row;
    USHORT col;
    USHORT cRow;
    USHORT cCol;
} NOPTRRECT, *PNOPTRRECT;

USHORT APIENTRY16 MouClose(HMOU);
USHORT APIENTRY16 MouDeRegister(VOID);
USHORT APIENTRY16 MouDrawPtr(HMOU);
USHORT APIENTRY16 MouFlushQue(HMOU);
USHORT APIENTRY16 MouGetDevStatus(PUSHORT,HMOU);
USHORT APIENTRY16 MouGetEventMask(PUSHORT,HMOU);
USHORT APIENTRY16 MouGetNumButtons(PUSHORT,HMOU);
USHORT APIENTRY16 MouGetNumMickeys(PUSHORT,HMOU);
USHORT APIENTRY16 MouGetNumQueEl(PMOUQUEINFO,HMOU);
USHORT APIENTRY16 MouGetPtrPos(PPTRLOC,HMOU);
USHORT APIENTRY16 MouGetPtrShape(PBYTE,PPTRSHAPE,HMOU);
USHORT APIENTRY16 MouGetScaleFact(PSCALEFACT,HMOU);
USHORT APIENTRY16 MouInitReal(PSZ);
USHORT APIENTRY16 MouOpen(PSZ,PHMOU);
USHORT APIENTRY16 MouReadEventQue(PMOUEVENTINFO,PUSHORT,HMOU);
USHORT APIENTRY16 MouRegister(PSZ,PSZ,ULONG);
USHORT APIENTRY16 MouRemovePtr(PNOPTRRECT,HMOU);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -