[config] Rename data structure for mouse buttons and keys

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-04-10 11:58:02 +02:00
parent c9f4c45007
commit 5d3c7ef4e8
1 changed files with 7 additions and 7 deletions

View File

@ -51,14 +51,14 @@ typedef struct
{ {
const char *name; const char *name;
xcb_keysym_t keysym; xcb_keysym_t keysym;
} KeyMod; } keymod_t;
/** Link a name to a mouse button symbol */ /** Link a name to a mouse button symbol */
typedef struct typedef struct
{ {
const char *name; const char *name;
unsigned int button; unsigned int button;
} MouseButton; } mouse_button_t;
extern const name_func_link_t UicbList[]; extern const name_func_link_t UicbList[];
extern const name_func_link_t WidgetList[]; extern const name_func_link_t WidgetList[];
@ -73,7 +73,7 @@ static xcb_keysym_t
key_mask_lookup(const char *keyname) key_mask_lookup(const char *keyname)
{ {
/** List of keyname and corresponding X11 mask codes */ /** List of keyname and corresponding X11 mask codes */
static const KeyMod KeyModList[] = static const keymod_t KeyModList[] =
{ {
{"Shift", XCB_MOD_MASK_SHIFT}, {"Shift", XCB_MOD_MASK_SHIFT},
{"Lock", XCB_MOD_MASK_LOCK}, {"Lock", XCB_MOD_MASK_LOCK},
@ -103,7 +103,7 @@ static unsigned int
mouse_button_lookup(const char *button) mouse_button_lookup(const char *button)
{ {
/** List of button name and corresponding X11 mask codes */ /** List of button name and corresponding X11 mask codes */
static const MouseButton MouseButtonList[] = static const mouse_button_t mouse_button_tList[] =
{ {
{"1", XCB_BUTTON_INDEX_1}, {"1", XCB_BUTTON_INDEX_1},
{"2", XCB_BUTTON_INDEX_2}, {"2", XCB_BUTTON_INDEX_2},
@ -117,9 +117,9 @@ mouse_button_lookup(const char *button)
int i; int i;
if(button) if(button)
for(i = 0; MouseButtonList[i].name; i++) for(i = 0; mouse_button_tList[i].name; i++)
if(!a_strcmp(button, MouseButtonList[i].name)) if(!a_strcmp(button, mouse_button_tList[i].name))
return MouseButtonList[i].button; return mouse_button_tList[i].button;
return 0; return 0;
} }