|
|
1.1 ! root 1: /***************************************************************************\ ! 2: * ! 3: * Module Name: BSESUB.H ! 4: * ! 5: * OS/2 Base Include File ! 6: * ! 7: * Copyright (c) 1987 Microsoft Corporation ! 8: * Copyright (c) 1987 IBM Corporation ! 9: * ! 10: ***************************************************************************** ! 11: * ! 12: * Subcomponents marked with "+" are partially included by default ! 13: * #define: To include: ! 14: * ! 15: * INCL_KBD KBD ! 16: * INCL_VIO VIO ! 17: * INCL_MOU MOU ! 18: * ! 19: \***************************************************************************/ ! 20: ! 21: #ifdef INCL_SUB ! 22: ! 23: #define INCL_KBD ! 24: #define INCL_VIO ! 25: #define INCL_MOU ! 26: ! 27: #endif /* INCL_SUB */ ! 28: ! 29: #ifdef INCL_KBD ! 30: ! 31: typedef SHANDLE HKBD; ! 32: typedef HKBD far * PHKBD; ! 33: ! 34: USHORT APIENTRY KbdRegister (PSZ, PSZ, ULONG); ! 35: ! 36: #define KR_KBDCHARIN 0x00000001 ! 37: #define KR_KBDPEEK 0x00000002 ! 38: #define KR_KBDFLUSHBUFFER 0x00000004 ! 39: #define KR_KBDGETSTATUS 0x00000008 ! 40: #define KR_KBDSETSTATUS 0x00000010 ! 41: #define KR_KBDSTRINGIN 0x00000020 ! 42: #define KR_KBDOPEN 0x00000040 ! 43: #define KR_KBDCLOSE 0x00000080 ! 44: #define KR_KBDGETFOCUS 0x00000100 ! 45: #define KR_KBDFREEFOCUS 0x00000200 ! 46: #define KR_KBDGETCP 0x00000400 ! 47: #define KR_KBDSETCP 0x00000800 ! 48: #define KR_KBDXLATE 0x00001000 ! 49: #define KR_KBDSETCUSTXT 0x00002000 ! 50: ! 51: #define IO_WAIT 0 ! 52: #define IO_NOWAIT 1 ! 53: ! 54: USHORT APIENTRY KbdDeRegister ( void ); ! 55: ! 56: /* KBDKEYINFO structure, for KbdCharIn and KbdPeek */ ! 57: ! 58: typedef struct _KBDKEYINFO { /* kbci */ ! 59: UCHAR chChar; ! 60: UCHAR chScan; ! 61: UCHAR fbStatus; ! 62: UCHAR bNlsShift; ! 63: USHORT fsState; ! 64: ULONG time; ! 65: }KBDKEYINFO; ! 66: typedef KBDKEYINFO far *PKBDKEYINFO; ! 67: ! 68: USHORT APIENTRY KbdCharIn ( PKBDKEYINFO, USHORT, HKBD ); ! 69: USHORT APIENTRY KbdPeek ( PKBDKEYINFO, HKBD ); ! 70: ! 71: /* structure for KbdStringIn() */ ! 72: ! 73: typedef struct _STRINGINBUF { /* kbsi */ ! 74: USHORT cb; ! 75: USHORT cchIn; ! 76: } STRINGINBUF; ! 77: typedef STRINGINBUF far *PSTRINGINBUF; ! 78: ! 79: USHORT APIENTRY KbdStringIn ( PCH, PSTRINGINBUF, USHORT, HKBD ); ! 80: ! 81: USHORT APIENTRY KbdFlushBuffer ( HKBD ); ! 82: ! 83: /* KBDINFO structure, for KbdSet/GetStatus */ ! 84: typedef struct _KBDINFO { /* kbst */ ! 85: USHORT cb; ! 86: USHORT fsMask; ! 87: USHORT chTurnAround; ! 88: USHORT fsInterim; ! 89: USHORT fsState; ! 90: }KBDINFO; ! 91: typedef KBDINFO far *PKBDINFO; ! 92: ! 93: USHORT APIENTRY KbdSetStatus ( PKBDINFO, HKBD ); ! 94: USHORT APIENTRY KbdGetStatus ( PKBDINFO, HKBD ); ! 95: ! 96: USHORT APIENTRY KbdSetCp ( USHORT, USHORT, HKBD); ! 97: USHORT APIENTRY KbdGetCp ( ULONG, PUSHORT, HKBD ); ! 98: ! 99: USHORT APIENTRY KbdOpen ( PHKBD ); ! 100: USHORT APIENTRY KbdClose ( HKBD ); ! 101: ! 102: USHORT APIENTRY KbdGetFocus ( USHORT, HKBD ); ! 103: USHORT APIENTRY KbdFreeFocus ( HKBD ); ! 104: ! 105: USHORT APIENTRY KbdSynch ( USHORT ); ! 106: ! 107: /* structure for KbdXlate() */ ! 108: typedef struct _KBDXLATE { /* kbxl */ ! 109: UCHAR chChar; ! 110: UCHAR chScan; ! 111: UCHAR fbStatus; ! 112: UCHAR bNlsShift; ! 113: USHORT fsState; ! 114: ULONG time; ! 115: USHORT fsDD; ! 116: USHORT fsXlate; ! 117: USHORT fsShift; ! 118: USHORT sZero; ! 119: } KBDXLATE; ! 120: typedef KBDXLATE far *PKBDXLATE; ! 121: ! 122: USHORT APIENTRY KbdXlate ( PKBDXLATE, HKBD ); ! 123: USHORT APIENTRY KbdSetCustXt ( PUSHORT, HKBD ); ! 124: ! 125: #endif /* INCL_KBD */ ! 126: ! 127: #ifdef INCL_VIO ! 128: ! 129: typedef SHANDLE HVIO; ! 130: typedef HVIO far * PHVIO; ! 131: ! 132: USHORT APIENTRY VioRegister ( PSZ, PSZ, ULONG, ULONG ); ! 133: ! 134: USHORT APIENTRY VioDeRegister ( void ); ! 135: ! 136: USHORT APIENTRY VioGetBuf ( PULONG, PUSHORT, HVIO ); ! 137: ! 138: USHORT APIENTRY VioGetCurPos ( PUSHORT, PUSHORT, HVIO ); ! 139: USHORT APIENTRY VioSetCurPos ( USHORT, USHORT, HVIO ); ! 140: ! 141: /* structure for VioSet/GetCurType() */ ! 142: typedef struct _VIOCURSORINFO { /* vioci */ ! 143: USHORT yStart; ! 144: USHORT cEnd; ! 145: USHORT cx; ! 146: USHORT attr; ! 147: } VIOCURSORINFO; ! 148: typedef VIOCURSORINFO FAR *PVIOCURSORINFO; ! 149: ! 150: USHORT APIENTRY VioGetCurType ( PVIOCURSORINFO, HVIO ); ! 151: USHORT APIENTRY VioSetCurType ( PVIOCURSORINFO, HVIO ); ! 152: ! 153: /* structure for VioSet/GetMode() */ ! 154: typedef struct _VIOMODEINFO { /* viomi */ ! 155: USHORT cb; ! 156: UCHAR fbType; ! 157: UCHAR color; ! 158: USHORT col; ! 159: USHORT row; ! 160: USHORT hres; ! 161: USHORT vres; ! 162: UCHAR fmt_ID; ! 163: UCHAR attrib; ! 164: } VIOMODEINFO; ! 165: typedef VIOMODEINFO FAR *PVIOMODEINFO; ! 166: ! 167: #define VGMT_OTHER 0x01 ! 168: #define VGMT_GRAPHICS 0x02 ! 169: #define VGMT_DISABLEBURST 0x04 ! 170: ! 171: USHORT APIENTRY VioGetMode ( PVIOMODEINFO, HVIO ); ! 172: USHORT APIENTRY VioSetMode ( PVIOMODEINFO, HVIO ); ! 173: ! 174: /* structure for VioGetPhysBuf() */ ! 175: ! 176: typedef struct _VIOPHYSBUF { /* viopb */ ! 177: PBYTE pBuf; ! 178: ULONG cb; ! 179: SEL asel[1]; ! 180: } VIOPHYSBUF; ! 181: typedef VIOPHYSBUF far *PVIOPHYSBUF; ! 182: ! 183: USHORT APIENTRY VioGetPhysBuf ( PVIOPHYSBUF, USHORT ); ! 184: ! 185: USHORT APIENTRY VioReadCellStr ( PCH, PUSHORT, USHORT, USHORT, HVIO ); ! 186: USHORT APIENTRY VioReadCharStr ( PCH, PUSHORT, USHORT, USHORT, HVIO ); ! 187: USHORT APIENTRY VioWrtCellStr ( PCH, USHORT, USHORT, USHORT, HVIO ); ! 188: USHORT APIENTRY VioWrtCharStr ( PCH, USHORT, USHORT, USHORT, HVIO ); ! 189: ! 190: USHORT APIENTRY VioScrollDn ( USHORT, USHORT, USHORT, USHORT, ! 191: USHORT, PBYTE, HVIO ); ! 192: USHORT APIENTRY VioScrollUp ( USHORT, USHORT, USHORT, USHORT, ! 193: USHORT, PBYTE, HVIO ); ! 194: USHORT APIENTRY VioScrollLf ( USHORT, USHORT, USHORT, USHORT, ! 195: USHORT, PBYTE, HVIO ); ! 196: USHORT APIENTRY VioScrollRt ( USHORT, USHORT, USHORT, USHORT, ! 197: USHORT, PBYTE, HVIO ); ! 198: ! 199: USHORT APIENTRY VioWrtNAttr ( PBYTE, USHORT, USHORT, USHORT, HVIO ); ! 200: USHORT APIENTRY VioWrtNCell ( PBYTE, USHORT, USHORT, USHORT, HVIO ); ! 201: USHORT APIENTRY VioWrtNChar ( PCH, USHORT, USHORT, USHORT, HVIO ); ! 202: USHORT APIENTRY VioWrtTTY ( PCH, USHORT, HVIO ); ! 203: USHORT APIENTRY VioWrtCharStrAtt ( PCH, USHORT, USHORT, USHORT, PBYTE, HVIO ); ! 204: ! 205: USHORT APIENTRY VioShowBuf ( USHORT, USHORT, HVIO ); ! 206: ! 207: ! 208: #define ANSI_ON 1 ! 209: #define ANSI_OFF 0 ! 210: ! 211: USHORT APIENTRY VioSetAnsi ( USHORT, HVIO ); ! 212: USHORT APIENTRY VioGetAnsi ( PUSHORT, HVIO ); ! 213: ! 214: USHORT APIENTRY VioPrtSc ( HVIO ); ! 215: USHORT APIENTRY VioPrtScToggle ( HVIO ); ! 216: ! 217: #define VSRWI_SAVEANDREDRAW 0 ! 218: #define VSRWI_REDRAW 1 ! 219: ! 220: #define VSRWN_SAVE 0 ! 221: #define VSRWN_REDRAW 1 ! 222: ! 223: #define UNDOI_GETOWNER 0 ! 224: #define UNDOI_RELEASEOWNER 1 ! 225: ! 226: #define UNDOK_ERRORCODE 0 ! 227: #define UNDOK_TERMINATE 1 ! 228: ! 229: USHORT APIENTRY VioRedrawSize ( PULONG ); ! 230: USHORT APIENTRY VioSavRedrawWait ( USHORT, PUSHORT, USHORT); ! 231: USHORT APIENTRY VioSavRedrawUndo ( USHORT, USHORT, USHORT ); ! 232: ! 233: #define VMWR_POPUP 0 ! 234: #define VMWN_POPUP 0 ! 235: ! 236: USHORT APIENTRY VioModeWait ( USHORT, PUSHORT, USHORT ); ! 237: USHORT APIENTRY VioModeUndo ( USHORT, USHORT, USHORT ); ! 238: ! 239: #define LOCKIO_NOWAIT 0 ! 240: #define LOCKIO_WAIT 1 ! 241: ! 242: #define LOCK_SUCCESS 0 ! 243: #define LOCK_FAIL 1 ! 244: ! 245: USHORT APIENTRY VioScrLock ( USHORT, PUCHAR, HVIO ); ! 246: USHORT APIENTRY VioScrUnLock ( HVIO ); ! 247: ! 248: #define VP_NOWAIT 0x0000 ! 249: #define VP_WAIT 0x0001 ! 250: #define VP_OPAQUE 0x0000 ! 251: #define VP_TRANSPARENT 0x0002 ! 252: ! 253: USHORT APIENTRY VioPopUp ( PUSHORT, HVIO ); /* !!! doesn't match documentation */ ! 254: USHORT APIENTRY VioEndPopUp ( HVIO ); ! 255: ! 256: /* structure for VioGetConfig() */ ! 257: ! 258: typedef struct _VIOCONFIGINFO { /* vioin */ ! 259: USHORT cb ; ! 260: USHORT adapter; ! 261: USHORT display; ! 262: ULONG cbMemory; ! 263: } VIOCONFIGINFO; ! 264: typedef VIOCONFIGINFO far *PVIOCONFIGINFO; ! 265: ! 266: USHORT APIENTRY VioGetConfig ( USHORT, PVIOCONFIGINFO, HVIO ); ! 267: ! 268: /* structure for VioGet/SetFont() */ ! 269: typedef struct _VIOFONTINFO { /* viofi */ ! 270: USHORT cb; ! 271: USHORT type; ! 272: USHORT cxCell; ! 273: USHORT cyCell; ! 274: PVOID pbData; ! 275: USHORT cbData; ! 276: } VIOFONTINFO; ! 277: typedef VIOFONTINFO far *PVIOFONTINFO; ! 278: ! 279: #define VGFI_GETCURFONT 0 ! 280: #define VGFI_GETROMFONT 1 ! 281: ! 282: USHORT APIENTRY VioGetFont ( PVIOFONTINFO, HVIO ); ! 283: USHORT APIENTRY VioSetFont ( PVIOFONTINFO, HVIO ); ! 284: ! 285: USHORT APIENTRY VioGetCp ( USHORT, PUSHORT, HVIO ); ! 286: USHORT APIENTRY VioSetCp ( USHORT, USHORT, HVIO ); ! 287: ! 288: typedef struct _VIOPALSTATE { /* viopal */ ! 289: USHORT cb; ! 290: USHORT type; ! 291: USHORT iFirst; ! 292: USHORT acolor[1]; ! 293: }VIOPALSTATE; ! 294: typedef VIOPALSTATE far *PVIOPALSTATE; ! 295: ! 296: typedef struct _VIOOVERSCAN { /* vioos */ ! 297: USHORT cb; ! 298: USHORT type; ! 299: USHORT color; ! 300: }VIOOVERSCAN; ! 301: typedef VIOOVERSCAN far *PVIOOVERSCAN; ! 302: ! 303: typedef struct _VIOINTENSITY { /* vioint */ ! 304: USHORT cb; ! 305: USHORT type; ! 306: USHORT fs; ! 307: }VIOINTENSITY; ! 308: typedef VIOINTENSITY far *PVIOINTENSITY; ! 309: ! 310: USHORT APIENTRY VioGetState ( PVOID, HVIO ); ! 311: USHORT APIENTRY VioSetState ( PVOID, HVIO ); ! 312: ! 313: #endif /* INCL_VIO */ ! 314: ! 315: #ifdef INCL_MOU ! 316: ! 317: typedef SHANDLE HMOU; ! 318: typedef HMOU far * PHMOU; ! 319: ! 320: USHORT APIENTRY MouRegister ( PSZ, PSZ, ULONG ); ! 321: ! 322: USHORT APIENTRY MouDeRegister ( void ); ! 323: ! 324: USHORT APIENTRY MouFlushQue ( HMOU ); ! 325: ! 326: #define MHK_BUTTON1 0x0001 ! 327: #define MHK_BUTTON2 0x0002 ! 328: #define MHK_BUTTON3 0x0004 ! 329: ! 330: USHORT APIENTRY MouGetHotKey ( PUSHORT, HMOU ); ! 331: USHORT APIENTRY MouSetHotKey ( PUSHORT, HMOU ); ! 332: ! 333: /* structure for MouGet/SetPtrPos() */ ! 334: typedef struct _PTRLOC { /* moupl */ ! 335: USHORT row; ! 336: USHORT col; ! 337: } PTRLOC; ! 338: typedef PTRLOC far *PPTRLOC; ! 339: ! 340: USHORT APIENTRY MouGetPtrPos ( PPTRLOC, HMOU ); ! 341: USHORT APIENTRY MouSetPtrPos ( PPTRLOC, HMOU ); ! 342: ! 343: /* structure for MouGet/SetPtrShape() */ ! 344: typedef struct _PTRSHAPE { /* moups */ ! 345: USHORT cb; ! 346: USHORT col; ! 347: USHORT row; ! 348: USHORT colHot; ! 349: USHORT rowHot; ! 350: } PTRSHAPE; ! 351: typedef PTRSHAPE far *PPTRSHAPE; ! 352: ! 353: USHORT APIENTRY MouSetPtrShape ( PBYTE, PPTRSHAPE, HMOU ); ! 354: USHORT APIENTRY MouGetPtrShape ( PBYTE, PPTRSHAPE, HMOU ); ! 355: ! 356: USHORT APIENTRY MouGetDevStatus ( PUSHORT, HMOU ); ! 357: ! 358: USHORT APIENTRY MouGetNumButtons ( PUSHORT, HMOU ); ! 359: USHORT APIENTRY MouGetNumMickeys ( PUSHORT, HMOU ); ! 360: ! 361: /* structure for MouReadEventQue() */ ! 362: typedef struct _MOUEVENTINFO { /* mouev */ ! 363: USHORT fs; ! 364: ULONG time; ! 365: USHORT row; ! 366: USHORT col; ! 367: }MOUEVENTINFO; ! 368: typedef MOUEVENTINFO far *PMOUEVENTINFO; ! 369: ! 370: USHORT APIENTRY MouReadEventQue ( PMOUEVENTINFO, PUSHORT, HMOU ); ! 371: ! 372: /* structure for MouGetNumQueEl() */ ! 373: typedef struct _MOUQUEINFO { /* mouqi */ ! 374: USHORT cEvents; ! 375: USHORT cmaxEvents; ! 376: } MOUQUEINFO; ! 377: typedef MOUQUEINFO far *PMOUQUEINFO; ! 378: ! 379: USHORT APIENTRY MouGetNumQueEl ( PMOUQUEINFO, HMOU ); ! 380: ! 381: USHORT APIENTRY MouGetEventMask ( PUSHORT, HMOU ); ! 382: USHORT APIENTRY MouSetEventMask ( PUSHORT, HMOU ); ! 383: ! 384: /* structure for MouGet/SetScaleFact() */ ! 385: typedef struct _SCALEFACT { /* mousc */ ! 386: USHORT rowScale; ! 387: USHORT colScale; ! 388: } SCALEFACT; ! 389: typedef SCALEFACT far *PSCALEFACT; ! 390: ! 391: USHORT APIENTRY MouGetScaleFact ( PSCALEFACT, HMOU ); ! 392: USHORT APIENTRY MouSetScaleFact ( PSCALEFACT, HMOU ); ! 393: ! 394: USHORT APIENTRY MouOpen ( PSZ, PHMOU ); ! 395: USHORT APIENTRY MouClose ( HMOU ); ! 396: ! 397: /* structure for MouRemovePtr() */ ! 398: typedef struct _NOPTRRECT { /* mourt */ ! 399: USHORT row; ! 400: USHORT col; ! 401: USHORT cRow; /* spec says this is a coordinate, not a cx */ ! 402: USHORT cCol; ! 403: } NOPTRRECT; ! 404: typedef NOPTRRECT far *PNOPTRRECT; ! 405: ! 406: USHORT APIENTRY MouRemovePtr ( PNOPTRRECT, HMOU ); ! 407: ! 408: USHORT APIENTRY MouDrawPtr ( HMOU ); ! 409: ! 410: #define MOU_NODRAW 0x0001 ! 411: #define MOU_DRAW 0x0000 ! 412: #define MOU_MICKEYS 0x0002 ! 413: #define MOU_PELS 0x0000 ! 414: ! 415: USHORT APIENTRY MouSetDevStatus ( PUSHORT, HMOU ); ! 416: USHORT APIENTRY MouInitReal ( PSZ ); ! 417: ! 418: #endif /* INCL_MOU */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.