Annotation of mstools/h/windef.h, revision 1.1.1.3

1.1       root        1: /*++ BUILD Version: 0001    // Increment this if a change has global effects
                      2: 
                      3: Copyright (c) 1985-91, Microsoft Corporation
                      4: 
                      5: Module Name:
                      6: 
                      7:     windef.h
                      8: 
                      9: Abstract:
                     10: 
                     11:     Type definitions for Windows' basic types.
                     12: 
                     13: --*/
                     14: 
                     15: #ifndef _WINDEF_
                     16: #define _WINDEF_
                     17: 
1.1.1.3 ! root       18: #ifdef __cplusplus
        !            19: extern "C" {
        !            20: #endif
        !            21: 
1.1.1.2   root       22: // the typedef of ULONG should go away here.  It will continue to be
                     23: // defined in windows\inc\windefp.h
                     24: 
                     25: #ifndef BASETYPE_ULONG
                     26: #define BASETYPE_ULONG
                     27: typedef unsigned long ULONG;
                     28: typedef ULONG *PULONG;
                     29: #endif
                     30: 
1.1       root       31: // BASETYPES is defined in ntdef.h if these types are already defined
                     32: 
                     33: #ifndef BASETYPES
                     34: #define BASETYPES
                     35: typedef unsigned short USHORT;
                     36: typedef USHORT *PUSHORT;
                     37: typedef unsigned char UCHAR;
                     38: typedef UCHAR *PUCHAR;
                     39: typedef char *PSZ;
                     40: #endif  // !BASETYPES
                     41: 
                     42: #define MAX_PATH          260
                     43: 
                     44: #ifndef NULL
                     45: #define NULL                0
                     46: #endif
                     47: 
                     48: #ifndef FALSE
                     49: #define FALSE               0
                     50: #endif
                     51: 
                     52: #ifndef TRUE
                     53: #define TRUE                1
                     54: #endif
                     55: 
1.1.1.2   root       56: #ifndef IN
                     57: #define IN
                     58: #endif
                     59: 
                     60: #ifndef OUT
                     61: #define OUT
                     62: #endif
                     63: 
                     64: #ifndef OPTIONAL
                     65: #define OPTIONAL
                     66: #endif
                     67: 
1.1       root       68: #define far
                     69: #define near
                     70: #define pascal
                     71: #ifdef DOSWIN32
                     72: #define cdecl _cdecl
1.1.1.2   root       73: #ifndef CDECL
                     74: #define CDECL _cdecl
                     75: #endif
1.1       root       76: #else
                     77: #define cdecl
1.1.1.2   root       78: #ifndef CDECL
                     79: #define CDECL
1.1       root       80: #endif
1.1.1.2   root       81: #endif
1.1.1.3 ! root       82: 
        !            83: #if (defined(i386) && ((!defined(I386_HOST)) || (I386_HOST != 0))) || \
        !            84:     (!defined(i386) && defined(I386_HOST) && (I386_HOST != 0))
        !            85: #define CALLBACK    __stdcall
        !            86: #define WINAPI      __stdcall
        !            87: #define APIENTRY    WINAPI
        !            88: #define APIPRIVATE  __stdcall
        !            89: #define PASCAL      __stdcall
        !            90: #else
1.1.1.2   root       91: #define CALLBACK
                     92: #define WINAPI
                     93: #define APIENTRY    WINAPI
1.1       root       94: #define APIPRIVATE
1.1.1.3 ! root       95: #define PASCAL              pascal
        !            96: #endif
1.1       root       97: 
                     98: #define FAR                 far
                     99: #define NEAR                near
1.1.1.2   root      100: #ifndef CONST
                    101: #define CONST               const
                    102: #endif
1.1       root      103: 
                    104: typedef unsigned long       DWORD;
                    105: typedef int                 BOOL;
                    106: typedef unsigned char       BYTE;
                    107: typedef unsigned short      WORD;
                    108: typedef float               FLOAT;
                    109: typedef FLOAT               *PFLOAT;
                    110: typedef BOOL near           *PBOOL;
                    111: typedef BOOL far            *LPBOOL;
                    112: typedef BYTE near           *PBYTE;
                    113: typedef BYTE far            *LPBYTE;
                    114: typedef int near            *PINT;
                    115: typedef int far             *LPINT;
                    116: typedef WORD near           *PWORD;
                    117: typedef WORD far            *LPWORD;
                    118: typedef long far            *LPLONG;
                    119: typedef DWORD near          *PDWORD;
                    120: typedef DWORD far           *LPDWORD;
                    121: typedef void far            *LPVOID;
                    122: 
                    123: typedef int                 INT;
                    124: typedef unsigned int        UINT;
                    125: typedef unsigned int        *PUINT;
                    126: 
                    127: #ifndef NT_INCLUDED
                    128: #include <winnt.h>
                    129: #endif // NT_INCLUDED
                    130: 
1.1.1.2   root      131: /* Types use for passing & returning polymorphic values */
                    132: typedef UINT WPARAM;
                    133: typedef LONG LPARAM;
                    134: typedef LONG LRESULT;
                    135: 
1.1       root      136: #ifndef NOMINMAX
                    137: 
                    138: #ifndef max
                    139: #define max(a,b)            (((a) > (b)) ? (a) : (b))
                    140: #endif
                    141: 
                    142: #ifndef min
                    143: #define min(a,b)            (((a) < (b)) ? (a) : (b))
                    144: #endif
                    145: 
                    146: #endif  /* NOMINMAX */
                    147: 
                    148: #define MAKEWORD(a, b)      ((WORD)(((BYTE)(a)) | ((WORD)((BYTE)(b))) << 8))
                    149: #define MAKELONG(a, b)      ((LONG)(((WORD)(a)) | ((DWORD)((WORD)(b))) << 16))
                    150: #define LOWORD(l)           ((WORD)(l))
                    151: #define HIWORD(l)           ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
                    152: #define LOBYTE(w)           ((BYTE)(w))
                    153: #define HIBYTE(w)           ((BYTE)(((WORD)(w) >> 8) & 0xFF))
                    154: 
                    155: 
                    156: #ifndef WIN_INTERNAL
1.1.1.2   root      157: DECLARE_HANDLE            (HWND);
                    158: DECLARE_HANDLE            (HHOOK);
1.1       root      159: #endif
                    160: 
                    161: typedef WORD                ATOM;
                    162: 
                    163: typedef HANDLE NEAR         *SPHANDLE;
                    164: typedef HANDLE FAR          *LPHANDLE;
1.1.1.2   root      165: typedef HANDLE              HGLOBAL;
                    166: typedef HANDLE              HLOCAL;
1.1.1.3 ! root      167: typedef HANDLE              GLOBALHANDLE;
        !           168: typedef HANDLE              LOCALHANDLE;
1.1.1.2   root      169: #ifdef STRICT
                    170: typedef void (FAR WINAPI *FARPROC)(void);      // should be removed some day!!!
                    171: typedef void (NEAR WINAPI *NEARPROC)(void);
                    172: typedef void (WINAPI *PROC)(void);             // new 32-bit version
                    173: #else
                    174: typedef int (FAR WINAPI *FARPROC)();      // should be removed some day!!!
                    175: typedef int (NEAR WINAPI *NEARPROC)();
                    176: typedef int (WINAPI *PROC)();             // new 32-bit version
                    177: #endif
                    178: 
                    179: #ifdef STRICT
                    180: typedef const void NEAR* HGDIOBJ;
                    181: #else
                    182: DECLARE_HANDLE(HGDIOBJ);
                    183: #endif
                    184: 
                    185: DECLARE_HANDLE(HACCEL);
                    186: DECLARE_HANDLE(HBITMAP);
                    187: DECLARE_HANDLE(HBRUSH);
                    188: DECLARE_HANDLE(HDC);
                    189: DECLARE_HANDLE(HDESK);
                    190: DECLARE_HANDLE(HENHMETAFILE);
                    191: DECLARE_HANDLE(HMF);
                    192: DECLARE_HANDLE(HEMF);
                    193: DECLARE_HANDLE(HFONT);
                    194: DECLARE_HANDLE(HICON);
                    195: DECLARE_HANDLE(HMENU);
                    196: DECLARE_HANDLE(HMETAFILE);
1.1.1.3 ! root      197: DECLARE_HANDLE(HINSTANCE);
        !           198: typedef HINSTANCE HMODULE;     /* HMODULEs can be used in place of HINSTANCEs */
1.1.1.2   root      199: DECLARE_HANDLE(HPALETTE);
                    200: DECLARE_HANDLE(HPEN);
                    201: DECLARE_HANDLE(HRGN);
                    202: DECLARE_HANDLE(HRSRC);
                    203: DECLARE_HANDLE(HSTR);
                    204: DECLARE_HANDLE(HWINSTA);
                    205: DECLARE_HANDLE(HKL);
                    206: 
                    207: typedef int HFILE;      /* Polymorphic with C runtime file handle type */
1.1.1.3 ! root      208: typedef HICON HCURSOR;      /* HICONs & HCURSORs are polymorphic */
1.1       root      209: 
                    210: typedef DWORD   COLORREF;
1.1.1.2   root      211: typedef DWORD   *LPCOLORREF;
                    212: 
                    213: #define HFILE_ERROR ((HFILE)-1)
1.1       root      214: 
                    215: typedef struct tagRECT
                    216: {
                    217:     LONG    left;
                    218:     LONG    top;
                    219:     LONG    right;
                    220:     LONG    bottom;
                    221: } RECT, *PRECT, NEAR *NPRECT, FAR *LPRECT;
                    222: 
1.1.1.2   root      223: typedef struct _RECTL       /* rcl */
1.1       root      224: {
                    225:     LONG    left;
                    226:     LONG    top;
                    227:     LONG    right;
                    228:     LONG    bottom;
                    229: } RECTL, *PRECTL;
                    230: 
                    231: typedef struct tagPOINT
                    232: {
                    233:     LONG  x;
                    234:     LONG  y;
                    235: } POINT, *PPOINT, NEAR *NPPOINT, FAR *LPPOINT;
                    236: 
                    237: typedef struct _POINTL      /* ptl  */
                    238: {
                    239:     LONG  x;
                    240:     LONG  y;
                    241: } POINTL, *PPOINTL;
                    242: 
                    243: typedef struct tagSIZE
                    244: {
                    245:     LONG        cx;
                    246:     LONG        cy;
                    247: } SIZE, *PSIZE, *LPSIZE;
                    248: 
                    249: typedef SIZE               SIZEL;
                    250: typedef SIZE               *PSIZEL;
                    251: 
                    252: typedef struct tagPOINTS
                    253: {
                    254:     SHORT   x;
                    255:     SHORT   y;
                    256: } POINTS, *PPOINTS, *LPPOINTS;
                    257: 
                    258: /* mode selections for the device mode function */
                    259: #define DM_UPDATE           1
                    260: #define DM_COPY             2
                    261: #define DM_PROMPT           4
                    262: #define DM_MODIFY           8
                    263: 
                    264: #define DM_IN_BUFFER        DM_MODIFY
                    265: #define DM_IN_PROMPT        DM_PROMPT
                    266: #define DM_OUT_BUFFER       DM_COPY
                    267: #define DM_OUT_DEFAULT      DM_UPDATE
                    268: 
                    269: /* device capabilities indices */
                    270: #define DC_FIELDS           1
                    271: #define DC_PAPERS           2
                    272: #define DC_PAPERSIZE        3
                    273: #define DC_MINEXTENT        4
                    274: #define DC_MAXEXTENT        5
                    275: #define DC_BINS             6
                    276: #define DC_DUPLEX           7
                    277: #define DC_SIZE             8
                    278: #define DC_EXTRA            9
                    279: #define DC_VERSION          10
                    280: #define DC_DRIVER           11
1.1.1.2   root      281: #define DC_BINNAMES         12
                    282: #define DC_ENUMRESOLUTIONS  13
                    283: #define DC_FILEDEPENDENCIES 14
                    284: #define DC_TRUETYPE         15
                    285: #define DC_PAPERNAMES       16
                    286: #define DC_ORIENTATION      17
                    287: #define DC_COPIES           18
1.1       root      288: 
1.1.1.3 ! root      289: #ifdef __cplusplus
        !           290: }
        !           291: #endif
1.1       root      292: 
                    293: #endif // _WINDEF_

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.