ReactOS  0.4.14-dev-606-g14ebc0b
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 
76 INIT_FUNCTION
78 NTAPI
80 
81 BOOL
82 NTAPI
84  HGDIOBJ hobj);
85 
86 BOOL
87 NTAPI
89  HGDIOBJ hObject);
90 
91 ULONG
92 NTAPI
94  HGDIOBJ hobj);
95 
96 BOOL
97 NTAPI
99  HGDIOBJ hobj,
100  ULONG ulOwner);
101 
102 BOOL
103 NTAPI
105  HGDIOBJ hobj,
106  ULONG ulOwner,
107  ULONG Flags);
108 
109 INT
110 NTAPI
112  IN HGDIOBJ hobj,
113  IN INT cbCount,
114  OUT PVOID pvBuffer);
115 
116 POBJ
117 NTAPI
119  UCHAR objt,
120  ULONG cjSize,
121  FLONG fl);
122 
123 VOID
124 NTAPI
126  POBJ pobj);
127 
128 POBJ
129 NTAPI
131  HGDIOBJ hobj,
132  UCHAR objt);
133 
134 VOID
135 NTAPI
137  POBJ pobj);
138 
139 VOID
140 NTAPI
142  POBJ pobj);
143 
144 PGDIOBJ
145 NTAPI
147  HGDIOBJ hobj,
148  UCHAR objt);
149 
150 PGDIOBJ
151 NTAPI
153  HGDIOBJ hobj,
154  UCHAR objt);
155 
156 VOID
157 NTAPI
159  POBJ pobj);
160 
161 VOID
162 NTAPI
164  POBJ pobj,
165  ULONG ulOwner);
166 
167 BOOL
168 NTAPI
170  ULONG ulCount,
171  HGDIOBJ* ahObj,
172  PGDIOBJ* apObj,
173  UCHAR objt);
174 
175 HGDIOBJ
176 NTAPI
178  POBJ pobj,
179  ULONG ulOwner);
180 
181 VOID
182 NTAPI
184  POBJ pobj);
185 
186 VOID
187 NTAPI
189  POBJ pobj,
190  PVOID pvObjAttr);
191 
192 PVOID
193 NTAPI
195  POBJ pobj);
196 
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:38
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:559
PVOID pvLangPack
Definition: gdiobj.h:22
HGDIOBJ NTAPI GDIOBJ_hInsertObject(POBJ pobj, ULONG ulOwner)
Definition: gdiobj.c:909
LONG NTSTATUS
Definition: precomp.h:26
ULONG NTAPI GreGetObjectOwner(HGDIOBJ hobj)
Definition: gdiobj.c:1189
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:1219
struct _CLIENTOBJ * PCLIENTOBJ
int32_t INT
Definition: typedefs.h:56
VOID NTAPI GDIOBJ_vSetObjectAttr(POBJ pobj, PVOID pvObjAttr)
Definition: gdiobj.c:1093
USHORT BaseFlags
Definition: gdiobj.h:46
VOID NTAPI GDIOBJ_vSetObjectOwner(POBJ pobj, ULONG ulOwner)
Definition: gdiobj.c:962
struct _GDI_HANDLE_TABLE * PGDI_HANDLE_TABLE
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
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
EX_PUSH_LOCK pushlock
Definition: gdiobj.h:47
unsigned long FLONG
Definition: ntbasedef.h:373
POBJ NTAPI GDIOBJ_AllocObjWithHandle(ULONG ObjectType, ULONG cjSize)
Definition: gdiobj.c:1485
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:1155
BASEFLAGS
Definition: gdiobj.h:56
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:1515
#define GDI_CFONT_MAX
Definition: ntgdihdl.h:20
PGDIOBJ NTAPI GDIOBJ_TryLockObject(HGDIOBJ hobj, UCHAR objt)
Definition: gdiobj.c:754
#define VOID
Definition: acefi.h:82
PVOID PGDIOBJ
Definition: gdiobj.h:31
PVOID NTAPI GDIOBJ_pvGetObjectAttr(POBJ pobj)
Definition: gdiobj.c:1085
POBJ NTAPI GDIOBJ_ReferenceObjectByHandle(HGDIOBJ hobj, UCHAR objt)
Definition: gdiobj.c:688
PGDIOBJ NTAPI GDIOBJ_ShareLockObj(HGDIOBJ hObj, DWORD ObjectType)
Definition: gdiobj.c:1440
#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:1143
unsigned short USHORT
Definition: pedump.c:61
VOID NTAPI GDIOBJ_vDeleteObject(POBJ pobj)
Definition: gdiobj.c:1108
INT NTAPI GreGetObject(IN HGDIOBJ hobj, IN INT cbCount, OUT PVOID pvBuffer)
Definition: gdiobj.c:1261
#define GDI_HANDLE_COUNT
Definition: gdi.h:12
INIT_FUNCTION NTSTATUS NTAPI InitGdiHandleTable(VOID)
Definition: gdiobj.c:259
_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:1452
VOID NTAPI GDIOBJ_vDereferenceObject(POBJ pobj)
Definition: gdiobj.c:628
#define OUT
Definition: typedefs.h:39
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:593
PGDIOBJ NTAPI GDIOBJ_LockObject(HGDIOBJ hobj, UCHAR objt)
Definition: gdiobj.c:823
VOID NTAPI GDIOBJ_vReferenceObjectByPointer(POBJ pobj)
Definition: gdiobj.c:731
VOID NTAPI GDIOBJ_vUnlockObject(POBJ pobj)
Definition: gdiobj.c:877
_GDIOBJLAGS
Definition: gdiobj.h:69
BOOL NTAPI GreSetObjectOwner(HGDIOBJ hobj, ULONG ulOwner)
Definition: gdiobj.c:1252
PGDI_HANDLE_TABLE GdiHandleTable
Definition: gdihv.c:26