ReactOS 0.4.16-dev-199-g898cc56
guicheck.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * PURPOSE: GUI state check
5 * FILE: win32ss/user/ntuser/guicheck.c
6 * PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
7 * NOTES: The GuiCheck() function performs a few delayed operations:
8 * 1) A GUI process is assigned a window station
9 * 2) A message queue is created for a GUI thread before use
10 * 3) The system window classes are registered for a process
11 */
12
13#include <win32k.h>
14
15/* GLOBALS *******************************************************************/
16
18
19/* FUNCTIONS *****************************************************************/
20
21static BOOL FASTCALL
23{
24 W32Data->W32PF_flags |= W32PF_CREATEDWINORDC;
26 {
28
30
31 if (!Initialized)
32 {
33 W32Data->W32PF_flags &= ~W32PF_CREATEDWINORDC;
35 return FALSE;
36 }
37 }
38 return TRUE;
39}
40
41static void FASTCALL
43{
44 W32Data->W32PF_flags &= ~W32PF_CREATEDWINORDC;
46 {
48 }
49}
50
53{
54 PPROCESSINFO W32Data;
55
57 if (Create)
58 {
59 if (!(W32Data->W32PF_flags & W32PF_CREATEDWINORDC) && !(W32Data->W32PF_flags & W32PF_MANUALGUICHECK))
60 {
61 return co_AddGuiApp(W32Data);
62 }
63 }
64 else
65 {
66 if ((W32Data->W32PF_flags & W32PF_CREATEDWINORDC) && !(W32Data->W32PF_flags & W32PF_MANUALGUICHECK))
67 {
68 RemoveGuiApp(W32Data);
69 }
70 }
71
72 return TRUE;
73}
74
75VOID
78{
80 W32Data->W32PF_flags |= W32PF_MANUALGUICHECK;
81
82 if (Create)
83 {
84 co_AddGuiApp(W32Data);
85 }
86 else
87 {
88 RemoveGuiApp(W32Data);
89 }
90}
91
92/* EOF */
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
@ Create
Definition: registry.c:563
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
static LONG NrGuiAppsRunning
Definition: guicheck.c:17
static BOOL FASTCALL co_AddGuiApp(PPROCESSINFO W32Data)
Definition: guicheck.c:22
BOOL FASTCALL co_IntGraphicsCheck(BOOL Create)
Definition: guicheck.c:52
VOID FASTCALL co_IntUserManualGuiCheck(BOOL Create)
Definition: guicheck.c:77
static void FASTCALL RemoveGuiApp(PPROCESSINFO W32Data)
Definition: guicheck.c:42
@ Initialized
Definition: ketypes.h:388
#define FASTCALL
Definition: nt_native.h:50
PVOID NTAPI PsGetCurrentProcessWin32Process(VOID)
Definition: process.c:1183
VOID FASTCALL IntEndDesktopGraphics(VOID)
Definition: winsta.c:358
BOOL FASTCALL co_IntInitializeDesktopGraphics(VOID)
Definition: winsta.c:262
struct _PROCESSINFO * PPROCESSINFO
Definition: ntwin32.h:5
long LONG
Definition: pedump.c:60
#define W32PF_MANUALGUICHECK
Definition: win32.h:33
#define W32PF_CREATEDWINORDC
Definition: win32.h:34