1 /** 2 * This file is part of the mingw-w64 runtime package. 3 * No warranty is given; refer to the file DISCLAIMER within this package. 4 */ 5 #ifndef _WINDEF_ 6 #define _WINDEF_ 7 8 #include <winapifamily.h> 9 #include <minwindef.h> 10 11 #ifdef __cplusplus 12 extern "C" { 13 #endif 14 15 #ifndef WINVER 16 #define WINVER 0x0502 17 #endif 18 19 /* Make sure winnt.h is included. */ 20 #ifndef NT_INCLUDED 21 #include <winnt.h> 22 #endif 23 24 #ifndef WIN_INTERNAL 25 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) 26 DECLARE_HANDLE (HWND); 27 DECLARE_HANDLE (HHOOK); 28 #endif 29 #ifdef WINABLE 30 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 31 DECLARE_HANDLE (HEVENT); 32 #endif 33 #endif 34 #endif 35 36 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) 37 #ifdef STRICT 38 typedef void *HGDIOBJ; 39 #else 40 DECLARE_HANDLE (HGDIOBJ); 41 #endif 42 43 DECLARE_HANDLE(HACCEL); 44 DECLARE_HANDLE(HBITMAP); 45 DECLARE_HANDLE(HBRUSH); 46 DECLARE_HANDLE(HCOLORSPACE); 47 DECLARE_HANDLE(HDC); 48 DECLARE_HANDLE(HGLRC); 49 DECLARE_HANDLE(HDESK); 50 DECLARE_HANDLE(HENHMETAFILE); 51 DECLARE_HANDLE(HFONT); 52 DECLARE_HANDLE(HICON); 53 DECLARE_HANDLE(HMENU); 54 DECLARE_HANDLE(HPALETTE); 55 DECLARE_HANDLE(HPEN); 56 DECLARE_HANDLE(HMONITOR); 57 #define HMONITOR_DECLARED 1 58 DECLARE_HANDLE(HWINEVENTHOOK); 59 60 typedef HICON HCURSOR; 61 typedef DWORD COLORREF; 62 #endif 63 64 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 65 DECLARE_HANDLE(HUMPD); 66 67 typedef DWORD *LPCOLORREF; 68 69 #define HFILE_ERROR ((HFILE)-1) 70 #endif 71 72 #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) 73 typedef struct tagRECT { 74 LONG left; 75 LONG top; 76 LONG right; 77 LONG bottom; 78 } RECT,*PRECT,*NPRECT,*LPRECT; 79 80 typedef const RECT *LPCRECT; 81 82 typedef struct _RECTL { 83 LONG left; 84 LONG top; 85 LONG right; 86 LONG bottom; 87 } RECTL,*PRECTL,*LPRECTL; 88 89 typedef const RECTL *LPCRECTL; 90 91 typedef struct tagPOINT { 92 LONG x; 93 LONG y; 94 } POINT,*PPOINT,*NPPOINT,*LPPOINT; 95 96 typedef struct _POINTL { 97 LONG x; 98 LONG y; 99 } POINTL,*PPOINTL; 100 101 typedef struct tagSIZE { 102 LONG cx; 103 LONG cy; 104 } SIZE,*PSIZE,*LPSIZE; 105 106 typedef SIZE SIZEL; 107 typedef SIZE *PSIZEL,*LPSIZEL; 108 109 typedef struct tagPOINTS { 110 SHORT x; 111 SHORT y; 112 } POINTS,*PPOINTS,*LPPOINTS; 113 114 #define APP_LOCAL_DEVICE_ID_SIZE 32 115 116 typedef struct APP_LOCAL_DEVICE_ID { 117 BYTE value[APP_LOCAL_DEVICE_ID_SIZE]; 118 } APP_LOCAL_DEVICE_ID; 119 120 #endif /* WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP) */ 121 122 #define DM_UPDATE 1 123 #define DM_COPY 2 124 #define DM_PROMPT 4 125 #define DM_MODIFY 8 126 127 #define DM_IN_BUFFER DM_MODIFY 128 #define DM_IN_PROMPT DM_PROMPT 129 #define DM_OUT_BUFFER DM_COPY 130 #define DM_OUT_DEFAULT DM_UPDATE 131 132 #define DC_FIELDS 1 133 #define DC_PAPERS 2 134 #define DC_PAPERSIZE 3 135 #define DC_MINEXTENT 4 136 #define DC_MAXEXTENT 5 137 #define DC_BINS 6 138 #define DC_DUPLEX 7 139 #define DC_SIZE 8 140 #define DC_EXTRA 9 141 #define DC_VERSION 10 142 #define DC_DRIVER 11 143 #define DC_BINNAMES 12 144 #define DC_ENUMRESOLUTIONS 13 145 #define DC_FILEDEPENDENCIES 14 146 #define DC_TRUETYPE 15 147 #define DC_PAPERNAMES 16 148 #define DC_ORIENTATION 17 149 #define DC_COPIES 18 150 151 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) 152 153 #define _DPI_AWARENESS_CONTEXTS_ 154 155 DECLARE_HANDLE(DPI_AWARENESS_CONTEXT); 156 157 typedef enum DPI_AWARENESS { 158 DPI_AWARENESS_INVALID = -1, 159 DPI_AWARENESS_UNAWARE = 0, 160 DPI_AWARENESS_SYSTEM_AWARE = 1, 161 DPI_AWARENESS_PER_MONITOR_AWARE = 2 162 } DPI_AWARENESS; 163 164 #define DPI_AWARENESS_CONTEXT_UNAWARE ((DPI_AWARENESS_CONTEXT)-1) 165 #define DPI_AWARENESS_CONTEXT_SYSTEM_AWARE ((DPI_AWARENESS_CONTEXT)-2) 166 #define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ((DPI_AWARENESS_CONTEXT)-3) 167 #define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ((DPI_AWARENESS_CONTEXT)-4) 168 #define DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED ((DPI_AWARENESS_CONTEXT)-5) 169 170 typedef enum DPI_HOSTING_BEHAVIOR { 171 DPI_HOSTING_BEHAVIOR_INVALID = -1, 172 DPI_HOSTING_BEHAVIOR_DEFAULT = 0, 173 DPI_HOSTING_BEHAVIOR_MIXED = 1 174 } DPI_HOSTING_BEHAVIOR; 175 176 #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ 177 178 #ifdef __cplusplus 179 } 180 #endif 181 182 #endif /* _WINDEF_ */ 183