X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fmisc%2Flua%2Fvlc.h;h=ff3d4da6eb58a97f5772fb04725e81e0880a4c32;hb=ade1b3cb6bd4dfd5e3eef3c811cd1b276e415eb0;hp=ea7e31474832e441ea11028d9b9b2821c4035c8d;hpb=a519cf4a4d95fc1b3aba6ab880b07a1b11a755a9;p=vlc diff --git a/modules/misc/lua/vlc.h b/modules/misc/lua/vlc.h index ea7e314748..ff3d4da6eb 100644 --- a/modules/misc/lua/vlc.h +++ b/modules/misc/lua/vlc.h @@ -35,7 +35,6 @@ #include #include #include -#include #include /* Low level lua C API */ #include /* Higher level C API */ @@ -74,7 +73,7 @@ static inline void lua_Dbg( vlc_object_t * p_this, const char * ppz_fmt, ... ) /***************************************************************************** * Functions that should be in lua ... but aren't for some obscure reason *****************************************************************************/ -static inline int luaL_checkboolean( lua_State *L, int narg ) +static inline bool luaL_checkboolean( lua_State *L, int narg ) { luaL_checktype( L, narg, LUA_TBOOLEAN ); /* can raise an error */ return lua_toboolean( L, narg ); @@ -92,8 +91,13 @@ static inline const char *luaL_nilorcheckstring( lua_State *L, int narg ) return luaL_checkstring( L, narg ); } +void vlclua_set_this( lua_State *, vlc_object_t * ); +#define vlclua_set_this(a, b) vlclua_set_this(a, VLC_OBJECT(b)) vlc_object_t * vlclua_get_this( lua_State * ); +struct intf_sys_t; +void vlclua_set_intf( lua_State *, struct intf_sys_t * ); + /***************************************************************************** * Lua function bridge *****************************************************************************/ @@ -105,9 +109,9 @@ int vlclua_push_ret( lua_State *, int i_error ); * success. *****************************************************************************/ int vlclua_scripts_batch_execute( vlc_object_t *p_this, const char * luadirname, - int (*func)(vlc_object_t *, const char *, lua_State *, void *), - lua_State * L, void * user_data ); -int vlclua_dir_list( vlc_object_t *p_this, const char *luadirname, char **ppsz_dir_list ); + int (*func)(vlc_object_t *, const char *, void *), + void * user_data ); +int vlclua_dir_list( vlc_object_t *p_this, const char *luadirname, char ***pppsz_dir_list ); void vlclua_dir_list_free( char **ppsz_dir_list ); char *vlclua_find_file( vlc_object_t *p_this, const char *psz_luadirname, const char *psz_name ); @@ -125,6 +129,9 @@ int __vlclua_playlist_add_internal( vlc_object_t *, lua_State *, playlist_t *, input_item_t *, bool ); #define vlclua_playlist_add_internal(a,b,c,d,e) __vlclua_playlist_add_internal(VLC_OBJECT(a),b,c,d,e) +int __vlclua_add_modules_path( vlc_object_t *, lua_State *, const char *psz_filename ); +#define vlclua_add_modules_path( a, b, c ) __vlclua_add_modules_path(VLC_OBJECT(a), b, c) + /** * Per-interface private state */