afb0920487454425d2d445c4e905fcbcb8b63df2
[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 along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 /*
20 * COPYRIGHT: See COPYING in the top level directory
21 * PROJECT: ReactOS kernel
22 * PURPOSE: GDI Internal Objects
23 * FILE: subsystem/win32/win32k/eng/objects.h
24 * PROGRAMER: Jason Filby
25 * REVISION HISTORY:
26 * 21/8/1999: Created
27 */
28
29 #pragma once
30
31 #include <ft2build.h>
32 #include <freetype/freetype.h>
33
34 /* Structure of internal gdi objects that win32k manages for ddi engine:
35 |---------------------------------|
36 | Public part |
37 | accessed from engine |
38 |---------------------------------|
39 | Private part |
40 | managed by gdi |
41 |_________________________________|
42
43 ---------------------------------------------------------------------------*/
44
45 /* EXtended CLip and Window Region Object */
46 typedef struct _XCLIPOBJ
47 {
48 WNDOBJ;
49 PVOID pClipRgn; /* prgnRao_ or (prgnVis_ if (prgnRao_ == z)) */
50 RECTL rclClipRgn;
51 PVOID pscanClipRgn; /* Ptr to regions rect buffer based on iDirection. */
52 DWORD cScan;
53 DWORD reserved;
54 ULONG ulBSize;
55 LONG lscnSize;
56 ULONG ulObjSize;
57 ULONG iDirection;
58 ULONG ulClipType;
59 DWORD reserved1;
60 LONG lUpDown;
61 DWORD reserved2;
62 BOOL bShouldDoAll;
63 DWORD nComplexity; /* count/mode based on # of rect in regions scan. */
64 PVOID pDDA; /* Pointer to a large drawing structure. */
65 } XCLIPOBJ, *PXCLIPOBJ;
66 /*
67 EngCreateClip allocates XCLIPOBJ and RGNOBJ, pco->co.pClipRgn = &pco->ro.
68 {
69 XCLIPOBJ co;
70 RGNOBJ ro;
71 }
72 */
73 typedef struct _CLIPGDI {
74 CLIPOBJ ClipObj;
75 ULONG EnumPos;
76 ULONG EnumOrder;
77 ULONG EnumMax;
78 ENUMRECTS EnumRects;
79 } CLIPGDI, *PCLIPGDI;
80
81 /*ei What is this for? */
82 typedef struct _DRVFUNCTIONSGDI {
83 HDEV hdev;
84 DRVFN Functions[INDEX_LAST];
85 } DRVFUNCTIONSGDI;
86
87 typedef struct _FLOATGDI {
88 ULONG Dummy;
89 } FLOATGDI;
90
91
92 #define FDM_TYPE_TEXT_METRIC 0x80000000
93
94 typedef struct _FONTGDI {
95 FONTOBJ FontObj;
96 ULONG iUnique;
97 FLONG flType;
98 union{
99 DHPDEV dhpdev;
100 FT_Face face;
101 };
102 FLONG flRealizedType;
103
104 LONG lMaxNegA;
105 LONG lMaxNegC;
106 LONG lMinWidthD;
107
108 TEXTMETRICW TextMetric;
109 LPWSTR Filename;
110 BYTE Underline;
111 BYTE StrikeOut;
112 } FONTGDI, *PFONTGDI;
113
114 typedef struct _PATHGDI {
115 PATHOBJ PathObj;
116 } PATHGDI;
117
118 typedef struct _WNDGDI {
119 WNDOBJ WndObj;
120 HWND Hwnd;
121 CLIPOBJ *ClientClipObj;
122 WNDOBJCHANGEPROC ChangeProc;
123 FLONG Flags;
124 int PixelFormat;
125 } WNDGDI, *PWNDGDI;
126
127 typedef struct _XFORMGDI {
128 ULONG Dummy;
129 /* XFORMOBJ has no public members */
130 } XFORMGDI;
131
132 /* as the *OBJ structures are located at the beginning of the *GDI structures
133 we can simply typecast the pointer */
134 #define ObjToGDI(ClipObj, Type) (Type##GDI *)(ClipObj)
135 #define GDIToObj(ClipGDI, Type) (Type##OBJ *)(ClipGDI)