screen: add .index property

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-07-13 15:36:49 +02:00
parent 38ada2bdc7
commit f3e12dbe52
2 changed files with 4 additions and 0 deletions

View File

@ -46,6 +46,7 @@ icon_name
id
image
imagebox
index
instance
key
key_press

View File

@ -431,6 +431,9 @@ luaA_screen_index(lua_State *L)
switch(a_tokenize(buf, len))
{
case A_TK_INDEX:
lua_pushinteger(L, screen_array_indexof(&globalconf.screens, s) + 1);
break;
case A_TK_GEOMETRY:
luaA_pusharea(L, s->geometry);
break;