ReactOS  0.4.15-dev-3181-g4acf100
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 }
BOOL UserCreateSystemThread(DWORD Type)
Definition: csr.c:247
BOOL FASTCALL MsqIsHung(PTHREADINFO pti, DWORD TimeOut)
Definition: msgqueue.c:2194
#define TRUE
Definition: types.h:120
#define MSQ_HUNG
Definition: msgqueue.h:3
#define WS_CHILD
Definition: pedump.c:617
#define FALSE
Definition: types.h:117
THRDESKHEAD head
Definition: ntuser.h:665
#define ST_GHOST_THREAD
Definition: csr.h:37
BOOL FASTCALL IntIsGhostWindow(PWND Window)
Definition: ghost.c:42
PTHREADINFO gptiGhostThread
Definition: ghost.c:19
HWND FASTCALL IntGhostWindowFromHungWindow(PWND pHungWnd)
Definition: ghost.c:76
PWND FASTCALL ValidateHwndNoErr(HWND hwnd)
Definition: utils.c:75
Definition: ntuser.h:663
#define DPRINT1
Definition: precomp.h:8
#define DPRINT
Definition: sndvol32.h:71
#define WS_VISIBLE
Definition: pedump.c:620
DWORD style
Definition: ntuser.h:676

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 }
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
Definition: thread.c:805
VOID FASTCALL UserEnterExclusive(VOID)
Definition: ntuser.c:245
#define TRACE(s)
Definition: solgame.cpp:4
PTHREADINFO gptiGhostThread
Definition: ghost.c:19
VOID FASTCALL UserLeave(VOID)
Definition: ntuser.c:253
#define NULL
Definition: types.h:112

Referenced by UserSystemThreadProc().