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
;
108 typedef struct _GDIPOINTER
/* should stay private to ENG */
110 /* private GDI pointer handling information, required for software emulation */
115 XLATEOBJ
*XlateObject
;
120 /* public pointer information */
121 RECTL Exclude
; /* required publicly for SPS_ACCEPT_EXCLUDE */
122 PGD_MOVEPOINTER MovePointer
;
124 } GDIPOINTER
, *PGDIPOINTER
;
131 HSURF FillPatterns
[HS_DDI_MAX
];
134 DRIVER_FUNCTIONS DriverFunctions
;
135 #ifdef NTOS_MODE_USER
136 PVOID VideoFileObject
;
138 PFILE_OBJECT VideoFileObject
;
140 BOOLEAN PreparedDriver
;
145 /* Stuff to keep track of software cursors; win32k gdi part */
146 UINT SafetyRemoveLevel
; /* at what level was the cursor removed?
148 UINT SafetyRemoveCount
;
151 /* Internal functions */
153 #ifndef NTOS_MODE_USER
155 #define DC_LockDc(hDC) \
156 ((PDC) GDIOBJ_LockObj ((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC))
157 #define DC_UnlockDc(pDC) \
158 GDIOBJ_UnlockObjByPtr (pDC)
160 HDC FASTCALL
RetrieveDisplayHDC(VOID
);
161 HDC FASTCALL
DC_AllocDC(PUNICODE_STRING Driver
);
162 VOID FASTCALL
DC_InitDC(HDC DCToInit
);
163 HDC FASTCALL
DC_FindOpenDC(PUNICODE_STRING Driver
);
164 VOID FASTCALL
DC_FreeDC(HDC DCToFree
);
165 BOOL INTERNAL_CALL
DC_Cleanup(PVOID ObjectBody
);
166 HDC FASTCALL
DC_GetNextDC (PDC pDC
);
167 VOID FASTCALL
DC_SetNextDC (PDC pDC
, HDC hNextDC
);
168 VOID FASTCALL
DC_SetOwnership(HDC DC
, PEPROCESS Owner
);
170 VOID FASTCALL
DC_UpdateXforms(PDC dc
);
171 BOOL FASTCALL
DC_InvertXform(const XFORM
*xformSrc
, XFORM
*xformDest
);
175 /* User entry points */
177 BOOL STDCALL
NtGdiCancelDC(HDC hDC
);
178 HDC STDCALL
NtGdiCreateCompatibleDC(HDC hDC
);
179 HDC STDCALL
NtGdiCreateDC(PUNICODE_STRING Driver
,
180 PUNICODE_STRING Device
,
181 PUNICODE_STRING Output
,
182 CONST PDEVMODEW InitData
);
183 HDC STDCALL
NtGdiCreateIC(PUNICODE_STRING Driver
,
184 PUNICODE_STRING Device
,
185 PUNICODE_STRING Output
,
186 CONST PDEVMODEW DevMode
);
187 BOOL STDCALL
NtGdiDeleteDC(HDC hDC
);
188 BOOL STDCALL
NtGdiDeleteObject(HGDIOBJ hObject
);
189 INT STDCALL
NtGdiDrawEscape(HDC hDC
,
194 INT STDCALL
NtGdiEnumObjects(HDC hDC
,
196 GOBJENUMPROC ObjectFunc
,
199 COLORREF STDCALL
NtGdiGetBkColor(HDC hDC
);
200 INT STDCALL
NtGdiGetBkMode(HDC hDC
);
201 BOOL STDCALL
NtGdiGetBrushOrgEx(HDC hDC
, LPPOINT brushOrg
);
202 HRGN STDCALL
NtGdiGetClipRgn(HDC hDC
);
203 HGDIOBJ STDCALL
NtGdiGetCurrentObject(HDC hDC
, UINT ObjectType
);
204 VOID FASTCALL
IntGetCurrentPositionEx (PDC dc
, LPPOINT currentPosition
);
205 BOOL STDCALL
NtGdiGetCurrentPositionEx(HDC hDC
, LPPOINT currentPosition
);
206 BOOL STDCALL
NtGdiGetDCOrgEx(HDC hDC
, LPPOINT Point
);
207 HDC STDCALL
NtGdiGetDCState(HDC hDC
);
208 INT STDCALL
NtGdiGetDeviceCaps(HDC hDC
, INT Index
);
209 INT STDCALL
NtGdiGetMapMode(HDC hDC
);
210 INT STDCALL
NtGdiGetObject(HGDIOBJ hGDIObj
,
213 DWORD STDCALL
NtGdiGetObjectType(HGDIOBJ hGDIObj
);
214 INT STDCALL
NtGdiGetPolyFillMode(HDC hDC
);
215 INT STDCALL
NtGdiGetRelAbs(HDC hDC
);
216 INT STDCALL
NtGdiGetROP2(HDC hDC
);
217 HGDIOBJ STDCALL
NtGdiGetStockObject(INT Object
);
218 INT STDCALL
NtGdiGetStretchBltMode(HDC hDC
);
219 COLORREF STDCALL
NtGdiGetTextColor(HDC hDC
);
220 UINT STDCALL
NtGdiGetTextAlign(HDC hDC
);
221 BOOL STDCALL
NtGdiGetViewportExtEx(HDC hDC
, LPSIZE viewportExt
);
222 BOOL STDCALL
NtGdiGetViewportOrgEx(HDC hDC
, LPPOINT viewportOrg
);
223 BOOL STDCALL
NtGdiGetWindowExtEx(HDC hDC
, LPSIZE windowExt
);
224 BOOL STDCALL
NtGdiGetWindowOrgEx(HDC hDC
, LPPOINT windowOrg
);
225 HDC STDCALL
NtGdiResetDC(HDC hDC
, CONST DEVMODEW
*InitData
);
226 BOOL STDCALL
NtGdiRestoreDC(HDC hDC
, INT SavedDC
);
227 INT STDCALL
NtGdiSaveDC(HDC hDC
);
228 HGDIOBJ STDCALL
NtGdiSelectObject(HDC hDC
, HGDIOBJ hGDIObj
);
229 INT STDCALL
NtGdiSetBkMode(HDC hDC
, INT backgroundMode
);
230 VOID STDCALL
NtGdiSetDCState ( HDC hDC
, HDC hDCSave
);
231 WORD STDCALL
NtGdiSetHookFlags(HDC hDC
, WORD Flags
);
232 INT STDCALL
NtGdiSetPolyFillMode(HDC hDC
, INT polyFillMode
);
233 INT STDCALL
NtGdiSetRelAbs(HDC hDC
, INT relAbsMode
);
234 INT STDCALL
NtGdiSetROP2(HDC hDC
, INT ROPmode
);
235 INT STDCALL
NtGdiSetStretchBltMode(HDC hDC
, INT stretchBltMode
);
236 COLORREF STDCALL
NtGdiSetTextColor(HDC hDC
, COLORREF color
);