ReactOS 0.4.16-dev-340-g0540c21
ghost.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

BOOL FASTCALL IntMakeHungWindowGhosted (HWND hwndHung)
 
VOID NTAPI UserGhostThreadEntry (VOID)
 

Function Documentation

◆ IntMakeHungWindowGhosted()

BOOL FASTCALL IntMakeHungWindowGhosted ( HWND  hwndHung)

Definition at line 156 of file ghost.c.

157{
158 PWND pHungWnd = ValidateHwndNoErr(hwndHung);
159 if (!pHungWnd)
160 {
161 DPRINT1("Not a window\n");
162 return FALSE; // not a window
163 }
164
165 if (!MsqIsHung(pHungWnd->head.pti, MSQ_HUNG))
166 {
167 DPRINT1("Not hung window\n");
168 return FALSE; // not hung window
169 }
170
171 if (!(pHungWnd->style & WS_VISIBLE))
172 return FALSE; // invisible
173
174 if (pHungWnd->style & WS_CHILD)
175 return FALSE; // child
176
177 if (IntIsGhostWindow(pHungWnd))
178 {
179 DPRINT1("IntIsGhostWindow\n");
180 return FALSE; // ghost window cannot be ghosted
181 }
182
183 if (IntGhostWindowFromHungWindow(pHungWnd))
184 {
185 DPRINT("Already ghosting\n");
186 return FALSE; // already ghosting
187 }
188
189 // TODO: Find a way to pass the hwnd of pHungWnd to the ghost thread as we can't pass parameters directly
190
191 if (!gptiGhostThread)
193
194 return TRUE;
195}
#define DPRINT1
Definition: precomp.h:8
BOOL UserCreateSystemThread(DWORD Type)
Definition: csr.c:247
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ValidateHwndNoErr(hwnd)
Definition: precomp.h:84
BOOL FASTCALL MsqIsHung(PTHREADINFO pti, DWORD TimeOut)
Definition: msgqueue.c:2143
#define MSQ_HUNG
Definition: msgqueue.h:3
HWND FASTCALL IntGhostWindowFromHungWindow(PWND pHungWnd)
Definition: ghost.c:76
PTHREADINFO gptiGhostThread
Definition: ghost.c:19
BOOL FASTCALL IntIsGhostWindow(PWND Window)
Definition: ghost.c:42
#define WS_CHILD
Definition: pedump.c:617
#define WS_VISIBLE
Definition: pedump.c:620
#define DPRINT
Definition: sndvol32.h:73
Definition: ntuser.h:694
THRDESKHEAD head
Definition: ntuser.h:695
DWORD style
Definition: ntuser.h:706
#define ST_GHOST_THREAD
Definition: csr.h:37

Referenced by co_IntSendMessageTimeoutSingle().

◆ UserGhostThreadEntry()

VOID NTAPI UserGhostThreadEntry ( VOID  )

Definition at line 27 of file ghost.c.

28{
29 TRACE("Ghost thread started\n");
30
32
34
35 //TODO: Implement. This thread should handle all ghost windows and exit when no ghost window is needed.
36
38
39 UserLeave();
40}
#define NULL
Definition: types.h:112
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
Definition: thread.c:805
VOID FASTCALL UserLeave(VOID)
Definition: ntuser.c:258
VOID FASTCALL UserEnterExclusive(VOID)
Definition: ntuser.c:249
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by UserSystemThreadProc().