lua: rename luaA_function to luaA_ref
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
0397854775
commit
9f503e5a13
|
@ -36,7 +36,7 @@ typedef struct keybinding_t
|
|||
/** Keycode */
|
||||
xcb_keycode_t keycode;
|
||||
/** Lua function to execute. */
|
||||
luaA_function fct;
|
||||
luaA_ref fct;
|
||||
} keybinding_t;
|
||||
|
||||
keybinding_t *keybinding_find(const xcb_key_press_event_t *);
|
||||
|
|
8
lua.h
8
lua.h
|
@ -37,7 +37,7 @@ typedef enum
|
|||
} awesome_type_t;
|
||||
|
||||
/** Type for Lua function */
|
||||
typedef int luaA_function;
|
||||
typedef int luaA_ref;
|
||||
|
||||
#define DO_LUA_NEW(decl, type, prefix, lua_type, type_ref) \
|
||||
decl int \
|
||||
|
@ -178,13 +178,13 @@ luaA_usemetatable(lua_State *L, int idxobj, int idxfield)
|
|||
|
||||
/** Register a function.
|
||||
* \param L The Lua stack.
|
||||
* \param fct A luaA_function address: it will be filled with the luaA_function
|
||||
* \param fct A luaA_ref address: it will be filled with the luaA_ref
|
||||
* registered. If the adresse point to an already registered function, it will
|
||||
* be unregistered.
|
||||
* \return Always 0.
|
||||
*/
|
||||
static inline int
|
||||
luaA_registerfct(lua_State *L, luaA_function *fct)
|
||||
luaA_registerfct(lua_State *L, luaA_ref *fct)
|
||||
{
|
||||
luaA_checkfunction(L, -1);
|
||||
if(*fct != LUA_REFNIL)
|
||||
|
@ -201,7 +201,7 @@ luaA_registerfct(lua_State *L, luaA_function *fct)
|
|||
* \return True on no error, false otherwise.
|
||||
*/
|
||||
static inline bool
|
||||
luaA_dofunction(lua_State *L, luaA_function f, int nargs, int nret)
|
||||
luaA_dofunction(lua_State *L, luaA_ref f, int nargs, int nret)
|
||||
{
|
||||
if(f != LUA_REFNIL)
|
||||
{
|
||||
|
|
22
structs.h
22
structs.h
|
@ -78,7 +78,7 @@ struct button_t
|
|||
/** Mouse button number */
|
||||
unsigned int button;
|
||||
/** Lua function to execute. */
|
||||
luaA_function fct;
|
||||
luaA_ref fct;
|
||||
/** Next and previous buttons */
|
||||
button_t *prev, *next;
|
||||
};
|
||||
|
@ -429,30 +429,30 @@ struct awesome_t
|
|||
struct
|
||||
{
|
||||
/** Command to execute when spawning a new client */
|
||||
luaA_function manage;
|
||||
luaA_ref manage;
|
||||
/** Command to execute when unmanaging client */
|
||||
luaA_function unmanage;
|
||||
luaA_ref unmanage;
|
||||
/** Command to execute when giving focus to a client */
|
||||
luaA_function focus;
|
||||
luaA_ref focus;
|
||||
/** Command to execute when removing focus to a client */
|
||||
luaA_function unfocus;
|
||||
luaA_ref unfocus;
|
||||
/** Command to run when mouse is over */
|
||||
luaA_function mouseover;
|
||||
luaA_ref mouseover;
|
||||
/** Command to run on arrange */
|
||||
luaA_function arrange;
|
||||
luaA_ref arrange;
|
||||
/** Command to run on title change */
|
||||
luaA_function titleupdate;
|
||||
luaA_ref titleupdate;
|
||||
/** Command to run on urgent flag */
|
||||
luaA_function urgent;
|
||||
luaA_ref urgent;
|
||||
/** Command to run on time */
|
||||
luaA_function timer;
|
||||
luaA_ref timer;
|
||||
} hooks;
|
||||
/** The event loop */
|
||||
struct ev_loop *loop;
|
||||
/** The timeout after which we need to stop select() */
|
||||
struct ev_timer timer;
|
||||
/** The key grabber function */
|
||||
luaA_function keygrabber;
|
||||
luaA_ref keygrabber;
|
||||
/** Focused screen */
|
||||
screen_t *screen_focus;
|
||||
};
|
||||
|
|
|
@ -54,7 +54,7 @@ DO_SLIST(taglist_drawn_area_t, taglist_drawn_area, taglist_drawn_area_delete);
|
|||
typedef struct
|
||||
{
|
||||
taglist_drawn_area_t *drawn_area;
|
||||
luaA_function label;
|
||||
luaA_ref label;
|
||||
} taglist_data_t;
|
||||
|
||||
static taglist_drawn_area_t *
|
||||
|
|
|
@ -77,7 +77,7 @@ DO_SLIST(tasklist_object_data_t, tasklist_object_data, tasklist_object_data_dele
|
|||
typedef struct
|
||||
{
|
||||
bool show_icons;
|
||||
luaA_function label;
|
||||
luaA_ref label;
|
||||
tasklist_object_data_t *objects_data;
|
||||
} tasklist_data_t;
|
||||
|
||||
|
|
Loading…
Reference in New Issue