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

Diff of /trunk/Include/wptHotkey.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.25  
changed lines
  Added in v.37

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26