ReactOS 0.4.15-dev-7968-g24a56f8
CWaitCursor.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS headers
3 * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
4 * PURPOSE: Wait cursor management
5 * COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6 */
7
8#pragma once
9
11{
12public:
14 {
15 if (s_nLock++ == 0)
16 {
17 if (!s_hWaitCursor)
20 }
21 else
22 {
24 }
25 }
27 {
28 if (--s_nLock == 0)
29 {
32 }
33 }
34
35 CWaitCursor(const CWaitCursor&) = delete;
37 void *operator new(size_t) = delete;
38 void operator delete(void*) = delete;
39
40 static BOOL IsWaiting()
41 {
42 return s_nLock > 0;
43 }
44
45 static void Restore()
46 {
48 }
49
50protected:
51 static LONG s_nLock;
54};
55
static void Restore()
Definition: CWaitCursor.h:45
CWaitCursor(const CWaitCursor &)=delete
static BOOL IsWaiting()
Definition: CWaitCursor.h:40
static LONG s_nLock
Definition: CWaitCursor.h:51
CWaitCursor & operator=(const CWaitCursor &)=delete
static HCURSOR s_hOldCursor
Definition: CWaitCursor.h:52
static HCURSOR s_hWaitCursor
Definition: CWaitCursor.h:53
#define NULL
Definition: types.h:112
__kernel_size_t size_t
Definition: linux.h:237
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
#define DECLSPEC_SELECTANY
Definition: guiddef.h:40
HICON HCURSOR
Definition: windef.h:299
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define LoadCursor
Definition: winuser.h:5812
#define IDC_WAIT
Definition: winuser.h:689