Annotation of pmsdk/include/pmord.h, revision 1.1.1.2
1.1.1.2 ! root 1: /****************************** Module Header ******************************\
! 2: *
! 3: * Module Name: PMORD.H
! 4: *
! 5: * This is the include file which defines all the structures and constants
! 6: * that can be used to build or intepret GOCA orders for the GPI
! 7: *
! 8: * Copyright (c) 1989 Microsoft Corporation
! 9: *
! 10: * ==========================================================================
! 11: *
! 12: * The orders fall into 4 categories :-
! 13: *
! 14: * 1) 1-byte orders
! 15: *
! 16: * 2) 2-byte orders - second byte contains the value
! 17: *
! 18: * 3) Long orders - second byte gives the order length, subsequent bytes
! 19: * contain the values (up to 256 bytes long)
! 20: *
! 21: * 4) Very long orders - third and fourth bytes gives the order length,
! 22: * subsequent bytes contain the values (up to 64K long)
! 23: *
! 24: \***************************************************************************/
! 25:
! 26: /***************************************************************************\
! 27: *
! 28: * Miscellaneous structures used in this file
! 29: *
! 30: \***************************************************************************/
! 31:
! 32: /* form of RECTL with shorts instead of longs */
! 33: typedef struct _RECT1S { /* rcs */
! 34: SHORT xLeft;
! 35: SHORT yBottom;
! 36: SHORT xRight;
! 37: SHORT yTop;
! 38: } RECT1S;
! 39:
! 40: /* form of POINTL with 1 byte offsets instead of longs */
! 41: typedef struct _ODPOINT { /* odpt */
! 42: CHAR dx;
! 43: CHAR dy;
! 44: } ODPOINT;
! 45:
! 46: /* form of SIZEL with shorts instead of longs */
! 47: typedef struct _SIZES { /* sizs */
! 48: SHORT cx;
! 49: SHORT cy;
! 50: } SIZES;
! 51:
! 52: /* unsigned two-byte swapped integer */
! 53: typedef struct _SWPUSHORT { /* swpus */
! 54: UCHAR HiByte;
! 55: UCHAR LoByte;
! 56: } SWPUSHORT;
! 57:
! 58: /***************************************************************************\
! 59: *
! 60: * 1-byte orders
! 61: *
! 62: \***************************************************************************/
! 63:
! 64: /* macro to tell whether this is a 1-byte order */
! 65: #define BYTE_ORDER(oc) ((oc)==OCODE_GNOP1 || (oc)==OCODE_GESD)
! 66:
! 67: /* 1-byte order codes */
! 68: #define OCODE_GNOP1 0x00 /* No-operation */
! 69: #define OCODE_GESD 0xFF /* End symbol definition */
! 70:
! 71: /***************************************************************************\
! 72: *
! 73: * 2-byte orders
! 74: *
! 75: \***************************************************************************/
! 76:
! 77: /* definitions to help determine whether an order code is a 2-byte order */
! 78: #define OCODE2_1 0x80
! 79: #define OCODE2_2 0x88
! 80:
! 81: #define SHORT_ORDER(oc) ((((oc)^OCODE2_1)&OCODE2_2)==OCODE2_2)
! 82:
! 83: /* General 2-byte order structure */
! 84: typedef struct _ORDER { /* ord */
! 85: UCHAR idCode;
! 86: UCHAR uchData;
! 87: } ORDER;
! 88:
! 89: /* 2-byte order codes */
! 90: #define OCODE_GBAR 0x68 /* Begin area */
! 91: #define OCODE_GCFIG 0x7D /* Close figure */
! 92: #define OCODE_GEEL 0x49 /* End element */
! 93: #define OCODE_GEPTH 0x7F /* End path */
! 94: #define OCODE_GEPROL 0x3E /* End prologue */
! 95: #define OCODE_GPOP 0x3F /* Pop */
! 96: #define OCODE_GSBMX 0x0D /* Set background mix */
! 97: #define OCODE_GPSBMX 0x4D /* Push & set b/g mix */
! 98: #define OCODE_GSCD 0x3A /* Set char direction */
! 99: #define OCODE_GPSCD 0x7A /* Push & set char direction */
! 100: #define OCODE_GSCR 0x39 /* Set char precision */
! 101: #define OCODE_GPSCR 0x79 /* Push & set char precision */
! 102: #define OCODE_GSCS 0x38 /* Set char set */
! 103: #define OCODE_GPSCS 0x78 /* Push & set char set */
! 104: #define OCODE_GSCOL 0x0A /* Set color */
! 105: #define OCODE_GPSCOL 0x4A /* Push & set color */
! 106: #define OCODE_GSLE 0x1A /* Set line end */
! 107: #define OCODE_GPSLE 0x5A /* Push & set line end */
! 108: #define OCODE_GSLJ 0x1B /* Set line join */
! 109: #define OCODE_GPSLJ 0x5B /* Push & set line join */
! 110: #define OCODE_GSLT 0x18 /* Set line type */
! 111: #define OCODE_GPSLT 0x58 /* Push & set line type */
! 112: #define OCODE_GSLW 0x19 /* Set line width */
! 113: #define OCODE_GPSLW 0x59 /* Push & set line width */
! 114: #define OCODE_GSMP 0x3B /* Set marker precision */
! 115: #define OCODE_GPSMP 0x7B /* Push & set marker precision */
! 116: #define OCODE_GSMS 0x3C /* Set marker set */
! 117: #define OCODE_GPSMS 0x7C /* Push & set marker set */
! 118: #define OCODE_GSMT 0x29 /* Set marker symbol */
! 119: #define OCODE_GPSMT 0x69 /* Push & set marker symbol */
! 120: #define OCODE_GSMX 0x0C /* Set mix */
! 121: #define OCODE_GPSMX 0x4C /* Push & set mix */
! 122: #define OCODE_GSPS 0x08 /* Set pattern set */
! 123: #define OCODE_GPSPS 0x48 /* Push & set pattern set */
! 124: #define OCODE_GSPT 0x28 /* Set pattern symbol */
! 125: #define OCODE_GPSPT 0x09 /* Push & set pattern symbol */
! 126:
! 127: /* constants for 2-byte orders */
! 128:
! 129: /* Begin area */
! 130: #define GBAR_RESERVED 0x80
! 131: #define GBAR_BOUNDARY 0xC0
! 132: #define GBAR_NOBOUNDARY 0x80
! 133: #define GBAR_WINDING 0xA0
! 134: #define GBAR_ALTERNATE 0x80
! 135:
! 136: /* Set Character Precision */
! 137: #define GSCR_PRECISION 0x0F
! 138:
! 139: /***************************************************************************\
! 140: *
! 141: * Long orders
! 142: *
! 143: \***************************************************************************/
! 144:
! 145: /* definitions to help determine whether an order code is a long order */
! 146:
! 147: #define OCODE_VLONG 0xFE
! 148:
! 149: #define LONG_ORDER(oc) (!((oc)==OCODE_VLONG||BYTE_ORDER(oc)||SHORT_ORDER(oc)))
! 150:
! 151: /* long order structure */
! 152: #define LORDER_ML 253
! 153: typedef struct _LORDER { /* lord */
! 154: UCHAR idCode;
! 155: UCHAR uchLength;
! 156: UCHAR uchData[LORDER_ML];
! 157: } LORDER;
! 158:
! 159: /* LoNg orders fe � ��ʜ��@�����&