1 /* tpb - program to use the IBM ThinkPad(tm) special keys
2  * Copyright (C) 2002-2005 Markus Braun <markus.braun@krawel.de>
3  *
4  * This file is part of tpb.
5  *
6  * tpb is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * tpb 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
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with tpb; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20 
21 #ifndef __TPB_H__
22 #define __TPB_H__
23 
24 #if ENABLE_NLS
25 #include <libintl.h>
26 #define _(String) gettext (String)
27 #else /* ENABLE_NLS */
28 #define _(String) (String)
29 #endif /* ENABLE_NLS */
30 
31 #define MAX_VOLUME 100
32 #define CALLBACK_CMD_LENGTH 256
33 #define CALLBACK_CMD_ARGS 30
34 
35 #define KEYCODE_HOME 178
36 #define KEYCODE_SEARCH 229
37 #define KEYCODE_MAIL 236
38 #define KEYCODE_FAVORITES 230
39 #define KEYCODE_RELOAD 231
40 #define KEYCODE_ABORT 232
41 #define KEYCODE_BACKWARD 234
42 #define KEYCODE_FORWARD 233
43 #define KEYCODE_FN_KEY 227
44 
45 /* all nvram toggle values are stored in bit 0 */
46 /* all xevents toggle values are stored in bit 1 */
47 typedef struct {
48   unsigned int thinkpad_toggle;     /* ThinkPad button */
49   unsigned int zoom_toggle;         /* zoom toggle */
50   unsigned int display_toggle;      /* display toggle */
51   unsigned int home_toggle;         /* Home button */
52   unsigned int search_toggle;       /* Search button */
53   unsigned int mail_toggle;         /* Mail button */
54   unsigned int wireless_toggle;     /* Wireless button */
55   unsigned int favorites_toggle;    /* Favorites button */
56   unsigned int reload_toggle;       /* Reload button */
57   unsigned int abort_toggle;        /* Abort button */
58   unsigned int backward_toggle;     /* Backward button */
59   unsigned int forward_toggle;      /* Forward button */
60   unsigned int fn_toggle;           /* Fn button */
61   unsigned int thinklight_toggle;   /* ThinkLight */
62   unsigned int hibernate_toggle;    /* hibernation/suspend toggle */
63   unsigned int display_state;       /* display state */
64   unsigned int expand_toggle;       /* hv expansion state */
65   unsigned int brightness_level;    /* brightness level */
66   unsigned int brightness_toggle;   /* brightness toggle */
67   unsigned int volume_level;        /* volume level */
68   unsigned int volume_toggle;       /* volume toggle */
69   unsigned int mute_toggle;         /* mute toggle */
70   unsigned int ac_state;            /* ac connected */
71   unsigned int powermgt_ac;         /* power management mode ac */
72   unsigned int powermgt_battery;    /* power management mode battery */
73   unsigned int bluetooth_toggle;    /* bluetooth toggle */
74 } t_thinkpad_state;
75 
76 #endif /* __TPB_H__*/
77 
78 /* vim600:set fen:set fdm=marker:set fdl=0: */
79