/[winpt]/trunk/Include/wptHotkey.h
ViewVC logotype

Contents of /trunk/Include/wptHotkey.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 33 - (show annotations)
Tue Oct 25 07:46:20 2005 UTC (19 years, 4 months ago) by twoaday
File MIME type: text/plain
File size: 2597 byte(s)
More bug fixes and cleanups.
See ChangeLog for details.

1 /* wptHotkey.h - Hotkey registration
2 * Copyright (C) 2001-2005 Timo Schulz
3 *
4 * This file is part of WinPT.
5 *
6 * WinPT is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * WinPT is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with WinPT; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20 #ifndef WPT_HOTKEY_H
21 #define WPT_HOTKEY_H
22
23 /* Hotkey IDs. */
24 enum hotkey_id_t {
25 WPT_CLIP_ENCRYPT_ID = 0x3000,
26 WPT_CLIP_DECRYPT_VERIFY_ID = 0x3001,
27 WPT_CLIP_SIGN_ID = 0x3002,
28 WPT_CLIP_SIGN_ENCRYPT_ID = 0x3003,
29 WPT_CURRWND_ENCRYPT_ID = 0x4000,
30 WPT_CURRWND_DECRYPT_VERIFY_ID = 0x4001,
31 WPT_CURRWND_SIGN_ID = 0x4002,
32 WPT_CURRWND_SIGN_ENCRYPT_ID = 0x4003,
33 WPT_AGENT_FORGET_ID = 0x5000,
34 };
35
36 /* Hotkey context. */
37 struct hotkey_s {
38 int enabled; /* 1 = enabled. */
39 int id; /* valid ID (see above). */
40 int alt_ctrl; /* hotkey used with ALT+ */
41 int alt_shift; /* hotkey used with SHIFT+ */
42 int key; /* actual key code. */
43 };
44 typedef struct hotkey_s * hotkey_t;
45
46 /* List of all predefined hotkeys. */
47 static hotkey_s wpt_hotkeys[] = {
48 {1, WPT_CLIP_ENCRYPT_ID, 1, 0, 0x45}, /* alt+ctrl+e */
49 {1, WPT_CLIP_DECRYPT_VERIFY_ID, 1, 0, 0x44}, /* alt+ctrl+d */
50 {1, WPT_CLIP_SIGN_ID, 1, 0, 0x53}, /* alt+ctrl+s */
51 {1, WPT_CLIP_SIGN_ENCRYPT_ID, 1, 0, 0x42}, /* alt+ctrl+b */
52 {1, WPT_CURRWND_ENCRYPT_ID, 0, 1, 0x45}, /* alt+shift+e */
53 {1, WPT_CURRWND_DECRYPT_VERIFY_ID, 0, 1, 0x44}, /* alt+shift+d */
54 {1, WPT_CURRWND_SIGN_ID, 0, 1, 0x53}, /* alt+shift+s */
55 {1, WPT_CURRWND_SIGN_ENCRYPT_ID, 0, 1, 0x42}, /* alt+shift+b */
56 {1, WPT_AGENT_FORGET_ID, 1, 0, 0x46}, /* alt+ctrl+f */
57 {0}
58 };
59
60 const char * hotkeys_strerror (void);
61 int hotkeys_register (HWND wnd);
62 int hotkeys_unregister (HWND wnd);
63 int hotkey_register_single (HWND wnd, hotkey_t hk);
64 int hotkey_unregister_single (HWND wnd, hotkey_t hk);
65
66 #endif /* WPT_HOTKEY_H */

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26