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 {
108 else
110 }
111 if (!hMenu)
112 {
113
114 hMenu =
Window->SystemMenu;
115 hSubMenu = hMenu;
117 nPos = pAccel->cmd;
118 if (MenuObject)
119 {
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)
#define UserHMGetHandle(obj)
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{
178
179 TRACE(
"Enter NtUserCopyAcceleratorTable\n");
181
183 if (!Accel)
184 {
186 }
187
188
190 {
193 }
194
195
196 if (Accel->
Count < EntriesCount)
197 EntriesCount = Accel->
Count;
198
200 {
202
203 for (Ret = 0; Ret < EntriesCount; Ret++)
204 {
208 }
209 }
211 {
213 Ret = 0;
214 }
216
218 TRACE(
"Leave NtUserCopyAcceleratorTable, ret=%lu\n", Ret);
220 return Ret;
221}
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(...)
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
PACCELERATOR_TABLE FASTCALL UserGetAccelObject(HACCEL hAccel)
Referenced by CopyAcceleratorTableW().
◆ NtUserCreateAcceleratorTable()
Definition at line 225 of file accelerator.c.
228{
235
236 TRACE(
"Enter NtUserCreateAcceleratorTable(Entries %p, EntriesCount %u)\n",
239
240 if (!
Entries || EntriesCount <= 0)
241 {
244 }
245
247
250 pti,
254
256 {
259 }
260
261 Accel->
Count = EntriesCount;
264 {
269 }
270
272 {
274
276 {
279 {
281 }
282 else
283 {
289 }
290
292 }
293 }
295 {
297 }
299
301 {
307 }
308
309
310
311
313
315
317 TRACE(
"Leave NtUserCreateAcceleratorTable(Entries %p, EntriesCount %u) = %p\n",
320 return Ret;
321}
#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 340 of file accelerator.c.
342{
345
346
347
348
349
350
351 TRACE(
"NtUserDestroyAcceleratorTable(Table %p)\n",
hAccel);
353
355 if (Accel)
356 {
358 }
359
360 TRACE(
"Leave NtUserDestroyAcceleratorTable(Table %p) = %u\n",
hAccel, Ret);
362 return Ret;
363}
BOOLEAN UserDestroyAccelTable(PVOID Object)
Referenced by DestroyAcceleratorTable().
◆ NtUserTranslateAccelerator()
Definition at line 367 of file accelerator.c.
371{
377 int Ret = 0;
378
379 TRACE(
"NtUserTranslateAccelerator(hWnd %p, hAccel %p, Message %p)\n",
382
384 {
386 }
387
389 {
392 }
394 {
397 }
399
404 {
406 }
407
409 if (!Accel)
410 {
412 }
413
415
418 {
420 }
421
423
424
425
427 {
429 {
430 Ret = 1;
431 break;
432 }
433
434
436 break;
437 }
438
442
443 TRACE(
"NtUserTranslateAccelerator returns %d\n", Ret);
445 return Ret;
446}
static const WCHAR Message[]
static const WCHAR Cleanup[]
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()