static int
_elua_scan_params(lua_State *L, int i, Eina_Bool tr, char *params, ...) // Stack usage -
- // if i is a table
+ // if i is a table
// [-n, +n, e]
// else
// [-0, +0, -]
// if tr
- // if i is a table
+ // if i is a table
// stack reset to i
// else
// [-0, +1, m]
@param text The string to print.
*/
static int
-_elua_echo(lua_State *L) // Stack usage [-0, +0, vm]
+_elua_echo(lua_State *L) // Stack usage [-0, +0, v]
{
- const char *string = luaL_checkstring(L, 1);
+ const char *string = luaL_checkstring(L, 1); // Stack usage [-0, +0, v]
LD("%s\n", string);
return 0;
}
*/
static int
-_elua_date(lua_State *L) // Stack usage [-?, +?, ?]
+_elua_date(lua_State *L) // Stack usage [-16, +17, em]
{
static time_t last_tzset = 0;
struct timeval timev;
struct tm *tm;
time_t tt;
- lua_newtable(L);
+ lua_newtable(L); // Stack usage [-0, +1, m]
gettimeofday(&timev, NULL);
tt = (time_t)(timev.tv_sec);
if ((tt > (last_tzset + 1)) || (tt < (last_tzset - 1)))
}
tm = localtime(&tt);
if (tm)
- {
+ { // Stack usage [-16, +16, em]
_elua_ret(L, "%year %month %day %yearday %weekday %hour %min #sec",
(int)(tm->tm_year + 1900),
(int)(tm->tm_mon + 1),
@returns A number of seconds.
*/
static int
-_elua_looptime(lua_State *L) // Stack usage [-?, +?, ?]
+_elua_looptime(lua_State *L) // Stack usage [-0, +1, -]
{
double t = ecore_loop_time_get();
- lua_pushnumber(L, t);
+ lua_pushnumber(L, t); // Stack usage [-0, +1, -]
return 1;
}
@returns A number of seconds.
*/
static int
-_elua_seconds(lua_State *L) // Stack usage [-?, +?, ?]
+_elua_seconds(lua_State *L) // Stack usage [-0, +1, -]
{
double t = ecore_time_get();
- lua_pushnumber(L, t);
+ lua_pushnumber(L, t); // Stack usage [-0, +1, -]
return 1;
}
- integer h: The edjes height.
*/
static int
-_elua_objgeom(lua_State *L) // Stack usage [-?, +?, ?]
+_elua_objgeom(lua_State *L) // Stack usage [-10, +11, em]
{
- Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key);
- if (!lua_istable(L, 1)) lua_newtable(L);
- _elua_ret(L, "%x %y %w %h", ed->x, ed->y, ed->w, ed->h);
+ Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key); // Stack usage [-2, +2, e]
+// FIXME: This function has no arguments, so why the table check?
+ if (!lua_istable(L, 1)) lua_newtable(L); // Stack usage [-0, +0, -] [-0, +1, m]
+ _elua_ret(L, "%x %y %w %h", ed->x, ed->y, ed->w, ed->h); // Stack usage [-8, +8, em]
return 1;
}
- integer y: The edjes Y position.
*/
static int
-_elua_objpos(lua_State *L) // Stack usage [-?, +?, ?]
+_elua_objpos(lua_State *L) // Stack usage [-6, +7, em]
{
- Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key);
- if (!lua_istable(L, 1)) lua_newtable(L);
- _elua_ret(L, "%x %y", ed->x, ed->y);
+ Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key); // Stack usage [-2, +2, e]
+// FIXME: This function has no arguments, so why the table check?
+ if (!lua_istable(L, 1)) lua_newtable(L); // Stack usage [-0, +0, -] [-0, +1, m]
+ _elua_ret(L, "%x %y", ed->x, ed->y); // Stack usage [-4, +4, em]
return 1;
}
- integer h: The edjes height.
*/
static int
-_elua_objsize(lua_State *L) // Stack usage [-?, +?, ?]
+_elua_objsize(lua_State *L) // Stack usage [-6, +7, em]
{
- Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key);
- if (!lua_istable(L, 1)) lua_newtable(L);
- _elua_ret(L, "%w %h", ed->w, ed->h);
+ Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key); // Stack usage [-2, +2, e]
+// FIXME: This function has no arguments, so why the table check?
+ if (!lua_istable(L, 1)) lua_newtable(L); // Stack usage [-0, +0, -] [-0, +1, m]
+ _elua_ret(L, "%w %h", ed->w, ed->h); // Stack usage [-4, +4, em]
return 1;
}
edje group.
*/
static int
-_elua_emit(lua_State *L) // Stack usage [-?, +?, ?]
+_elua_emit(lua_State *L) // Stack usage [-2, +2, ev]
{
- Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key);
- const char *sig = luaL_checkstring(L, 1);
- const char *src = luaL_checkstring(L, 2);
+ Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key); // Stack usage [-2, +2, e]
+ const char *sig = luaL_checkstring(L, 1); // Stack usage [-0, +0, v]
+ const char *src = luaL_checkstring(L, 2); // Stack usage [-0, +0, v]
if ((!sig) || (!src)) return 0;
_edje_emit(ed, sig, src);
return 0;
static int
_elua_messagesend(lua_State *L) // Stack usage [-?, +?, ?]
{
- Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key);
+ Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key); // Stack usage [-2, +2, e]
int id = luaL_checkinteger(L, 1);
const char *type = luaL_checkstring(L, 2);
if (!type) return 0;
//-------------
static Eina_Bool
-_elua_animator_cb(void *data)
+_elua_animator_cb(void *data) // Stack usage [-?, +?, ?]
{
Edje_Lua_Animator *ela = data;
lua_State *L;
}
static void
-_elua_animator_free(void *obj)
+_elua_animator_free(void *obj) // Stack usage [-?, +?, ?]
{
Edje_Lua_Animator *ela = obj;
lua_State *L;
static int
_elua_animator(lua_State *L) // Stack usage [-?, +?, ?]
{
- Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key);
+ Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key); // Stack usage [-2, +2, e]
Edje_Lua_Animator *ela;
luaL_checkany(L, 1);
}
static Eina_Bool
-_elua_timer_cb(void *data)
+_elua_timer_cb(void *data) // Stack usage [-?, +?, ?]
{
Edje_Lua_Timer *elt = data;
lua_State *L;
}
static void
-_elua_timer_free(void *obj)
+_elua_timer_free(void *obj) // Stack usage [-?, +?, ?]
{
Edje_Lua_Timer *elt = obj;
lua_State *L;
static int
_elua_timer(lua_State *L) // Stack usage [-?, +?, ?]
{
- Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key);
+ Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key); // Stack usage [-2, +2, e]
Edje_Lua_Timer *elt;
double val;
}
static Eina_Bool
-_elua_transition_cb(void *data)
+_elua_transition_cb(void *data) // Stack usage [-?, +?, ?]
{
Edje_Lua_Transition *elt = data;
lua_State *L;
}
static void
-_elua_transition_free(void *obj)
+_elua_transition_free(void *obj) // Stack usage [-?, +?, ?]
{
Edje_Lua_Transition *elt = obj;
lua_State *L;
static int
_elua_transition(lua_State *L) // Stack usage [-?, +?, ?]
{
- Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key);
+ Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key); // Stack usage [-2, +2, e]
Edje_Lua_Transition *elt;
double val;
static int
_elua_color_class(lua_State *L) // Stack usage [-?, +?, ?]
{
- Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key);
+ Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key); // Stack usage [-2, +2, e]
Edje_Color_Class *c_class;
const char *class = luaL_checkstring(L, 1);
int r, g, b, a;
static int
_elua_text_class(lua_State *L) // Stack usage [-?, +?, ?]
{
- Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key);
+ Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key); // Stack usage [-2, +2, e]
Edje_Text_Class *t_class;
const char *class = luaL_checkstring(L, 1);
char *font = NULL;
static int
_elua_map(lua_State *L) // Stack usage [-?, +?, ?]
{
- Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key);
+ Edje *ed = (Edje *)_elua_table_ptr_get(L, _elua_key); // Stack usage [-2, +2, e]
Edje_Lua_Map *elm;
int count;