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
28 #include <wine/wingdi16.h>
31 /* GDI objects magic numbers */
32 #define FIRST_MAGIC 0x4f47
33 #define PEN_MAGIC 0x4f47
34 #define BRUSH_MAGIC 0x4f48
35 #define FONT_MAGIC 0x4f49
36 #define PALETTE_MAGIC 0x4f4a
37 #define BITMAP_MAGIC 0x4f4b
38 #define REGION_MAGIC 0x4f4c
39 #define DC_MAGIC 0x4f4d
40 #define DISABLED_DC_MAGIC 0x4f4e
41 #define META_DC_MAGIC 0x4f4f
42 #define METAFILE_MAGIC 0x4f50
43 #define METAFILE_DC_MAGIC 0x4f51
44 #define ENHMETAFILE_MAGIC 0x4f52
45 #define ENHMETAFILE_DC_MAGIC 0x4f53
46 #define MEMORY_DC_MAGIC 0x4f54
47 #define LAST_MAGIC 0x4f54
49 #define MAGIC_DONTCARE 0xffff
51 /* GDI constants for making objects private/system (naming undoc. !) */
52 #define OBJECT_PRIVATE 0x2000
53 #define OBJECT_NOSYSTEM 0x8000
55 #define GDIMAGIC(magic) ((magic) & ~(OBJECT_PRIVATE|OBJECT_NOSYSTEM))
59 HGDIOBJ (*pSelectObject
)( HGDIOBJ handle
, void *obj
, HDC hdc
);
60 INT (*pGetObject16
)( HGDIOBJ handle
, void *obj
, INT count
, LPVOID buffer
);
61 INT (*pGetObjectA
)( HGDIOBJ handle
, void *obj
, INT count
, LPVOID buffer
);
62 INT (*pGetObjectW
)( HGDIOBJ handle
, void *obj
, INT count
, LPVOID buffer
);
63 BOOL (*pUnrealizeObject
)( HGDIOBJ handle
, void *obj
);
64 BOOL (*pDeleteObject
)( HGDIOBJ handle
, void *obj
);
67 typedef struct tagGDIOBJHDR
72 const struct gdi_obj_funcs
*funcs
;
76 /* It should not be necessary to access the contents of the GdiPath
77 * structure directly; if you find that the exported functions don't
78 * allow you to do what you want, then please place a new exported
79 * function that does this job in path.c.
81 typedef enum tagGdiPathState
88 typedef struct tagGdiPath
93 int numEntriesUsed
, numEntriesAllocated
;
97 typedef struct tagGdiFont
*GdiFont
;
99 typedef struct { int opaque
; } *PHYSDEV
; /* PHYSDEV is an opaque pointer */
104 HDC hSelf
; /* Handle to this DC */
105 const struct tagDC_FUNCS
*funcs
; /* DC function table */
106 PHYSDEV physDev
; /* Physical device (driver-specific) */
109 FARPROC16 hookProc
; /* the original SEGPTR ... */
110 DCHOOKPROC hookThunk
; /* ... and the thunk to call it */
112 INT wndOrgX
; /* Window origin */
114 INT wndExtX
; /* Window extent */
116 INT vportOrgX
; /* Viewport origin */
118 INT vportExtX
; /* Viewport extent */
122 HRGN hClipRgn
; /* Clip region (may be 0) */
123 HRGN hVisRgn
; /* Visible region (must never be 0) */
124 HRGN hGCClipRgn
; /* GC clip region (ClipRgn AND VisRgn) */
140 COLORREF backgroundColor
;
142 COLORREF dcBrushColor
;
147 WORD textAlign
; /* Text alignment from SetTextAlign() */
148 short charExtra
; /* Spacing from SetTextCharacterExtra() */
149 short breakTotalExtra
; /* Total extra space for justification */
150 short breakCount
; /* Break char. count */
151 short breakExtra
; /* breakTotalExtra / breakCount */
152 short breakRem
; /* breakTotalExtra % breakCount */
158 INT GraphicsMode
; /* Graphics mode */
159 ABORTPROC pAbortProc
; /* AbortProc for Printing */
160 ABORTPROC16 pAbortProc16
;
161 INT CursPosX
; /* Current position */
164 XFORM xformWorld2Wnd
; /* World-to-window transformation */
165 XFORM xformWorld2Vport
; /* World-to-viewport transformation */
166 XFORM xformVport2World
; /* Inverse of the above transformation */
167 BOOL vport2WorldValid
; /* Is xformVport2World valid? */
170 /* Device functions for the Wine driver interface */
172 typedef INT (*DEVICEFONTENUMPROC
)(LPENUMLOGFONTEXW
,NEWTEXTMETRICEXW
*,DWORD
,
175 typedef struct tagDC_FUNCS
177 INT (*pAbortDoc
)(PHYSDEV
);
178 BOOL (*pAbortPath
)(PHYSDEV
);
179 BOOL (*pAngleArc
)(PHYSDEV
,INT
,INT
,DWORD
,FLOAT
,FLOAT
);
180 BOOL (*pArc
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,INT
);
181 BOOL (*pArcTo
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,INT
);
182 BOOL (*pBeginPath
)(PHYSDEV
);
183 BOOL (*pBitBlt
)(PHYSDEV
,INT
,INT
,INT
,INT
,PHYSDEV
,INT
,INT
,DWORD
);
184 INT (*pChoosePixelFormat
)(PHYSDEV
,const PIXELFORMATDESCRIPTOR
*);
185 BOOL (*pChord
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,INT
);
186 BOOL (*pCloseFigure
)(PHYSDEV
);
187 BOOL (*pCreateBitmap
)(PHYSDEV
,HBITMAP
);
188 BOOL (*pCreateDC
)(DC
*,PHYSDEV
*,LPCWSTR
,LPCWSTR
,LPCWSTR
,const DEVMODEW
*);
189 HBITMAP (*pCreateDIBSection
)(PHYSDEV
,BITMAPINFO
*,UINT
,LPVOID
*,HANDLE
,DWORD
,DWORD
);
190 BOOL (*pDeleteBitmap
)(HBITMAP
);
191 BOOL (*pDeleteDC
)(PHYSDEV
);
192 INT (*pDescribePixelFormat
)(PHYSDEV
,INT
,UINT
,PIXELFORMATDESCRIPTOR
*);
193 DWORD (*pDeviceCapabilities
)(LPSTR
,LPCSTR
,LPCSTR
,WORD
,LPSTR
,LPDEVMODEA
);
194 BOOL (*pEllipse
)(PHYSDEV
,INT
,INT
,INT
,INT
);
195 INT (*pEndDoc
)(PHYSDEV
);
196 INT (*pEndPage
)(PHYSDEV
);
197 BOOL (*pEndPath
)(PHYSDEV
);
198 BOOL (*pEnumDeviceFonts
)(PHYSDEV
,LPLOGFONTW
,DEVICEFONTENUMPROC
,LPARAM
);
199 INT (*pExcludeClipRect
)(PHYSDEV
,INT
,INT
,INT
,INT
);
200 INT (*pExtDeviceMode
)(LPSTR
,HWND
,LPDEVMODEA
,LPSTR
,LPSTR
,LPDEVMODEA
,LPSTR
,DWORD
);
201 INT (*pExtEscape
)(PHYSDEV
,INT
,INT
,LPCVOID
,INT
,LPVOID
);
202 BOOL (*pExtFloodFill
)(PHYSDEV
,INT
,INT
,COLORREF
,UINT
);
203 INT (*pExtSelectClipRgn
)(PHYSDEV
,HRGN
,INT
);
204 BOOL (*pExtTextOut
)(PHYSDEV
,INT
,INT
,UINT
,const RECT
*,LPCWSTR
,UINT
,const INT
*);
205 BOOL (*pFillPath
)(PHYSDEV
);
206 BOOL (*pFillRgn
)(PHYSDEV
,HRGN
,HBRUSH
);
207 BOOL (*pFlattenPath
)(PHYSDEV
);
208 BOOL (*pFrameRgn
)(PHYSDEV
,HRGN
,HBRUSH
,INT
,INT
);
209 BOOL (*pGdiComment
)(PHYSDEV
,UINT
,CONST BYTE
*);
210 LONG (*pGetBitmapBits
)(HBITMAP
,void*,LONG
);
211 BOOL (*pGetCharWidth
)(PHYSDEV
,UINT
,UINT
,LPINT
);
212 BOOL (*pGetDCOrgEx
)(PHYSDEV
,LPPOINT
);
213 UINT (*pGetDIBColorTable
)(PHYSDEV
,UINT
,UINT
,RGBQUAD
*);
214 INT (*pGetDIBits
)(PHYSDEV
,HBITMAP
,UINT
,UINT
,LPVOID
,BITMAPINFO
*,UINT
);
215 INT (*pGetDeviceCaps
)(PHYSDEV
,INT
);
216 BOOL (*pGetDeviceGammaRamp
)(PHYSDEV
,LPVOID
);
217 COLORREF (*pGetNearestColor
)(PHYSDEV
,COLORREF
);
218 COLORREF (*pGetPixel
)(PHYSDEV
,INT
,INT
);
219 INT (*pGetPixelFormat
)(PHYSDEV
);
220 UINT (*pGetSystemPaletteEntries
)(PHYSDEV
,UINT
,UINT
,LPPALETTEENTRY
);
221 BOOL (*pGetTextExtentPoint
)(PHYSDEV
,LPCWSTR
,INT
,LPSIZE
);
222 BOOL (*pGetTextMetrics
)(PHYSDEV
,TEXTMETRICW
*);
223 INT (*pIntersectClipRect
)(PHYSDEV
,INT
,INT
,INT
,INT
);
224 BOOL (*pInvertRgn
)(PHYSDEV
,HRGN
);
225 BOOL (*pLineTo
)(PHYSDEV
,INT
,INT
);
226 BOOL (*pModifyWorldTransform
)(PHYSDEV
,const XFORM
*,INT
);
227 BOOL (*pMoveTo
)(PHYSDEV
,INT
,INT
);
228 INT (*pOffsetClipRgn
)(PHYSDEV
,INT
,INT
);
229 INT (*pOffsetViewportOrg
)(PHYSDEV
,INT
,INT
);
230 INT (*pOffsetWindowOrg
)(PHYSDEV
,INT
,INT
);
231 BOOL (*pPaintRgn
)(PHYSDEV
,HRGN
);
232 BOOL (*pPatBlt
)(PHYSDEV
,INT
,INT
,INT
,INT
,DWORD
);
233 BOOL (*pPie
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,INT
);
234 BOOL (*pPolyBezier
)(PHYSDEV
,const POINT
*,DWORD
);
235 BOOL (*pPolyBezierTo
)(PHYSDEV
,const POINT
*,DWORD
);
236 BOOL (*pPolyDraw
)(PHYSDEV
,const POINT
*,const BYTE
*,DWORD
);
237 BOOL (*pPolyPolygon
)(PHYSDEV
,const POINT
*,const INT
*,UINT
);
238 BOOL (*pPolyPolyline
)(PHYSDEV
,const POINT
*,const DWORD
*,DWORD
);
239 BOOL (*pPolygon
)(PHYSDEV
,const POINT
*,INT
);
240 BOOL (*pPolyline
)(PHYSDEV
,const POINT
*,INT
);
241 BOOL (*pPolylineTo
)(PHYSDEV
,const POINT
*,INT
);
242 UINT (*pRealizeDefaultPalette
)(PHYSDEV
);
243 UINT (*pRealizePalette
)(PHYSDEV
,HPALETTE
,BOOL
);
244 BOOL (*pRectangle
)(PHYSDEV
,INT
,INT
,INT
,INT
);
245 HDC (*pResetDC
)(PHYSDEV
,const DEVMODEA
*);
246 BOOL (*pRestoreDC
)(PHYSDEV
,INT
);
247 BOOL (*pRoundRect
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
);
248 INT (*pSaveDC
)(PHYSDEV
);
249 INT (*pScaleViewportExt
)(PHYSDEV
,INT
,INT
,INT
,INT
);
250 INT (*pScaleWindowExt
)(PHYSDEV
,INT
,INT
,INT
,INT
);
251 HBITMAP (*pSelectBitmap
)(PHYSDEV
,HBITMAP
);
252 HBRUSH (*pSelectBrush
)(PHYSDEV
,HBRUSH
);
253 BOOL (*pSelectClipPath
)(PHYSDEV
,INT
);
254 HFONT (*pSelectFont
)(PHYSDEV
,HFONT
);
255 HPALETTE (*pSelectPalette
)(PHYSDEV
,HPALETTE
,BOOL
);
256 HPEN (*pSelectPen
)(PHYSDEV
,HPEN
);
257 INT (*pSetArcDirection
)(PHYSDEV
,INT
);
258 LONG (*pSetBitmapBits
)(HBITMAP
,const void*,LONG
);
259 COLORREF (*pSetBkColor
)(PHYSDEV
,COLORREF
);
260 INT (*pSetBkMode
)(PHYSDEV
,INT
);
261 COLORREF (*pSetDCBrushColor
)(PHYSDEV
, COLORREF
);
262 DWORD (*pSetDCOrg
)(PHYSDEV
,INT
,INT
);
263 COLORREF (*pSetDCPenColor
)(PHYSDEV
, COLORREF
);
264 UINT (*pSetDIBColorTable
)(PHYSDEV
,UINT
,UINT
,const RGBQUAD
*);
265 INT (*pSetDIBits
)(PHYSDEV
,HBITMAP
,UINT
,UINT
,LPCVOID
,const BITMAPINFO
*,UINT
);
266 INT (*pSetDIBitsToDevice
)(PHYSDEV
,INT
,INT
,DWORD
,DWORD
,INT
,INT
,UINT
,UINT
,LPCVOID
,
267 const BITMAPINFO
*,UINT
);
268 VOID (*pSetDeviceClipping
)(PHYSDEV
,HRGN
);
269 BOOL (*pSetDeviceGammaRamp
)(PHYSDEV
,LPVOID
);
270 INT (*pSetMapMode
)(PHYSDEV
,INT
);
271 DWORD (*pSetMapperFlags
)(PHYSDEV
,DWORD
);
272 COLORREF (*pSetPixel
)(PHYSDEV
,INT
,INT
,COLORREF
);
273 BOOL (*pSetPixelFormat
)(PHYSDEV
,INT
,const PIXELFORMATDESCRIPTOR
*);
274 INT (*pSetPolyFillMode
)(PHYSDEV
,INT
);
275 INT (*pSetROP2
)(PHYSDEV
,INT
);
276 INT (*pSetRelAbs
)(PHYSDEV
,INT
);
277 INT (*pSetStretchBltMode
)(PHYSDEV
,INT
);
278 UINT (*pSetTextAlign
)(PHYSDEV
,UINT
);
279 INT (*pSetTextCharacterExtra
)(PHYSDEV
,INT
);
280 DWORD (*pSetTextColor
)(PHYSDEV
,DWORD
);
281 INT (*pSetTextJustification
)(PHYSDEV
,INT
,INT
);
282 INT (*pSetViewportExt
)(PHYSDEV
,INT
,INT
);
283 INT (*pSetViewportOrg
)(PHYSDEV
,INT
,INT
);
284 INT (*pSetWindowExt
)(PHYSDEV
,INT
,INT
);
285 INT (*pSetWindowOrg
)(PHYSDEV
,INT
,INT
);
286 BOOL (*pSetWorldTransform
)(PHYSDEV
,const XFORM
*);
287 INT (*pStartDoc
)(PHYSDEV
,const DOCINFOA
*);
288 INT (*pStartPage
)(PHYSDEV
);
289 BOOL (*pStretchBlt
)(PHYSDEV
,INT
,INT
,INT
,INT
,PHYSDEV
,INT
,INT
,INT
,INT
,DWORD
);
290 INT (*pStretchDIBits
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,const void *,
291 const BITMAPINFO
*,UINT
,DWORD
);
292 BOOL (*pStrokeAndFillPath
)(PHYSDEV
);
293 BOOL (*pStrokePath
)(PHYSDEV
);
294 BOOL (*pSwapBuffers
)(PHYSDEV
);
295 BOOL (*pWidenPath
)(PHYSDEV
);
298 /* Certain functions will do no further processing if the driver returns this.
299 Used by mfdrv for example. */
300 #define GDI_NO_MORE_WORK 2
303 #define DCHC_INVALIDVISRGN 0x0001
304 #define DCHC_DELETEDC 0x0002
306 #define DCHF_INVALIDATEVISRGN 0x0001
307 #define DCHF_VALIDATEVISRGN 0x0002
310 #define DC_SAVED 0x0002 /* It is a saved DC */
311 #define DC_DIRTY 0x0004 /* hVisRgn has to be updated */
312 #define DC_THUNKHOOK 0x0008 /* DC hook is in the 16-bit code */
314 #define GDI_HEAP_SIZE 0xffe0
316 /* extra stock object: default 1x1 bitmap for memory DCs */
317 #define DEFAULT_BITMAP (STOCK_LAST+1)
319 /* Metafile defines */
321 #define META_EOF 0x0000
322 /* values of mtType in METAHEADER. Note however that the disk image of a disk
323 based metafile has mtType == 1 */
324 #define METAFILE_MEMORY 1
325 #define METAFILE_DISK 2
327 /* Rounds a floating point number to integer. The world-to-viewport
328 * transformation process is done in floating point internally. This function
329 * is then used to round these coordinates to integer values.
331 static inline INT WINE_UNUSED
GDI_ROUND(FLOAT val
)
333 return (int)floor(val
+ 0.5);
336 /* World -> Device size conversion */
338 /* Performs a world-to-viewport transformation on the specified width (which
339 * is in floating point format).
341 static inline void WINE_UNUSED
INTERNAL_XWSTODS_FLOAT(DC
*dc
, FLOAT
*width
)
343 /* Perform the transformation */
344 *width
= *width
* dc
->xformWorld2Vport
.eM11
;
347 /* Performs a world-to-viewport transformation on the specified width (which
348 * is in integer format).
350 static inline INT WINE_UNUSED
INTERNAL_XWSTODS(DC
*dc
, INT width
)
354 /* Perform operation with floating point */
355 floatWidth
= (FLOAT
)width
;
356 INTERNAL_XWSTODS_FLOAT(dc
, &floatWidth
);
358 /* Round to integers */
359 return GDI_ROUND(floatWidth
);
363 /* Performs a world-to-viewport transformation on the specified size (which
364 * is in floating point format).
366 static inline void WINE_UNUSED
INTERNAL_YWSTODS_FLOAT(DC
*dc
, FLOAT
*height
)
368 /* Perform the transformation */
369 *height
= *height
* dc
->xformWorld2Vport
.eM22
;
372 /* Performs a world-to-viewport transformation on the specified size (which
373 * is in integer format).
375 static inline INT WINE_UNUSED
INTERNAL_YWSTODS(DC
*dc
, INT height
)
379 /* Perform operation with floating point */
380 floatHeight
= (FLOAT
)height
;
381 INTERNAL_YWSTODS_FLOAT(dc
, &floatHeight
);
383 /* Round to integers */
384 return GDI_ROUND(floatHeight
);
388 /* Device -> World size conversion */
390 /* Performs a device to world transformation on the specified width (which
391 * is in floating point format).
393 static inline void INTERNAL_XDSTOWS_FLOAT(DC
*dc
, FLOAT
*width
)
395 /* Perform the transformation */
396 *width
= *width
* dc
->xformVport2World
.eM11
;
399 /* Performs a device to world transformation on the specified width (which
400 * is in integer format).
402 static inline INT
INTERNAL_XDSTOWS(DC
*dc
, INT width
)
406 /* Perform operation with floating point */
407 floatWidth
= (FLOAT
)width
;
408 INTERNAL_XDSTOWS_FLOAT(dc
, &floatWidth
);
410 /* Round to integers */
411 return GDI_ROUND(floatWidth
);
415 /* Performs a device to world transformation on the specified size (which
416 * is in floating point format).
418 static inline void INTERNAL_YDSTOWS_FLOAT(DC
*dc
, FLOAT
*height
)
420 /* Perform the transformation */
421 *height
= *height
* dc
->xformVport2World
.eM22
;
424 /* Performs a device to world transformation on the specified size (which
425 * is in integer format).
427 static inline INT
INTERNAL_YDSTOWS(DC
*dc
, INT height
)
431 /* Perform operation with floating point */
432 floatHeight
= (FLOAT
)height
;
433 INTERNAL_YDSTOWS_FLOAT(dc
, &floatHeight
);
435 /* Round to integers */
436 return GDI_ROUND(floatHeight
);
440 /* Device <-> logical size conversion */
442 #define XDSTOLS(dc,x) \
443 MulDiv((x), (dc)->wndExtX, (dc)->vportExtX)
444 #define YDSTOLS(dc,y) \
445 MulDiv((y), (dc)->wndExtY, (dc)->vportExtY)
446 #define XLSTODS(dc,x) \
447 MulDiv((x), (dc)->vportExtX, (dc)->wndExtX)
448 #define YLSTODS(dc,y) \
449 MulDiv((y), (dc)->vportExtY, (dc)->wndExtY)
453 extern BOOL
GDI_Init(void);
454 extern void *GDI_AllocObject( WORD
, WORD
, HGDIOBJ
*, const struct gdi_obj_funcs
*funcs
);
455 extern void *GDI_ReallocObject( WORD
, HGDIOBJ
, void *obj
);
456 extern BOOL
GDI_FreeObject( HGDIOBJ
, void *obj
);
457 extern void *GDI_GetObjPtr( HGDIOBJ
, WORD
);
458 extern void GDI_ReleaseObj( HGDIOBJ
);
459 extern void GDI_CheckNotLock(void);
461 extern const DC_FUNCTIONS
*DRIVER_load_driver( LPCWSTR name
);
462 extern const DC_FUNCTIONS
*DRIVER_get_driver( const DC_FUNCTIONS
*funcs
);
463 extern void DRIVER_release_driver( const DC_FUNCTIONS
*funcs
);
464 extern BOOL
DRIVER_GetDriverName( LPCWSTR device
, LPWSTR driver
, DWORD size
);
466 extern POINT
*GDI_Bezier( const POINT
*Points
, INT count
, INT
*nPtsOut
);
468 extern DC
* DC_AllocDC( const DC_FUNCTIONS
*funcs
, WORD magic
);
469 extern DC
* DC_GetDCPtr( HDC hdc
);
470 extern DC
* DC_GetDCUpdate( HDC hdc
);
471 extern void DC_InitDC( DC
* dc
);
472 extern void DC_UpdateXforms( DC
* dc
);
476 /* Wine_GCPW Flags */
478 * LOOSE means that the paragraph dir is only set if there is no strong character.
479 * FORCE means override the characters in the paragraph.
481 #define WINE_GCPW_FORCE_LTR 0
482 #define WINE_GCPW_FORCE_RTL 1
483 #define WINE_GCPW_LOOSE_LTR 2
484 #define WINE_GCPW_LOOSE_RTL 3
485 #define WINE_GCPW_DIR_MASK 3
486 extern BOOL
BIDI_Reorder( LPCWSTR lpString
, INT uCount
, DWORD dwFlags
, DWORD dwWineGCP_Flags
,
487 LPWSTR lpOutString
, INT uCountOut
, UINT
*lpOrder
);
488 extern BOOL BidiAvail
;
491 extern void CLIPPING_UpdateGCRegion( DC
* dc
);
494 extern HENHMETAFILE
EMF_Create_HENHMETAFILE(ENHMETAHEADER
*emh
, BOOL on_disk
);
497 extern INT
WineEngAddFontResourceEx(LPCWSTR
, DWORD
, PVOID
);
498 extern GdiFont
WineEngCreateFontInstance(DC
*, HFONT
);
499 extern BOOL
WineEngDestroyFontInstance(HFONT handle
);
500 extern DWORD
WineEngEnumFonts(LPLOGFONTW
, DEVICEFONTENUMPROC
, LPARAM
);
501 extern BOOL
WineEngGetCharWidth(GdiFont
, UINT
, UINT
, LPINT
);
502 extern DWORD
WineEngGetFontData(GdiFont
, DWORD
, DWORD
, LPVOID
, DWORD
);
503 extern DWORD
WineEngGetGlyphIndices(GdiFont font
, LPCWSTR lpstr
, INT count
,
504 LPWORD pgi
, DWORD flags
);
505 extern DWORD
WineEngGetGlyphOutline(GdiFont
, UINT glyph
, UINT format
,
506 LPGLYPHMETRICS
, DWORD buflen
, LPVOID buf
,
508 extern UINT
WineEngGetOutlineTextMetrics(GdiFont
, UINT
, LPOUTLINETEXTMETRICW
);
509 extern UINT
WineEngGetTextCharsetInfo(GdiFont font
, LPFONTSIGNATURE fs
, DWORD flags
);
510 extern BOOL
WineEngGetTextExtentPoint(GdiFont
, LPCWSTR
, INT
, LPSIZE
);
511 extern BOOL
WineEngGetTextExtentPointI(GdiFont
, const WORD
*, INT
, LPSIZE
);
512 extern INT
WineEngGetTextFace(GdiFont
, INT
, LPWSTR
);
513 extern BOOL
WineEngGetTextMetrics(GdiFont
, LPTEXTMETRICW
);
514 extern BOOL
WineEngInit(void);
515 extern BOOL
WineEngRemoveFontResourceEx(LPCWSTR
, DWORD
, PVOID
);
518 extern HMETAFILE
MF_Create_HMETAFILE(METAHEADER
*mh
);
519 extern HMETAFILE16
MF_Create_HMETAFILE16(METAHEADER
*mh
);
520 extern METAHEADER
*MF_CreateMetaHeaderDisk(METAHEADER
*mr
, LPCSTR filename
);
523 extern BOOL
REGION_FrameRgn( HRGN dest
, HRGN src
, INT x
, INT y
);
526 extern HPALETTE WINAPI
GDISelectPalette( HDC hdc
, HPALETTE hpal
, WORD wBkg
);
527 extern UINT WINAPI
GDIRealizePalette( HDC hdc
);
531 #define PATH_IsPathOpen(path) ((path).state==PATH_Open)
532 /* Returns TRUE if the specified path is in the open state, i.e. in the
533 * state where points will be added to the path, or FALSE otherwise. This
534 * function is implemented as a macro for performance reasons.
537 extern void PATH_InitGdiPath(GdiPath
*pPath
);
538 extern void PATH_DestroyGdiPath(GdiPath
*pPath
);
539 extern BOOL
PATH_AssignGdiPath(GdiPath
*pPathDest
, const GdiPath
*pPathSrc
);
541 extern BOOL
PATH_MoveTo(DC
*dc
);
542 extern BOOL
PATH_LineTo(DC
*dc
, INT x
, INT y
);
543 extern BOOL
PATH_Rectangle(DC
*dc
, INT x1
, INT y1
, INT x2
, INT y2
);
544 extern BOOL
PATH_Ellipse(DC
*dc
, INT x1
, INT y1
, INT x2
, INT y2
);
545 extern BOOL
PATH_Arc(DC
*dc
, INT x1
, INT y1
, INT x2
, INT y2
,
546 INT xStart
, INT yStart
, INT xEnd
, INT yEnd
, INT lines
);
547 extern BOOL
PATH_PolyBezierTo(DC
*dc
, const POINT
*pt
, DWORD cbCount
);
548 extern BOOL
PATH_PolyBezier(DC
*dc
, const POINT
*pt
, DWORD cbCount
);
549 extern BOOL
PATH_PolylineTo(DC
*dc
, const POINT
*pt
, DWORD cbCount
);
550 extern BOOL
PATH_Polyline(DC
*dc
, const POINT
*pt
, DWORD cbCount
);
551 extern BOOL
PATH_Polygon(DC
*dc
, const POINT
*pt
, DWORD cbCount
);
552 extern BOOL
PATH_PolyPolyline(DC
*dc
, const POINT
*pt
, const DWORD
*counts
, DWORD polylines
);
553 extern BOOL
PATH_PolyPolygon(DC
*dc
, const POINT
*pt
, const INT
*counts
, UINT polygons
);
554 extern BOOL
PATH_RoundRect(DC
*dc
, INT x1
, INT y1
, INT x2
, INT y2
, INT ell_width
, INT ell_height
);
555 extern BOOL
PATH_AddEntry(GdiPath
*pPath
, const POINT
*pPoint
, BYTE flags
);
558 extern LPWSTR
FONT_mbtowc(HDC
, LPCSTR
, INT
, INT
*, UINT
*);
560 #define WINE_GGO_GRAY16_BITMAP 0x7f
562 #endif /* __WINE_GDI_H */