* Sync up to trunk HEAD (r62285). Branch guys deserve the significant speedups too ;)
[reactos.git] / win32ss / gdi / eng / 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 /* Structure of internal gdi objects that win32k manages for ddi engine:
32 |---------------------------------|
33 | Public part |
34 | accessed from engine |
35 |---------------------------------|
36 | Private part |
37 | managed by gdi |
38 |_________________________________|
39
40 ---------------------------------------------------------------------------*/
41
42 /* EXtended CLip and Window Region Object */
43 typedef struct _XCLIPOBJ
44 {
45 WNDOBJ;
46 PVOID pClipRgn; /* prgnRao_ or (prgnVis_ if (prgnRao_ == z)) */
47 RECTL rclClipRgn;
48 PVOID pscanClipRgn; /* Ptr to regions rect buffer based on iDirection. */
49 DWORD cScan;
50 DWORD reserved;
51 ULONG ulBSize;
52 LONG lscnSize;
53 ULONG ulObjSize;
54 ULONG iDirection;
55 ULONG ulClipType;
56 DWORD reserved1;
57 LONG lUpDown;
58 DWORD reserved2;
59 BOOL bShouldDoAll;
60 DWORD nComplexity; /* count/mode based on # of rect in regions scan. */
61 PVOID pDDA; /* Pointer to a large drawing structure. */
62 } XCLIPOBJ, *PXCLIPOBJ;
63 /*
64 EngCreateClip allocates XCLIPOBJ and RGNOBJ, pco->co.pClipRgn = &pco->ro.
65 {
66 XCLIPOBJ co;
67 RGNOBJ ro;
68 }
69 */
70 typedef struct _CLIPGDI {
71 CLIPOBJ ClipObj;
72 ULONG EnumPos;
73 ULONG EnumOrder;
74 ULONG EnumMax;
75 ENUMRECTS EnumRects;
76 } CLIPGDI, *PCLIPGDI;
77
78 // HACK, until we use the original structure
79 #define XCLIPOBJ CLIPGDI
80
81 extern XCLIPOBJ gxcoTrivial;
82
83 /*ei What is this for? */
84 typedef struct _DRVFUNCTIONSGDI {
85 HDEV hdev;
86 DRVFN Functions[INDEX_LAST];
87 } DRVFUNCTIONSGDI;
88
89 typedef struct _FLOATGDI {
90 ULONG Dummy;
91 } FLOATGDI;
92
93 typedef struct _FONTGDI {
94 FONTOBJ FontObj;
95 ULONG iUnique;
96 FLONG flType;
97 union{
98 DHPDEV dhpdev;
99 FT_Face face;
100 };
101
102 LONG lMaxNegA;
103 LONG lMaxNegC;
104 LONG lMinWidthD;
105
106 LPWSTR Filename;
107 BYTE Underline;
108 BYTE StrikeOut;
109 } FONTGDI, *PFONTGDI;
110
111 typedef struct _PATHGDI {
112 PATHOBJ PathObj;
113 } PATHGDI;
114
115 typedef struct _WNDGDI {
116 WNDOBJ WndObj;
117 HWND Hwnd;
118 CLIPOBJ *ClientClipObj;
119 WNDOBJCHANGEPROC ChangeProc;
120 FLONG Flags;
121 int PixelFormat;
122 } WNDGDI, *PWNDGDI;
123
124 typedef struct _XFORMGDI {
125 ULONG Dummy;
126 /* XFORMOBJ has no public members */
127 } XFORMGDI;
128
129 /* As the *OBJ structures are located at the beginning of the *GDI structures
130 we can simply typecast the pointer */
131 #define ObjToGDI(ClipObj, Type) (Type##GDI *)(ClipObj)
132 #define GDIToObj(ClipGDI, Type) (Type##OBJ *)(ClipGDI)