Window activation cleanups.
[wine] / include / gdi.h
1 /*
2  * GDI definitions
3  *
4  * Copyright 1993 Alexandre Julliard
5  */
6
7 #ifndef __WINE_GDI_H
8 #define __WINE_GDI_H
9
10 #include "windef.h"
11 #include "wingdi.h"
12 #include "wine/wingdi16.h"
13 #include "path.h"
14 #include <math.h>
15
16   /* GDI objects magic numbers */
17 #define FIRST_MAGIC           0x4f47
18 #define PEN_MAGIC             0x4f47
19 #define BRUSH_MAGIC           0x4f48
20 #define FONT_MAGIC            0x4f49
21 #define PALETTE_MAGIC         0x4f4a
22 #define BITMAP_MAGIC          0x4f4b
23 #define REGION_MAGIC          0x4f4c
24 #define DC_MAGIC              0x4f4d
25 #define DISABLED_DC_MAGIC     0x4f4e
26 #define META_DC_MAGIC         0x4f4f
27 #define METAFILE_MAGIC        0x4f50
28 #define METAFILE_DC_MAGIC     0x4f51
29 #define ENHMETAFILE_MAGIC     0x4f52
30 #define ENHMETAFILE_DC_MAGIC  0x4f53
31 #define LAST_MAGIC            0x4f53
32
33 #define MAGIC_DONTCARE        0xffff
34
35 /* GDI constants for making objects private/system (naming undoc. !) */
36 #define OBJECT_PRIVATE        0x2000
37 #define OBJECT_NOSYSTEM       0x8000
38
39 #define GDIMAGIC(magic) ((magic) & ~(OBJECT_PRIVATE|OBJECT_NOSYSTEM))
40
41 typedef struct tagGDIOBJHDR
42 {
43     HANDLE16    hNext;
44     WORD        wMagic;
45     DWORD       dwCount;
46 } GDIOBJHDR;
47
48
49 typedef BOOL16 CALLBACK (*DCHOOKPROC)(HDC16,WORD,DWORD,LPARAM);
50
51 typedef struct tagGdiFont *GdiFont;
52
53 typedef struct tagDC
54 {
55     GDIOBJHDR    header;
56     HDC          hSelf;            /* Handle to this DC */
57     const struct tagDC_FUNCS *funcs; /* DC function table */
58     void         *physDev;         /* Physical device (driver-specific) */
59     INT          saveLevel;
60     DWORD        dwHookData;
61     FARPROC16    hookProc;         /* the original SEGPTR ... */
62     DCHOOKPROC   hookThunk;        /* ... and the thunk to call it */
63
64     INT          wndOrgX;          /* Window origin */
65     INT          wndOrgY;
66     INT          wndExtX;          /* Window extent */
67     INT          wndExtY;
68     INT          vportOrgX;        /* Viewport origin */
69     INT          vportOrgY;
70     INT          vportExtX;        /* Viewport extent */
71     INT          vportExtY;
72
73     int           flags;
74     HRGN16        hClipRgn;     /* Clip region (may be 0) */
75     HRGN16        hVisRgn;      /* Visible region (must never be 0) */
76     HRGN16        hGCClipRgn;   /* GC clip region (ClipRgn AND VisRgn) */
77     HPEN16        hPen;
78     HBRUSH16      hBrush;
79     HFONT16       hFont;
80     HBITMAP16     hBitmap;
81     HANDLE16      hDevice;
82     HPALETTE16    hPalette;
83
84     GdiFont       gdiFont;
85     GdiPath       path;
86
87     WORD          ROPmode;
88     WORD          polyFillMode;
89     WORD          stretchBltMode;
90     WORD          relAbsMode;
91     WORD          backgroundMode;
92     COLORREF      backgroundColor;
93     COLORREF      textColor;
94     short         brushOrgX;
95     short         brushOrgY;
96
97     WORD          textAlign;         /* Text alignment from SetTextAlign() */
98     short         charExtra;         /* Spacing from SetTextCharacterExtra() */
99     short         breakTotalExtra;   /* Total extra space for justification */
100     short         breakCount;        /* Break char. count */
101     short         breakExtra;        /* breakTotalExtra / breakCount */
102     short         breakRem;          /* breakTotalExtra % breakCount */
103
104     RECT          totalExtent;
105     BYTE          bitsPerPixel;
106
107     INT           MapMode;
108     INT           GraphicsMode;      /* Graphics mode */
109     INT           DCOrgX;            /* DC origin */
110     INT           DCOrgY;
111     ABORTPROC     pAbortProc;        /* AbortProc for Printing */
112     INT           CursPosX;          /* Current position */
113     INT           CursPosY;
114     INT           ArcDirection;
115     XFORM         xformWorld2Wnd;    /* World-to-window transformation */
116     XFORM         xformWorld2Vport;  /* World-to-viewport transformation */
117     XFORM         xformVport2World;  /* Inverse of the above transformation */
118     BOOL          vport2WorldValid;  /* Is xformVport2World valid? */
119 } DC;
120
121 /* Device functions for the Wine driver interface */
122
123 typedef INT (*DEVICEFONTENUMPROC)(LPENUMLOGFONTEXW,LPNEWTEXTMETRICEXW,DWORD,
124                                   LPARAM);
125
126 typedef struct tagDC_FUNCS
127 {
128     INT      (*pAbortDoc)(DC*);
129     BOOL     (*pAbortPath)(DC*);
130     BOOL     (*pAngleArc)(DC*,INT,INT,DWORD,FLOAT,FLOAT);
131     BOOL     (*pArc)(DC*,INT,INT,INT,INT,INT,INT,INT,INT);
132     BOOL     (*pArcTo)(DC*,INT,INT,INT,INT,INT,INT,INT,INT);    
133     BOOL     (*pBeginPath)(DC*);
134     BOOL     (*pBitBlt)(DC*,INT,INT,INT,INT,DC*,INT,INT,DWORD);
135     LONG     (*pBitmapBits)(HBITMAP,void*,LONG,WORD);
136     INT      (*pChoosePixelFormat)(DC*,const PIXELFORMATDESCRIPTOR *);
137     BOOL     (*pChord)(DC*,INT,INT,INT,INT,INT,INT,INT,INT);
138     BOOL     (*pCloseFigure)(DC*);
139     BOOL     (*pCreateBitmap)(HBITMAP); 
140     BOOL     (*pCreateDC)(DC*,LPCSTR,LPCSTR,LPCSTR,const DEVMODEA*);
141     HBITMAP  (*pCreateDIBSection)(DC *,BITMAPINFO *,UINT,LPVOID *,HANDLE,
142                                   DWORD,DWORD);
143     BOOL     (*pDeleteDC)(DC*);
144     BOOL     (*pDeleteObject)(HGDIOBJ);
145     INT      (*pDescribePixelFormat)(DC *,INT,UINT,PIXELFORMATDESCRIPTOR *);
146     DWORD    (*pDeviceCapabilities)(LPSTR,LPCSTR,LPCSTR,WORD,LPSTR,LPDEVMODEA);
147     BOOL     (*pEllipse)(DC*,INT,INT,INT,INT);
148     INT      (*pEndDoc)(DC*);
149     INT      (*pEndPage)(DC*);
150     BOOL     (*pEndPath)(DC*);
151     BOOL     (*pEnumDeviceFonts)(HDC,LPLOGFONTW,DEVICEFONTENUMPROC,LPARAM);
152     INT      (*pExcludeClipRect)(DC*,INT,INT,INT,INT);
153     INT      (*pExtDeviceMode)(LPSTR,HWND,LPDEVMODEA,LPSTR,LPSTR,LPDEVMODEA,LPSTR,DWORD);
154     INT      (*pExtEscape)(DC*,INT,INT,LPCVOID,INT,LPVOID);
155     BOOL     (*pExtFloodFill)(DC*,INT,INT,COLORREF,UINT);
156     BOOL     (*pExtTextOut)(DC*,INT,INT,UINT,const RECT*,LPCWSTR,UINT,
157                             const INT*);
158     BOOL     (*pFillPath)(DC*);
159     BOOL     (*pFillRgn)(DC*,HRGN,HBRUSH);
160     BOOL     (*pFlattenPath)(DC*);
161     BOOL     (*pFrameRgn)(DC*,HRGN,HBRUSH,INT,INT);
162     BOOL     (*pGetCharWidth)(DC*,UINT,UINT,LPINT);
163     BOOL     (*pGetDCOrgEx)(DC*,LPPOINT);
164     INT      (*pGetDeviceCaps)(DC*,INT);
165     BOOL     (*pGetDeviceGammaRamp)(DC*,LPVOID);
166     COLORREF (*pGetPixel)(DC*,INT,INT);
167     INT      (*pGetPixelFormat)(DC*);
168     BOOL     (*pGetTextExtentPoint)(DC*,LPCWSTR,INT,LPSIZE);
169     BOOL     (*pGetTextMetrics)(DC*,TEXTMETRICW*);
170     INT      (*pIntersectClipRect)(DC*,INT,INT,INT,INT);
171     BOOL     (*pInvertRgn)(DC*,HRGN);    
172     BOOL     (*pLineTo)(DC*,INT,INT);
173     BOOL     (*pMoveTo)(DC*,INT,INT);
174     INT      (*pOffsetClipRgn)(DC*,INT,INT);
175     BOOL     (*pOffsetViewportOrg)(DC*,INT,INT);
176     BOOL     (*pOffsetWindowOrg)(DC*,INT,INT);
177     BOOL     (*pPaintRgn)(DC*,HRGN);
178     BOOL     (*pPatBlt)(DC*,INT,INT,INT,INT,DWORD);
179     BOOL     (*pPie)(DC*,INT,INT,INT,INT,INT,INT,INT,INT);
180     BOOL     (*pPolyBezier)(DC*,const POINT*,DWORD);
181     BOOL     (*pPolyBezierTo)(DC*,const POINT*,DWORD);
182     BOOL     (*pPolyDraw)(DC*,const POINT*,const BYTE *,DWORD);
183     BOOL     (*pPolyPolygon)(DC*,const POINT*,const INT*,UINT);
184     BOOL     (*pPolyPolyline)(DC*,const POINT*,const DWORD*,DWORD);
185     BOOL     (*pPolygon)(DC*,const POINT*,INT);
186     BOOL     (*pPolyline)(DC*,const POINT*,INT);
187     BOOL     (*pPolylineTo)(DC*,const POINT*,INT);
188     UINT     (*pRealizePalette)(DC*);
189     BOOL     (*pRectangle)(DC*,INT,INT,INT,INT);
190     BOOL     (*pRestoreDC)(DC*,INT);
191     BOOL     (*pRoundRect)(DC*,INT,INT,INT,INT,INT,INT);
192     INT      (*pSaveDC)(DC*);
193     BOOL     (*pScaleViewportExt)(DC*,INT,INT,INT,INT);
194     BOOL     (*pScaleWindowExt)(DC*,INT,INT,INT,INT);
195     BOOL     (*pSelectClipPath)(DC*,INT);
196     INT      (*pSelectClipRgn)(DC*,HRGN);
197     HANDLE   (*pSelectObject)(DC*,HANDLE);
198     HPALETTE (*pSelectPalette)(DC*,HPALETTE,BOOL);
199     COLORREF (*pSetBkColor)(DC*,COLORREF);
200     INT      (*pSetBkMode)(DC*,INT);
201     VOID     (*pSetDeviceClipping)(DC*);
202     BOOL     (*pSetDeviceGammaRamp)(DC*,LPVOID);
203     INT      (*pSetDIBitsToDevice)(DC*,INT,INT,DWORD,DWORD,INT,INT,UINT,UINT,
204                                    LPCVOID,const BITMAPINFO*,UINT);
205     INT      (*pSetMapMode)(DC*,INT);
206     DWORD    (*pSetMapperFlags)(DC*,DWORD);
207     COLORREF (*pSetPixel)(DC*,INT,INT,COLORREF);
208     BOOL     (*pSetPixelFormat)(DC*,INT,const PIXELFORMATDESCRIPTOR *);
209     INT      (*pSetPolyFillMode)(DC*,INT);
210     INT      (*pSetROP2)(DC*,INT);
211     INT      (*pSetRelAbs)(DC*,INT);
212     INT      (*pSetStretchBltMode)(DC*,INT);
213     UINT     (*pSetTextAlign)(DC*,UINT);
214     INT      (*pSetTextCharacterExtra)(DC*,INT);
215     DWORD    (*pSetTextColor)(DC*,DWORD);
216     INT      (*pSetTextJustification)(DC*,INT,INT);
217     BOOL     (*pSetViewportExt)(DC*,INT,INT);
218     BOOL     (*pSetViewportOrg)(DC*,INT,INT);
219     BOOL     (*pSetWindowExt)(DC*,INT,INT);
220     BOOL     (*pSetWindowOrg)(DC*,INT,INT);
221     INT      (*pStartDoc)(DC*,const DOCINFOA*);
222     INT      (*pStartPage)(DC*);
223     BOOL     (*pStretchBlt)(DC*,INT,INT,INT,INT,DC*,INT,INT,INT,INT,DWORD);
224     INT      (*pStretchDIBits)(DC*,INT,INT,INT,INT,INT,INT,INT,INT,
225                                const void *,const BITMAPINFO *,UINT,DWORD);
226     BOOL     (*pStrokeAndFillPath)(DC*);
227     BOOL     (*pStrokePath)(DC*);
228     BOOL     (*pSwapBuffers)(DC*);
229     BOOL     (*pWidenPath)(DC*);
230 } DC_FUNCTIONS;
231
232   /* LoadOEMResource types */
233 #define OEM_BITMAP  1
234 #define OEM_CURSOR  2
235 #define OEM_ICON    3
236
237   /* DC hook codes */
238 #define DCHC_INVALIDVISRGN      0x0001
239 #define DCHC_DELETEDC           0x0002
240
241 #define DCHF_INVALIDATEVISRGN   0x0001
242 #define DCHF_VALIDATEVISRGN     0x0002
243
244   /* DC flags */
245 #define DC_MEMORY     0x0001   /* It is a memory DC */
246 #define DC_SAVED      0x0002   /* It is a saved DC */
247 #define DC_DIRTY      0x0004   /* hVisRgn has to be updated */
248 #define DC_THUNKHOOK  0x0008   /* DC hook is in the 16-bit code */ 
249
250 #define GDI_HEAP_SIZE 0xffe0
251
252 /* extra stock object: default 1x1 bitmap for memory DCs */
253 #define DEFAULT_BITMAP (STOCK_LAST+1)
254
255   /* Device <-> logical coords conversion */
256
257 /* A floating point version of the POINT structure */
258 typedef struct tagFLOAT_POINT
259 {
260    FLOAT x, y;
261 } FLOAT_POINT;
262
263 /* Rounds a floating point number to integer. The world-to-viewport
264  * transformation process is done in floating point internally. This function
265  * is then used to round these coordinates to integer values.
266  */
267 static inline INT WINE_UNUSED GDI_ROUND(FLOAT val)
268 {
269    return (int)floor(val + 0.5);
270 }
271
272 /* Performs a viewport-to-world transformation on the specified point (which
273  * is in floating point format). Returns TRUE if successful, else FALSE.
274  */
275 static inline BOOL WINE_UNUSED INTERNAL_DPTOLP_FLOAT(DC *dc, FLOAT_POINT *point)
276 {
277     FLOAT x, y;
278     
279     /* Check that the viewport-to-world transformation is valid */
280     if (!dc->vport2WorldValid)
281         return FALSE;
282
283     /* Perform the transformation */
284     x = point->x;
285     y = point->y;
286     point->x = x * dc->xformVport2World.eM11 +
287                y * dc->xformVport2World.eM21 +
288                dc->xformVport2World.eDx;
289     point->y = x * dc->xformVport2World.eM12 +
290                y * dc->xformVport2World.eM22 +
291                dc->xformVport2World.eDy;
292
293     return TRUE;
294 }
295
296 /* Performs a viewport-to-world transformation on the specified point (which
297  * is in integer format). Returns TRUE if successful, else FALSE.
298  */
299 static inline BOOL WINE_UNUSED INTERNAL_DPTOLP(DC *dc, LPPOINT point)
300 {
301     FLOAT_POINT floatPoint;
302     
303     /* Perform operation with floating point */
304     floatPoint.x=(FLOAT)point->x;
305     floatPoint.y=(FLOAT)point->y;
306     if (!INTERNAL_DPTOLP_FLOAT(dc, &floatPoint))
307         return FALSE;
308     
309     /* Round to integers */
310     point->x = GDI_ROUND(floatPoint.x);
311     point->y = GDI_ROUND(floatPoint.y);
312
313     return TRUE;
314 }
315
316 /* Performs a world-to-viewport transformation on the specified point (which
317  * is in floating point format).
318  */
319 static inline void WINE_UNUSED INTERNAL_LPTODP_FLOAT(DC *dc, FLOAT_POINT *point)
320 {
321     FLOAT x, y;
322     
323     /* Perform the transformation */
324     x = point->x;
325     y = point->y;
326     point->x = x * dc->xformWorld2Vport.eM11 +
327                y * dc->xformWorld2Vport.eM21 +
328                dc->xformWorld2Vport.eDx;
329     point->y = x * dc->xformWorld2Vport.eM12 +
330                y * dc->xformWorld2Vport.eM22 +
331                dc->xformWorld2Vport.eDy;
332 }
333
334 /* Performs a world-to-viewport transformation on the specified point (which
335  * is in integer format).
336  */
337 static inline void WINE_UNUSED INTERNAL_LPTODP(DC *dc, LPPOINT point)
338 {
339     FLOAT_POINT floatPoint;
340     
341     /* Perform operation with floating point */
342     floatPoint.x=(FLOAT)point->x;
343     floatPoint.y=(FLOAT)point->y;
344     INTERNAL_LPTODP_FLOAT(dc, &floatPoint);
345     
346     /* Round to integers */
347     point->x = GDI_ROUND(floatPoint.x);
348     point->y = GDI_ROUND(floatPoint.y);
349 }
350
351
352 /* Performs a world-to-viewport transformation on the specified point (which
353  * is in integer format).
354  */
355 static inline INT WINE_UNUSED INTERNAL_XWPTODP(DC *dc, INT x, INT y)
356 {
357     FLOAT_POINT floatPoint;
358
359     /* Perform operation with floating point */
360     floatPoint.x=(FLOAT)x;
361     floatPoint.y=(FLOAT)y;
362     INTERNAL_LPTODP_FLOAT(dc, &floatPoint);
363
364     /* Round to integers */
365     return GDI_ROUND(floatPoint.x);
366 }
367
368 /* Performs a world-to-viewport transformation on the specified point (which
369  * is in integer format).
370  */
371 static inline INT WINE_UNUSED INTERNAL_YWPTODP(DC *dc, INT x, INT y)
372 {
373     FLOAT_POINT floatPoint;
374
375     /* Perform operation with floating point */
376     floatPoint.x=(FLOAT)x;
377     floatPoint.y=(FLOAT)y;
378     INTERNAL_LPTODP_FLOAT(dc, &floatPoint);
379
380     /* Round to integers */
381     return GDI_ROUND(floatPoint.y);
382 }
383
384
385 /* Performs a viewport-to-world transformation on the specified point (which
386  * is in integer format).
387  */
388 static inline INT WINE_UNUSED INTERNAL_XDPTOWP(DC *dc, INT x, INT y)
389 {
390     FLOAT_POINT floatPoint;
391
392     /* Perform operation with floating point */
393     floatPoint.x=(FLOAT)x;
394     floatPoint.y=(FLOAT)y;
395     INTERNAL_DPTOLP_FLOAT(dc, &floatPoint);
396
397     /* Round to integers */
398     return GDI_ROUND(floatPoint.x);
399 }
400
401 /* Performs a viewport-to-world transformation on the specified point (which
402  * is in integer format).
403  */
404 static inline INT WINE_UNUSED INTERNAL_YDPTOWP(DC *dc, INT x, INT y)
405 {
406     FLOAT_POINT floatPoint;
407
408     /* Perform operation with floating point */
409     floatPoint.x=(FLOAT)x;
410     floatPoint.y=(FLOAT)y;
411     INTERNAL_DPTOLP_FLOAT(dc, &floatPoint);
412
413     /* Round to integers */
414     return GDI_ROUND(floatPoint.y);
415 }
416
417
418 #define XDPTOLP(dc,x) \
419     (MulDiv(((x)-(dc)->vportOrgX), (dc)->wndExtX, (dc)->vportExtX) + (dc)->wndOrgX)
420 #define YDPTOLP(dc,y) \
421     (MulDiv(((y)-(dc)->vportOrgY), (dc)->wndExtY, (dc)->vportExtY) + (dc)->wndOrgY)
422 #define XLPTODP(dc,x) \
423     (MulDiv(((x)-(dc)->wndOrgX), (dc)->vportExtX, (dc)->wndExtX) + (dc)->vportOrgX)
424 #define YLPTODP(dc,y) \
425     (MulDiv(((y)-(dc)->wndOrgY), (dc)->vportExtY, (dc)->wndExtY) + (dc)->vportOrgY)
426
427
428
429   /* World -> Device size conversion */
430
431 /* Performs a world-to-viewport transformation on the specified width (which
432  * is in floating point format).
433  */
434 static inline void WINE_UNUSED INTERNAL_XWSTODS_FLOAT(DC *dc, FLOAT *width)
435 {
436     /* Perform the transformation */
437     *width = *width * dc->xformWorld2Vport.eM11;
438 }
439
440 /* Performs a world-to-viewport transformation on the specified width (which
441  * is in integer format).
442  */
443 static inline INT WINE_UNUSED INTERNAL_XWSTODS(DC *dc, INT width)
444 {
445     FLOAT floatWidth;
446
447     /* Perform operation with floating point */
448     floatWidth = (FLOAT)width;
449     INTERNAL_XWSTODS_FLOAT(dc, &floatWidth);
450
451     /* Round to integers */
452     return GDI_ROUND(floatWidth);
453 }
454
455
456 /* Performs a world-to-viewport transformation on the specified size (which
457  * is in floating point format).
458  */
459 static inline void WINE_UNUSED INTERNAL_YWSTODS_FLOAT(DC *dc, FLOAT *height)
460 {
461     /* Perform the transformation */
462     *height = *height * dc->xformWorld2Vport.eM22;
463 }
464
465 /* Performs a world-to-viewport transformation on the specified size (which
466  * is in integer format).
467  */
468 static inline INT WINE_UNUSED INTERNAL_YWSTODS(DC *dc, INT height)
469 {
470     FLOAT floatHeight;
471
472     /* Perform operation with floating point */
473     floatHeight = (FLOAT)height;
474     INTERNAL_YWSTODS_FLOAT(dc, &floatHeight);
475
476     /* Round to integers */
477     return GDI_ROUND(floatHeight);
478 }
479
480
481   /* Device <-> logical size conversion */
482
483 #define XDSTOLS(dc,x) \
484     MulDiv((x), (dc)->wndExtX, (dc)->vportExtX)
485 #define YDSTOLS(dc,y) \
486     MulDiv((y), (dc)->wndExtY, (dc)->vportExtY)
487 #define XLSTODS(dc,x) \
488     MulDiv((x), (dc)->vportExtX, (dc)->wndExtX)
489 #define YLSTODS(dc,y) \
490     MulDiv((y), (dc)->vportExtY, (dc)->wndExtY)
491
492   /* GDI local heap */
493
494 extern BOOL GDI_Init(void);
495 extern void *GDI_AllocObject( WORD, WORD, HGDIOBJ * );
496 extern void *GDI_ReallocObject( WORD, HGDIOBJ, void *obj );
497 extern BOOL GDI_FreeObject( HGDIOBJ, void *obj );
498 extern void *GDI_GetObjPtr( HGDIOBJ, WORD );
499 extern void GDI_ReleaseObj( HGDIOBJ );
500 extern void GDI_CheckNotLock(void);
501
502 extern const DC_FUNCTIONS *DRIVER_load_driver( LPCSTR name );
503 extern const DC_FUNCTIONS *DRIVER_get_driver( const DC_FUNCTIONS *funcs );
504 extern void DRIVER_release_driver( const DC_FUNCTIONS *funcs );
505 extern BOOL DRIVER_GetDriverName( LPCSTR device, LPSTR driver, DWORD size );
506
507 extern POINT *GDI_Bezier( const POINT *Points, INT count, INT *nPtsOut );
508
509 extern DC * DC_AllocDC( const DC_FUNCTIONS *funcs );
510 extern DC * DC_GetDCPtr( HDC hdc );
511 extern DC * DC_GetDCUpdate( HDC hdc );
512 extern void DC_InitDC( DC * dc );
513 extern void DC_UpdateXforms( DC * dc );
514
515
516 #define CLIP_INTERSECT 0x0001
517 #define CLIP_EXCLUDE   0x0002
518 #define CLIP_KEEPRGN   0x0004
519
520 /* objects/clipping.c */
521 INT CLIPPING_IntersectClipRect( DC * dc, INT left, INT top,
522                                 INT right, INT bottom, UINT flags );
523 INT CLIPPING_IntersectVisRect( DC * dc, INT left, INT top,
524                                INT right, INT bottom, BOOL exclude );
525 extern void CLIPPING_UpdateGCRegion( DC * dc );
526
527 /* objects/enhmetafile.c */
528 extern HENHMETAFILE EMF_Create_HENHMETAFILE(ENHMETAHEADER *emh, BOOL on_disk );
529
530 #endif  /* __WINE_GDI_H */