remove deprecated functions
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
e6c7770b33
commit
5154cfc19f
|
@ -44,7 +44,6 @@ set(AWE_SRCS
|
||||||
${SOURCE_DIR}/event.c
|
${SOURCE_DIR}/event.c
|
||||||
${SOURCE_DIR}/property.c
|
${SOURCE_DIR}/property.c
|
||||||
${SOURCE_DIR}/ewmh.c
|
${SOURCE_DIR}/ewmh.c
|
||||||
${SOURCE_DIR}/keybinding.c
|
|
||||||
${SOURCE_DIR}/key.c
|
${SOURCE_DIR}/key.c
|
||||||
${SOURCE_DIR}/keygrabber.c
|
${SOURCE_DIR}/keygrabber.c
|
||||||
${SOURCE_DIR}/mousegrabber.c
|
${SOURCE_DIR}/mousegrabber.c
|
||||||
|
|
31
client.c
31
client.c
|
@ -1621,8 +1621,6 @@ luaA_client_newindex(lua_State *L)
|
||||||
client_need_arrange(*c);
|
client_need_arrange(*c);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case A_TK_MINIMIZE:
|
|
||||||
luaA_deprecate(L, "client.minimized");
|
|
||||||
case A_TK_MINIMIZED:
|
case A_TK_MINIMIZED:
|
||||||
client_setminimized(*c, luaA_checkboolean(L, 3));
|
client_setminimized(*c, luaA_checkboolean(L, 3));
|
||||||
break;
|
break;
|
||||||
|
@ -1656,8 +1654,6 @@ luaA_client_newindex(lua_State *L)
|
||||||
case A_TK_STICKY:
|
case A_TK_STICKY:
|
||||||
client_setsticky(*c, luaA_checkboolean(L, 3));
|
client_setsticky(*c, luaA_checkboolean(L, 3));
|
||||||
break;
|
break;
|
||||||
case A_TK_HONORSIZEHINTS:
|
|
||||||
luaA_deprecate(L, "size_hints_honor");
|
|
||||||
case A_TK_SIZE_HINTS_HONOR:
|
case A_TK_SIZE_HINTS_HONOR:
|
||||||
(*c)->size_hints_honor = luaA_checkboolean(L, 3);
|
(*c)->size_hints_honor = luaA_checkboolean(L, 3);
|
||||||
client_need_arrange(*c);
|
client_need_arrange(*c);
|
||||||
|
@ -1878,8 +1874,6 @@ luaA_client_index(lua_State *L)
|
||||||
case A_TK_HIDE:
|
case A_TK_HIDE:
|
||||||
lua_pushboolean(L, (*c)->ishidden);
|
lua_pushboolean(L, (*c)->ishidden);
|
||||||
break;
|
break;
|
||||||
case A_TK_MINIMIZE:
|
|
||||||
luaA_deprecate(L, "client.minimized");
|
|
||||||
case A_TK_MINIMIZED:
|
case A_TK_MINIMIZED:
|
||||||
lua_pushboolean(L, (*c)->isminimized);
|
lua_pushboolean(L, (*c)->isminimized);
|
||||||
break;
|
break;
|
||||||
|
@ -1922,8 +1916,6 @@ luaA_client_index(lua_State *L)
|
||||||
case A_TK_STICKY:
|
case A_TK_STICKY:
|
||||||
lua_pushboolean(L, (*c)->issticky);
|
lua_pushboolean(L, (*c)->issticky);
|
||||||
break;
|
break;
|
||||||
case A_TK_HONORSIZEHINTS:
|
|
||||||
luaA_deprecate(L, "size_hints_honor");
|
|
||||||
case A_TK_SIZE_HINTS_HONOR:
|
case A_TK_SIZE_HINTS_HONOR:
|
||||||
lua_pushboolean(L, (*c)->size_hints_honor);
|
lua_pushboolean(L, (*c)->size_hints_honor);
|
||||||
break;
|
break;
|
||||||
|
@ -2226,27 +2218,6 @@ luaA_client_module_newindex(lua_State *L)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Move a client with mouse (DEPRECATED).
|
|
||||||
* \param L The Lua VM state.
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
luaA_client_mouse_move(lua_State *L)
|
|
||||||
{
|
|
||||||
luaA_deprecate(L, "awful.mouse.client.move()");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Resize a client with mouse (DEPRECATED).
|
|
||||||
* \param L The Lua VM state.
|
|
||||||
* \return The number of pushed elements.
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
luaA_client_mouse_resize(lua_State *L)
|
|
||||||
{
|
|
||||||
luaA_deprecate(L, "awful.mouse.client.resize()");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
const struct luaL_reg awesome_client_methods[] =
|
const struct luaL_reg awesome_client_methods[] =
|
||||||
{
|
{
|
||||||
{ "get", luaA_client_get },
|
{ "get", luaA_client_get },
|
||||||
|
@ -2267,8 +2238,6 @@ const struct luaL_reg awesome_client_meta[] =
|
||||||
{ "raise", luaA_client_raise },
|
{ "raise", luaA_client_raise },
|
||||||
{ "lower", luaA_client_lower },
|
{ "lower", luaA_client_lower },
|
||||||
{ "redraw", luaA_client_redraw },
|
{ "redraw", luaA_client_redraw },
|
||||||
{ "mouse_resize", luaA_client_mouse_resize },
|
|
||||||
{ "mouse_move", luaA_client_mouse_move },
|
|
||||||
{ "unmanage", luaA_client_unmanage },
|
{ "unmanage", luaA_client_unmanage },
|
||||||
{ "fake_input", luaA_client_fake_input },
|
{ "fake_input", luaA_client_fake_input },
|
||||||
{ "__index", luaA_client_index },
|
{ "__index", luaA_client_index },
|
||||||
|
|
40
key.c
40
key.c
|
@ -370,44 +370,6 @@ luaA_key_array_get(lua_State *L, keybindings_t *keys)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Add a global key binding. This key binding will always be available.
|
|
||||||
* \param L The Lua VM state.
|
|
||||||
*
|
|
||||||
* \luastack
|
|
||||||
* \lvalue A key.
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
luaA_key_add(lua_State *L)
|
|
||||||
{
|
|
||||||
luaA_deprecate(L, "root.keys");
|
|
||||||
keyb_t **k = luaA_checkudata(L, 1, "key");
|
|
||||||
int nscreen = xcb_setup_roots_length(xcb_get_setup(globalconf.connection));
|
|
||||||
|
|
||||||
key_register(&globalconf.keys, *k);
|
|
||||||
|
|
||||||
for(int phys_screen = 0; phys_screen < nscreen; phys_screen++)
|
|
||||||
{
|
|
||||||
xcb_screen_t *s = xutil_screen_get(globalconf.connection, phys_screen);
|
|
||||||
xcb_ungrab_key(globalconf.connection, XCB_GRAB_ANY, s->root, XCB_BUTTON_MASK_ANY);
|
|
||||||
window_grabkeys(s->root, &globalconf.keys);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Remove a global key binding.
|
|
||||||
* \param L The Lua VM state.
|
|
||||||
*
|
|
||||||
* \luastack
|
|
||||||
* \lvalue A key.
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
luaA_key_remove(lua_State *L)
|
|
||||||
{
|
|
||||||
luaA_deprecate(L, "root.keys");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
const struct luaL_reg awesome_key_methods[] =
|
const struct luaL_reg awesome_key_methods[] =
|
||||||
{
|
{
|
||||||
{ "__call", luaA_key_new },
|
{ "__call", luaA_key_new },
|
||||||
|
@ -415,8 +377,6 @@ const struct luaL_reg awesome_key_methods[] =
|
||||||
};
|
};
|
||||||
const struct luaL_reg awesome_key_meta[] =
|
const struct luaL_reg awesome_key_meta[] =
|
||||||
{
|
{
|
||||||
{ "add", luaA_key_add },
|
|
||||||
{ "remove", luaA_key_remove },
|
|
||||||
{ "__tostring", luaA_key_tostring },
|
{ "__tostring", luaA_key_tostring },
|
||||||
{ "__gc", luaA_key_gc },
|
{ "__gc", luaA_key_gc },
|
||||||
{ NULL, NULL },
|
{ NULL, NULL },
|
||||||
|
|
45
keybinding.c
45
keybinding.c
|
@ -1,45 +0,0 @@
|
||||||
/*
|
|
||||||
* keybinding.c - Key bindings configuration management
|
|
||||||
*
|
|
||||||
* Copyright © 2008 Julien Danjou <julien@danjou.info>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along
|
|
||||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "key.h"
|
|
||||||
|
|
||||||
/** Define a global key binding. This key binding will always be available.
|
|
||||||
* (DEPRECATED, see key).
|
|
||||||
* \param L The Lua VM state.
|
|
||||||
* \luastack
|
|
||||||
* \lparam A table with modifier keys.
|
|
||||||
* \lparam A key name.
|
|
||||||
* \lparam A function to execute on key press.
|
|
||||||
* \lparam A function to execute on key release.
|
|
||||||
* \lreturn The key.
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
luaA_keybinding_new(lua_State *L)
|
|
||||||
{
|
|
||||||
luaA_deprecate(L, "key");
|
|
||||||
return luaA_key_new(L);
|
|
||||||
}
|
|
||||||
|
|
||||||
const struct luaL_reg awesome_keybinding_methods[] =
|
|
||||||
{
|
|
||||||
{ "__call", luaA_keybinding_new },
|
|
||||||
{ NULL, NULL }
|
|
||||||
};
|
|
|
@ -421,10 +421,6 @@ function moveresize(x, y, w, h, c)
|
||||||
sel:geometry(geometry)
|
sel:geometry(geometry)
|
||||||
end
|
end
|
||||||
|
|
||||||
function maximize()
|
|
||||||
util.deprecate("maximized_horizontal and vertical client attributes")
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Move a client to a tag.
|
--- Move a client to a tag.
|
||||||
-- @param target The tag to move the client to.
|
-- @param target The tag to move the client to.
|
||||||
-- @param c Optional client to move, otherwise the focused one is used.
|
-- @param c Optional client to move, otherwise the focused one is used.
|
||||||
|
|
19
luaa.c
19
luaa.c
|
@ -76,7 +76,6 @@ extern const struct luaL_reg awesome_wibox_methods[];
|
||||||
extern const struct luaL_reg awesome_wibox_meta[];
|
extern const struct luaL_reg awesome_wibox_meta[];
|
||||||
extern const struct luaL_reg awesome_key_methods[];
|
extern const struct luaL_reg awesome_key_methods[];
|
||||||
extern const struct luaL_reg awesome_key_meta[];
|
extern const struct luaL_reg awesome_key_meta[];
|
||||||
extern const struct luaL_reg awesome_keybinding_methods[];
|
|
||||||
|
|
||||||
static struct sockaddr_un *addr;
|
static struct sockaddr_un *addr;
|
||||||
static ev_io csio = { .fd = -1 };
|
static ev_io csio = { .fd = -1 };
|
||||||
|
@ -130,22 +129,6 @@ luaA_root_buttons(lua_State *L)
|
||||||
return luaA_button_array_get(L, &globalconf.buttons);
|
return luaA_button_array_get(L, &globalconf.buttons);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get or set global mouse bindings (DEPRECATED).
|
|
||||||
* This binding will be available when you'll click on root window.
|
|
||||||
* \param L The Lua VM state.
|
|
||||||
* \return The number of element pushed on stack.
|
|
||||||
* \luastack
|
|
||||||
* \lvalue A client.
|
|
||||||
* \lparam An array of mouse button bindings objects, or nothing.
|
|
||||||
* \return The array of mouse button bindings objects.
|
|
||||||
*/
|
|
||||||
static int
|
|
||||||
luaA_buttons(lua_State *L)
|
|
||||||
{
|
|
||||||
luaA_deprecate(L, "root.buttons");
|
|
||||||
return luaA_root_buttons(L);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Quit awesome.
|
/** Quit awesome.
|
||||||
* \param L The Lua VM state.
|
* \param L The Lua VM state.
|
||||||
* \return The number of elements pushed on stack.
|
* \return The number of elements pushed on stack.
|
||||||
|
@ -830,7 +813,6 @@ luaA_init(void)
|
||||||
{ "exec", luaA_exec },
|
{ "exec", luaA_exec },
|
||||||
{ "spawn", luaA_spawn },
|
{ "spawn", luaA_spawn },
|
||||||
{ "restart", luaA_restart },
|
{ "restart", luaA_restart },
|
||||||
{ "buttons", luaA_buttons },
|
|
||||||
{ "__index", luaA_awesome_index },
|
{ "__index", luaA_awesome_index },
|
||||||
{ "__newindex", luaA_awesome_newindex },
|
{ "__newindex", luaA_awesome_newindex },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
|
@ -895,7 +877,6 @@ luaA_init(void)
|
||||||
|
|
||||||
/* Export keys */
|
/* Export keys */
|
||||||
luaA_openlib(L, "key", awesome_key_methods, awesome_key_meta);
|
luaA_openlib(L, "key", awesome_key_methods, awesome_key_meta);
|
||||||
luaA_openlib(L, "keybinding", awesome_keybinding_methods, awesome_key_meta);
|
|
||||||
|
|
||||||
lua_pushliteral(L, "AWESOME_VERSION");
|
lua_pushliteral(L, "AWESOME_VERSION");
|
||||||
lua_pushstring(L, AWESOME_VERSION);
|
lua_pushstring(L, AWESOME_VERSION);
|
||||||
|
|
14
tag.c
14
tag.c
|
@ -255,19 +255,7 @@ static int
|
||||||
luaA_tag_new(lua_State *L)
|
luaA_tag_new(lua_State *L)
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t len;
|
||||||
const char *name;
|
const char *name = luaL_checklstring(L, 2, &len);
|
||||||
|
|
||||||
if(lua_istable(L, 2))
|
|
||||||
{
|
|
||||||
/* deprecation warning */
|
|
||||||
luaA_warn(L, "%s: This function prototype changed, see API documentation",
|
|
||||||
__FUNCTION__);
|
|
||||||
lua_getfield(L, 2, "name");
|
|
||||||
name = luaL_checklstring(L, -1, &len);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
name = luaL_checklstring(L, 2, &len);
|
|
||||||
|
|
||||||
return luaA_tag_userdata_new(L, tag_new(name, len));
|
return luaA_tag_userdata_new(L, tag_new(name, len));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue