mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
[mouse] Rename Button to button_t
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
0142f0efc9
commit
a04417494b
11 changed files with 27 additions and 27 deletions
4
client.c
4
client.c
|
@ -818,7 +818,7 @@ luaA_client_mouse(lua_State *L)
|
|||
{
|
||||
size_t i, len;
|
||||
int b;
|
||||
Button *button;
|
||||
button_t *button;
|
||||
|
||||
/* arg 2 is modkey table */
|
||||
luaA_checktable(L, 1);
|
||||
|
@ -827,7 +827,7 @@ luaA_client_mouse(lua_State *L)
|
|||
/* arg 4 is cmd to run */
|
||||
luaA_checkfunction(L, 3);
|
||||
|
||||
button = p_new(Button, 1);
|
||||
button = p_new(button_t, 1);
|
||||
button->button = xutil_button_fromint(b);
|
||||
button->fct = luaL_ref(L, LUA_REGISTRYINDEX);
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#define CURSOR_SIZING 120
|
||||
|
||||
#define ANY_KEY 0L /* special Key Code, passed to GrabKey */
|
||||
#define ANY_MODIFIER (1<<15) /* used in GrabButton, GrabKey */
|
||||
#define ANY_MODIFIER (1<<15) /* used in Grabbutton_t, GrabKey */
|
||||
|
||||
/*****************************************************************
|
||||
* ERROR CODES
|
||||
|
|
4
event.c
4
event.c
|
@ -50,9 +50,9 @@ extern AwesomeConf globalconf;
|
|||
static void
|
||||
event_handle_mouse_button_press(unsigned int button,
|
||||
unsigned int state,
|
||||
Button *buttons)
|
||||
button_t *buttons)
|
||||
{
|
||||
Button *b;
|
||||
button_t *b;
|
||||
|
||||
for(b = buttons; b; b = b->next)
|
||||
if(button == b->button && CLEANMASK(state) == b->mod && b->fct)
|
||||
|
|
4
lua.c
4
lua.c
|
@ -59,7 +59,7 @@ luaA_mouse(lua_State *L)
|
|||
{
|
||||
size_t i, len;
|
||||
int b;
|
||||
Button *button;
|
||||
button_t *button;
|
||||
|
||||
/* arg 1 is modkey table */
|
||||
luaA_checktable(L, 1);
|
||||
|
@ -68,7 +68,7 @@ luaA_mouse(lua_State *L)
|
|||
/* arg 3 is cmd to run */
|
||||
luaA_checkfunction(L, 3);
|
||||
|
||||
button = p_new(Button, 1);
|
||||
button = p_new(button_t, 1);
|
||||
button->button = xutil_button_fromint(b);
|
||||
button->fct = luaL_ref(L, LUA_REGISTRYINDEX);
|
||||
|
||||
|
|
18
structs.h
18
structs.h
|
@ -94,8 +94,8 @@ struct keybinding_t
|
|||
DO_SLIST(keybinding_t, keybinding, p_delete)
|
||||
|
||||
/** Mouse buttons bindings */
|
||||
typedef struct Button Button;
|
||||
struct Button
|
||||
typedef struct button_t button_t;
|
||||
struct button_t
|
||||
{
|
||||
/** Key modifiers */
|
||||
unsigned long mod;
|
||||
|
@ -104,10 +104,10 @@ struct Button
|
|||
/** Lua function to execute. */
|
||||
luaA_function fct;
|
||||
/** Next and previous buttons */
|
||||
Button *prev, *next;
|
||||
button_t *prev, *next;
|
||||
};
|
||||
|
||||
DO_SLIST(Button, button, p_delete)
|
||||
DO_SLIST(button_t, button, p_delete)
|
||||
|
||||
/** Widget tell status code */
|
||||
typedef enum
|
||||
|
@ -141,8 +141,8 @@ struct widget_t
|
|||
alignment_t align;
|
||||
/** Misc private data */
|
||||
void *data;
|
||||
/** Buttons bindings */
|
||||
Button *buttons;
|
||||
/** Button bindings */
|
||||
button_t *buttons;
|
||||
/** Cache flags */
|
||||
int cache_flags;
|
||||
};
|
||||
|
@ -359,9 +359,9 @@ struct AwesomeConf
|
|||
/** Mouse bindings list */
|
||||
struct
|
||||
{
|
||||
Button *root;
|
||||
Button *client;
|
||||
Button *titlebar;
|
||||
button_t *root;
|
||||
button_t *client;
|
||||
button_t *titlebar;
|
||||
} buttons;
|
||||
/** Numlock mask */
|
||||
unsigned int numlockmask;
|
||||
|
|
|
@ -437,7 +437,7 @@ luaA_titlebar_mouse(lua_State *L)
|
|||
{
|
||||
size_t i, len;
|
||||
int b;
|
||||
Button *button;
|
||||
button_t *button;
|
||||
|
||||
/* arg 1 is modkey table */
|
||||
luaA_checktable(L, 1);
|
||||
|
@ -446,7 +446,7 @@ luaA_titlebar_mouse(lua_State *L)
|
|||
/* arg 3 is cmd to run */
|
||||
luaA_checkfunction(L, 3);
|
||||
|
||||
button = p_new(Button, 1);
|
||||
button = p_new(button_t, 1);
|
||||
button->button = xutil_button_fromint(b);
|
||||
button->fct = luaL_ref(L, LUA_REGISTRYINDEX);
|
||||
|
||||
|
|
6
widget.c
6
widget.c
|
@ -78,7 +78,7 @@ widget_common_button_press(widget_node_t *w,
|
|||
statusbar_t *statusbar __attribute__ ((unused)),
|
||||
xcb_button_press_event_t *ev)
|
||||
{
|
||||
Button *b;
|
||||
button_t *b;
|
||||
|
||||
for(b = w->widget->buttons; b; b = b->next)
|
||||
if(ev->detail == b->button && CLEANMASK(ev->state) == b->mod && b->fct)
|
||||
|
@ -194,7 +194,7 @@ luaA_widget_mouse(lua_State *L)
|
|||
/* arg 1 is object */
|
||||
widget_t **widget = luaL_checkudata(L, 1, "widget");
|
||||
int b;
|
||||
Button *button;
|
||||
button_t *button;
|
||||
|
||||
/* arg 2 is modkey table */
|
||||
luaA_checktable(L, 2);
|
||||
|
@ -203,7 +203,7 @@ luaA_widget_mouse(lua_State *L)
|
|||
/* arg 4 is cmd to run */
|
||||
luaA_checkfunction(L, 4);
|
||||
|
||||
button = p_new(Button, 1);
|
||||
button = p_new(button_t, 1);
|
||||
button->button = xutil_button_fromint(b);
|
||||
button->fct = luaL_ref(L, LUA_REGISTRYINDEX);
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ taglist_button_press(widget_node_t *w, statusbar_t *statusbar,
|
|||
xcb_button_press_event_t *ev)
|
||||
{
|
||||
VirtScreen *vscreen = &globalconf.screens[statusbar->screen];
|
||||
Button *b;
|
||||
button_t *b;
|
||||
taglist_data_t *data = w->widget->data;
|
||||
taglist_drawn_area_t *tda;
|
||||
area_t *area;
|
||||
|
|
|
@ -177,7 +177,7 @@ static void
|
|||
tasklist_button_press(widget_node_t *w, statusbar_t *statusbar,
|
||||
xcb_button_press_event_t *ev)
|
||||
{
|
||||
Button *b;
|
||||
button_t *b;
|
||||
client_t *c, **lc;
|
||||
Data *d = w->widget->data;
|
||||
int n = 0, box_width = 0, i, ci = 0;
|
||||
|
|
6
window.c
6
window.c
|
@ -112,7 +112,7 @@ window_configure(xcb_window_t win, area_t geometry, int border)
|
|||
void
|
||||
window_grabbuttons(xcb_window_t win, int phys_screen)
|
||||
{
|
||||
Button *b;
|
||||
button_t *b;
|
||||
|
||||
/* Always grab the first mouse button. */
|
||||
xcb_grab_button(globalconf.connection, false, win, BUTTONMASK,
|
||||
|
@ -155,7 +155,7 @@ window_grabbuttons(xcb_window_t win, int phys_screen)
|
|||
void
|
||||
window_root_grabbuttons(void)
|
||||
{
|
||||
Button *b;
|
||||
button_t *b;
|
||||
xcb_screen_t *s;
|
||||
int phys_screen = globalconf.default_screen;
|
||||
|
||||
|
@ -186,7 +186,7 @@ window_root_grabbuttons(void)
|
|||
* \param b The button binding.
|
||||
*/
|
||||
void
|
||||
window_root_grabbutton(Button *b)
|
||||
window_root_grabbutton(button_t *b)
|
||||
{
|
||||
xcb_screen_t *s;
|
||||
int phys_screen = globalconf.default_screen;
|
||||
|
|
2
window.h
2
window.h
|
@ -28,7 +28,7 @@ void window_setstate(xcb_window_t, long);
|
|||
long window_getstate(xcb_window_t);
|
||||
void window_configure(xcb_window_t, area_t, int);
|
||||
void window_grabbuttons(xcb_window_t, int);
|
||||
void window_root_grabbutton(Button *);
|
||||
void window_root_grabbutton(button_t *);
|
||||
void window_root_grabbuttons(void);
|
||||
void window_root_grabkey(keybinding_t *);
|
||||
void window_setshape(xcb_window_t, int);
|
||||
|
|
Loading…
Reference in a new issue