ReactOS 0.4.16-dev-91-g764881a
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>
11
13
15
18{
20 ASSERT(ppiCurrent);
21
24 ppiCurrent->PrivateMemFontHandleCount = 0;
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
47{
49 ASSERT(ppiCurrent);
50 ASSERT(ppiCurrent->peProcess == Process);
51
53
54 /* And GDI ones too */
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
68{
69 return STATUS_SUCCESS;
70}
71
74{
75 return STATUS_SUCCESS;
76}
77
78
79BOOL
81{
82 /* Initialize DirectX graphics driver */
84 {
85 ERR("Unable to initialize DirectX graphics\n");
86 return FALSE;
87 }
88
89 /* Get global language ID */
91
92 /* Initialize FreeType library */
93 if (!InitFontSupport())
94 {
95 ERR("Unable to initialize font support\n");
96 return FALSE;
97 }
98
99 return TRUE;
100}
101
102/*
103 * @implemented
104 */
105BOOL
108{
109 return TRUE;
110}
111
112/* EOF */
LONG NTSTATUS
Definition: precomp.h:26
#define ERR(fmt,...)
Definition: precomp.h:57
#define DBG_DEFAULT_CHANNEL(ch)
Definition: debug.h:106
PEPROCESS gpepCSRSS
Definition: csr.c:15
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define APIENTRY
Definition: api.h:79
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
unsigned int BOOL
Definition: ntddk_ex.h:94
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
VOID FASTCALL IntGdiCleanupPrivateFontsForProcess(VOID)
Definition: freetype.c:2584
BOOL FASTCALL InitFontSupport(VOID)
Definition: freetype.c:1020
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
PGDI_POOL NTAPI GdiPoolCreate(ULONG cjAllocSize, ULONG ulTag)
Definition: gdipool.c:316
VOID NTAPI GdiPoolDestroy(PGDI_POOL pPool)
Definition: gdipool.c:343
#define ASSERT(a)
Definition: mode.c:44
#define GDI_BATCH_LIMIT
Definition: ntgdityp.h:201
PVOID NTAPI PsGetProcessWin32Process(PEPROCESS Process)
Definition: process.c:1193
unsigned short USHORT
Definition: pedump.c:61
#define STATUS_SUCCESS
Definition: shellext.h:65
LIST_ENTRY PrivateMemFontListHead
Definition: win32.h:285
FAST_MUTEX PrivateFontListLock
Definition: win32.h:283
struct _GDI_POOL * pPoolRgnAttr
Definition: win32.h:293
struct _GDI_POOL * pPoolBrushAttr
Definition: win32.h:292
UINT PrivateMemFontHandleCount
Definition: win32.h:286
LIST_ENTRY PrivateFontListHead
Definition: win32.h:284
struct _GDI_POOL * pPoolDcAttr
Definition: win32.h:291
#define NTAPI
Definition: typedefs.h:36
PVOID NTAPI GDI_MapHandleTable(PEPROCESS pProcess)
Definition: gdiobj.c:1552
USHORT gusLanguageID
Definition: init.c:12
BOOL InitializeGreCSRSS(VOID)
Definition: init.c:80
NTSTATUS GdiThreadDestroy(PETHREAD Thread)
Definition: init.c:73
BOOL NTAPI GDI_CleanupForProcess(struct _EPROCESS *Process)
Definition: gdiobj.c:1582
NTSTATUS GdiProcessCreate(PEPROCESS Process)
Definition: init.c:17
NTSTATUS GdiThreadCreate(PETHREAD Thread)
Definition: init.c:67
NTSTATUS GdiProcessDestroy(PEPROCESS Process)
Definition: init.c:46
BOOL APIENTRY NtGdiInit(VOID)
Definition: init.c:107
USHORT FASTCALL UserGetLanguageID(VOID)
Definition: misc.c:105
NTSTATUS APIENTRY DxDdStartupDxGraphics(ULONG SizeEngDrv, PDRVENABLEDATA pDxEngDrv, ULONG SizeDxgDrv, PDRVENABLEDATA pDxgDrv, PULONG DirectDrawContext, PEPROCESS Proc)
Definition: main.c:34
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
Definition: exfuncs.h:274