1 |
twoaday |
2 |
/* wptHotkey.h - Hotkey registration |
2 |
|
|
* Copyright (C) 2001-2004 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 |
|
|
|
21 |
|
|
#ifndef WPT_HOTKEY_H |
22 |
|
|
#define WPT_HOTKEY_H |
23 |
|
|
|
24 |
|
|
enum { |
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 |
|
|
|
37 |
|
|
struct hotkey_s { |
38 |
|
|
int enabled; |
39 |
|
|
int id; |
40 |
|
|
int alt_ctrl; |
41 |
|
|
int alt_shift; |
42 |
|
|
int key; |
43 |
|
|
}; |
44 |
|
|
typedef struct hotkey_s * hotkey_t; |
45 |
|
|
|
46 |
|
|
static hotkey_s wpt_hotkeys[] = { |
47 |
|
|
{1, WPT_CLIP_ENCRYPT_ID, 1, 0, 0x45}, /* alt+ctrl+e */ |
48 |
|
|
{1, WPT_CLIP_DECRYPT_VERIFY_ID, 1, 0, 0x44}, /* alt+ctrl+d */ |
49 |
|
|
{1, WPT_CLIP_SIGN_ID, 1, 0, 0x53}, /* alt+ctrl+s */ |
50 |
|
|
{1, WPT_CLIP_SIGN_ENCRYPT_ID, 1, 0, 0x42}, /* alt+ctrl+b */ |
51 |
|
|
{1, WPT_CURRWND_ENCRYPT_ID, 0, 1, 0x45}, /* alt+shift+e */ |
52 |
|
|
{1, WPT_CURRWND_DECRYPT_VERIFY_ID, 0, 1, 0x44}, /* alt+shift+d */ |
53 |
|
|
{1, WPT_CURRWND_SIGN_ID, 0, 1, 0x53}, /* alt+shift+s */ |
54 |
|
|
{1, WPT_CURRWND_SIGN_ENCRYPT_ID, 0, 1, 0x42}, /* alt+shift+b */ |
55 |
|
|
{1, WPT_AGENT_FORGET_ID, 1, 0, 0x46}, /* alt+ctrl+f */ |
56 |
|
|
{0} |
57 |
|
|
}; |
58 |
|
|
|
59 |
|
|
const char * hotkeys_strerror (void); |
60 |
|
|
int hotkeys_register (HWND wnd); |
61 |
|
|
int hotkeys_unregister (HWND wnd); |
62 |
|
|
int hotkey_register_single (HWND wnd, hotkey_t hk); |
63 |
|
|
int hotkey_unregister_single (HWND wnd, hotkey_t hk); |
64 |
|
|
|
65 |
|
|
#endif /* WPT_HOTKEY_H */ |