ReactOS 0.4.15-dev-8348-gc1b9bb5
mouse.cpp File Reference
#include "precomp.h"
Include dependency graph for mouse.cpp:

Go to the source code of this file.

Functions

HRESULT STDMETHODCALLTYPE MouseKeys_Init (_In_ CSysTray *pSysTray)
 
HRESULT STDMETHODCALLTYPE MouseKeys_Shutdown (_In_ CSysTray *pSysTray)
 
HRESULT STDMETHODCALLTYPE MouseKeys_Update (_In_ CSysTray *pSysTray)
 

Variables

static MOUSEKEYS g_Mk
 
static UINT g_MkState
 
static HICON g_MkStateIcon
 

Function Documentation

◆ MouseKeys_Init()

HRESULT STDMETHODCALLTYPE MouseKeys_Init ( _In_ CSysTray pSysTray)

Definition at line 15 of file mouse.cpp.

16{
17 TRACE("MouseKeys_Init!\n");
18
19 return MouseKeys_Update(pSysTray);
20}
HRESULT STDMETHODCALLTYPE MouseKeys_Update(_In_ CSysTray *pSysTray)
Definition: mouse.cpp:43
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by CSysTray::InitIcons().

◆ MouseKeys_Shutdown()

HRESULT STDMETHODCALLTYPE MouseKeys_Shutdown ( _In_ CSysTray pSysTray)

Definition at line 23 of file mouse.cpp.

24{
25 TRACE("MouseKeys_Shutdown!\n");
26
27 if (g_MkStateIcon)
28 {
31 }
32
33 if (g_MkState)
34 {
35 g_MkState = 0;
36 pSysTray->NotifyIcon(NIM_DELETE, ID_ICON_MOUSE, g_MkStateIcon, L"MouseKeys");
37 }
38
39 return S_OK;
40}
#define NULL
Definition: types.h:112
static UINT g_MkState
Definition: mouse.cpp:11
static HICON g_MkStateIcon
Definition: mouse.cpp:12
#define ID_ICON_MOUSE
Definition: precomp.h:36
#define S_OK
Definition: intsafe.h:52
#define L(x)
Definition: ntvdm.h:50
#define NIM_DELETE
Definition: shellapi.h:96
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2097

Referenced by CSysTray::ShutdownIcons().

◆ MouseKeys_Update()

HRESULT STDMETHODCALLTYPE MouseKeys_Update ( _In_ CSysTray pSysTray)

Definition at line 43 of file mouse.cpp.

44{
45 TRACE("MouseKeys_Update!\n");
46
47 g_Mk.cbSize = sizeof(g_Mk);
49
50 UINT state = 0;
52 {
54 {
56 {
57 case 0:
58 default:
60 break;
63 break;
67 break;
70 break;
74 break;
77 break;
83 break;
87 break;
91 break;
92 }
93 }
94 else
95 {
97 }
98 }
99
100 UINT uId = NIM_MODIFY;
101 if (state != g_MkState)
102 {
103 if (g_MkStateIcon)
104 {
107 }
108
109 if (g_MkState == 0)
110 uId = NIM_ADD;
111
113 if (g_MkState)
114 {
116 }
117 }
118
119 if (g_MkState == 0)
120 {
121 uId = NIM_DELETE;
122 }
123
124 return pSysTray->NotifyIcon(uId, ID_ICON_MOUSE, g_MkStateIcon, L"MouseKeys");
125}
HINSTANCE g_hInstance
Definition: MainWindow.cpp:18
static int state
Definition: maze.c:121
static MOUSEKEYS g_Mk
Definition: mouse.cpp:10
#define IDI_MOUSE_R_DOWN
Definition: resource.h:64
#define IDI_MOUSE_R_ACTIVE
Definition: resource.h:63
#define IDI_MOUSE_R_ACTIVE_L_DOWN
Definition: resource.h:68
#define IDI_MOUSE_L_ACTIVE_R_DOWN
Definition: resource.h:67
#define IDI_MOUSE_L_DOWN
Definition: resource.h:62
#define IDI_MOUSE_NOBTN
Definition: resource.h:60
#define IDI_MOUSE_L_ACTIVE
Definition: resource.h:61
#define IDI_MOUSE_LR_DOWN
Definition: resource.h:66
#define IDI_MOUSE_DISABLED
Definition: resource.h:59
#define IDI_MOUSE_LR_ACTIVE
Definition: resource.h:65
unsigned int UINT
Definition: ndis.h:50
#define NIM_MODIFY
Definition: shellapi.h:95
#define NIM_ADD
Definition: shellapi.h:94
UINT cbSize
Definition: winuser.h:3411
DWORD dwFlags
Definition: winuser.h:3412
#define MKF_RIGHTBUTTONSEL
Definition: winuser.h:2153
#define MKF_MOUSEMODE
Definition: winuser.h:2154
#define SPI_GETMOUSEKEYS
Definition: winuser.h:1403
#define MKF_LEFTBUTTONDOWN
Definition: winuser.h:2150
#define MKF_LEFTBUTTONSEL
Definition: winuser.h:2152
#define LoadIcon
Definition: winuser.h:5822
#define MKF_INDICATOR
Definition: winuser.h:2147
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
#define MKF_RIGHTBUTTONDOWN
Definition: winuser.h:2151
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define MKF_MOUSEKEYSON
Definition: winuser.h:2142

Referenced by MouseKeys_Init(), and CSysTray::ProcessWindowMessage().

Variable Documentation

◆ g_Mk

MOUSEKEYS g_Mk
static

Definition at line 10 of file mouse.cpp.

Referenced by MouseKeys_Update().

◆ g_MkState

UINT g_MkState
static

Definition at line 11 of file mouse.cpp.

Referenced by MouseKeys_Shutdown(), and MouseKeys_Update().

◆ g_MkStateIcon

HICON g_MkStateIcon
static

Definition at line 12 of file mouse.cpp.

Referenced by MouseKeys_Shutdown(), and MouseKeys_Update().