ReactOS  0.4.15-dev-313-g8fde48b
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 TRUE
Definition: types.h:120
PWND FASTCALL ValidateHwndNoErr(HWND hWnd)
Definition: window.c:96
BOOL UserCreateSystemThread(DWORD Type)
Definition: csr.c:247
BOOL FASTCALL MsqIsHung(PTHREADINFO pti, DWORD TimeOut)
Definition: msgqueue.c:2194
#define MSQ_HUNG
Definition: msgqueue.h:3
#define WS_CHILD
Definition: pedump.c:617
THRDESKHEAD head
Definition: ntuser.h:659
void DPRINT(...)
Definition: polytest.cpp:61
#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
Definition: ntuser.h:657
#define DPRINT1
Definition: precomp.h:8
#define WS_VISIBLE
Definition: pedump.c:620
DWORD style
Definition: ntuser.h:670

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
smooth NULL
Definition: ftsmooth.c:416
VOID FASTCALL UserEnterExclusive(VOID)
Definition: ntuser.c:247
#define TRACE(s)
Definition: solgame.cpp:4
PTHREADINFO gptiGhostThread
Definition: ghost.c:19
VOID FASTCALL UserLeave(VOID)
Definition: ntuser.c:255

Referenced by UserSystemThreadProc().