mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 20:03:07 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
90
win32ss/gdi/ntgdi/init.c
Normal file
90
win32ss/gdi/ntgdi/init.c
Normal file
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS Win32k subsystem
|
||||
* PURPOSE: Initialization of GDI
|
||||
* FILE: win32ss/gdi/ntgdi/init.c
|
||||
* PROGRAMER:
|
||||
*/
|
||||
|
||||
#include <win32k.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include <kdros.h>
|
||||
|
||||
BOOL NTAPI GDI_CleanupForProcess(struct _EPROCESS *Process);
|
||||
|
||||
NTSTATUS
|
||||
GdiProcessCreate(PEPROCESS Process)
|
||||
{
|
||||
PPROCESSINFO ppiCurrent = PsGetProcessWin32Process(Process);
|
||||
ASSERT(ppiCurrent);
|
||||
|
||||
InitializeListHead(&ppiCurrent->PrivateFontListHead);
|
||||
InitializeListHead(&ppiCurrent->PrivateMemFontListHead);
|
||||
ppiCurrent->PrivateMemFontHandleCount = 0;
|
||||
ExInitializeFastMutex(&ppiCurrent->PrivateFontListLock);
|
||||
|
||||
InitializeListHead(&ppiCurrent->GDIBrushAttrFreeList);
|
||||
InitializeListHead(&ppiCurrent->GDIDcAttrFreeList);
|
||||
|
||||
/* Map the GDI handle table to user land */
|
||||
Process->Peb->GdiSharedHandleTable = GDI_MapHandleTable(Process);
|
||||
Process->Peb->GdiDCAttributeList = GDI_BATCH_LIMIT;
|
||||
|
||||
/* Create pools for GDI object attributes */
|
||||
ppiCurrent->pPoolDcAttr = GdiPoolCreate(sizeof(DC_ATTR), 'acdG');
|
||||
ppiCurrent->pPoolBrushAttr = GdiPoolCreate(sizeof(BRUSH_ATTR), 'arbG');
|
||||
ppiCurrent->pPoolRgnAttr = GdiPoolCreate(sizeof(RGN_ATTR), 'agrG');
|
||||
ASSERT(ppiCurrent->pPoolDcAttr);
|
||||
ASSERT(ppiCurrent->pPoolBrushAttr);
|
||||
ASSERT(ppiCurrent->pPoolRgnAttr);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
GdiProcessDestroy(PEPROCESS Process)
|
||||
{
|
||||
PPROCESSINFO ppiCurrent = PsGetProcessWin32Process(Process);
|
||||
ASSERT(ppiCurrent);
|
||||
ASSERT(ppiCurrent->peProcess == Process);
|
||||
|
||||
IntGdiCleanupPrivateFontsForProcess();
|
||||
|
||||
/* And GDI ones too */
|
||||
GDI_CleanupForProcess(Process);
|
||||
|
||||
/* So we can now free the pools */
|
||||
GdiPoolDestroy(ppiCurrent->pPoolDcAttr);
|
||||
GdiPoolDestroy(ppiCurrent->pPoolBrushAttr);
|
||||
GdiPoolDestroy(ppiCurrent->pPoolRgnAttr);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
NTSTATUS
|
||||
GdiThreadCreate(PETHREAD Thread)
|
||||
{
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
GdiThreadDestroy(PETHREAD Thread)
|
||||
{
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOL
|
||||
APIENTRY
|
||||
NtGdiInit(VOID)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* EOF */
|
Loading…
Add table
Add a link
Reference in a new issue