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: win32ss/gdi/eng/engobjects.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 typedef struct _RWNDOBJ { 43 PVOID pvConsumer; 44 RECTL rclClient; 45 SURFOBJ *psoOwner; 46 } RWNDOBJ; 47 48 /* 49 * XCLIPOBJ structure --- EXtended CLip and Window Region Objects. 50 * See also: https://reactos.org/wiki/Techwiki:Win32k/XCLIPOBJ 51 */ 52 #ifdef __cplusplus 53 typedef struct _XCLIPOBJ : _CLIPOBJ, _RWNDOBJ 54 { 55 #else 56 typedef struct _XCLIPOBJ 57 { 58 CLIPOBJ; 59 RWNDOBJ; 60 #endif 61 struct _REGION *pClipRgn; /* prgnRao_ or (prgnVis_ if (prgnRao_ == z)) */ 62 // 63 RECTL rclClipRgn; 64 //PVOID pscanClipRgn; /* Ptr to regions rect buffer based on iDirection. */ 65 RECTL* Rects; 66 DWORD cScan; 67 DWORD reserved; 68 ULONG EnumPos; 69 LONG lscnSize; 70 ULONG EnumMax; 71 ULONG iDirection; 72 ULONG iType; 73 DWORD reserved1; 74 LONG lUpDown; 75 DWORD reserved2; 76 BOOL bAll; 77 // 78 DWORD RectCount; /* count/mode based on # of rect in regions scan. */ 79 PVOID pDDA; /* Pointer to a large drawing structure. */ 80 } XCLIPOBJ, *PXCLIPOBJ; 81 82 /* 83 EngCreateClip allocates XCLIPOBJ and REGION, pco->co.pClipRgn = &pco->ro. 84 { 85 XCLIPOBJ co; 86 REGION ro; 87 } 88 */ 89 90 extern XCLIPOBJ gxcoTrivial; 91 92 #ifdef __cplusplus 93 typedef struct _EWNDOBJ : _XCLIPOBJ 94 { 95 #else 96 typedef struct _EWNDOBJ 97 { 98 XCLIPOBJ; 99 #endif 100 /* Extended WNDOBJ part */ 101 HWND Hwnd; 102 WNDOBJCHANGEPROC ChangeProc; 103 FLONG Flags; 104 int PixelFormat; 105 } EWNDOBJ, *PEWNDOBJ; 106 107 108 /*ei What is this for? */ 109 typedef struct _DRVFUNCTIONSGDI { 110 HDEV hdev; 111 DRVFN Functions[INDEX_LAST]; 112 } DRVFUNCTIONSGDI; 113 114 typedef struct _FLOATGDI { 115 ULONG Dummy; 116 } FLOATGDI; 117 118 typedef struct _SHARED_MEM { 119 PVOID Buffer; 120 ULONG BufferSize; 121 BOOL IsMapping; 122 LONG RefCount; 123 } SHARED_MEM, *PSHARED_MEM; 124 125 typedef struct _SHARED_FACE_CACHE { 126 UINT OutlineRequiredSize; 127 UNICODE_STRING FontFamily; 128 UNICODE_STRING FullName; 129 } SHARED_FACE_CACHE, *PSHARED_FACE_CACHE; 130 131 typedef struct _SHARED_FACE { 132 FT_Face Face; 133 LONG RefCount; 134 PSHARED_MEM Memory; 135 SHARED_FACE_CACHE EnglishUS; 136 SHARED_FACE_CACHE UserLanguage; 137 } SHARED_FACE, *PSHARED_FACE; 138 139 typedef struct _FONTGDI { 140 FONTOBJ FontObj; 141 ULONG iUnique; 142 FLONG flType; 143 144 DHPDEV dhpdev; 145 PSHARED_FACE SharedFace; 146 147 LONG lMaxNegA; 148 LONG lMaxNegC; 149 LONG lMinWidthD; 150 151 LPWSTR Filename; 152 BYTE RequestUnderline; 153 BYTE RequestStrikeOut; 154 BYTE RequestItalic; 155 LONG RequestWeight; 156 BYTE OriginalItalic; 157 LONG OriginalWeight; 158 BYTE CharSet; 159 160 /* Precomputed font metrics (supplements FreeType metrics) */ 161 LONG tmHeight; 162 LONG tmAscent; 163 LONG tmDescent; 164 LONG tmInternalLeading; 165 LONG Magic; 166 LONG lfHeight; 167 LONG lfWidth; 168 } FONTGDI, *PFONTGDI; 169 170 /* The initialized 'Magic' value in FONTGDI */ 171 #define FONTGDI_MAGIC 0x20110311 172 173 typedef struct _PATHGDI { 174 PATHOBJ PathObj; 175 } PATHGDI; 176 177 typedef struct _XFORMGDI { 178 ULONG Dummy; 179 /* XFORMOBJ has no public members */ 180 } XFORMGDI; 181 182 /* As the *OBJ structures are located at the beginning of the *GDI structures 183 we can simply typecast the pointer */ 184 #define ObjToGDI(ClipObj, Type) (Type##GDI *)(ClipObj) 185 #define GDIToObj(ClipGDI, Type) (Type##OBJ *)(ClipGDI) 186