ReactOS  0.4.15-dev-1207-g698a8e6
caret.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 co_IntDestroyCaret (PTHREADINFO Win32Thread)
 
BOOL FASTCALL IntSetCaretBlinkTime (UINT uMSeconds)
 
BOOL FASTCALL co_IntSetCaretPos (int X, int Y)
 
BOOL FASTCALL IntSwitchCaretShowing (PVOID Info)
 
BOOL FASTCALL co_UserShowCaret (PWND WindowObject)
 
BOOL FASTCALL co_UserHideCaret (PWND WindowObject)
 

Function Documentation

◆ co_IntDestroyCaret()

BOOL FASTCALL co_IntDestroyCaret ( PTHREADINFO  Win32Thread)

Definition at line 164 of file caret.c.

165 {
166  PUSER_MESSAGE_QUEUE ThreadQueue;
167  PWND pWnd;
168  ThreadQueue = Win32Thread->MessageQueue;
169 
170  if (!ThreadQueue)
171  return FALSE;
172 
173  pWnd = ValidateHwndNoErr(ThreadQueue->CaretInfo.hWnd);
174  co_IntHideCaret(&ThreadQueue->CaretInfo);
175  ThreadQueue->CaretInfo.Bitmap = (HBITMAP)0;
176  ThreadQueue->CaretInfo.hWnd = (HWND)0;
177  ThreadQueue->CaretInfo.Size.cx = ThreadQueue->CaretInfo.Size.cy = 0;
178  ThreadQueue->CaretInfo.Showing = 0;
179  ThreadQueue->CaretInfo.Visible = 0;
180  if (pWnd)
181  {
182  IntNotifyWinEvent(EVENT_OBJECT_DESTROY, pWnd, OBJID_CARET, CHILDID_SELF, 0);
183  }
184  return TRUE;
185 }
PWND FASTCALL ValidateHwndNoErr(HWND hWnd)
Definition: window.c:96
#define TRUE
Definition: types.h:120
VOID FASTCALL IntNotifyWinEvent(DWORD Event, PWND pWnd, LONG idObject, LONG idChild, DWORD flags)
Definition: event.c:179
HANDLE HWND
Definition: compat.h:19
#define FALSE
Definition: types.h:117
HBITMAP Bitmap
Definition: ntusrtyp.h:130
#define CHILDID_SELF
Definition: winable.h:14
LONG cx
Definition: windef.h:334
static BOOL FASTCALL co_IntHideCaret(PTHRDCARETINFO CaretInfo)
Definition: caret.c:148
THRDCARETINFO CaretInfo
Definition: msgqueue.h:92
Definition: ntuser.h:657
struct _USER_MESSAGE_QUEUE * MessageQueue
Definition: win32.h:88
static HBITMAP
Definition: button.c:44
#define OBJID_CARET
Definition: winable.h:23
LONG cy
Definition: windef.h:335

Referenced by IntSendDestroyMsg(), and NtUserCallNoParam().

◆ co_IntSetCaretPos()

BOOL FASTCALL co_IntSetCaretPos ( int  X,
int  Y 
)

Definition at line 205 of file caret.c.

206 {
207  PTHREADINFO pti;
208  PWND pWnd;
209  PUSER_MESSAGE_QUEUE ThreadQueue;
210 
212  ThreadQueue = pti->MessageQueue;
213 
214  if(ThreadQueue->CaretInfo.hWnd)
215  {
216  pWnd = UserGetWindowObject(ThreadQueue->CaretInfo.hWnd);
217  if(ThreadQueue->CaretInfo.Pos.x != X || ThreadQueue->CaretInfo.Pos.y != Y)
218  {
219  co_IntHideCaret(&ThreadQueue->CaretInfo);
220  ThreadQueue->CaretInfo.Pos.x = X;
221  ThreadQueue->CaretInfo.Pos.y = Y;
222  if (ThreadQueue->CaretInfo.Visible)
223  {
224  ThreadQueue->CaretInfo.Showing = 1;
225  co_IntDrawCaret(pWnd, &ThreadQueue->CaretInfo);
226  }
227 
229  IntNotifyWinEvent(EVENT_OBJECT_LOCATIONCHANGE, pWnd, OBJID_CARET, CHILDID_SELF, 0);
230  }
231  return TRUE;
232  }
233 
234  return FALSE;
235 }
UINT_PTR FASTCALL IntSetTimer(PWND Window, UINT_PTR IDEvent, UINT Elapse, TIMERPROC TimerFunc, INT Type)
Definition: timer.c:177
long y
Definition: polytest.cpp:48
#define Y(I)
long x
Definition: polytest.cpp:48
#define TRUE
Definition: types.h:120
#define IDCARETTIMER
Definition: undocuser.h:78
VOID FASTCALL IntNotifyWinEvent(DWORD Event, PWND pWnd, LONG idObject, LONG idChild, DWORD flags)
Definition: event.c:179
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
Definition: thread.c:805
PSERVERINFO gpsi
Definition: main.c:27
#define FALSE
Definition: types.h:117
#define CHILDID_SELF
Definition: winable.h:14
PWND FASTCALL UserGetWindowObject(HWND hWnd)
Definition: window.c:103
#define TMRF_SYSTEM
Definition: timer.h:20
static BOOL FASTCALL co_IntHideCaret(PTHRDCARETINFO CaretInfo)
Definition: caret.c:148
VOID CALLBACK CaretSystemTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
Definition: caret.c:102
THRDCARETINFO CaretInfo
Definition: msgqueue.h:92
Definition: ntuser.h:657
struct _USER_MESSAGE_QUEUE * MessageQueue
Definition: win32.h:88
#define OBJID_CARET
Definition: winable.h:23
VOID FASTCALL co_IntDrawCaret(PWND pWnd, PTHRDCARETINFO CaretInfo)
Definition: caret.c:21
#define X(b, s)

Referenced by IntDrawScrollBar(), IntScrollWindowEx(), and NtUserCallTwoParam().

◆ co_UserHideCaret()

BOOL FASTCALL co_UserHideCaret ( PWND  WindowObject)

◆ co_UserShowCaret()

BOOL FASTCALL co_UserShowCaret ( PWND  WindowObject)

◆ IntSetCaretBlinkTime()

BOOL FASTCALL IntSetCaretBlinkTime ( UINT  uMSeconds)

Definition at line 188 of file caret.c.

189 {
190  /* Don't save the new value to the registry! */
191 
192  /* Windows doesn't do this check */
193  if((uMSeconds < MIN_CARETBLINKRATE) || (uMSeconds > MAX_CARETBLINKRATE))
194  {
196  return FALSE;
197  }
198 
199  gpsi->dtCaretBlink = uMSeconds;
200 
201  return TRUE;
202 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define TRUE
Definition: types.h:120
PSERVERINFO gpsi
Definition: main.c:27
#define FALSE
Definition: types.h:117
#define MIN_CARETBLINKRATE
Definition: caret.c:15
#define MAX_CARETBLINKRATE
Definition: caret.c:16
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:27

Referenced by NtUserCallOneParam().

◆ IntSwitchCaretShowing()

BOOL FASTCALL IntSwitchCaretShowing ( PVOID  Info)