deprecate awesome.load_image

Signed-off-by: delta <darkussdelta@gmail.com>
This commit is contained in:
delta 2024-11-28 00:44:34 +01:00
parent 0f950cbb62
commit 51b98dce38
1 changed files with 2 additions and 4 deletions

6
luaa.c
View File

@ -327,14 +327,12 @@ luaA_pixbuf_to_surface(lua_State *L)
* @treturn gears.surface A cairo surface as light user datum.
* @treturn nil|string The error message, if any.
* @staticfct load_image
* @deprecated awesome.pixbuf_to_surface
*/
static int
luaA_load_image(lua_State *L)
{
/* TODO: Deprecate this function, Lua can use GdkPixbuf directly plus
* awesome.pixbuf_to_surface
*/
luaA_deprecate(L, "awesome.pixbuf_to_surface");
GError *error = NULL;
const char *filename = luaL_checkstring(L, 1);
cairo_surface_t *surface = draw_load_image(L, filename, &error);