Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
89e6bf1e
Commit
89e6bf1e
authored
Nov 02, 2010
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua: implement var_ToggleBool and var_CountChoices.
parent
a50d13ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
modules/misc/lua/libs/variables.c
modules/misc/lua/libs/variables.c
+22
-0
No files found.
modules/misc/lua/libs/variables.c
View file @
89e6bf1e
...
...
@@ -561,6 +561,26 @@ static int vlclua_dec_integer( lua_State *L )
return
1
;
}
static
int
vlclua_countchoices
(
lua_State
*
L
)
{
vlc_object_t
**
pp_obj
=
luaL_checkudata
(
L
,
1
,
"vlc_object"
);
const
char
*
psz_var
=
luaL_checkstring
(
L
,
2
);
int
i_count
=
var_CountChoices
(
*
pp_obj
,
psz_var
);
lua_pushinteger
(
L
,
i_count
);
return
1
;
}
static
int
vlclua_togglebool
(
lua_State
*
L
)
{
vlc_object_t
**
pp_obj
=
luaL_checkudata
(
L
,
1
,
"vlc_object"
);
const
char
*
psz_var
=
luaL_checkstring
(
L
,
2
);
bool
b_val
=
var_ToggleBool
(
*
pp_obj
,
psz_var
);
lua_pushboolean
(
L
,
b_val
);
return
1
;
}
/*****************************************************************************
*
*****************************************************************************/
...
...
@@ -576,6 +596,8 @@ static const luaL_Reg vlclua_var_reg[] = {
{
"libvlc_command"
,
vlclua_libvlc_command
},
{
"inc_integer"
,
vlclua_inc_integer
},
{
"dec_integer"
,
vlclua_dec_integer
},
{
"count_choices"
,
vlclua_countchoices
},
{
"toggle_bool"
,
vlclua_togglebool
},
{
NULL
,
NULL
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment