4 * Copyright 1993 Alexandre Julliard
5 * Copyright 2021 Jacek Caban for CodeWeavers
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #ifndef __WINE_GDI_PRIVATE_H
23 #define __WINE_GDI_PRIVATE_H
31 void set_gdi_client_ptr( HGDIOBJ handle
, void *ptr
) DECLSPEC_HIDDEN
;
32 void *get_gdi_client_ptr( HGDIOBJ handle
, WORD type
) DECLSPEC_HIDDEN
;
33 DC_ATTR
*get_dc_attr( HDC hdc
) DECLSPEC_HIDDEN
;
34 void GDI_hdc_using_object( HGDIOBJ obj
, HDC hdc
,
35 void (*delete)( HDC hdc
, HGDIOBJ handle
)) DECLSPEC_HIDDEN
;
36 void GDI_hdc_not_using_object( HGDIOBJ obj
, HDC hdc
) DECLSPEC_HIDDEN
;
38 static inline WORD
gdi_handle_type( HGDIOBJ obj
)
40 unsigned int handle
= HandleToULong( obj
);
41 return (handle
& NTGDI_HANDLE_TYPE_MASK
) >> NTGDI_HANDLE_TYPE_SHIFT
;
44 static inline BOOL
is_meta_dc( HDC hdc
)
46 return gdi_handle_type( hdc
) == NTGDI_OBJ_METADC
;
49 extern BOOL
METADC_Arc( HDC hdc
, INT left
, INT top
, INT right
, INT bottom
,
50 INT xstart
, INT ystart
, INT xend
, INT yend
) DECLSPEC_HIDDEN
;
51 extern BOOL
METADC_Chord( HDC hdc
, INT left
, INT top
, INT right
, INT bottom
, INT xstart
,
52 INT ystart
, INT xend
, INT yend
) DECLSPEC_HIDDEN
;
53 extern BOOL
METADC_Ellipse( HDC hdc
, INT left
, INT top
, INT right
, INT bottom
) DECLSPEC_HIDDEN
;
54 extern BOOL
METADC_ExcludeClipRect( HDC hdc
, INT left
, INT top
, INT right
,
55 INT bottom
) DECLSPEC_HIDDEN
;
56 extern BOOL
METADC_ExtFloodFill( HDC hdc
, INT x
, INT y
, COLORREF color
,
57 UINT fill_type
) DECLSPEC_HIDDEN
;
58 extern BOOL
METADC_ExtSelectClipRgn( HDC hdc
, HRGN hrgn
, INT mode
) DECLSPEC_HIDDEN
;
59 extern BOOL
METADC_ExtTextOut( HDC hdc
, INT x
, INT y
, UINT flags
, const RECT
*rect
,
60 const WCHAR
*str
, UINT count
, const INT
*dx
) DECLSPEC_HIDDEN
;
61 extern BOOL
METADC_FillRgn( HDC hdc
, HRGN hrgn
, HBRUSH hbrush
) DECLSPEC_HIDDEN
;
62 extern BOOL
METADC_FrameRgn( HDC hdc
, HRGN hrgn
, HBRUSH hbrush
, INT x
, INT y
) DECLSPEC_HIDDEN
;
63 extern INT
METADC_GetDeviceCaps( HDC hdc
, INT cap
);
64 extern BOOL
METADC_IntersectClipRect( HDC hdc
, INT left
, INT top
, INT right
,
65 INT bottom
) DECLSPEC_HIDDEN
;
66 extern BOOL
METADC_InvertRgn( HDC hdc
, HRGN hrgn
) DECLSPEC_HIDDEN
;
67 extern BOOL
METADC_LineTo( HDC hdc
, INT x
, INT y
) DECLSPEC_HIDDEN
;
68 extern BOOL
METADC_MoveTo( HDC hdc
, INT x
, INT y
) DECLSPEC_HIDDEN
;
69 extern BOOL
METADC_OffsetClipRgn( HDC hdc
, INT x
, INT y
) DECLSPEC_HIDDEN
;
70 extern BOOL
METADC_OffsetViewportOrgEx( HDC hdc
, INT x
, INT y
) DECLSPEC_HIDDEN
;
71 extern BOOL
METADC_OffsetWindowOrgEx( HDC hdc
, INT x
, INT y
) DECLSPEC_HIDDEN
;
72 extern BOOL
METADC_PaintRgn( HDC hdc
, HRGN hrgn
) DECLSPEC_HIDDEN
;
73 extern BOOL
METADC_PatBlt( HDC hdc
, INT left
, INT top
, INT width
, INT height
, DWORD rop
);
74 extern BOOL
METADC_Pie( HDC hdc
, INT left
, INT top
, INT right
, INT bottom
,
75 INT xstart
, INT ystart
, INT xend
, INT yend
) DECLSPEC_HIDDEN
;
76 extern BOOL
METADC_PolyPolygon( HDC hdc
, const POINT
*points
, const INT
*counts
,
77 UINT polygons
) DECLSPEC_HIDDEN
;
78 extern BOOL
METADC_Polygon( HDC hdc
, const POINT
*points
, INT count
) DECLSPEC_HIDDEN
;
79 extern BOOL
METADC_Polyline( HDC hdc
, const POINT
*points
,INT count
) DECLSPEC_HIDDEN
;
80 extern BOOL
METADC_RealizePalette( HDC hdc
) DECLSPEC_HIDDEN
;
81 extern BOOL
METADC_Rectangle( HDC hdc
, INT left
, INT top
, INT right
, INT bottom
) DECLSPEC_HIDDEN
;
82 extern BOOL
METADC_RoundRect( HDC hdc
, INT left
, INT top
, INT right
, INT bottom
,
83 INT ell_width
, INT ell_height
) DECLSPEC_HIDDEN
;
84 extern BOOL
METADC_SaveDC( HDC hdc
) DECLSPEC_HIDDEN
;
85 extern BOOL
METADC_ScaleViewportExtEx( HDC hdc
, INT x_num
, INT x_denom
, INT y_num
,
86 INT y_denom
) DECLSPEC_HIDDEN
;
87 extern BOOL
METADC_ScaleWindowExtEx( HDC hdc
, INT x_num
, INT x_denom
, INT y_num
,
88 INT y_denom
) DECLSPEC_HIDDEN
;
89 extern HGDIOBJ
METADC_SelectObject( HDC hdc
, HGDIOBJ obj
) DECLSPEC_HIDDEN
;
90 extern BOOL
METADC_SelectPalette( HDC hdc
, HPALETTE palette
) DECLSPEC_HIDDEN
;
91 extern BOOL
METADC_SetBkMode( HDC hdc
, INT mode
) DECLSPEC_HIDDEN
;
92 extern BOOL
METADC_SetLayout( HDC hdc
, DWORD layout
) DECLSPEC_HIDDEN
;
93 extern BOOL
METADC_SetTextCharacterExtra( HDC hdc
, INT extra
) DECLSPEC_HIDDEN
;
94 extern BOOL
METADC_SetMapMode( HDC hdc
, INT mode
) DECLSPEC_HIDDEN
;
95 extern BOOL
METADC_SetMapperFlags( HDC hdc
, DWORD flags
) DECLSPEC_HIDDEN
;
96 extern BOOL
METADC_SetPixel( HDC hdc
, INT x
, INT y
, COLORREF color
) DECLSPEC_HIDDEN
;
97 extern BOOL
METADC_SetPolyFillMode( HDC hdc
, INT mode
) DECLSPEC_HIDDEN
;
98 extern BOOL
METADC_SetRelAbs( HDC hdc
, INT mode
) DECLSPEC_HIDDEN
;
99 extern BOOL
METADC_SetROP2( HDC hdc
, INT rop
) DECLSPEC_HIDDEN
;
100 extern BOOL
METADC_SetStretchBltMode( HDC hdc
, INT mode
) DECLSPEC_HIDDEN
;
101 extern BOOL
METADC_SetTextAlign( HDC hdc
, UINT align
) DECLSPEC_HIDDEN
;
102 extern BOOL
METADC_SetTextJustification( HDC hdc
, INT extra
, INT breaks
) DECLSPEC_HIDDEN
;
103 extern BOOL
METADC_SetViewportExtEx( HDC hdc
, INT x
, INT y
) DECLSPEC_HIDDEN
;
104 extern BOOL
METADC_SetViewportOrgEx( HDC hdc
, INT x
, INT y
) DECLSPEC_HIDDEN
;
105 extern BOOL
METADC_SetWindowExtEx( HDC hdc
, INT x
, INT y
) DECLSPEC_HIDDEN
;
106 extern BOOL
METADC_SetWindowOrgEx( HDC
, INT x
, INT y
) DECLSPEC_HIDDEN
;
107 extern BOOL
METADC_StretchBlt( HDC hdc_dst
, INT x_dst
, INT y_dst
, INT width_dst
, INT height_dst
,
108 HDC hdc_src
, INT x_src
, INT y_src
, INT width_src
, INT height_src
,
111 /* enhanced metafiles */
112 extern BOOL
EMFDC_AbortPath( DC_ATTR
*dc_attr
) DECLSPEC_HIDDEN
;
113 extern BOOL
EMFDC_AngleArc( DC_ATTR
*dc_attr
, INT x
, INT y
, DWORD radius
, FLOAT start
,
114 FLOAT sweep
) DECLSPEC_HIDDEN
;
115 extern BOOL
EMFDC_ArcChordPie( DC_ATTR
*dc_attr
, INT left
, INT top
, INT right
,
116 INT bottom
, INT xstart
, INT ystart
, INT xend
,
117 INT yend
, DWORD type
) DECLSPEC_HIDDEN
;
118 extern BOOL
EMFDC_BeginPath( DC_ATTR
*dc_attr
) DECLSPEC_HIDDEN
;
119 extern BOOL
EMFDC_CloseFigure( DC_ATTR
*dc_attr
) DECLSPEC_HIDDEN
;
120 extern BOOL
EMFDC_Ellipse( DC_ATTR
*dc_attr
, INT left
, INT top
, INT right
,
121 INT bottom
) DECLSPEC_HIDDEN
;
122 extern BOOL
EMFDC_EndPath( DC_ATTR
*dc_attr
) DECLSPEC_HIDDEN
;
123 extern BOOL
EMFDC_ExcludeClipRect( DC_ATTR
*dc_attr
, INT left
, INT top
, INT right
,
124 INT bottom
) DECLSPEC_HIDDEN
;
125 extern BOOL
EMFDC_ExtFloodFill( DC_ATTR
*dc_attr
, INT x
, INT y
, COLORREF color
,
126 UINT fill_type
) DECLSPEC_HIDDEN
;
127 extern BOOL
EMFDC_ExtSelectClipRgn( DC_ATTR
*dc_attr
, HRGN hrgn
, INT mode
) DECLSPEC_HIDDEN
;
128 extern BOOL
EMFDC_ExtTextOut( DC_ATTR
*dc_attr
, INT x
, INT y
, UINT flags
, const RECT
*rect
,
129 const WCHAR
*str
, UINT count
, const INT
*dx
) DECLSPEC_HIDDEN
;
130 extern BOOL
EMFDC_FillRgn( DC_ATTR
*dc_attr
, HRGN hrgn
, HBRUSH hbrush
) DECLSPEC_HIDDEN
;
131 extern BOOL
EMFDC_FrameRgn( DC_ATTR
*dc_attr
, HRGN hrgn
, HBRUSH hbrush
, INT width
,
132 INT height
) DECLSPEC_HIDDEN
;
133 extern BOOL
EMFDC_GradientFill( DC_ATTR
*dc_attr
, TRIVERTEX
*vert_array
, ULONG nvert
,
134 void *grad_array
, ULONG ngrad
, ULONG mode
) DECLSPEC_HIDDEN
;
135 extern BOOL
EMFDC_IntersectClipRect( DC_ATTR
*dc_attr
, INT left
, INT top
, INT right
,
136 INT bottom
) DECLSPEC_HIDDEN
;
137 extern BOOL
EMFDC_InvertRgn( DC_ATTR
*dc_attr
, HRGN hrgn
) DECLSPEC_HIDDEN
;
138 extern BOOL
EMFDC_LineTo( DC_ATTR
*dc_attr
, INT x
, INT y
) DECLSPEC_HIDDEN
;
139 extern BOOL
EMFDC_MoveTo( DC_ATTR
*dc_attr
, INT x
, INT y
) DECLSPEC_HIDDEN
;
140 extern BOOL
EMFDC_OffsetClipRgn( DC_ATTR
*dc_attr
, INT x
, INT y
) DECLSPEC_HIDDEN
;
141 extern BOOL
EMFDC_PaintRgn( DC_ATTR
*dc_attr
, HRGN hrgn
) DECLSPEC_HIDDEN
;
142 extern BOOL
EMFDC_PatBlt( DC_ATTR
*dc_attr
, INT left
, INT top
, INT width
, INT height
, DWORD rop
);
143 extern BOOL
EMFDC_PolyBezier( DC_ATTR
*dc_attr
, const POINT
*points
, DWORD count
) DECLSPEC_HIDDEN
;
144 extern BOOL
EMFDC_PolyBezierTo( DC_ATTR
*dc_attr
, const POINT
*points
, DWORD count
) DECLSPEC_HIDDEN
;
145 extern BOOL
EMFDC_PolyDraw( DC_ATTR
*dc_attr
, const POINT
*points
, const BYTE
*types
,
146 DWORD count
) DECLSPEC_HIDDEN
;
147 extern BOOL
EMFDC_PolyPolyline( DC_ATTR
*dc_attr
, const POINT
*points
, const DWORD
*counts
,
148 DWORD polys
) DECLSPEC_HIDDEN
;
149 extern BOOL
EMFDC_PolyPolygon( DC_ATTR
*dc_attr
, const POINT
*points
, const INT
*counts
,
150 UINT polys
) DECLSPEC_HIDDEN
;
151 extern BOOL
EMFDC_Polygon( DC_ATTR
*dc_attr
, const POINT
*points
, INT count
) DECLSPEC_HIDDEN
;
152 extern BOOL
EMFDC_Polyline( DC_ATTR
*dc_attr
, const POINT
*points
, INT count
) DECLSPEC_HIDDEN
;
153 extern BOOL
EMFDC_PolylineTo( DC_ATTR
*dc_attr
, const POINT
*points
, INT count
) DECLSPEC_HIDDEN
;
154 extern BOOL
EMFDC_Rectangle( DC_ATTR
*dc_attr
, INT left
, INT top
, INT right
,
155 INT bottom
) DECLSPEC_HIDDEN
;
156 extern BOOL
EMFDC_RoundRect( DC_ATTR
*dc_attr
, INT left
, INT top
, INT right
, INT bottom
,
157 INT ell_width
, INT ell_height
) DECLSPEC_HIDDEN
;
158 extern BOOL
EMFDC_SaveDC( DC_ATTR
*dc_attr
) DECLSPEC_HIDDEN
;
159 extern BOOL
EMFDC_ScaleViewportExtEx( DC_ATTR
*dc_attr
, INT x_num
, INT x_denom
, INT y_num
,
160 INT y_denom
) DECLSPEC_HIDDEN
;
161 extern BOOL
EMFDC_ScaleWindowExtEx( DC_ATTR
*dc_attr
, INT x_num
, INT x_denom
, INT y_num
,
162 INT y_denom
) DECLSPEC_HIDDEN
;
163 extern BOOL
EMFDC_SelectObject( DC_ATTR
*dc_attr
, HGDIOBJ obj
) DECLSPEC_HIDDEN
;
164 extern BOOL
EMFDC_SelectPalette( DC_ATTR
*dc_attr
, HPALETTE palette
) DECLSPEC_HIDDEN
;
165 extern BOOL
EMFDC_SetArcDirection( DC_ATTR
*dc_attr
, INT dir
) DECLSPEC_HIDDEN
;
166 extern BOOL
EMFDC_SetBkMode( DC_ATTR
*dc_attr
, INT mode
) DECLSPEC_HIDDEN
;
167 extern BOOL
EMFDC_SetLayout( DC_ATTR
*dc_attr
, DWORD layout
) DECLSPEC_HIDDEN
;
168 extern BOOL
EMFDC_SetMapMode( DC_ATTR
*dc_attr
, INT mode
) DECLSPEC_HIDDEN
;
169 extern BOOL
EMFDC_SetMapperFlags( DC_ATTR
*dc_attr
, DWORD flags
) DECLSPEC_HIDDEN
;
170 extern BOOL
EMFDC_SetPixel( DC_ATTR
*dc_attr
, INT x
, INT y
, COLORREF color
) DECLSPEC_HIDDEN
;
171 extern BOOL
EMFDC_SetPolyFillMode( DC_ATTR
*dc_attr
, INT mode
) DECLSPEC_HIDDEN
;
172 extern BOOL
EMFDC_SetROP2( DC_ATTR
*dc_attr
, INT rop
) DECLSPEC_HIDDEN
;
173 extern BOOL
EMFDC_SetStretchBltMode( DC_ATTR
*dc_attr
, INT mode
) DECLSPEC_HIDDEN
;
174 extern BOOL
EMFDC_SetTextAlign( DC_ATTR
*dc_attr
, UINT align
) DECLSPEC_HIDDEN
;
175 extern BOOL
EMFDC_SetTextJustification( DC_ATTR
*dc_attr
, INT extra
, INT breaks
) DECLSPEC_HIDDEN
;
176 extern BOOL
EMFDC_SetViewportExtEx( DC_ATTR
*dc_attr
, INT x
, INT y
) DECLSPEC_HIDDEN
;
177 extern BOOL
EMFDC_SetViewportOrgEx( DC_ATTR
*dc_attr
, INT x
, INT y
) DECLSPEC_HIDDEN
;
178 extern BOOL
EMFDC_SetWindowExtEx( DC_ATTR
*dc_attr
, INT x
, INT y
) DECLSPEC_HIDDEN
;
179 extern BOOL
EMFDC_SetWindowOrgEx( DC_ATTR
*dc_attr
, INT x
, INT y
) DECLSPEC_HIDDEN
;
180 extern BOOL
EMFDC_StretchBlt( DC_ATTR
*dc_attr
, INT x_dst
, INT y_dst
, INT width_dst
, INT height_dst
,
181 HDC hdc_src
, INT x_src
, INT y_src
, INT width_src
, INT height_src
,
184 #endif /* __WINE_GDI_PRIVATE_H */