3 * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * COPYRIGHT: See COPYING in the top level directory
22 * PROJECT: ReactOS kernel
23 * PURPOSE: GDI Internal Objects
24 * FILE: subsys/win32k/eng/objects.h
25 * PROGRAMER: Jason Filby
29 #ifndef __ENG_OBJECTS_H
30 #define __ENG_OBJECTS_H
32 #include <freetype/freetype.h>
34 /* Structure of internal gdi objects that win32k manages for ddi engine:
35 |---------------------------------|
37 |---------------------------------|
39 | accessed from engine |
40 |---------------------------------|
43 |_________________________________|
45 ---------------------------------------------------------------------------*/
47 typedef struct _ENGOBJ {
55 typedef struct _BRUSHGDI {
60 typedef struct _CLIPGDI {
63 /* ei what were these for?
65 ULONG NumIntersectRects;
67 RECTL *IntersectRects;
75 /*ei What is this for? */
76 typedef struct _DRVFUNCTIONSGDI {
78 DRVFN Functions[INDEX_LAST];
81 typedef struct _FLOATGDI {
85 typedef struct _FONTGDI {
91 TEXTMETRICW TextMetric;
94 typedef struct _PATHGDI {
99 typedef struct _STRGDI {
104 typedef BOOL STDCALL (*PFN_BitBlt)(PSURFOBJ, PSURFOBJ, PSURFOBJ, PCLIPOBJ,
105 PXLATEOBJ, PRECTL, PPOINTL, PPOINTL,
106 PBRUSHOBJ, PPOINTL, ROP4);
108 typedef BOOL STDCALL (*PFN_TransparentBlt)(PSURFOBJ, PSURFOBJ, PCLIPOBJ, PXLATEOBJ, PRECTL, PRECTL, ULONG, ULONG);
110 typedef BOOL STDCALL (*PFN_StretchBlt)(PSURFOBJ, PSURFOBJ, PSURFOBJ, PCLIPOBJ,
111 PXLATEOBJ, PCOLORADJUSTMENT, PPOINTL,
112 PRECTL, PRECTL, PPOINT, ULONG);
114 typedef BOOL STDCALL (*PFN_TextOut)(PSURFOBJ, PSTROBJ, PFONTOBJ, PCLIPOBJ,
115 PRECTL, PRECTL, PBRUSHOBJ, PBRUSHOBJ,
118 typedef BOOL STDCALL (*PFN_Paint)(PSURFOBJ, PCLIPOBJ, PBRUSHOBJ, PPOINTL, MIX);
120 typedef BOOL STDCALL (*PFN_StrokePath)(PSURFOBJ, PPATHOBJ, PCLIPOBJ, PXFORMOBJ,
121 PBRUSHOBJ, PPOINTL, PLINEATTRS, MIX);
123 typedef BOOL STDCALL (*PFN_FillPath)(PSURFOBJ, PPATHOBJ, PCLIPOBJ, PBRUSHOBJ,
124 PPOINTL, MIX, ULONG);
126 typedef BOOL STDCALL (*PFN_StrokeAndFillPath)(PSURFOBJ, PPATHOBJ, PCLIPOBJ,
127 PXFORMOBJ, PBRUSHOBJ, PLINEATTRS, PBRUSHOBJ,
128 PPOINTL, MIX, ULONG);
130 typedef BOOL STDCALL (*PFN_LineTo)(PSURFOBJ, PCLIPOBJ, PBRUSHOBJ,
131 LONG, LONG, LONG, LONG, PRECTL, MIX);
133 typedef BOOL STDCALL (*PFN_CopyBits)(PSURFOBJ, PSURFOBJ, PCLIPOBJ,
134 PXLATEOBJ, PRECTL, PPOINTL);
136 typedef VOID STDCALL (*PFN_Synchronize)(DHPDEV, PRECTL);
138 typedef VOID STDCALL (*PFN_MovePointer)(PSURFOBJ, LONG, LONG, PRECTL);
140 typedef ULONG STDCALL (*PFN_SetPointerShape)(PSURFOBJ, PSURFOBJ, PSURFOBJ, PXLATEOBJ,
141 LONG, LONG, LONG, LONG, PRECTL, ULONG);
143 typedef HBITMAP STDCALL (*PFN_CreateDeviceBitmap)(DHPDEV, SIZEL, ULONG);
145 typedef BOOL STDCALL (*PFN_SetPalette)(DHPDEV, PALOBJ*, ULONG, ULONG, ULONG);
147 /* Forward declare (circular reference) */
148 typedef struct _SURFGDI *PSURFGDI;
150 typedef VOID (*PFN_DIB_PutPixel)(PSURFOBJ, LONG, LONG, ULONG);
151 typedef ULONG (*PFN_DIB_GetPixel)(PSURFOBJ, LONG, LONG);
152 typedef VOID (*PFN_DIB_HLine) (PSURFOBJ, LONG, LONG, LONG, ULONG);
153 typedef VOID (*PFN_DIB_VLine) (PSURFOBJ, LONG, LONG, LONG, ULONG);
154 typedef BOOLEAN (*PFN_DIB_BitBlt) (PSURFOBJ DestSurf, PSURFOBJ SourceSurf,
155 PSURFGDI DestGDI, PSURFGDI SourceGDI,
156 PRECTL DestRect, PPOINTL SourcePoint,
157 PBRUSHOBJ BrushObj, PPOINTL BrushOrigin,
158 XLATEOBJ *ColorTranslation, ULONG Rop4);
160 typedef struct _SURFGDI {
166 /* Driver functions */
168 PFN_TransparentBlt TransparentBlt;
169 PFN_StretchBlt StretchBlt;
172 PFN_StrokePath StrokePath;
173 PFN_FillPath FillPath;
174 PFN_StrokeAndFillPath StrokeAndFillPath;
176 PFN_CopyBits CopyBits;
177 PFN_Synchronize Synchronize;
178 BOOL SynchronizeAccess;
179 PFN_CreateDeviceBitmap CreateDeviceBitmap;
180 PFN_SetPalette SetPalette;
181 PFN_MovePointer MovePointer;
182 PFN_SetPointerShape SetPointerShape;
185 PFN_DIB_PutPixel DIB_PutPixel;
186 PFN_DIB_HLine DIB_HLine;
187 PFN_DIB_VLine DIB_VLine;
188 PFN_DIB_BitBlt DIB_BitBlt;
191 typedef struct _XFORMGDI {
193 /* XFORMOBJ has no public members */
196 typedef struct _XLATEGDI {
202 ULONG *translationTable;
210 BOOL UseShiftAndMask;
213 // List of GDI objects
214 // FIXME: Make more dynamic
216 #define MAX_GDI_BRUSHES 255
217 #define MAX_GDI_CLIPS 255
218 #define MAX_GDI_DRVFUNCTIONS 16
219 #define MAX_GDI_FLOATS 255
220 #define MAX_GDI_FONTS 255
221 #define MAX_GDI_PALS 255
222 #define MAX_GDI_PATHS 255
223 #define MAX_GDI_STRS 255
224 #define MAX_GDI_SURFS 255
225 #define MAX_GDI_XFORMS 255
226 #define MAX_GDI_XLATES 255
228 #endif //__ENG_OBJECTS_H