4 * Copyright 1993 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #include "wine/wingdi16.h"
30 /* GDI objects magic numbers */
31 #define FIRST_MAGIC 0x4f47
32 #define PEN_MAGIC 0x4f47
33 #define BRUSH_MAGIC 0x4f48
34 #define FONT_MAGIC 0x4f49
35 #define PALETTE_MAGIC 0x4f4a
36 #define BITMAP_MAGIC 0x4f4b
37 #define REGION_MAGIC 0x4f4c
38 #define DC_MAGIC 0x4f4d
39 #define DISABLED_DC_MAGIC 0x4f4e
40 #define META_DC_MAGIC 0x4f4f
41 #define METAFILE_MAGIC 0x4f50
42 #define METAFILE_DC_MAGIC 0x4f51
43 #define ENHMETAFILE_MAGIC 0x4f52
44 #define ENHMETAFILE_DC_MAGIC 0x4f53
45 #define LAST_MAGIC 0x4f53
47 #define MAGIC_DONTCARE 0xffff
49 /* GDI constants for making objects private/system (naming undoc. !) */
50 #define OBJECT_PRIVATE 0x2000
51 #define OBJECT_NOSYSTEM 0x8000
53 #define GDIMAGIC(magic) ((magic) & ~(OBJECT_PRIVATE|OBJECT_NOSYSTEM))
55 typedef struct tagGDIOBJHDR
63 typedef struct tagGdiFont
*GdiFont
;
65 typedef struct { int opaque
; } *PHYSDEV
; /* PHYSDEV is an opaque pointer */
70 HDC hSelf
; /* Handle to this DC */
71 const struct tagDC_FUNCS
*funcs
; /* DC function table */
72 PHYSDEV physDev
; /* Physical device (driver-specific) */
75 FARPROC16 hookProc
; /* the original SEGPTR ... */
76 DCHOOKPROC hookThunk
; /* ... and the thunk to call it */
78 INT wndOrgX
; /* Window origin */
80 INT wndExtX
; /* Window extent */
82 INT vportOrgX
; /* Viewport origin */
84 INT vportExtX
; /* Viewport extent */
88 HRGN16 hClipRgn
; /* Clip region (may be 0) */
89 HRGN16 hVisRgn
; /* Visible region (must never be 0) */
90 HRGN16 hGCClipRgn
; /* GC clip region (ClipRgn AND VisRgn) */
106 COLORREF backgroundColor
;
111 WORD textAlign
; /* Text alignment from SetTextAlign() */
112 short charExtra
; /* Spacing from SetTextCharacterExtra() */
113 short breakTotalExtra
; /* Total extra space for justification */
114 short breakCount
; /* Break char. count */
115 short breakExtra
; /* breakTotalExtra / breakCount */
116 short breakRem
; /* breakTotalExtra % breakCount */
122 INT GraphicsMode
; /* Graphics mode */
123 INT DCOrgX
; /* DC origin */
125 ABORTPROC pAbortProc
; /* AbortProc for Printing */
126 ABORTPROC16 pAbortProc16
;
127 INT CursPosX
; /* Current position */
130 XFORM xformWorld2Wnd
; /* World-to-window transformation */
131 XFORM xformWorld2Vport
; /* World-to-viewport transformation */
132 XFORM xformVport2World
; /* Inverse of the above transformation */
133 BOOL vport2WorldValid
; /* Is xformVport2World valid? */
136 /* Device functions for the Wine driver interface */
138 typedef INT (*DEVICEFONTENUMPROC
)(LPENUMLOGFONTEXW
,LPNEWTEXTMETRICEXW
,DWORD
,
141 typedef struct tagDC_FUNCS
143 INT (*pAbortDoc
)(PHYSDEV
);
144 BOOL (*pAbortPath
)(PHYSDEV
);
145 BOOL (*pAngleArc
)(PHYSDEV
,INT
,INT
,DWORD
,FLOAT
,FLOAT
);
146 BOOL (*pArc
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,INT
);
147 BOOL (*pArcTo
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,INT
);
148 BOOL (*pBeginPath
)(PHYSDEV
);
149 BOOL (*pBitBlt
)(PHYSDEV
,INT
,INT
,INT
,INT
,PHYSDEV
,INT
,INT
,DWORD
);
150 LONG (*pBitmapBits
)(HBITMAP
,void*,LONG
,WORD
);
151 INT (*pChoosePixelFormat
)(PHYSDEV
,const PIXELFORMATDESCRIPTOR
*);
152 BOOL (*pChord
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,INT
);
153 BOOL (*pCloseFigure
)(PHYSDEV
);
154 BOOL (*pCreateBitmap
)(HBITMAP
);
155 BOOL (*pCreateDC
)(DC
*,LPCSTR
,LPCSTR
,LPCSTR
,const DEVMODEA
*);
156 HBITMAP (*pCreateDIBSection
)(PHYSDEV
,BITMAPINFO
*,UINT
,LPVOID
*,HANDLE
,DWORD
,DWORD
);
157 BOOL (*pDeleteDC
)(PHYSDEV
);
158 BOOL (*pDeleteObject
)(HGDIOBJ
);
159 INT (*pDescribePixelFormat
)(PHYSDEV
,INT
,UINT
,PIXELFORMATDESCRIPTOR
*);
160 DWORD (*pDeviceCapabilities
)(LPSTR
,LPCSTR
,LPCSTR
,WORD
,LPSTR
,LPDEVMODEA
);
161 BOOL (*pEllipse
)(PHYSDEV
,INT
,INT
,INT
,INT
);
162 INT (*pEndDoc
)(PHYSDEV
);
163 INT (*pEndPage
)(PHYSDEV
);
164 BOOL (*pEndPath
)(PHYSDEV
);
165 BOOL (*pEnumDeviceFonts
)(HDC
,LPLOGFONTW
,DEVICEFONTENUMPROC
,LPARAM
);
166 INT (*pExcludeClipRect
)(PHYSDEV
,INT
,INT
,INT
,INT
);
167 INT (*pExtDeviceMode
)(LPSTR
,HWND
,LPDEVMODEA
,LPSTR
,LPSTR
,LPDEVMODEA
,LPSTR
,DWORD
);
168 INT (*pExtEscape
)(PHYSDEV
,INT
,INT
,LPCVOID
,INT
,LPVOID
);
169 BOOL (*pExtFloodFill
)(PHYSDEV
,INT
,INT
,COLORREF
,UINT
);
170 BOOL (*pExtTextOut
)(PHYSDEV
,INT
,INT
,UINT
,const RECT
*,LPCWSTR
,UINT
,const INT
*);
171 BOOL (*pFillPath
)(PHYSDEV
);
172 BOOL (*pFillRgn
)(PHYSDEV
,HRGN
,HBRUSH
);
173 BOOL (*pFlattenPath
)(PHYSDEV
);
174 BOOL (*pFrameRgn
)(PHYSDEV
,HRGN
,HBRUSH
,INT
,INT
);
175 BOOL (*pGetCharWidth
)(PHYSDEV
,UINT
,UINT
,LPINT
);
176 BOOL (*pGetDCOrgEx
)(PHYSDEV
,LPPOINT
);
177 UINT (*pGetDIBColorTable
)(PHYSDEV
,UINT
,UINT
,RGBQUAD
*);
178 INT (*pGetDIBits
)(PHYSDEV
,HBITMAP
,UINT
,UINT
,LPVOID
,BITMAPINFO
*,UINT
);
179 INT (*pGetDeviceCaps
)(PHYSDEV
,INT
);
180 BOOL (*pGetDeviceGammaRamp
)(PHYSDEV
,LPVOID
);
181 COLORREF (*pGetPixel
)(PHYSDEV
,INT
,INT
);
182 INT (*pGetPixelFormat
)(PHYSDEV
);
183 BOOL (*pGetTextExtentPoint
)(PHYSDEV
,LPCWSTR
,INT
,LPSIZE
);
184 BOOL (*pGetTextMetrics
)(PHYSDEV
,TEXTMETRICW
*);
185 INT (*pIntersectClipRect
)(PHYSDEV
,INT
,INT
,INT
,INT
);
186 BOOL (*pInvertRgn
)(PHYSDEV
,HRGN
);
187 BOOL (*pLineTo
)(PHYSDEV
,INT
,INT
);
188 BOOL (*pMoveTo
)(PHYSDEV
,INT
,INT
);
189 INT (*pOffsetClipRgn
)(PHYSDEV
,INT
,INT
);
190 BOOL (*pOffsetViewportOrg
)(PHYSDEV
,INT
,INT
);
191 BOOL (*pOffsetWindowOrg
)(PHYSDEV
,INT
,INT
);
192 BOOL (*pPaintRgn
)(PHYSDEV
,HRGN
);
193 BOOL (*pPatBlt
)(PHYSDEV
,INT
,INT
,INT
,INT
,DWORD
);
194 BOOL (*pPie
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,INT
);
195 BOOL (*pPolyBezier
)(PHYSDEV
,const POINT
*,DWORD
);
196 BOOL (*pPolyBezierTo
)(PHYSDEV
,const POINT
*,DWORD
);
197 BOOL (*pPolyDraw
)(PHYSDEV
,const POINT
*,const BYTE
*,DWORD
);
198 BOOL (*pPolyPolygon
)(PHYSDEV
,const POINT
*,const INT
*,UINT
);
199 BOOL (*pPolyPolyline
)(PHYSDEV
,const POINT
*,const DWORD
*,DWORD
);
200 BOOL (*pPolygon
)(PHYSDEV
,const POINT
*,INT
);
201 BOOL (*pPolyline
)(PHYSDEV
,const POINT
*,INT
);
202 BOOL (*pPolylineTo
)(PHYSDEV
,const POINT
*,INT
);
203 UINT (*pRealizePalette
)(PHYSDEV
);
204 BOOL (*pRectangle
)(PHYSDEV
,INT
,INT
,INT
,INT
);
205 BOOL (*pRestoreDC
)(PHYSDEV
,INT
);
206 BOOL (*pRoundRect
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
);
207 INT (*pSaveDC
)(PHYSDEV
);
208 BOOL (*pScaleViewportExt
)(PHYSDEV
,INT
,INT
,INT
,INT
);
209 BOOL (*pScaleWindowExt
)(PHYSDEV
,INT
,INT
,INT
,INT
);
210 HBITMAP (*pSelectBitmap
)(PHYSDEV
,HBITMAP
);
211 HBRUSH (*pSelectBrush
)(PHYSDEV
,HBRUSH
);
212 BOOL (*pSelectClipPath
)(PHYSDEV
,INT
);
213 INT (*pSelectClipRgn
)(PHYSDEV
,HRGN
);
214 HFONT (*pSelectFont
)(PHYSDEV
,HFONT
);
215 HPALETTE (*pSelectPalette
)(PHYSDEV
,HPALETTE
,BOOL
);
216 HPEN (*pSelectPen
)(PHYSDEV
,HPEN
);
217 COLORREF (*pSetBkColor
)(PHYSDEV
,COLORREF
);
218 INT (*pSetBkMode
)(PHYSDEV
,INT
);
219 UINT (*pSetDIBColorTable
)(PHYSDEV
,UINT
,UINT
,const RGBQUAD
*);
220 INT (*pSetDIBits
)(PHYSDEV
,HBITMAP
,UINT
,UINT
,LPCVOID
,const BITMAPINFO
*,UINT
);
221 INT (*pSetDIBitsToDevice
)(PHYSDEV
,INT
,INT
,DWORD
,DWORD
,INT
,INT
,UINT
,UINT
,LPCVOID
,
222 const BITMAPINFO
*,UINT
);
223 VOID (*pSetDeviceClipping
)(PHYSDEV
);
224 BOOL (*pSetDeviceGammaRamp
)(PHYSDEV
,LPVOID
);
225 INT (*pSetMapMode
)(PHYSDEV
,INT
);
226 DWORD (*pSetMapperFlags
)(PHYSDEV
,DWORD
);
227 COLORREF (*pSetPixel
)(PHYSDEV
,INT
,INT
,COLORREF
);
228 BOOL (*pSetPixelFormat
)(PHYSDEV
,INT
,const PIXELFORMATDESCRIPTOR
*);
229 INT (*pSetPolyFillMode
)(PHYSDEV
,INT
);
230 INT (*pSetROP2
)(PHYSDEV
,INT
);
231 INT (*pSetRelAbs
)(PHYSDEV
,INT
);
232 INT (*pSetStretchBltMode
)(PHYSDEV
,INT
);
233 UINT (*pSetTextAlign
)(PHYSDEV
,UINT
);
234 INT (*pSetTextCharacterExtra
)(PHYSDEV
,INT
);
235 DWORD (*pSetTextColor
)(PHYSDEV
,DWORD
);
236 INT (*pSetTextJustification
)(PHYSDEV
,INT
,INT
);
237 BOOL (*pSetViewportExt
)(PHYSDEV
,INT
,INT
);
238 BOOL (*pSetViewportOrg
)(PHYSDEV
,INT
,INT
);
239 BOOL (*pSetWindowExt
)(PHYSDEV
,INT
,INT
);
240 BOOL (*pSetWindowOrg
)(PHYSDEV
,INT
,INT
);
241 INT (*pStartDoc
)(PHYSDEV
,const DOCINFOA
*);
242 INT (*pStartPage
)(PHYSDEV
);
243 BOOL (*pStretchBlt
)(PHYSDEV
,INT
,INT
,INT
,INT
,PHYSDEV
,INT
,INT
,INT
,INT
,DWORD
);
244 INT (*pStretchDIBits
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,const void *,
245 const BITMAPINFO
*,UINT
,DWORD
);
246 BOOL (*pStrokeAndFillPath
)(PHYSDEV
);
247 BOOL (*pStrokePath
)(PHYSDEV
);
248 BOOL (*pSwapBuffers
)(PHYSDEV
);
249 BOOL (*pWidenPath
)(PHYSDEV
);
253 #define DCHC_INVALIDVISRGN 0x0001
254 #define DCHC_DELETEDC 0x0002
256 #define DCHF_INVALIDATEVISRGN 0x0001
257 #define DCHF_VALIDATEVISRGN 0x0002
260 #define DC_MEMORY 0x0001 /* It is a memory DC */
261 #define DC_SAVED 0x0002 /* It is a saved DC */
262 #define DC_DIRTY 0x0004 /* hVisRgn has to be updated */
263 #define DC_THUNKHOOK 0x0008 /* DC hook is in the 16-bit code */
265 #define GDI_HEAP_SIZE 0xffe0
267 /* extra stock object: default 1x1 bitmap for memory DCs */
268 #define DEFAULT_BITMAP (STOCK_LAST+1)
270 /* Device <-> logical coords conversion */
272 /* A floating point version of the POINT structure */
273 typedef struct tagFLOAT_POINT
278 /* Rounds a floating point number to integer. The world-to-viewport
279 * transformation process is done in floating point internally. This function
280 * is then used to round these coordinates to integer values.
282 static inline INT WINE_UNUSED
GDI_ROUND(FLOAT val
)
284 return (int)floor(val
+ 0.5);
287 /* Performs a viewport-to-world transformation on the specified point (which
288 * is in floating point format). Returns TRUE if successful, else FALSE.
290 static inline BOOL WINE_UNUSED
INTERNAL_DPTOLP_FLOAT(DC
*dc
, FLOAT_POINT
*point
)
294 /* Check that the viewport-to-world transformation is valid */
295 if (!dc
->vport2WorldValid
)
298 /* Perform the transformation */
301 point
->x
= x
* dc
->xformVport2World
.eM11
+
302 y
* dc
->xformVport2World
.eM21
+
303 dc
->xformVport2World
.eDx
;
304 point
->y
= x
* dc
->xformVport2World
.eM12
+
305 y
* dc
->xformVport2World
.eM22
+
306 dc
->xformVport2World
.eDy
;
311 /* Performs a viewport-to-world transformation on the specified point (which
312 * is in integer format). Returns TRUE if successful, else FALSE.
314 static inline BOOL WINE_UNUSED
INTERNAL_DPTOLP(DC
*dc
, LPPOINT point
)
316 FLOAT_POINT floatPoint
;
318 /* Perform operation with floating point */
319 floatPoint
.x
=(FLOAT
)point
->x
;
320 floatPoint
.y
=(FLOAT
)point
->y
;
321 if (!INTERNAL_DPTOLP_FLOAT(dc
, &floatPoint
))
324 /* Round to integers */
325 point
->x
= GDI_ROUND(floatPoint
.x
);
326 point
->y
= GDI_ROUND(floatPoint
.y
);
331 /* Performs a world-to-viewport transformation on the specified point (which
332 * is in floating point format).
334 static inline void WINE_UNUSED
INTERNAL_LPTODP_FLOAT(DC
*dc
, FLOAT_POINT
*point
)
338 /* Perform the transformation */
341 point
->x
= x
* dc
->xformWorld2Vport
.eM11
+
342 y
* dc
->xformWorld2Vport
.eM21
+
343 dc
->xformWorld2Vport
.eDx
;
344 point
->y
= x
* dc
->xformWorld2Vport
.eM12
+
345 y
* dc
->xformWorld2Vport
.eM22
+
346 dc
->xformWorld2Vport
.eDy
;
349 /* Performs a world-to-viewport transformation on the specified point (which
350 * is in integer format).
352 static inline void WINE_UNUSED
INTERNAL_LPTODP(DC
*dc
, LPPOINT point
)
354 FLOAT_POINT floatPoint
;
356 /* Perform operation with floating point */
357 floatPoint
.x
=(FLOAT
)point
->x
;
358 floatPoint
.y
=(FLOAT
)point
->y
;
359 INTERNAL_LPTODP_FLOAT(dc
, &floatPoint
);
361 /* Round to integers */
362 point
->x
= GDI_ROUND(floatPoint
.x
);
363 point
->y
= GDI_ROUND(floatPoint
.y
);
367 /* Performs a world-to-viewport transformation on the specified point (which
368 * is in integer format).
370 static inline INT WINE_UNUSED
INTERNAL_XWPTODP(DC
*dc
, INT x
, INT y
)
372 FLOAT_POINT floatPoint
;
374 /* Perform operation with floating point */
375 floatPoint
.x
=(FLOAT
)x
;
376 floatPoint
.y
=(FLOAT
)y
;
377 INTERNAL_LPTODP_FLOAT(dc
, &floatPoint
);
379 /* Round to integers */
380 return GDI_ROUND(floatPoint
.x
);
383 /* Performs a world-to-viewport transformation on the specified point (which
384 * is in integer format).
386 static inline INT WINE_UNUSED
INTERNAL_YWPTODP(DC
*dc
, INT x
, INT y
)
388 FLOAT_POINT floatPoint
;
390 /* Perform operation with floating point */
391 floatPoint
.x
=(FLOAT
)x
;
392 floatPoint
.y
=(FLOAT
)y
;
393 INTERNAL_LPTODP_FLOAT(dc
, &floatPoint
);
395 /* Round to integers */
396 return GDI_ROUND(floatPoint
.y
);
400 /* Performs a viewport-to-world transformation on the specified point (which
401 * is in integer format).
403 static inline INT WINE_UNUSED
INTERNAL_XDPTOWP(DC
*dc
, INT x
, INT y
)
405 FLOAT_POINT floatPoint
;
407 /* Perform operation with floating point */
408 floatPoint
.x
=(FLOAT
)x
;
409 floatPoint
.y
=(FLOAT
)y
;
410 INTERNAL_DPTOLP_FLOAT(dc
, &floatPoint
);
412 /* Round to integers */
413 return GDI_ROUND(floatPoint
.x
);
416 /* Performs a viewport-to-world transformation on the specified point (which
417 * is in integer format).
419 static inline INT WINE_UNUSED
INTERNAL_YDPTOWP(DC
*dc
, INT x
, INT y
)
421 FLOAT_POINT floatPoint
;
423 /* Perform operation with floating point */
424 floatPoint
.x
=(FLOAT
)x
;
425 floatPoint
.y
=(FLOAT
)y
;
426 INTERNAL_DPTOLP_FLOAT(dc
, &floatPoint
);
428 /* Round to integers */
429 return GDI_ROUND(floatPoint
.y
);
433 #define XDPTOLP(dc,x) \
434 (MulDiv(((x)-(dc)->vportOrgX), (dc)->wndExtX, (dc)->vportExtX) + (dc)->wndOrgX)
435 #define YDPTOLP(dc,y) \
436 (MulDiv(((y)-(dc)->vportOrgY), (dc)->wndExtY, (dc)->vportExtY) + (dc)->wndOrgY)
437 #define XLPTODP(dc,x) \
438 (MulDiv(((x)-(dc)->wndOrgX), (dc)->vportExtX, (dc)->wndExtX) + (dc)->vportOrgX)
439 #define YLPTODP(dc,y) \
440 (MulDiv(((y)-(dc)->wndOrgY), (dc)->vportExtY, (dc)->wndExtY) + (dc)->vportOrgY)
444 /* World -> Device size conversion */
446 /* Performs a world-to-viewport transformation on the specified width (which
447 * is in floating point format).
449 static inline void WINE_UNUSED
INTERNAL_XWSTODS_FLOAT(DC
*dc
, FLOAT
*width
)
451 /* Perform the transformation */
452 *width
= *width
* dc
->xformWorld2Vport
.eM11
;
455 /* Performs a world-to-viewport transformation on the specified width (which
456 * is in integer format).
458 static inline INT WINE_UNUSED
INTERNAL_XWSTODS(DC
*dc
, INT width
)
462 /* Perform operation with floating point */
463 floatWidth
= (FLOAT
)width
;
464 INTERNAL_XWSTODS_FLOAT(dc
, &floatWidth
);
466 /* Round to integers */
467 return GDI_ROUND(floatWidth
);
471 /* Performs a world-to-viewport transformation on the specified size (which
472 * is in floating point format).
474 static inline void WINE_UNUSED
INTERNAL_YWSTODS_FLOAT(DC
*dc
, FLOAT
*height
)
476 /* Perform the transformation */
477 *height
= *height
* dc
->xformWorld2Vport
.eM22
;
480 /* Performs a world-to-viewport transformation on the specified size (which
481 * is in integer format).
483 static inline INT WINE_UNUSED
INTERNAL_YWSTODS(DC
*dc
, INT height
)
487 /* Perform operation with floating point */
488 floatHeight
= (FLOAT
)height
;
489 INTERNAL_YWSTODS_FLOAT(dc
, &floatHeight
);
491 /* Round to integers */
492 return GDI_ROUND(floatHeight
);
496 /* Device <-> logical size conversion */
498 #define XDSTOLS(dc,x) \
499 MulDiv((x), (dc)->wndExtX, (dc)->vportExtX)
500 #define YDSTOLS(dc,y) \
501 MulDiv((y), (dc)->wndExtY, (dc)->vportExtY)
502 #define XLSTODS(dc,x) \
503 MulDiv((x), (dc)->vportExtX, (dc)->wndExtX)
504 #define YLSTODS(dc,y) \
505 MulDiv((y), (dc)->vportExtY, (dc)->wndExtY)
509 extern BOOL
GDI_Init(void);
510 extern void *GDI_AllocObject( WORD
, WORD
, HGDIOBJ
* );
511 extern void *GDI_ReallocObject( WORD
, HGDIOBJ
, void *obj
);
512 extern BOOL
GDI_FreeObject( HGDIOBJ
, void *obj
);
513 extern void *GDI_GetObjPtr( HGDIOBJ
, WORD
);
514 extern void GDI_ReleaseObj( HGDIOBJ
);
515 extern void GDI_CheckNotLock(void);
517 extern const DC_FUNCTIONS
*DRIVER_load_driver( LPCSTR name
);
518 extern const DC_FUNCTIONS
*DRIVER_get_driver( const DC_FUNCTIONS
*funcs
);
519 extern void DRIVER_release_driver( const DC_FUNCTIONS
*funcs
);
520 extern BOOL
DRIVER_GetDriverName( LPCSTR device
, LPSTR driver
, DWORD size
);
522 extern POINT
*GDI_Bezier( const POINT
*Points
, INT count
, INT
*nPtsOut
);
524 extern DC
* DC_AllocDC( const DC_FUNCTIONS
*funcs
);
525 extern DC
* DC_GetDCPtr( HDC hdc
);
526 extern DC
* DC_GetDCUpdate( HDC hdc
);
527 extern void DC_InitDC( DC
* dc
);
528 extern void DC_UpdateXforms( DC
* dc
);
531 #define CLIP_INTERSECT 0x0001
532 #define CLIP_EXCLUDE 0x0002
533 #define CLIP_KEEPRGN 0x0004
535 /* objects/clipping.c */
536 INT
CLIPPING_IntersectClipRect( DC
* dc
, INT left
, INT top
,
537 INT right
, INT bottom
, UINT flags
);
538 INT
CLIPPING_IntersectVisRect( DC
* dc
, INT left
, INT top
,
539 INT right
, INT bottom
, BOOL exclude
);
540 extern void CLIPPING_UpdateGCRegion( DC
* dc
);
542 /* objects/enhmetafile.c */
543 extern HENHMETAFILE
EMF_Create_HENHMETAFILE(ENHMETAHEADER
*emh
, BOOL on_disk
);
545 #define WINE_GGO_GRAY16_BITMAP 0x7f
547 #endif /* __WINE_GDI_H */