#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winnls.h"
#include "commctrl.h"
#include "comctl32.h"
#include "wine/debug.h"
#include "wine/heap.h"
Go to the source code of this file.
|
| WINE_DEFAULT_DEBUG_CHANNEL (hotkey) |
|
static LRESULT | HOTKEY_SetFont (HOTKEY_INFO *infoPtr, HFONT hFont, BOOL redraw) |
|
static BOOL | HOTKEY_IsCombInv (const HOTKEY_INFO *infoPtr) |
|
static void | HOTKEY_DrawHotKey (HOTKEY_INFO *infoPtr, HDC hdc, LPCWSTR KeyName, WORD NameLen) |
|
static void | HOTKEY_Refresh (HOTKEY_INFO *infoPtr, HDC hdc) |
|
static void | HOTKEY_Paint (HOTKEY_INFO *infoPtr, HDC hdc) |
|
static LRESULT | HOTKEY_GetHotKey (const HOTKEY_INFO *infoPtr) |
|
static void | HOTKEY_SetHotKey (HOTKEY_INFO *infoPtr, WORD hotKey) |
|
static void | HOTKEY_SetRules (HOTKEY_INFO *infoPtr, WORD invComb, WORD invMod) |
|
static LRESULT | HOTKEY_Create (HOTKEY_INFO *infoPtr, const CREATESTRUCTW *lpcs) |
|
static LRESULT | HOTKEY_Destroy (HOTKEY_INFO *infoPtr) |
|
static LRESULT | HOTKEY_EraseBackground (const HOTKEY_INFO *infoPtr, HDC hdc) |
|
static LRESULT | HOTKEY_GetFont (const HOTKEY_INFO *infoPtr) |
|
static LRESULT | HOTKEY_KeyDown (HOTKEY_INFO *infoPtr, DWORD key, DWORD flags) |
|
static LRESULT | HOTKEY_KeyUp (HOTKEY_INFO *infoPtr, DWORD key) |
|
static LRESULT | HOTKEY_KillFocus (HOTKEY_INFO *infoPtr) |
|
static LRESULT | HOTKEY_LButtonDown (const HOTKEY_INFO *infoPtr) |
|
static LRESULT | HOTKEY_NCCreate (HWND hwnd, const CREATESTRUCTW *lpcs) |
|
static LRESULT | HOTKEY_SetFocus (HOTKEY_INFO *infoPtr) |
|
static LRESULT WINAPI | HOTKEY_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
|
void | HOTKEY_Register (void) |
|
void | HOTKEY_Unregister (void) |
|
◆ IsOnlySet
◆ HOTKEY_INFO
◆ HOTKEY_Create()
Definition at line 230 of file hotkey.c.
231{
233
235
236 return 0;
237}
static LRESULT HOTKEY_SetFont(HOTKEY_INFO *infoPtr, HFONT hFont, BOOL redraw)
HGDIOBJ WINAPI GetStockObject(_In_ int)
Referenced by HOTKEY_WindowProc().
◆ HOTKEY_Destroy()
Definition at line 241 of file hotkey.c.
242{
243
246 return 0;
247}
static BOOL heap_free(void *mem)
#define SetWindowLongPtrW
Referenced by HOTKEY_WindowProc().
◆ HOTKEY_DrawHotKey()
Definition at line 96 of file hotkey.c.
97{
102
103
106
109 {
112 }
113 else
114 {
117 }
118
120
121
124
128
129
131}
COMCTL32_SysColor comctl32_color
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
BOOL WINAPI TextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_reads_(c) LPCWSTR lpString, _In_ int c)
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
BOOL WINAPI GetTextExtentPoint32W(_In_ HDC hdc, _In_reads_(c) LPCWSTR lpString, _In_ int c, _Out_ LPSIZE psizl)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
BOOL WINAPI SetCaretPos(_In_ int, _In_ int)
int WINAPI GetSystemMetrics(_In_ int)
Referenced by HOTKEY_Refresh().
◆ HOTKEY_EraseBackground()
Definition at line 251 of file hotkey.c.
252{
253 HBRUSH hBrush, hSolidBrush =
NULL;
255
258 else
259 {
262 if (!hBrush)
264 }
265
267
269
270 if (hSolidBrush)
272
273 return -1;
274}
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
Referenced by HOTKEY_WindowProc().
◆ HOTKEY_GetFont()
◆ HOTKEY_GetHotKey()
◆ HOTKEY_IsCombInv()
◆ HOTKEY_KeyDown()
Definition at line 284 of file hotkey.c.
285{
288
290 return 0;
291
293
294 wOldHotKey = infoPtr->
HotKey;
296
297
299
301 {
310
313 break;
316 break;
319 break;
320
321 default:
324 else
327 break;
328 }
329
330 if ((wOldHotKey != infoPtr->
HotKey) || (bOldMod != infoPtr->
CurrMod))
331 {
333
334
338 }
339
340 return 0;
341}
static BOOL HOTKEY_IsCombInv(const HOTKEY_INFO *infoPtr)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
int WINAPI GetDlgCtrlID(_In_ HWND)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
Referenced by HOTKEY_WindowProc().
◆ HOTKEY_KeyUp()
Definition at line 345 of file hotkey.c.
346{
348
350 return 0;
351
353
355
357 {
359 infoPtr->
CurrMod &= ~HOTKEYF_SHIFT;
360 break;
362 infoPtr->
CurrMod &= ~HOTKEYF_CONTROL;
363 break;
365 infoPtr->
CurrMod &= ~HOTKEYF_ALT;
366 break;
367 default:
368 return 1;
369 }
370
371 if (bOldMod != infoPtr->
CurrMod)
372 {
374
375
379 }
380
381 return 0;
382}
Referenced by HOTKEY_WindowProc().
◆ HOTKEY_KillFocus()
◆ HOTKEY_LButtonDown()
◆ HOTKEY_NCCreate()
Definition at line 406 of file hotkey.c.
407{
412
413
414 infoPtr = heap_alloc_zero (sizeof(*infoPtr));
416
417
422
424}
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
Referenced by HOTKEY_WindowProc().
◆ HOTKEY_Paint()
Definition at line 188 of file hotkey.c.
189{
192 else {
197 }
198}
static void HOTKEY_Refresh(HOTKEY_INFO *infoPtr, HDC hdc)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
Referenced by HOTKEY_WindowProc().
◆ HOTKEY_Refresh()
Definition at line 135 of file hotkey.c.
136{
140
141 TRACE(
"(infoPtr=%p hdc=%p)\n", infoPtr,
hdc);
142
145 return;
146 }
147
151 Modifier = infoPtr->
InvMod;
152 else
154
160 NameLen += 3;
161 }
164 &
KeyName[NameLen], 64 - NameLen);
167 NameLen += 3;
168 }
171 &
KeyName[NameLen], 64 - NameLen);
174 NameLen += 3;
175 }
176
180 }
181 else
183
185}
static void HOTKEY_DrawHotKey(HOTKEY_INFO *infoPtr, HDC hdc, LPCWSTR KeyName, WORD NameLen)
static const WCHAR HOTKEY_plussep[]
#define memcpy(s1, s2, n)
UINT WINAPI MapVirtualKeyW(_In_ UINT, _In_ UINT)
int WINAPI GetKeyNameTextW(_In_ LONG lParam, _Out_writes_(cchSize) LPWSTR lpString, _In_ int cchSize)
Referenced by HOTKEY_Paint().
◆ HOTKEY_Register()
Definition at line 541 of file hotkey.c.
542{
544
553
555}
static LRESULT WINAPI HOTKEY_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
Referenced by DllMain().
◆ HOTKEY_SetFocus()
Definition at line 427 of file hotkey.c.
428{
430
434
435 return 0;
436}
BOOL WINAPI ShowCaret(_In_opt_ HWND)
BOOL WINAPI CreateCaret(_In_ HWND, _In_opt_ HBITMAP, _In_ int, _In_ int)
Referenced by HOTKEY_WindowProc().
◆ HOTKEY_SetFont()
Definition at line 440 of file hotkey.c.
441{
445
447
451
454
458
461
462 return 0;
463}
void redraw(int x, int y, int cx, int cy)
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)
Referenced by HOTKEY_Create(), and HOTKEY_WindowProc().
◆ HOTKEY_SetHotKey()
◆ HOTKEY_SetRules()
◆ HOTKEY_Unregister()
Definition at line 559 of file hotkey.c.
560{
562}
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
Referenced by DllMain().
◆ HOTKEY_WindowProc()
Definition at line 466 of file hotkey.c.
467{
472 switch (uMsg)
473 {
478 break;
481 break;
482
486
489
492
495
498
501
505
509
512
515
518
522 return 0;
523
526
529
530 default:
532 ERR(
"unknown msg %04x wp=%08lx lp=%08lx\n",
535 }
536 return 0;
537}
BOOL COMCTL32_IsReflectedMessage(UINT uMsg) DECLSPEC_HIDDEN
static void HOTKEY_Paint(HOTKEY_INFO *infoPtr, HDC hdc)
static LRESULT HOTKEY_GetFont(const HOTKEY_INFO *infoPtr)
static LRESULT HOTKEY_GetHotKey(const HOTKEY_INFO *infoPtr)
static LRESULT HOTKEY_KeyDown(HOTKEY_INFO *infoPtr, DWORD key, DWORD flags)
static LRESULT HOTKEY_LButtonDown(const HOTKEY_INFO *infoPtr)
static LRESULT HOTKEY_KeyUp(HOTKEY_INFO *infoPtr, DWORD key)
static LRESULT HOTKEY_EraseBackground(const HOTKEY_INFO *infoPtr, HDC hdc)
static void HOTKEY_SetHotKey(HOTKEY_INFO *infoPtr, WORD hotKey)
static LRESULT HOTKEY_NCCreate(HWND hwnd, const CREATESTRUCTW *lpcs)
static LRESULT HOTKEY_Destroy(HOTKEY_INFO *infoPtr)
static LRESULT HOTKEY_Create(HOTKEY_INFO *infoPtr, const CREATESTRUCTW *lpcs)
static LRESULT HOTKEY_KillFocus(HOTKEY_INFO *infoPtr)
static void HOTKEY_SetRules(HOTKEY_INFO *infoPtr, WORD invComb, WORD invMod)
static LRESULT HOTKEY_SetFocus(HOTKEY_INFO *infoPtr)
#define GetWindowLongPtrW
Referenced by HOTKEY_Register().
◆ WINE_DEFAULT_DEBUG_CHANNEL()
WINE_DEFAULT_DEBUG_CHANNEL |
( |
hotkey |
| ) |
|
◆ HOTKEY_plussep