ReactOS  0.4.15-dev-2359-g0dedb9b
gdiobj.h
Go to the documentation of this file.
1 /*
2  * GDI object common header definition
3  *
4  */
5 
6 #pragma once
7 
8 #define GDI_OBJECT_STACK_LEVELS 20
9 
10 /* The first 10 entries are never used in windows, they are empty */
11 static const unsigned RESERVE_ENTRIES_COUNT = 10;
12 
13 typedef struct _GDI_HANDLE_TABLE
14 {
15 /* The table must be located at the beginning of this structure so it can be
16  * properly mapped!
17  */
20  DEVCAPS DevCaps; // Device Capabilities.
21  FLONG flDeviceUniq; // Device settings uniqueness.
22  PVOID pvLangPack; // Language Pack.
23  CFONT cfPublic[GDI_CFONT_MAX]; // Public Fonts.
25 
26 
28 
30 
31 typedef PVOID PGDIOBJ;
32 
33 typedef VOID (NTAPI *GDICLEANUPPROC)(PVOID ObjectBody);
34 typedef VOID (NTAPI *GDIOBJDELETEPROC)(PVOID ObjectBody);
35 
36 /* Every GDI Object must have this standard type of header.
37  * It's for thread locking. */
38 typedef struct _BASEOBJECT
39 {
41  union {
42  ULONG ulShareCount; /* For objects without a handle */
43  DWORD dwThreadId; /* Exclusive lock owner */
44  };
48 #if DBG_ENABLE_GDIOBJ_BACKTRACES
49  PVOID apvBackTrace[GDI_OBJECT_STACK_LEVELS];
50 #endif
51 #if DBG_ENABLE_EVENT_LOGGING
52  SLIST_HEADER slhLog;
53 #endif
54 } BASEOBJECT, *POBJ;
55 
57 {
59 
60  /* ReactOS specific: */
62 };
63 
64 typedef struct _CLIENTOBJ
65 {
68 
70 {
74 };
75 
77 NTAPI
79 
80 BOOL
81 NTAPI
83  HGDIOBJ hobj);
84 
85 BOOL
86 NTAPI
88  HGDIOBJ hObject);
89 
90 ULONG
91 NTAPI
93  HGDIOBJ hobj);
94 
95 BOOL
96 NTAPI
98  HGDIOBJ hobj,
99  ULONG ulOwner);
100 
101 BOOL
102 NTAPI
104  HGDIOBJ hobj,
105  ULONG ulOwner,
106  ULONG Flags);
107 
108 INT
109 NTAPI
111  IN HGDIOBJ hobj,
112  IN INT cbCount,
113  OUT PVOID pvBuffer);
114 
115 POBJ
116 NTAPI
118  UCHAR objt,
119  ULONG cjSize,
120  FLONG fl);
121 
122 VOID
123 NTAPI
125  POBJ pobj);
126 
127 POBJ
128 NTAPI
130  HGDIOBJ hobj,
131  UCHAR objt);
132 
133 VOID
134 NTAPI
136  POBJ pobj);
137 
138 VOID
139 NTAPI
141  POBJ pobj);
142 
143 PGDIOBJ
144 NTAPI
146  HGDIOBJ hobj,
147  UCHAR objt);
148 
149 PGDIOBJ
150 NTAPI
152  HGDIOBJ hobj,
153  UCHAR objt);
154 
155 VOID
156 NTAPI
158  POBJ pobj);
159 
160 VOID
161 NTAPI
163  POBJ pobj,
164  ULONG ulOwner);
165 
166 BOOL
167 NTAPI
169  ULONG ulCount,
170  HGDIOBJ* ahObj,
171  PGDIOBJ* apObj,
172  UCHAR objt);
173 
174 HGDIOBJ
175 NTAPI
177  POBJ pobj,
178  ULONG ulOwner);
179 
180 VOID
181 NTAPI
183  POBJ pobj);
184 
185 VOID
186 NTAPI
188  POBJ pobj,
189  PVOID pvObjAttr);
190 
191 PVOID
192 NTAPI
194  POBJ pobj);
195 
struct _BASEOBJECT BASEOBJECT
DWORD dwCFCount
Definition: gdiobj.h:24
ObjectType
Definition: metafile.c:80
FLONG flDeviceUniq
Definition: gdiobj.h:21
#define IN
Definition: typedefs.h:39
VOID(NTAPI * GDIOBJDELETEPROC)(PVOID ObjectBody)
Definition: gdiobj.h:34
BASEOBJECT BaseObject
Definition: gdiobj.h:66
ULONG ulShareCount
Definition: gdiobj.h:42
static int cbCount
Definition: fiber.c:42
POBJ NTAPI GDIOBJ_AllocateObject(UCHAR objt, ULONG cjSize, FLONG fl)
Definition: gdiobj.c:562
PVOID pvLangPack
Definition: gdiobj.h:22
HGDIOBJ NTAPI GDIOBJ_hInsertObject(POBJ pobj, ULONG ulOwner)
Definition: gdiobj.c:912
LONG NTSTATUS
Definition: precomp.h:26
ULONG NTAPI GreGetObjectOwner(HGDIOBJ hobj)
Definition: gdiobj.c:1192
DWORD dwThreadId
Definition: gdiobj.h:43
USHORT cExclusiveLock
Definition: gdiobj.h:45
HGDIOBJ hHmgr
Definition: gdiobj.h:40
BOOL NTAPI GreSetObjectOwnerEx(HGDIOBJ hobj, ULONG ulOwner, ULONG Flags)
Definition: gdiobj.c:1222
struct _CLIENTOBJ * PCLIENTOBJ
int32_t INT
Definition: typedefs.h:58
VOID NTAPI GDIOBJ_vSetObjectAttr(POBJ pobj, PVOID pvObjAttr)
Definition: gdiobj.c:1096
USHORT BaseFlags
Definition: gdiobj.h:46
VOID NTAPI GDIOBJ_vSetObjectOwner(POBJ pobj, ULONG ulOwner)
Definition: gdiobj.c:965
struct _GDI_HANDLE_TABLE * PGDI_HANDLE_TABLE
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
_In_ FLONG fl
Definition: winddi.h:1279
BOOL NTAPI GDIOBJ_bLockMultipleObjects(ULONG ulCount, HGDIOBJ *ahObj, PGDIOBJ *apObj, UCHAR objt)
unsigned int BOOL
Definition: ntddk_ex.h:94
DEVCAPS DevCaps
Definition: gdiobj.h:20
NTSTATUS NTAPI InitGdiHandleTable(VOID)
Definition: gdiobj.c:259
EX_PUSH_LOCK pushlock
Definition: gdiobj.h:47
unsigned long FLONG
Definition: ntbasedef.h:366
POBJ NTAPI GDIOBJ_AllocObjWithHandle(ULONG ObjectType, ULONG cjSize)
Definition: gdiobj.c:1488
CFONT cfPublic[GDI_CFONT_MAX]
Definition: gdiobj.h:23
VOID(NTAPI * GDICLEANUPPROC)(PVOID ObjectBody)
Definition: gdiobj.h:33
BOOL NTAPI GreDeleteObject(HGDIOBJ hObject)
Definition: gdiobj.c:1158
BASEFLAGS
Definition: gdiobj.h:56
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
struct _GDI_HANDLE_TABLE GDI_HANDLE_TABLE
unsigned long DWORD
Definition: ntddk_ex.h:95
GDI_TABLE_ENTRY Entries[GDI_HANDLE_COUNT]
Definition: gdiobj.h:19
unsigned char UCHAR
Definition: xmlstorage.h:181
PVOID NTAPI GDI_MapHandleTable(PEPROCESS Process)
Definition: gdiobj.c:1518
#define GDI_CFONT_MAX
Definition: ntgdihdl.h:20
PGDIOBJ NTAPI GDIOBJ_TryLockObject(HGDIOBJ hobj, UCHAR objt)
Definition: gdiobj.c:757
#define VOID
Definition: acefi.h:82
PVOID PGDIOBJ
Definition: gdiobj.h:31
PVOID NTAPI GDIOBJ_pvGetObjectAttr(POBJ pobj)
Definition: gdiobj.c:1088
POBJ NTAPI GDIOBJ_ReferenceObjectByHandle(HGDIOBJ hobj, UCHAR objt)
Definition: gdiobj.c:691
PGDIOBJ NTAPI GDIOBJ_ShareLockObj(HGDIOBJ hObj, DWORD ObjectType)
Definition: gdiobj.c:1443
#define GDI_OBJECT_STACK_LEVELS
Definition: gdiobj.h:8
static const unsigned RESERVE_ENTRIES_COUNT
Definition: gdiobj.h:11
Definition: gdi.h:1
BOOL NTAPI GreIsHandleValid(HGDIOBJ hobj)
Definition: gdiobj.c:1146
unsigned short USHORT
Definition: pedump.c:61
VOID NTAPI GDIOBJ_vDeleteObject(POBJ pobj)
Definition: gdiobj.c:1111
INT NTAPI GreGetObject(IN HGDIOBJ hobj, IN INT cbCount, OUT PVOID pvBuffer)
Definition: gdiobj.c:1264
#define GDI_HANDLE_COUNT
Definition: gdi.h:12
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
struct _BASEOBJECT * POBJ
BOOL NTAPI GDIOBJ_ConvertToStockObj(HGDIOBJ *hObj)
Definition: gdiobj.c:1455
VOID NTAPI GDIOBJ_vDereferenceObject(POBJ pobj)
Definition: gdiobj.c:631
#define OUT
Definition: typedefs.h:40
struct _CLIENTOBJ CLIENTOBJ
unsigned int ULONG
Definition: retypes.h:1
_In_ ULONG cjSize
Definition: winddi.h:3634
VOID NTAPI GDIOBJ_vFreeObject(POBJ pobj)
Definition: gdiobj.c:596
PGDIOBJ NTAPI GDIOBJ_LockObject(HGDIOBJ hobj, UCHAR objt)
Definition: gdiobj.c:826
VOID NTAPI GDIOBJ_vReferenceObjectByPointer(POBJ pobj)
Definition: gdiobj.c:734
VOID NTAPI GDIOBJ_vUnlockObject(POBJ pobj)
Definition: gdiobj.c:880
_GDIOBJLAGS
Definition: gdiobj.h:69
BOOL NTAPI GreSetObjectOwner(HGDIOBJ hobj, ULONG ulOwner)
Definition: gdiobj.c:1255
PGDI_HANDLE_TABLE GdiHandleTable
Definition: gdihv.c:26