Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
1c0551f1
Commit
1c0551f1
authored
Sep 17, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up a bit of redundant code
parent
f2453c92
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
201 deletions
+98
-201
include/variables.h
include/variables.h
+29
-11
modules/control/hotkeys.c
modules/control/hotkeys.c
+69
-190
No files found.
include/variables.h
View file @
1c0551f1
...
...
@@ -232,7 +232,7 @@ static inline int __var_SetInteger( vlc_object_t *p_obj, const char *psz_name, i
val
.
i_int
=
i
;
return
__var_Set
(
p_obj
,
psz_name
,
val
);
}
#define var_SetInteger(a,b,c) __var_SetInteger( VLC_OBJECT(a),b,c)
/**
* Set the value of an boolean variable
*
...
...
@@ -301,11 +301,8 @@ static inline int __var_SetVoid( vlc_object_t *p_obj, const char *psz_name )
val
.
b_bool
=
VLC_TRUE
;
return
__var_Set
(
p_obj
,
psz_name
,
val
);
}
#define var_SetVoid(a,b) __var_SetVoid( VLC_OBJECT(a),b)
/**
* __var_SetInteger() with automatic casting
*/
#define var_SetInteger(a,b,c) __var_SetInteger( VLC_OBJECT(a),b,c)
/**
* __var_SetBool() with automatic casting
*/
...
...
@@ -323,14 +320,10 @@ static inline int __var_SetVoid( vlc_object_t *p_obj, const char *psz_name )
* __var_SetString() with automatic casting
*/
#define var_SetString(a,b,c) __var_SetString( VLC_OBJECT(a),b,c)
/**
* __var_SetVoid() with automatic casting
*/
#define var_SetVoid(a,b) __var_SetVoid( VLC_OBJECT(a),b)
/**
* Get a integer value
*
* Get a
n
integer value
*
* \param p_obj The object that holds the variable
* \param psz_name The name of the variable
*/
...
...
@@ -425,6 +418,31 @@ static inline char *__var_GetString( vlc_object_t *p_obj, const char *psz_name )
#define var_GetString(a,b) __var_GetString( VLC_OBJECT(a),b)
/**
* Increment an integer variable
* \param p_obj the object that holds the variable
* \param psz_name the name of the variable
*/
static
inline
void
__var_IncInteger
(
vlc_object_t
*
p_obj
,
const
char
*
psz_name
)
{
int
i_val
=
__var_GetInteger
(
p_obj
,
psz_name
);
__var_SetInteger
(
p_obj
,
psz_name
,
++
i_val
);
}
#define var_IncInteger(a,b) __var_IncInteger( VLC_OBJECT(a), b )
/**
* Decrement an integer variable
* \param p_obj the object that holds the variable
* \param psz_name the name of the variable
*/
static
inline
void
__var_DecInteger
(
vlc_object_t
*
p_obj
,
const
char
*
psz_name
)
{
int
i_val
=
__var_GetInteger
(
p_obj
,
psz_name
);
__var_SetInteger
(
p_obj
,
psz_name
,
--
i_val
);
}
#define var_DecInteger(a,b) __var_DecInteger( VLC_OBJECT(a), b )
/**
* Create a integer variable with inherit and get its value.
*
...
...
modules/control/hotkeys.c
View file @
1c0551f1
This diff is collapsed.
Click to expand it.
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