Go to the source code of this file.
◆ FVIRT_MASK
◆ FVIRT_TBL_END
◆ co_IntTranslateAccelerator()
Definition at line 44 of file accelerator.c.
48{
52 HMENU hMenu, hSubMenu;
54
56
58
59 TRACE(
"IntTranslateAccelerator(hwnd %p, message %x, wParam %x, lParam %x, fVirt 0x%x, key %x, cmd %x)\n",
60 hWnd, pMsg->message, pMsg->wParam, pMsg->lParam, pAccel->fVirt, pAccel->key, pAccel->cmd);
61
66
68 {
69
71 {
72
74 {
76 }
77 }
78 }
79 else
80 {
81
83 {
84
85 if (pMsg->wParam == pAccel->key && (
Mask &
FALT) == (pAccel->fVirt &
FALT))
86 {
88 }
89 }
90 }
91
92 if (!bFound)
93 {
94
95 TRACE(
"IntTranslateAccelerator returns FALSE\n");
97 }
98
99
103 nPos = pAccel->cmd;
104 if (MenuObject)
105 {
107 hSubMenu = MenuObject->
head.h;
108 else
110 }
111 if (!hMenu)
112 {
113
114 hMenu =
Window->SystemMenu;
115 hSubMenu = hMenu;
117 nPos = pAccel->cmd;
118 if (MenuObject)
119 {
121 hSubMenu = MenuObject->
head.h;
122 else
124 }
125 }
126
127
128
130 {
132 if (hSubMenu)
133 {
135 TRACE(
"hSysMenu = %p, hSubMenu = %p, nPos = %u\n", hMenu, hSubMenu, nPos);
137 }
138 }
139
140
141
142
143
147 {
148
149 if (hMenu && hMenu ==
Window->SystemMenu)
150 {
151 TRACE(
"Sending WM_SYSCOMMAND, wParam=%0x\n", pAccel->cmd);
153 }
154 else
155 {
156 TRACE(
"Sending WM_COMMAND, wParam=%0x\n", 0x10000 | pAccel->cmd);
158 }
159 }
160
161 TRACE(
"IntTranslateAccelerator returns TRUE\n");
163}
HWND FASTCALL IntGetCaptureWindow(VOID)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
DWORD FASTCALL UserGetKeyState(DWORD dwKey)
FORCEINLINE PMENU UserGetMenuObject(HMENU hMenu)
#define ASSERT_REFS_CO(_obj_)
LRESULT FASTCALL co_IntSendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Referenced by NtUserTranslateAccelerator().
◆ DBG_DEFAULT_CHANNEL()
DBG_DEFAULT_CHANNEL |
( |
UserAccel |
| ) |
|
◆ NtUserCopyAcceleratorTable()
Definition at line 171 of file accelerator.c.
175{
179
180 TRACE(
"Enter NtUserCopyAcceleratorTable\n");
182
184 if (!Accel)
185 {
187 }
188
189
191 {
193 }
194
195
196 if (Accel->
Count < EntriesCount)
197 EntriesCount = Accel->
Count;
198
199 Ret = 0;
200
202 {
204
205 for (Ret = 0; Ret < EntriesCount; Ret++)
206 {
210 }
211 }
213 {
215 Ret = 0;
216 }
218
220
222 TRACE(
"Leave NtUserCopyAcceleratorTable, ret=%i\n", _ret_);
225}
static const ENTRY Entries[]
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
#define EXCEPTION_EXECUTE_HANDLER
VOID FASTCALL UserLeave(VOID)
VOID FASTCALL UserEnterShared(VOID)
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define DECLARE_RETURN(type)
VOID FASTCALL SetLastNtError(NTSTATUS Status)
PACCELERATOR_TABLE FASTCALL UserGetAccelObject(HACCEL hAccel)
Referenced by CopyAcceleratorTableW().
◆ NtUserCreateAcceleratorTable()
Definition at line 229 of file accelerator.c.
232{
239
240 TRACE(
"Enter NtUserCreateAcceleratorTable(Entries %p, EntriesCount %u)\n",
243
244 if (!
Entries || EntriesCount <= 0)
245 {
248 }
249
251
254 pti,
258
260 {
263 }
264
265 Accel->
Count = EntriesCount;
268 {
273 }
274
276 {
278
280 {
283 {
285 }
286 else
287 {
293 }
294
296 }
297 }
299 {
301 }
303
305 {
311 }
312
313
314
315
317
319
321 TRACE(
"Leave NtUserCreateAcceleratorTable(Entries %p, EntriesCount %u) = %p\n",
325}
#define NT_SUCCESS(StatCode)
#define ExAllocatePoolWithTag(hernya, size, tag)
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
#define ExFreePoolWithTag(_P, _T)
_Use_decl_annotations_ NTSTATUS NTAPI RtlMultiByteToUnicodeN(_Out_ PWCH UnicodeString, _In_ ULONG UnicodeSize, _Out_opt_ PULONG ResultSize, _In_ PCCH MbString, _In_ ULONG MbSize)
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
VOID FASTCALL UserEnterExclusive(VOID)
#define STATUS_INVALID_PARAMETER
_In_ WDFCOLLECTION _In_ ULONG Index
BOOL FASTCALL UserDereferenceObject(PVOID Object)
BOOL FASTCALL UserDeleteObject(HANDLE h, HANDLE_TYPE type)
PUSER_HANDLE_TABLE gHandleTable
PVOID FASTCALL UserCreateObject(PUSER_HANDLE_TABLE ht, PDESKTOP pDesktop, PTHREADINFO pti, HANDLE *h, HANDLE_TYPE type, ULONG size)
Referenced by CreateAcceleratorTableW(), and U32LoadAccelerators().
◆ NtUserDestroyAcceleratorTable()
Definition at line 344 of file accelerator.c.
346{
349
350
351
352
353
354
355 TRACE(
"NtUserDestroyAcceleratorTable(Table %p)\n",
hAccel);
357
359 {
361 }
362
364
366
368 TRACE(
"Leave NtUserDestroyAcceleratorTable(Table %p) = %u\n",
hAccel, _ret_);
371}
BOOLEAN UserDestroyAccelTable(PVOID Object)
Referenced by DestroyAcceleratorTable().
◆ NtUserTranslateAccelerator()
Definition at line 375 of file accelerator.c.
379{
386
387 TRACE(
"NtUserTranslateAccelerator(hWnd %p, hAccel %p, Message %p)\n",
390
392 {
394 }
395
397 {
400 }
402 {
405 }
407
412 {
414 }
415
417 if (!Accel)
418 {
420 }
421
423
426 {
428 }
429
431
432
433
435 {
437 {
439 }
440
441
443 break;
444 }
445
447
451
452 TRACE(
"NtUserTranslateAccelerator returns %d\n", _ret_);
455}
static const WCHAR Message[]
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static __inline VOID UserDerefObjectCo(PVOID obj)
static __inline VOID UserRefObjectCo(PVOID obj, PUSER_REFERENCE_ENTRY UserReferenceEntry)
#define _SEH2_YIELD(__stmt)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define RtlCopyMemory(Destination, Source, Length)
PWND FASTCALL UserGetWindowObject(HWND hWnd)
static BOOLEAN FASTCALL co_IntTranslateAccelerator(PWND Window, CONST MSG *pMsg, CONST ACCEL *pAccel)
Referenced by TranslateAcceleratorW().
◆ UserDestroyAccelTable()
◆ UserGetAccelObject()