5 typedef struct _WIN_DC_INFO
8 HRGN hClipRgn
; /* Clip region (may be 0) */
9 HRGN hVisRgn
; /* Visible region (must never be 0) */
10 HRGN hGCClipRgn
; /* GC clip region (ClipRgn AND VisRgn) */
15 HBITMAP hFirstBitmap
; /* Bitmap selected at creation of the DC */
29 COLORREF backgroundColor
;
35 WORD textAlign
; /* Text alignment from SetTextAlign() */
36 short charExtra
; /* Spacing from SetTextCharacterExtra() */
37 short breakTotalExtra
; /* Total extra space for justification */
38 short breakCount
; /* Break char. count */
39 short breakExtra
; /* breakTotalExtra / breakCount */
40 short breakRem
; /* breakTotalExtra % breakCount */
46 INT GraphicsMode
; /* Graphics mode */
47 INT DCOrgX
; /* DC origin */
51 FARPROC lpfnPrint
; /* AbortProc for Printing */
54 INT CursPosX
; /* Current position */
58 XFORM xformWorld2Wnd
; /* World-to-window transformation */
59 XFORM xformWorld2Vport
; /* World-to-viewport transformation */
60 XFORM xformVport2World
; /* Inverse of the above transformation */
61 BOOL vport2WorldValid
; /* Is xformVport2World valid? */
65 #define DC_MEMORY 0x0001 /* It is a memory DC */
66 #define DC_SAVED 0x0002 /* It is a saved DC */
67 #define DC_DIRTY 0x0004 /* hVisRgn has to be updated */
68 #define DC_THUNKHOOK 0x0008 /* DC hook is in the 16-bit code */
70 #define GDI_DC_TYPE (1)
77 HSURF FillPatternSurfaces
[HS_DDI_MAX
];
82 DRIVER_FUNCTIONS DriverFunctions
;
83 UNICODE_STRING DriverName
;
86 INT wndOrgX
; /* Window origin */
88 INT wndExtX
; /* Window extent */
90 INT vportOrgX
; /* Viewport origin */
92 INT vportExtX
; /* Viewport extent */
95 CLIPOBJ
*CombinedClip
;
106 typedef struct _GDIPOINTER
/* should stay private to ENG */
108 /* private GDI pointer handling information, required for software emulation */
113 XLATEOBJ
*XlateObject
;
118 /* public pointer information */
119 RECTL Exclude
; /* required publicly for SPS_ACCEPT_EXCLUDE */
120 PGD_MOVEPOINTER MovePointer
;
122 } GDIPOINTER
, *PGDIPOINTER
;
129 HSURF FillPatterns
[HS_DDI_MAX
];
132 DRIVER_FUNCTIONS DriverFunctions
;
133 #ifdef NTOS_MODE_USER
134 PVOID VideoFileObject
;
136 PFILE_OBJECT VideoFileObject
;
138 BOOLEAN PreparedDriver
;
143 /* Stuff to keep track of software cursors; win32k gdi part */
144 UINT SafetyRemoveLevel
; /* at what level was the cursor removed?
146 UINT SafetyRemoveCount
;
149 /* Internal functions */
151 #ifndef NTOS_MODE_USER
153 #define DC_LockDc(hDC) \
154 ((PDC) GDIOBJ_LockObj ((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC))
155 #define DC_UnlockDc(pDC) \
156 GDIOBJ_UnlockObjByPtr (pDC)
158 HDC FASTCALL
RetrieveDisplayHDC(VOID
);
159 HDC FASTCALL
DC_AllocDC(PUNICODE_STRING Driver
);
160 VOID FASTCALL
DC_InitDC(HDC DCToInit
);
161 HDC FASTCALL
DC_FindOpenDC(PUNICODE_STRING Driver
);
162 VOID FASTCALL
DC_FreeDC(HDC DCToFree
);
163 BOOL INTERNAL_CALL
DC_Cleanup(PVOID ObjectBody
);
164 HDC FASTCALL
DC_GetNextDC (PDC pDC
);
165 VOID FASTCALL
DC_SetNextDC (PDC pDC
, HDC hNextDC
);
166 VOID FASTCALL
DC_SetOwnership(HDC DC
, PEPROCESS Owner
);
168 VOID FASTCALL
DC_UpdateXforms(PDC dc
);
169 BOOL FASTCALL
DC_InvertXform(const XFORM
*xformSrc
, XFORM
*xformDest
);
173 /* User entry points */
175 BOOL STDCALL
NtGdiCancelDC(HDC hDC
);
176 HDC STDCALL
NtGdiCreateCompatibleDC(HDC hDC
);
177 HDC STDCALL
NtGdiCreateDC(PUNICODE_STRING Driver
,
178 PUNICODE_STRING Device
,
179 PUNICODE_STRING Output
,
180 CONST PDEVMODEW InitData
);
181 HDC STDCALL
NtGdiCreateIC(PUNICODE_STRING Driver
,
182 PUNICODE_STRING Device
,
183 PUNICODE_STRING Output
,
184 CONST PDEVMODEW DevMode
);
185 BOOL STDCALL
NtGdiDeleteDC(HDC hDC
);
186 BOOL STDCALL
NtGdiDeleteObject(HGDIOBJ hObject
);
187 INT STDCALL
NtGdiDrawEscape(HDC hDC
,
192 INT STDCALL
NtGdiEnumObjects(HDC hDC
,
194 GOBJENUMPROC ObjectFunc
,
197 COLORREF STDCALL
NtGdiGetBkColor(HDC hDC
);
198 INT STDCALL
NtGdiGetBkMode(HDC hDC
);
199 BOOL STDCALL
NtGdiGetBrushOrgEx(HDC hDC
, LPPOINT brushOrg
);
200 HRGN STDCALL
NtGdiGetClipRgn(HDC hDC
);
201 HGDIOBJ STDCALL
NtGdiGetCurrentObject(HDC hDC
, UINT ObjectType
);
202 VOID FASTCALL
IntGetCurrentPositionEx (PDC dc
, LPPOINT currentPosition
);
203 BOOL STDCALL
NtGdiGetCurrentPositionEx(HDC hDC
, LPPOINT currentPosition
);
204 BOOL STDCALL
NtGdiGetDCOrgEx(HDC hDC
, LPPOINT Point
);
205 HDC STDCALL
NtGdiGetDCState(HDC hDC
);
206 INT STDCALL
NtGdiGetDeviceCaps(HDC hDC
, INT Index
);
207 INT STDCALL
NtGdiGetMapMode(HDC hDC
);
208 INT STDCALL
NtGdiGetObject(HGDIOBJ hGDIObj
,
211 DWORD STDCALL
NtGdiGetObjectType(HGDIOBJ hGDIObj
);
212 INT STDCALL
NtGdiGetPolyFillMode(HDC hDC
);
213 INT STDCALL
NtGdiGetRelAbs(HDC hDC
);
214 INT STDCALL
NtGdiGetROP2(HDC hDC
);
215 HGDIOBJ STDCALL
NtGdiGetStockObject(INT Object
);
216 INT STDCALL
NtGdiGetStretchBltMode(HDC hDC
);
217 COLORREF STDCALL
NtGdiGetTextColor(HDC hDC
);
218 UINT STDCALL
NtGdiGetTextAlign(HDC hDC
);
219 BOOL STDCALL
NtGdiGetViewportExtEx(HDC hDC
, LPSIZE viewportExt
);
220 BOOL STDCALL
NtGdiGetViewportOrgEx(HDC hDC
, LPPOINT viewportOrg
);
221 BOOL STDCALL
NtGdiGetWindowExtEx(HDC hDC
, LPSIZE windowExt
);
222 BOOL STDCALL
NtGdiGetWindowOrgEx(HDC hDC
, LPPOINT windowOrg
);
223 HDC STDCALL
NtGdiResetDC(HDC hDC
, CONST DEVMODEW
*InitData
);
224 BOOL STDCALL
NtGdiRestoreDC(HDC hDC
, INT SavedDC
);
225 INT STDCALL
NtGdiSaveDC(HDC hDC
);
226 HGDIOBJ STDCALL
NtGdiSelectObject(HDC hDC
, HGDIOBJ hGDIObj
);
227 INT STDCALL
NtGdiSetBkMode(HDC hDC
, INT backgroundMode
);
228 VOID STDCALL
NtGdiSetDCState ( HDC hDC
, HDC hDCSave
);
229 WORD STDCALL
NtGdiSetHookFlags(HDC hDC
, WORD Flags
);
230 INT STDCALL
NtGdiSetPolyFillMode(HDC hDC
, INT polyFillMode
);
231 INT STDCALL
NtGdiSetRelAbs(HDC hDC
, INT relAbsMode
);
232 INT STDCALL
NtGdiSetROP2(HDC hDC
, INT ROPmode
);
233 INT STDCALL
NtGdiSetStretchBltMode(HDC hDC
, INT stretchBltMode
);
234 COLORREF STDCALL
NtGdiSetTextColor(HDC hDC
, COLORREF color
);