📄 pmgpi.mh
字号:
/*
* pmgpi.h OS/2 Graphics Programming Interface include file
* for 32-bit development.
*
:include crwatcnt.sp
*/
:include readonly.sp
:include cpluspro.sp
#define INCL_GPIINCLUDED
#ifdef INCL_GPI
#define INCL_GPIBITMAPS
#define INCL_GPICONTROL
#define INCL_GPICORRELATION
#define INCL_GPIDEFAULTS
#define INCL_GPILCIDS
#define INCL_GPILOGCOLORTABLE
#define INCL_GPIMETAFILES
#define INCL_GPIPATHS
#define INCL_GPIPOLYGON
#define INCL_GPIPRIMITIVES
#define INCL_GPIREGIONS
#define INCL_GPITRANSFORMS
#define INCL_GPISEGMENTS
#endif
#define GPI_ERROR 0
#define GPI_OK 1
#define GPI_ALTERROR (-1)
#define CLR_NOINDEX (-254)
#define FIXEDINT(fx) ((SHORT)HIUSHORT(fx))
#define FIXEDFRAC(fx) (LOUSHORT(fx))
#define MAKEFIXED(intpart,fractpart) MAKELONG(fractpart,intpart)
typedef struct _SIZEL {
LONG cx;
LONG cy;
} SIZEL, *PSIZEL;
#if defined(INCL_GPIBITMAPS) || !defined(INCL_NOCOMMON)
#define ROP_SRCCOPY 0x00CC
#define ROP_SRCPAINT 0x00EE
#define ROP_SRCAND 0x0088
#define ROP_SRCINVERT 0x0066
#define ROP_SRCERASE 0x0044
#define ROP_NOTSRCCOPY 0x0033
#define ROP_NOTSRCERASE 0x0011
#define ROP_MERGECOPY 0x00C0
#define ROP_MERGEPAINT 0x00BB
#define ROP_PATCOPY 0x00F0
#define ROP_PATPAINT 0x00FB
#define ROP_PATINVERT 0x005A
#define ROP_DSTINVERT 0x0055
#define ROP_ZERO 0x0000
#define ROP_ONE 0x00FF
#define BBO_OR 0
#define BBO_AND 1
#define BBO_IGNORE 2
#define BBO_PAL_COLORS 4
#define BBO_NO_COLOR_INFO 8
#define FF_BOUNDARY 0
#define FF_SURFACE 1
#define HBM_ERROR ((HBITMAP)-1)
LONG APIENTRY GpiBitBlt(HPS,HPS,LONG,PPOINTL,LONG,ULONG);
BOOL APIENTRY GpiDeleteBitmap(HBITMAP);
HBITMAP APIENTRY GpiLoadBitmap(HPS,HMODULE,ULONG,LONG,LONG);
HBITMAP APIENTRY GpiSetBitmap(HPS,HBITMAP);
LONG APIENTRY GpiWCBitBlt(HPS,HBITMAP,LONG,PPOINTL,LONG,ULONG);
#endif
#if defined(INCL_GPIBITMAPS)
#define CBM_INIT 4
#define BCA_UNCOMP 0
#define BCA_HUFFMAN1D 3
#define BCA_RLE4 2
#define BCA_RLE8 1
#define BCA_RLE24 4
#define BRU_METRIC 0
#define BRA_BOTTOMUP 0
#define BRH_NOTHALFTONED 0
#define BRH_ERRORDIFFUSION 1
#define BRH_PANDA 2
#define BRH_SUPERCIRCLE 3
#define BCE_PALETTE (-1)
#define BCE_RGB 0
#define BFT_ICON 0x4349
#define BFT_BMAP 0x4d42
#define BFT_POINTER 0x5450
#define BFT_COLORICON 0x4943
#define BFT_COLORPOINTER 0x5043
#define BFT_BITMAPARRAY 0x4142
#define BMB_ERROR (-1)
#pragma pack(1)
typedef struct _RGB {
BYTE bBlue;
BYTE bGreen;
BYTE bRed;
} RGB;
typedef struct _RGB2 {
BYTE bBlue;
BYTE bGreen;
BYTE bRed;
BYTE fcOptions;
} RGB2, *PRGB2;
typedef struct _BITMAPINFO {
ULONG cbFix;
USHORT cx;
USHORT cy;
USHORT cPlanes;
USHORT cBitCount;
RGB argbColor[1];
} BITMAPINFO, *PBITMAPINFO;
typedef struct _BITMAPINFO2 {
ULONG cbFix;
ULONG cx;
ULONG cy;
USHORT cPlanes;
USHORT cBitCount;
ULONG ulCompression;
ULONG cbImage;
ULONG cxResolution;
ULONG cyResolution;
ULONG cclrUsed;
ULONG cclrImportant;
USHORT usUnits;
USHORT usReserved;
USHORT usRecording;
USHORT usRendering;
ULONG cSize1;
ULONG cSize2;
ULONG ulColorEncoding;
ULONG ulIdentifier;
RGB2 argbColor[1];
} BITMAPINFO2, *PBITMAPINFO2;
typedef struct _BITMAPINFOHEADER {
ULONG cbFix;
USHORT cx;
USHORT cy;
USHORT cPlanes;
USHORT cBitCount;
} BITMAPINFOHEADER, *PBITMAPINFOHEADER;
typedef struct _BITMAPINFOHEADER2 {
ULONG cbFix;
ULONG cx;
ULONG cy;
USHORT cPlanes;
USHORT cBitCount;
ULONG ulCompression;
ULONG cbImage;
ULONG cxResolution;
ULONG cyResolution;
ULONG cclrUsed;
ULONG cclrImportant;
USHORT usUnits;
USHORT usReserved;
USHORT usRecording;
USHORT usRendering;
ULONG cSize1;
ULONG cSize2;
ULONG ulColorEncoding;
ULONG ulIdentifier;
} BITMAPINFOHEADER2, *PBITMAPINFOHEADER2;
typedef struct _BITMAPFILEHEADER {
USHORT usType;
ULONG cbSize;
SHORT xHotspot;
SHORT yHotspot;
ULONG offBits;
BITMAPINFOHEADER bmp;
} BITMAPFILEHEADER, *PBITMAPFILEHEADER;
typedef struct _BITMAPARRAYFILEHEADER {
USHORT usType;
ULONG cbSize;
ULONG offNext;
USHORT cxDisplay;
USHORT cyDisplay;
BITMAPFILEHEADER bfh;
} BITMAPARRAYFILEHEADER, *PBITMAPARRAYFILEHEADER;
typedef struct _BITMAPFILEHEADER2 {
USHORT usType;
ULONG cbSize;
SHORT xHotspot;
SHORT yHotspot;
ULONG offBits;
BITMAPINFOHEADER2 bmp2;
} BITMAPFILEHEADER2, *PBITMAPFILEHEADER2;
typedef struct _BITMAPARRAYFILEHEADER2 {
USHORT usType;
ULONG cbSize;
ULONG offNext;
USHORT cxDisplay;
USHORT cyDisplay;
BITMAPFILEHEADER2 bfh2;
} BITMAPARRAYFILEHEADER2, *PBITMAPARRAYFILEHEADER2;
#pragma pack()
HBITMAP APIENTRY GpiCreateBitmap(HPS,PBITMAPINFOHEADER2,ULONG,PBYTE,PBITMAPINFO2);
LONG APIENTRY GpiFloodFill(HPS,LONG,LONG);
LONG APIENTRY GpiQueryBitmapBits(HPS,LONG,LONG,PBYTE,PBITMAPINFO2);
BOOL APIENTRY GpiQueryBitmapDimension(HBITMAP,PSIZEL);
HBITMAP APIENTRY GpiQueryBitmapHandle(HPS,LONG);
BOOL APIENTRY GpiQueryBitmapInfoHeader(HBITMAP,PBITMAPINFOHEADER2);
BOOL APIENTRY GpiQueryBitmapParameters(HBITMAP,PBITMAPINFOHEADER);
BOOL APIENTRY GpiQueryDeviceBitmapFormats(HPS,LONG,PLONG);
LONG APIENTRY GpiQueryPel(HPS,PPOINTL);
LONG APIENTRY GpiSetBitmapBits(HPS,LONG,LONG,PBYTE,PBITMAPINFO2);
BOOL APIENTRY GpiSetBitmapDimension(HBITMAP,PSIZEL);
BOOL APIENTRY GpiSetBitmapId(HPS,HBITMAP,LONG);
LONG APIENTRY GpiSetPel(HPS,PPOINTL);
LONG APIENTRY GpiDrawBits(HPS,PVOID,PBITMAPINFO2,LONG,PPOINTL,LONG,ULONG);
#endif
#if defined(INCL_GPICONTROL) || !defined(INCL_NOCOMMON)
#define PU_ARBITRARY 0x0004
#define PU_PELS 0x0008
#define PU_LOMETRIC 0x000C
#define PU_HIMETRIC 0x0010
#define PU_LOENGLISH 0x0014
#define PU_HIENGLISH 0x0018
#define PU_TWIPS 0x001C
#define GPIF_DEFAULT 0
#define GPIF_SHORT 0x0100
#define GPIF_LONG 0x0200
#define GPIT_NORMAL 0
#define GPIT_MICRO 0x1000
#define GPIT_INK 0x2000
#define GPIA_NOASSOC 0
#define GPIA_ASSOC 0x4000
#define GPIM_AREAEXCL 0x8000
#define HDC_ERROR ((HDC)-1)
BOOL APIENTRY GpiAssociate(HPS,HDC);
HPS APIENTRY GpiCreatePS(HAB,HDC,PSIZEL,ULONG);
BOOL APIENTRY GpiDestroyPS(HPS);
BOOL APIENTRY GpiErase(HPS);
HDC APIENTRY GpiQueryDevice(HPS);
BOOL APIENTRY GpiRestorePS(HPS,LONG);
LONG APIENTRY GpiSavePS(HPS);
#endif
#if defined(INCL_GPICONTROL)
#define DCTL_ERASE 1
#define DCTL_DISPLAY 2
#define DCTL_BOUNDARY 3
#define DCTL_DYNAMIC 4
#define DCTL_CORRELATE 5
#define DCTL_ERROR (-1)
#define DCTL_OFF 0
#define DCTL_ON 1
#define SDW_ERROR (-1)
#define SDW_OFF 0
#define SDW_ON 1
#define GRES_ATTRS 0x0001
#define GRES_SEGMENTS 0x0002
#define GRES_ALL 0x0004
#define PS_UNITS 0x00FC
#define PS_FORMAT 0x0F00
#define PS_TYPE 0x1000
#define PS_MODE 0x2000
#define PS_ASSOCIATE 0x4000
#define PS_NORESET 0x8000
#define GPIE_SEGMENT 0
#define GPIE_ELEMENT 1
#define GPIE_DATA 2
#define DM_ERROR 0
#define DM_DRAW 1
#define DM_RETAIN 2
#define DM_DRAWANDRETAIN 3
LONG APIENTRY GpiQueryDrawControl(HPS,LONG);
LONG APIENTRY GpiQueryDrawingMode(HPS);
ULONG APIENTRY GpiQueryPS(HPS,PSIZEL);
LONG APIENTRY GpiQueryStopDraw(HPS);
BOOL APIENTRY GpiResetPS(HPS,ULONG);
BOOL APIENTRY GpiSetDrawControl(HPS,LONG,LONG);
BOOL APIENTRY GpiSetDrawingMode(HPS,LONG);
BOOL APIENTRY GpiSetPS(HPS,PSIZEL,ULONG);
BOOL APIENTRY GpiSetStopDraw(HPS,LONG);
#endif
#if defined(INCL_GPILCIDS)
#define QF_PUBLIC 1
#define QF_PRIVATE 2
#define QF_NO_GENERIC 4
#define QF_NO_DEVICE 8
#define QFA_PUBLIC 1
#define QFA_PRIVATE 2
#define QFA_ERROR GPI_ALTERROR
#define FONT_IGNORE_FONTRES 1
#define FONT_MATCH_NEAREST 2
#define FONT_DEFAULT 1
#define FONT_MATCH 2
#define LCIDT_FONT 6
#define LCIDT_BITMAP 7
#define LCID_ALL (-1)
#define RC_ATMAVAIL 1
#define RC_ATMENABLED 1
#define RC_TTAVAIL 2
#define RC_TTENABLED 2
#define FWEIGHT_DONT_CARE 0
#define FWEIGHT_ULTRA_LIGHT 1
#define FWEIGHT_EXTRA_LIGHT 2
#define FWEIGHT_LIGHT 3
#define FWEIGHT_SEMI_LIGHT 4
#define FWEIGHT_NORMAL 5
#define FWEIGHT_SEMI_BOLD 6
#define FWEIGHT_BOLD 7
#define FWEIGHT_EXTRA_BOLD 8
#define FWEIGHT_ULTRA_BOLD 9
#define FWIDTH_DONT_CARE 0
#define FWIDTH_ULTRA_CONDENSED 1
#define FWIDTH_EXTRA_CONDENSED 2
#define FWIDTH_CONDENSED 3
#define FWIDTH_SEMI_CONDENSED 4
#define FWIDTH_NORMAL 5
#define FWIDTH_SEMI_EXPANDED 6
#define FWIDTH_EXPANDED 7
#define FWIDTH_EXTRA_EXPANDED 8
#define FWIDTH_ULTRA_EXPANDED 9
#define FTYPE_ITALIC 0x01
#define FTYPE_ITALIC_DONT_CARE 0x02
#define FTYPE_OBLIQUE 0x04
#define FTYPE_OBLIQUE_DONT_CARE 0x08
#define FTYPE_ROUNDED 0x10
#define FTYPE_ROUNDED_DONT_CARE 0x20
typedef struct _KERNINGPAIRS {
SHORT sFirstChar;
SHORT sSecondChar;
LONG lKerningAmount;
} KERNINGPAIRS,*PKERNINGPAIRS;
typedef struct _RASTERIZERCAPS {
ULONG cb;
ULONG ulAvailFlags;
ULONG ulEnabledFlags;
} RASTERIZERCAPS,*PRASTERIZERCAPS;
typedef struct _FACENAMEDESC {
USHORT usSize;
USHORT usWeightClass;
USHORT usWidthClass;
USHORT usReserved;
ULONG flOptions;
} FACENAMEDESC,*PFACENAMEDESC;
typedef CHAR FFDESCS[2][FACESIZE],*PFFDESCS;
typedef struct _FFDESCS2 {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -