* Sync up to trunk head (r64959).
[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 union
72 {
73 CLIPOBJ ClipObj;
74 WNDOBJ WndObj;
75 };
76 /* WNDOBJ part */
77 HWND Hwnd;
78 WNDOBJCHANGEPROC ChangeProc;
79 FLONG Flags;
80 int PixelFormat;
81 /* CLIPOBJ part */
82 ULONG EnumPos;
83 ULONG EnumOrder;
84 ULONG EnumMax;
85 ULONG RectCount;
86 RECTL* Rects;
87 } CLIPGDI, *PCLIPGDI;
88 C_ASSERT(FIELD_OFFSET(CLIPGDI, ClipObj) == FIELD_OFFSET(CLIPGDI, WndObj.coClient));
89
90 // HACK, until we use the original structure
91 #define XCLIPOBJ CLIPGDI
92
93 extern XCLIPOBJ gxcoTrivial;
94
95 /*ei What is this for? */
96 typedef struct _DRVFUNCTIONSGDI {
97 HDEV hdev;
98 DRVFN Functions[INDEX_LAST];
99 } DRVFUNCTIONSGDI;
100
101 typedef struct _FLOATGDI {
102 ULONG Dummy;
103 } FLOATGDI;
104
105 typedef struct _FONTGDI {
106 FONTOBJ FontObj;
107 ULONG iUnique;
108 FLONG flType;
109 union{
110 DHPDEV dhpdev;
111 FT_Face face;
112 };
113
114 LONG lMaxNegA;
115 LONG lMaxNegC;
116 LONG lMinWidthD;
117
118 LPWSTR Filename;
119 BYTE Underline;
120 BYTE StrikeOut;
121 } FONTGDI, *PFONTGDI;
122
123 typedef struct _PATHGDI {
124 PATHOBJ PathObj;
125 } PATHGDI;
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)