ReactOS
0.4.16-dev-1311-g81a4d83
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
init.c
Go to the documentation of this file.
1
/*
2
* COPYRIGHT: See COPYING in the top level directory
3
* PROJECT: ReactOS Win32k subsystem
4
* PURPOSE: Initialization of GDI
5
* FILE: win32ss/gdi/ntgdi/init.c
6
* PROGRAMER:
7
*/
8
9
#include <
win32k.h
>
10
DBG_DEFAULT_CHANNEL
(UserMisc);
11
12
USHORT
gusLanguageID
;
13
14
BOOL
NTAPI
GDI_CleanupForProcess
(
struct
_EPROCESS
*
Process
);
15
16
NTSTATUS
17
GdiProcessCreate
(
PEPROCESS
Process
)
18
{
19
PPROCESSINFO
ppiCurrent =
PsGetProcessWin32Process
(
Process
);
20
ASSERT
(ppiCurrent);
21
22
InitializeListHead
(&ppiCurrent->
PrivateFontListHead
);
23
InitializeListHead
(&ppiCurrent->
PrivateMemFontListHead
);
24
ppiCurrent->
PrivateMemFontHandleCount
= 0;
25
ExInitializeFastMutex
(&ppiCurrent->
PrivateFontListLock
);
26
27
InitializeListHead
(&ppiCurrent->GDIBrushAttrFreeList);
28
InitializeListHead
(&ppiCurrent->GDIDcAttrFreeList);
29
30
/* Map the GDI handle table to user land */
31
Process
->Peb->GdiSharedHandleTable =
GDI_MapHandleTable
(
Process
);
32
Process
->Peb->GdiDCAttributeList =
GDI_BATCH_LIMIT
;
33
34
/* Create pools for GDI object attributes */
35
ppiCurrent->
pPoolDcAttr
=
GdiPoolCreate
(
sizeof
(
DC_ATTR
),
'acdG'
);
36
ppiCurrent->
pPoolBrushAttr
=
GdiPoolCreate
(
sizeof
(
BRUSH_ATTR
),
'arbG'
);
37
ppiCurrent->
pPoolRgnAttr
=
GdiPoolCreate
(
sizeof
(
RGN_ATTR
),
'agrG'
);
38
ASSERT
(ppiCurrent->
pPoolDcAttr
);
39
ASSERT
(ppiCurrent->
pPoolBrushAttr
);
40
ASSERT
(ppiCurrent->
pPoolRgnAttr
);
41
42
return
STATUS_SUCCESS
;
43
}
44
45
NTSTATUS
46
GdiProcessDestroy
(
PEPROCESS
Process
)
47
{
48
PPROCESSINFO
ppiCurrent =
PsGetProcessWin32Process
(
Process
);
49
ASSERT
(ppiCurrent);
50
ASSERT
(ppiCurrent->peProcess ==
Process
);
51
52
IntGdiCleanupPrivateFontsForProcess
();
53
54
/* And GDI ones too */
55
GDI_CleanupForProcess
(
Process
);
56
57
/* So we can now free the pools */
58
GdiPoolDestroy
(ppiCurrent->
pPoolDcAttr
);
59
GdiPoolDestroy
(ppiCurrent->
pPoolBrushAttr
);
60
GdiPoolDestroy
(ppiCurrent->
pPoolRgnAttr
);
61
62
return
STATUS_SUCCESS
;
63
}
64
65
66
NTSTATUS
67
GdiThreadCreate
(
PETHREAD
Thread
)
68
{
69
return
STATUS_SUCCESS
;
70
}
71
72
NTSTATUS
73
GdiThreadDestroy
(
PETHREAD
Thread
)
74
{
75
return
STATUS_SUCCESS
;
76
}
77
78
BOOL
79
InitializeGreCSRSS
(
VOID
)
80
{
81
/* Initialize Dxgkrnl interfaces and run startup routine */
82
DxStartupDxgkInt
();
83
84
/* Initialize Legacy DirectX graphics driver */
85
if
(
DxDdStartupDxGraphics
(0,
NULL
, 0,
NULL
,
NULL
,
gpepCSRSS
) !=
STATUS_SUCCESS
)
86
{
87
ERR
(
"Unable to initialize DirectX graphics\n"
);
88
return
FALSE
;
89
}
90
91
/* Get global language ID */
92
gusLanguageID
=
UserGetLanguageID
();
93
94
/* Initialize FreeType library */
95
if
(!
InitFontSupport
())
96
{
97
ERR
(
"Unable to initialize font support\n"
);
98
return
FALSE
;
99
}
100
101
return
TRUE
;
102
}
103
104
/*
105
* @implemented
106
*/
107
BOOL
108
APIENTRY
109
NtGdiInit
(
VOID
)
110
{
111
return
TRUE
;
112
}
113
114
/* EOF */
NTSTATUS
LONG NTSTATUS
Definition:
precomp.h:26
ERR
#define ERR(fmt,...)
Definition:
precomp.h:57
DBG_DEFAULT_CHANNEL
#define DBG_DEFAULT_CHANNEL(ch)
Definition:
debug.h:106
gpepCSRSS
PEPROCESS gpepCSRSS
Definition:
csr.c:15
NULL
#define NULL
Definition:
types.h:112
TRUE
#define TRUE
Definition:
types.h:120
FALSE
#define FALSE
Definition:
types.h:117
APIENTRY
#define APIENTRY
Definition:
api.h:79
InitializeListHead
#define InitializeListHead(ListHead)
Definition:
env_spec_w32.h:944
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
Thread
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition:
fltkernel.h:2653
IntGdiCleanupPrivateFontsForProcess
VOID FASTCALL IntGdiCleanupPrivateFontsForProcess(VOID)
Definition:
freetype.c:2773
InitFontSupport
BOOL FASTCALL InitFontSupport(VOID)
Definition:
freetype.c:1021
Process
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition:
fsrtlfuncs.h:223
DxStartupDxgkInt
VOID APIENTRY DxStartupDxgkInt(VOID)
Definition:
d3dkmt.c:25
GdiPoolCreate
PGDI_POOL NTAPI GdiPoolCreate(ULONG cjAllocSize, ULONG ulTag)
Definition:
gdipool.c:316
GdiPoolDestroy
VOID NTAPI GdiPoolDestroy(PGDI_POOL pPool)
Definition:
gdipool.c:343
void
Definition:
nsiface.idl:2307
ASSERT
#define ASSERT(a)
Definition:
mode.c:44
GDI_BATCH_LIMIT
#define GDI_BATCH_LIMIT
Definition:
ntgdityp.h:201
PsGetProcessWin32Process
PVOID NTAPI PsGetProcessWin32Process(PEPROCESS Process)
Definition:
process.c:1193
USHORT
unsigned short USHORT
Definition:
pedump.c:61
STATUS_SUCCESS
#define STATUS_SUCCESS
Definition:
shellext.h:65
_BRUSH_ATTR
Definition:
ntgdihdl.h:354
_DC_ATTR
Definition:
ntgdihdl.h:292
_EPROCESS
Definition:
pstypes.h:1262
_ETHREAD
Definition:
pstypes.h:1103
_PROCESSINFO
Definition:
win32.h:254
_PROCESSINFO::PrivateMemFontListHead
LIST_ENTRY PrivateMemFontListHead
Definition:
win32.h:286
_PROCESSINFO::PrivateFontListLock
FAST_MUTEX PrivateFontListLock
Definition:
win32.h:284
_PROCESSINFO::pPoolRgnAttr
struct _GDI_POOL * pPoolRgnAttr
Definition:
win32.h:294
_PROCESSINFO::pPoolBrushAttr
struct _GDI_POOL * pPoolBrushAttr
Definition:
win32.h:293
_PROCESSINFO::PrivateMemFontHandleCount
UINT PrivateMemFontHandleCount
Definition:
win32.h:287
_PROCESSINFO::PrivateFontListHead
LIST_ENTRY PrivateFontListHead
Definition:
win32.h:285
_PROCESSINFO::pPoolDcAttr
struct _GDI_POOL * pPoolDcAttr
Definition:
win32.h:292
_RGN_ATTR
Definition:
ntgdihdl.h:255
NTAPI
#define NTAPI
Definition:
typedefs.h:36
win32k.h
GDI_MapHandleTable
PVOID NTAPI GDI_MapHandleTable(PEPROCESS pProcess)
Definition:
gdiobj.c:1558
gusLanguageID
USHORT gusLanguageID
Definition:
init.c:12
InitializeGreCSRSS
BOOL InitializeGreCSRSS(VOID)
Definition:
init.c:79
GdiThreadDestroy
NTSTATUS GdiThreadDestroy(PETHREAD Thread)
Definition:
init.c:73
GDI_CleanupForProcess
BOOL NTAPI GDI_CleanupForProcess(struct _EPROCESS *Process)
Definition:
gdiobj.c:1588
GdiProcessCreate
NTSTATUS GdiProcessCreate(PEPROCESS Process)
Definition:
init.c:17
GdiThreadCreate
NTSTATUS GdiThreadCreate(PETHREAD Thread)
Definition:
init.c:67
GdiProcessDestroy
NTSTATUS GdiProcessDestroy(PEPROCESS Process)
Definition:
init.c:46
NtGdiInit
BOOL APIENTRY NtGdiInit(VOID)
Definition:
init.c:109
UserGetLanguageID
USHORT FASTCALL UserGetLanguageID(VOID)
Definition:
misc.c:105
DxDdStartupDxGraphics
NTSTATUS APIENTRY DxDdStartupDxGraphics(ULONG SizeEngDrv, PDRVENABLEDATA pDxEngDrv, ULONG SizeDxgDrv, PDRVENABLEDATA pDxgDrv, PULONG DirectDrawContext, PEPROCESS Proc)
Definition:
main.c:34
ExInitializeFastMutex
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
Definition:
exfuncs.h:274
win32ss
gdi
ntgdi
init.c
Generated on Thu Jun 19 2025 06:17:45 for ReactOS by
1.9.6