0516517c0e9c9a42a8298df2755c4400d9eb51bb
[reactos.git] / reactos / subsystems / win32 / win32k / include / engobjects.h
1 /*
2 * ReactOS kernel
3 * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
4 *
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.
9 *
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.
14 *
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.
18 */
19 /* $Id$
20 *
21 * COPYRIGHT: See COPYING in the top level directory
22 * PROJECT: ReactOS kernel
23 * PURPOSE: GDI Internal Objects
24 * FILE: subsystem/win32/win32k/eng/objects.h
25 * PROGRAMER: Jason Filby
26 * REVISION HISTORY:
27 * 21/8/1999: Created
28 */
29 #ifndef __ENG_OBJECTS_H
30 #define __ENG_OBJECTS_H
31
32 #include <ft2build.h>
33 #include <freetype/freetype.h>
34
35 /* Structure of internal gdi objects that win32k manages for ddi engine:
36 |---------------------------------|
37 | Public part |
38 | accessed from engine |
39 |---------------------------------|
40 | Private part |
41 | managed by gdi |
42 |_________________________________|
43
44 ---------------------------------------------------------------------------*/
45
46 typedef struct _CLIPGDI {
47 CLIPOBJ ClipObj;
48 ULONG EnumPos;
49 ULONG EnumOrder;
50 ULONG EnumMax;
51 ENUMRECTS EnumRects;
52 } CLIPGDI, *PCLIPGDI;
53
54 /*ei What is this for? */
55 typedef struct _DRVFUNCTIONSGDI {
56 HDEV hdev;
57 DRVFN Functions[INDEX_LAST];
58 } DRVFUNCTIONSGDI;
59
60 typedef struct _FLOATGDI {
61 ULONG Dummy;
62 } FLOATGDI;
63
64
65 #define FDM_TYPE_TEXT_METRIC 0x80000000
66
67 typedef struct _FONTGDI {
68 FONTOBJ FontObj;
69 ULONG iUnique;
70 FLONG flType;
71 union{
72 DHPDEV dhpdev;
73 FT_Face face;
74 };
75 FLONG flRealizedType;
76
77 LONG lMaxNegA;
78 LONG lMaxNegC;
79 LONG lMinWidthD;
80
81 TEXTMETRICW TextMetric;
82 LPWSTR Filename;
83 BYTE Underline;
84 BYTE StrikeOut;
85 } FONTGDI, *PFONTGDI;
86
87 typedef struct _PATHGDI {
88 PATHOBJ PathObj;
89 } PATHGDI;
90
91 typedef struct _WNDGDI {
92 WNDOBJ WndObj;
93 LIST_ENTRY ListEntry;
94 HWND Hwnd;
95 CLIPOBJ *ClientClipObj;
96 WNDOBJCHANGEPROC ChangeProc;
97 FLONG Flags;
98 int PixelFormat;
99 } WNDGDI, *PWNDGDI;
100
101 typedef struct _XFORMGDI {
102 ULONG Dummy;
103 /* XFORMOBJ has no public members */
104 } XFORMGDI;
105
106 typedef struct _XLATEGDI {
107 XLATEOBJ XlateObj;
108 HPALETTE DestPal;
109 HPALETTE SourcePal;
110 BOOL UseShiftAndMask;
111
112 // union {
113 // struct { /* For Shift Translations */
114 ULONG RedMask;
115 ULONG GreenMask;
116 ULONG BlueMask;
117 INT RedShift;
118 INT GreenShift;
119 INT BlueShift;
120 // };
121 // struct { /* For Color -> Mono Translations */
122 ULONG BackgroundColor;
123 // };
124 // };
125 } XLATEGDI;
126
127 /* as the *OBJ structures are located at the beginning of the *GDI structures
128 we can simply typecast the pointer */
129 #define ObjToGDI(ClipObj, Type) (Type##GDI *)(ClipObj)
130 #define GDIToObj(ClipGDI, Type) (Type##OBJ *)(ClipGDI)
131
132
133 #endif //__ENG_OBJECTS_H