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

📄 pmwin.mh

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

:include readonly.sp
:include cpluspro.sp

#define INCL_WININCLUDED

#ifdef INCL_WIN
    #define INCL_WINACCELERATORS
    #define INCL_WINATOM
    #define INCL_WINBUTTONS
    #define INCL_WINCLIPBOARD
    #define INCL_WINCOUNTRY
    #define INCL_WINCURSORS
    #define INCL_WINDDE
    #define INCL_WINDIALOGS
    #define INCL_WINDESKTOP
    #define INCL_WINENTRYFIELDS
    #define INCL_WINERRORS
    #define INCL_WINFRAMECTLS
    #define INCL_WINFRAMEMGR
    #define INCL_WINHELP
    #define INCL_WINHOOKS
    #define INCL_WININPUT
    #define INCL_WINLISTBOXES
    #define INCL_WINLOAD
    #define INCL_WINMENUS
    #define INCL_WINMESSAGEMGR
    #define INCL_WINMLE
    #define INCL_WINPALETTE
    #define INCL_WINPOINTERS
    #define INCL_WINPROGRAMLIST
    #define INCL_WINRECTANGLES
    #define INCL_WINSCROLLBARS
    #define INCL_WINSEI
    #define INCL_WINSHELLDATA
    #define INCL_WINSTATICS
    #define INCL_WINSTDDLGS
    #define INCL_WINSWITCHLIST
    #define INCL_WINSYS
    #define INCL_WINTIMER
    #define INCL_WINTRACKRECT
    #define INCL_WINTYPES
    #define INCL_WINWINDOWMGR
    #define INCL_WINTHUNKAPI
#else
  #ifdef RC_INVOKED
    #define INCL_WINACCELERATORS
    #define INCL_WINBUTTONS
    #define INCL_WINDIALOGS
    #define INCL_WINENTRYFIELDS
    #define INCL_WINFRAMECTLS
    #define INCL_WINFRAMEMGR
    #define INCL_WINHELP
    #define INCL_WININPUT
    #define INCL_WINLISTBOXES
    #define INCL_WINMENUS
    #define INCL_WINMESSAGEMGR
    #define INCL_WINMLE
    #define INCL_WINPOINTERS
    #define INCL_WINSCROLLBARS
    #define INCL_WINSTATICS
    #define INCL_WINSTDDLGS
    #define INCL_WINSYS
  #endif
#endif

#ifdef INCL_ERRORS
  #define INCL_WINERRORS
#endif

#define MPVOID              ((MPARAM)0)
#define MPFROMP(p)          ((MPARAM)(VOID *)(p))
#define MPFROMHWND(hwnd)    ((MPARAM)(HWND)(hwnd))
#define MPFROMCHAR(ch)      ((MPARAM)(USHORT)(ch))
#define MPFROMSHORT(s)      ((MPARAM)(USHORT)(s))
#define MPFROM2SHORT(s1, s2)((MPARAM)MAKELONG(s1, s2))
#define MPFROMSH2CH(s, uch1, uch2)   ((MPARAM)MAKELONG(s, MAKESHORT(uch1, uch2)))
#define MPFROMLONG(l)       ((MPARAM)(ULONG)(l))
#define PVOIDFROMMP(mp)     ((VOID *)(mp))
#define HWNDFROMMP(mp)      ((HWND)(mp))
#define CHAR1FROMMP(mp)     ((UCHAR)(mp))
#define CHAR2FROMMP(mp)     ((UCHAR)((ULONG)mp >> 8))
#define CHAR3FROMMP(mp)     ((UCHAR)((ULONG)mp >> 16))
#define CHAR4FROMMP(mp)     ((UCHAR)((ULONG)mp >> 24))
#define SHORT1FROMMP(mp)    ((USHORT)(ULONG)(mp))
#define SHORT2FROMMP(mp)    ((USHORT)((ULONG)mp >> 16))
#define LONGFROMMP(mp)      ((ULONG)(mp))
#define MRFROMP(p)          ((MRESULT)(VOID *)(p))
#define MRFROMSHORT(s)      ((MRESULT)(USHORT)(s))
#define MRFROM2SHORT(s1, s2)((MRESULT)MAKELONG(s1, s2))
#define MRFROMLONG(l)       ((MRESULT)(ULONG)(l))
#define PVOIDFROMMR(mr)     ((VOID *)(mr))
#define SHORT1FROMMR(mr)    ((USHORT)((ULONG)mr))
#define SHORT2FROMMR(mr)    ((USHORT)((ULONG)mr >> 16))
#define LONGFROMMR(mr)      ((ULONG)(mr))

#define HWND_DESKTOP       (HWND)1
#define HWND_OBJECT        (HWND)2
#define HWND_TOP           (HWND)3
#define HWND_BOTTOM        (HWND)4
#define HWND_THREADCAPTURE (HWND)5

#define WC_FRAME           ((PSZ)0xffff0001)
#define WC_COMBOBOX        ((PSZ)0xffff0002)
#define WC_BUTTON          ((PSZ)0xffff0003)
#define WC_MENU            ((PSZ)0xffff0004)
#define WC_STATIC          ((PSZ)0xffff0005)
#define WC_ENTRYFIELD      ((PSZ)0xffff0006)
#define WC_LISTBOX         ((PSZ)0xffff0007)
#define WC_SCROLLBAR       ((PSZ)0xffff0008)
#define WC_TITLEBAR        ((PSZ)0xffff0009)
#define WC_MLE             ((PSZ)0xffff000A)
#define WC_APPSTAT         ((PSZ)0xffff0010)
#define WC_KBDSTAT         ((PSZ)0xffff0011)
#define WC_PECIC           ((PSZ)0xffff0012)
#define WC_DBE_KKPOPUP     ((PSZ)0xffff0013)
#define WC_SPINBUTTON      ((PSZ)0xffff0020)
#define WC_CONTAINER       ((PSZ)0xffff0025)
#define WC_SLIDER          ((PSZ)0xffff0026)
#define WC_VALUESET        ((PSZ)0xffff0027)
#define WC_NOTEBOOK        ((PSZ)0xffff0028)
#define WC_PENFIRST        ((PSZ)0xffff0029)
#define WC_PENLAST         ((PSZ)0xffff002C)
#define WC_MMPMFIRST       ((PSZ)0xffff0040)
#define WC_CIRCULARSLIDER  ((PSZ)0xffff0041)
#define WC_MMPMLAST        ((PSZ)0xffff004f)
#define WC_PRISTDDLGFIRST  ((PSZ)0xffff0050)
#define WC_PRISTDDLGLAST   ((PSZ)0xffff0057)
#define WC_PUBSTDDLGFIRST  ((PSZ)0xffff0058)
#define WC_PUBSTDDLGLAST   ((PSZ)0xffff005f)

#define WS_VISIBLE         0x80000000
#define WS_DISABLED        0x40000000
#define WS_CLIPCHILDREN    0x20000000
#define WS_CLIPSIBLINGS    0x10000000
#define WS_PARENTCLIP      0x08000000
#define WS_SAVEBITS        0x04000000
#define WS_SYNCPAINT       0x02000000
#define WS_MINIMIZED       0x01000000
#define WS_MAXIMIZED       0x00800000
#define WS_ANIMATE         0x00400000

#define WS_GROUP           0x00010000
#define WS_TABSTOP         0x00020000
#define WS_MULTISELECT     0x00040000

#define CS_MOVENOTIFY      0x00000001
#define CS_SIZEREDRAW      0x00000004
#define CS_HITTEST         0x00000008
#define CS_PUBLIC          0x00000010
#define CS_FRAME           0x00000020
#define CS_SYNCPAINT       0x02000000
#define CS_SAVEBITS        0x04000000
#define CS_PARENTCLIP      0x08000000
#define CS_CLIPSIBLINGS    0x10000000
#define CS_CLIPCHILDREN    0x20000000

typedef LHANDLE HACCEL;

typedef HMODULE  HLIB;
typedef PHMODULE PHLIB;

typedef MRESULT (APIENTRY FNWP)(HWND,ULONG,MPARAM,MPARAM);
typedef FNWP *PFNWP;

typedef struct _MATRIXLF {
    FIXED fxM11;
    FIXED fxM12;
    LONG  lM13;
    FIXED fxM21;
    FIXED fxM22;
    LONG  lM23;
    LONG  lM31;
    LONG  lM32;
    LONG  lM33;
} MATRIXLF, *PMATRIXLF;

typedef struct _POINTL {
    LONG  x;
    LONG  y;
} POINTL, *PPOINTL;

typedef struct _POINTS {
    SHORT x;
    SHORT y;
} POINTS, *PPOINTS;

typedef struct _RECTL {
    LONG xLeft;
    LONG yBottom;
    LONG xRight;
    LONG yTop;
} RECTL, *PRECTL;

typedef struct _FATTRS {
    USHORT usRecordLength;
    USHORT fsSelection;
    LONG   lMatch;
    CHAR   szFacename[FACESIZE];
    USHORT idRegistry;
    USHORT usCodePage;
    LONG   lMaxBaselineExt;
    LONG   lAveCharWidth;
    USHORT fsType;
    USHORT fsFontUse;
} FATTRS, *PFATTRS;

typedef struct _PANOSE {
    BYTE bFamilyType;
    BYTE bSerifStyle;
    BYTE bWeight;
    BYTE bProportion;
    BYTE bContrast;
    BYTE bStrokeVariation;
    BYTE bArmStyle;
    BYTE bLetterform;
    BYTE bMidline;
    BYTE bXHeight;
    BYTE fbPassedISO;
    BYTE fbFailedISO;
} PANOSE, *PPANOSE;

typedef struct _FONTMETRICS {
    CHAR   szFamilyname[FACESIZE];
    CHAR   szFacename[FACESIZE];
    USHORT idRegistry;
    USHORT usCodePage;
    LONG   lEmHeight;
    LONG   lXHeight;
    LONG   lMaxAscender;
    LONG   lMaxDescender;
    LONG   lLowerCaseAscent;
    LONG   lLowerCaseDescent;
    LONG   lInternalLeading;
    LONG   lExternalLeading;
    LONG   lAveCharWidth;
    LONG   lMaxCharInc;
    LONG   lEmInc;
    LONG   lMaxBaselineExt;
    SHORT  sCharSlope;
    SHORT  sInlineDir;
    SHORT  sCharRot;
    USHORT usWeightClass;
    USHORT usWidthClass;
    SHORT  sXDeviceRes;
    SHORT  sYDeviceRes;
    SHORT  sFirstChar;
    SHORT  sLastChar;
    SHORT  sDefaultChar;
    SHORT  sBreakChar;
    SHORT  sNominalPointSize;
    SHORT  sMinimumPointSize;
    SHORT  sMaximumPointSize;
    USHORT fsType;
    USHORT fsDefn;
    USHORT fsSelection;
    USHORT fsCapabilities;
    LONG   lSubscriptXSize;
    LONG   lSubscriptYSize;
    LONG   lSubscriptXOffset;
    LONG   lSubscriptYOffset;
    LONG   lSuperscriptXSize;
    LONG   lSuperscriptYSize;
    LONG   lSuperscriptXOffset;
    LONG   lSuperscriptYOffset;
    LONG   lUnderscoreSize;
    LONG   lUnderscorePosition;
    LONG   lStrikeoutSize;
    LONG   lStrikeoutPosition;
    SHORT  sKerningPairs;
    SHORT  sFamilyClass;
    LONG   lMatch;
    LONG   FamilyNameAtom;
    LONG   FaceNameAtom;
    PANOSE panose;
} FONTMETRICS, *PFONTMETRICS;

#ifdef INCL_WINATOM

#define MAKEINTATOM(a)  ((PCH)MAKEULONG(a,0xffff))

typedef ULONG ATOM;
typedef LHANDLE HATOMTBL;

ATOM     APIENTRY WinAddAtom(HATOMTBL,PCSZ);
HATOMTBL APIENTRY WinCreateAtomTable(ULONG,ULONG);
ATOM     APIENTRY WinDeleteAtom(HATOMTBL,ATOM);
HATOMTBL APIENTRY WinDestroyAtomTable(HATOMTBL);
ATOM     APIENTRY WinFindAtom(HATOMTBL,PCSZ);
ULONG    APIENTRY WinQueryAtomLength(HATOMTBL,ATOM);
ULONG    APIENTRY WinQueryAtomName(HATOMTBL,ATOM,PCSZ,ULONG);
ULONG    APIENTRY WinQueryAtomUsage(HATOMTBL,ATOM);
HATOMTBL APIENTRY WinQuerySystemAtomTable(VOID);

#endif

#ifdef INCL_WINBUTTONS

#define BS_PUSHBUTTON          0
#define BS_CHECKBOX            1
#define BS_AUTOCHECKBOX        2
#define BS_RADIOBUTTON         3
#define BS_AUTORADIOBUTTON     4
#define BS_3STATE              5
#define BS_AUTO3STATE          6
#define BS_USERBUTTON          7
#define BS_NOTEBOOKBUTTON      8
#define BS_PRIMARYSTYLES  0x000F

#define BS_TEXT           0x0010
#define BS_MINIICON       0x0020
#define BS_BITMAP         0x0040
#define BS_ICON           0x0080
#define BS_HELP           0x0100
#define BS_SYSCOMMAND     0x0200
#define BS_DEFAULT        0x0400
#define BS_NOPOINTERFOCUS 0x0800
#define BS_NOBORDER       0x1000
#define BS_NOCURSORSELECT 0x2000
#define BS_AUTOSIZE       0x4000

#define BN_CLICKED    1
#define BN_DBLCLICKED 2
#define BN_PAINT      3

#define BDS_HILITED  0x0100
#define BDS_DISABLED 0x0200
#define BDS_DEFAULT  0x0400

#define BM_CLICK           0x0120
#define BM_QUERYCHECKINDEX 0x0121
#define BM_QUERYHILITE     0x0122
#define BM_SETHILITE       0x0123
#define BM_QUERYCHECK      0x0124
#define BM_SETCHECK        0x0125
#define BM_SETDEFAULT      0x0126
#define BM_AUTOSIZE        0x0128

#pragma pack(2)

typedef struct _BTNCDATA {
    USHORT  cb;
    USHORT  fsCheckState;
    USHORT  fsHiliteState;
    LHANDLE hImage;
} BTNCDATA, *PBTNCDATA;

#pragma pack()

typedef struct _USERBUTTON {
    HWND  hwnd;
    HPS   hps;
    ULONG fsState;
    ULONG fsStateOld;
} USERBUTTON, *PUSERBUTTON;

#endif

#ifdef INCL_WINCLIPBOARD

#define CF_TEXT         1
#define CF_BITMAP       2
#define CF_DSPTEXT      3
#define CF_DSPBITMAP    4
#define CF_METAFILE     5
#define CF_DSPMETAFILE  6
#define CF_PALETTE      9
#define CF_MMPMFIRST   10
#define CF_MMPMLAST    19

#define CFI_OWNERFREE    0x0001
#define CFI_OWNERDISPLAY 0x0002
#define CFI_POINTER      0x0400
#define CFI_HANDLE       0x0200

#define WM_RENDERFMT        0x0060
#define WM_RENDERALLFMTS    0x0061
#define WM_DESTROYCLIPBOARD 0x0062
#define WM_PAINTCLIPBOARD   0x0063
#define WM_SIZECLIPBOARD    0x0064
#define WM_HSCROLLCLIPBOARD 0x0065
#define WM_VSCROLLCLIPBOARD 0x0066
#define WM_DRAWCLIPBOARD    0x0067

BOOL   APIENTRY WinCloseClipbrd(HAB);
BOOL   APIENTRY WinEmptyClipbrd(HAB);
BOOL   APIENTRY WinOpenClipbrd(HAB);
ULONG  APIENTRY WinQueryClipbrdData(HAB,ULONG);
BOOL   APIENTRY WinQueryClipbrdFmtInfo(HAB,ULONG,PULONG);
HWND   APIENTRY WinQueryClipbrdOwner(HAB);
HWND   APIENTRY WinQueryClipbrdViewer(HAB);
BOOL   APIENTRY WinSetClipbrdData(HAB,ULONG,ULONG,ULONG);
BOOL   APIENTRY WinSetClipbrdOwner(HAB,HWND);
BOOL   APIENTRY WinSetClipbrdViewer(HAB,HWND);

#endif

#if defined(INCL_WINCURSORS) || !defined(INCL_NOCOMMON)

#define CURSOR_SOLID      0x0000
#define CURSOR_HALFTONE   0x0001
#define CURSOR_FRAME      0x0002
#define CURSOR_FLASH      0x0004
#define CURSOR_SETPOS     0x8000
#define CURSOR_BIDI_FIRST 0x0100
#define CURSOR_BIDI_LAST  0x0200

BOOL   APIENTRY WinCreateCursor(HWND,LONG,LONG,LONG,LONG,ULONG,PRECTL);
BOOL   APIENTRY WinDestroyCursor(HWND);
BOOL   APIENTRY WinShowCursor(HWND,BOOL);

#endif

#ifdef INCL_WINCURSORS

typedef struct _CURSORINFO {
    HWND  hwnd;
    LONG  x;
    LONG  y;
    LONG  cx;
    LONG  cy;
    ULONG fs;
    RECTL rclClip;
} CURSORINFO, *PCURSORINFO;

BOOL   APIENTRY WinQueryCursorInfo(HWND,PCURSORINFO);

⌨️ 快捷键说明

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