24#ifndef VLC_VARIABLES_H
25#define VLC_VARIABLES_H 1
38#define VLC_VAR_TYPE 0x00ff
39#define VLC_VAR_CLASS 0x00f0
40#define VLC_VAR_FLAGS 0xff00
47#define VLC_VAR_VOID 0x0010
48#define VLC_VAR_BOOL 0x0020
49#define VLC_VAR_INTEGER 0x0030
50#define VLC_VAR_STRING 0x0040
51#define VLC_VAR_FLOAT 0x0050
52#define VLC_VAR_ADDRESS 0x0070
53#define VLC_VAR_COORDS 0x00A0
61#define VLC_VAR_HASCHOICE 0x0100
63#define VLC_VAR_ISCOMMAND 0x2000
68#define VLC_VAR_DOINHERIT 0x8000
79#define VLC_VAR_SETSTEP 0x0012
86#define VLC_VAR_SETVALUE 0x0013
88#define VLC_VAR_SETTEXT 0x0014
89#define VLC_VAR_GETTEXT 0x0015
91#define VLC_VAR_GETMIN 0x0016
92#define VLC_VAR_GETMAX 0x0017
93#define VLC_VAR_GETSTEP 0x0018
95#define VLC_VAR_ADDCHOICE 0x0020
96#define VLC_VAR_DELCHOICE 0x0021
97#define VLC_VAR_CLEARCHOICES 0x0022
98#define VLC_VAR_GETCHOICES 0x0024
100#define VLC_VAR_CHOICESCOUNT 0x0026
101#define VLC_VAR_SETMINMAX 0x0027
127 struct { int32_t x; int32_t y; } coords;
347 int32_t x, int32_t y )
432 int32_t *px, int32_t *py )
779 unsigned *den,
const char *
name);
802#define var_Create(a,b,c) var_Create(VLC_OBJECT(a), b, c)
803#define var_Destroy(a,b) var_Destroy(VLC_OBJECT(a), b)
804#define var_Change(a,b,...) var_Change(VLC_OBJECT(a), b, __VA_ARGS__)
805#define var_Type(a,b) var_Type(VLC_OBJECT(a), b)
806#define var_Set(a,b,c) var_Set(VLC_OBJECT(a), b, c)
807#define var_Get(a,b,c) var_Get(VLC_OBJECT(a), b, c)
808#define var_SetChecked(o,n,t,v) var_SetChecked(VLC_OBJECT(o), n, t, v)
809#define var_GetChecked(o,n,t,v) var_GetChecked(VLC_OBJECT(o), n, t, v)
811#define var_AddCallback(a,b,c,d) var_AddCallback(VLC_OBJECT(a), b, c, d)
812#define var_DelCallback(a,b,c,d) var_DelCallback(VLC_OBJECT(a), b, c, d)
813#define var_TriggerCallback(a,b) var_TriggerCallback(VLC_OBJECT(a), b)
814#define var_AddListCallback(a,b,c,d) \
815 var_AddListCallback(VLC_OBJECT(a), b, c, d)
816#define var_DelListCallback(a,b,c,d) \
817 var_DelListCallback(VLC_OBJECT(a), b, c, d)
819#define var_SetInteger(a,b,c) var_SetInteger(VLC_OBJECT(a), b, c)
820#define var_SetBool(a,b,c) var_SetBool(VLC_OBJECT(a), b, c)
821#define var_SetCoords(o,n,x,y) var_SetCoords(VLC_OBJECT(o), n, x, y)
822#define var_SetFloat(a,b,c) var_SetFloat(VLC_OBJECT(a), b, c)
823#define var_SetString(a,b,c) var_SetString(VLC_OBJECT(a), b, c)
824#define var_SetAddress(o, n, p) var_SetAddress(VLC_OBJECT(o), n, p)
826#define var_GetCoords(o,n,x,y) var_GetCoords(VLC_OBJECT(o), n, x, y)
828#define var_IncInteger(a,b) var_IncInteger(VLC_OBJECT(a), b)
829#define var_DecInteger(a,b) var_DecInteger(VLC_OBJECT(a), b)
830#define var_OrInteger(a,b,c) var_OrInteger(VLC_OBJECT(a), b, c)
831#define var_NAndInteger(a,b,c) var_NAndInteger(VLC_OBJECT(a), b, c)
833#define var_CreateGetInteger(a,b) var_CreateGetInteger(VLC_OBJECT(a), b)
834#define var_CreateGetBool(a,b) var_CreateGetBool(VLC_OBJECT(a), b)
835#define var_CreateGetFloat(a,b) var_CreateGetFloat(VLC_OBJECT(a), b)
836#define var_CreateGetString(a,b) var_CreateGetString(VLC_OBJECT(a), b)
837#define var_CreateGetNonEmptyString(a,b) \
838 var_CreateGetNonEmptyString(VLC_OBJECT(a), b)
839#define var_CreateGetAddress(a,b) var_CreateGetAddress( VLC_OBJECT(a), b)
841#define var_CreateGetIntegerCommand(a,b) var_CreateGetIntegerCommand( VLC_OBJECT(a),b)
842#define var_CreateGetBoolCommand(a,b) var_CreateGetBoolCommand( VLC_OBJECT(a),b)
843#define var_CreateGetFloatCommand(a,b) var_CreateGetFloatCommand( VLC_OBJECT(a),b)
844#define var_CreateGetStringCommand(a,b) var_CreateGetStringCommand( VLC_OBJECT(a),b)
845#define var_CreateGetNonEmptyStringCommand(a,b) var_CreateGetNonEmptyStringCommand( VLC_OBJECT(a),b)
847#define var_CountChoices(a,b) var_CountChoices(VLC_OBJECT(a),b)
848#define var_ToggleBool(a,b) var_ToggleBool(VLC_OBJECT(a),b )
850#define var_InheritBool(o, n) var_InheritBool(VLC_OBJECT(o), n)
851#define var_InheritInteger(o, n) var_InheritInteger(VLC_OBJECT(o), n)
852#define var_InheritFloat(o, n) var_InheritFloat(VLC_OBJECT(o), n)
853#define var_InheritString(o, n) var_InheritString(VLC_OBJECT(o), n)
854#define var_InheritAddress(o, n) var_InheritAddress(VLC_OBJECT(o), n)
855#define var_InheritURational(a,b,c,d) var_InheritURational(VLC_OBJECT(a), b, c, d)
857#define var_GetInteger(a,b) var_GetInteger(VLC_OBJECT(a),b)
858#define var_GetBool(a,b) var_GetBool(VLC_OBJECT(a),b)
859#define var_GetFloat(a,b) var_GetFloat(VLC_OBJECT(a),b)
860#define var_GetString(a,b) var_GetString(VLC_OBJECT(a),b)
861#define var_GetNonEmptyString(a,b) var_GetNonEmptyString( VLC_OBJECT(a),b)
862#define var_GetAddress(a,b) var_GetAddress(VLC_OBJECT(a),b)
864#define var_LocationParse(o, m, p) var_LocationParse(VLC_OBJECT(o), m, p)
size_t count
Definition core.c:403
#define VLC_USED
Definition fourcc_gen.c:32
#define VLC_API
Definition fourcc_gen.c:31
#define VLC_MALLOC
Definition vlc_common.h:157
#define likely(p)
Predicted true condition.
Definition vlc_common.h:237
#define VLC_VAR_CHOICESCOUNT
Definition vlc_variables.h:101
#define VLC_VAR_ISCOMMAND
Definition vlc_variables.h:64
#define VLC_VAR_DOINHERIT
Creation flag.
Definition vlc_variables.h:69
#define VLC_VAR_COORDS
Definition vlc_variables.h:54
#define VLC_VAR_FLOAT
Definition vlc_variables.h:52
#define VLC_VAR_BOOL
Definition vlc_variables.h:49
#define VLC_VAR_INTEGER
Definition vlc_variables.h:50
#define VLC_VAR_STRING
Definition vlc_variables.h:51
#define VLC_VAR_ADDRESS
Definition vlc_variables.h:53
static char * var_InheritString(vlc_object_t *obj, const char *name)
Definition vlc_variables.h:737
static void var_GetCoords(vlc_object_t *obj, const char *name, int32_t *px, int32_t *py)
Definition vlc_variables.h:432
static float var_GetFloat(vlc_object_t *p_obj, const char *psz_name)
Get a float value.
Definition vlc_variables.h:453
static char * var_GetNonEmptyString(vlc_object_t *p_obj, const char *psz_name)
Definition vlc_variables.h:479
int var_InheritURational(vlc_object_t *obj, unsigned *num, unsigned *den, const char *name)
Inherit a string as a fractional value.
Definition variables.c:1071
static int var_SetString(vlc_object_t *p_obj, const char *psz_name, const char *psz_string)
Set the value of a string variable.
Definition vlc_variables.h:377
int var_Set(vlc_object_t *obj, const char *name, vlc_value_t val)
Sets a variable value.
Definition variables.c:721
int var_Inherit(vlc_object_t *, const char *, int, vlc_value_t *)
Finds the value of a variable.
Definition variables.c:1038
static uint64_t var_OrInteger(vlc_object_t *obj, const char *name, unsigned v)
Definition vlc_variables.h:528
static int var_SetInteger(vlc_object_t *p_obj, const char *psz_name, int64_t i)
Set the value of an integer variable.
Definition vlc_variables.h:325
static char * var_CreateGetNonEmptyString(vlc_object_t *p_obj, const char *psz_name)
Definition vlc_variables.h:602
void var_Destroy(vlc_object_t *obj, const char *name)
Destroys a VLC object variable.
Definition variables.c:382
int var_Type(vlc_object_t *obj, const char *name)
Get the type of a variable.
Definition variables.c:655
static int64_t var_GetInteger(vlc_object_t *p_obj, const char *psz_name)
Get an integer value.
Definition vlc_variables.h:406
static float var_InheritFloat(vlc_object_t *obj, const char *name)
Definition vlc_variables.h:727
static bool var_ToggleBool(vlc_object_t *p_obj, const char *psz_name)
Definition vlc_variables.h:698
int(* vlc_list_callback_t)(vlc_object_t *, char const *, int, vlc_value_t *, void *)
Definition vlc_variables.h:144
int var_Create(vlc_object_t *obj, const char *name, int type)
Creates a VLC object variable.
Definition variables.c:289
int var_SetChecked(vlc_object_t *, const char *, int, vlc_value_t)
Definition variables.c:676
static int64_t var_CreateGetInteger(vlc_object_t *p_obj, const char *psz_name)
Create a integer variable with inherit and get its value.
Definition vlc_variables.h:555
int var_Get(vlc_object_t *obj, const char *name, vlc_value_t *valp)
Gets a variable value.
Definition variables.c:755
static int var_SetBool(vlc_object_t *p_obj, const char *psz_name, bool b)
Set the value of an boolean variable.
Definition vlc_variables.h:340
static bool var_InheritBool(vlc_object_t *obj, const char *name)
Definition vlc_variables.h:707
int(* vlc_callback_t)(vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *)
Definition vlc_variables.h:135
static int var_SetFloat(vlc_object_t *p_obj, const char *psz_name, float f)
Set the value of a float variable.
Definition vlc_variables.h:363
static bool var_CreateGetBoolCommand(vlc_object_t *p_obj, const char *psz_name)
Create a boolean command variable with inherit and get its value.
Definition vlc_variables.h:644
static void * var_GetAddress(vlc_object_t *p_obj, const char *psz_name)
Definition vlc_variables.h:491
static int64_t var_DecInteger(vlc_object_t *p_obj, const char *psz_name)
Decrement an integer variable.
Definition vlc_variables.h:519
static int var_SetCoords(vlc_object_t *obj, const char *name, int32_t x, int32_t y)
Definition vlc_variables.h:347
static int64_t var_InheritInteger(vlc_object_t *obj, const char *name)
Definition vlc_variables.h:717
static char * var_CreateGetStringCommand(vlc_object_t *p_obj, const char *psz_name)
Create a string command variable with inherit and get its value.
Definition vlc_variables.h:672
void var_AddListCallback(vlc_object_t *, const char *, vlc_list_callback_t, void *)
Register a callback for a list variable.
Definition variables.c:879
static void * var_CreateGetAddress(vlc_object_t *p_obj, const char *psz_name)
Create an address variable with inherit and get its value.
Definition vlc_variables.h:616
static float var_CreateGetFloat(vlc_object_t *p_obj, const char *psz_name)
Create a float variable with inherit and get its value.
Definition vlc_variables.h:581
static uint64_t var_NAndInteger(vlc_object_t *obj, const char *name, unsigned v)
Definition vlc_variables.h:538
static size_t var_CountChoices(vlc_object_t *p_obj, const char *psz_name)
Definition vlc_variables.h:690
int var_LocationParse(vlc_object_t *obj, const char *mrl, const char *prefix)
Parses a string with multiple options.
Definition variables.c:1009
static int var_SetAddress(vlc_object_t *p_obj, const char *psz_name, void *ptr)
Set the value of a pointer variable.
Definition vlc_variables.h:392
int var_GetAndSet(vlc_object_t *obj, const char *name, int op, vlc_value_t *value)
Perform an atomic read-modify-write of a variable.
Definition variables.c:594
static char * var_GetString(vlc_object_t *p_obj, const char *psz_name)
Get a string value.
Definition vlc_variables.h:469
static int64_t var_IncInteger(vlc_object_t *p_obj, const char *psz_name)
Increment an integer variable.
Definition vlc_variables.h:505
static bool var_GetBool(vlc_object_t *p_obj, const char *psz_name)
Get a boolean value.
Definition vlc_variables.h:422
static char * var_CreateGetString(vlc_object_t *p_obj, const char *psz_name)
Create a string variable with inherit and get its value.
Definition vlc_variables.h:594
int var_Change(vlc_object_t *obj, const char *name, int action,...)
Performs a special action on a variable.
Definition variables.c:423
vlc_var_atomic_op
Variable actions.
Definition vlc_variables.h:111
int var_GetChecked(vlc_object_t *, const char *, int, vlc_value_t *)
Definition variables.c:726
void var_DelListCallback(vlc_object_t *, const char *, vlc_list_callback_t, void *)
Remove a callback from a list variable.
Definition variables.c:889
void var_AddCallback(vlc_object_t *obj, const char *name, vlc_callback_t callback, void *opaque)
Registers a callback for a variable.
Definition variables.c:801
void var_DelCallback(vlc_object_t *obj, const char *name, vlc_callback_t callback, void *opaque)
Deregisters a callback from a variable.
Definition variables.c:854
static int64_t var_CreateGetIntegerCommand(vlc_object_t *p_obj, const char *psz_name)
Create a integer command variable with inherit and get its value.
Definition vlc_variables.h:630
static bool var_CreateGetBool(vlc_object_t *p_obj, const char *psz_name)
Create a boolean variable with inherit and get its value.
Definition vlc_variables.h:568
static float var_CreateGetFloatCommand(vlc_object_t *p_obj, const char *psz_name)
Create a float command variable with inherit and get its value.
Definition vlc_variables.h:658
static void * var_InheritAddress(vlc_object_t *obj, const char *name)
Definition vlc_variables.h:752
void var_TriggerCallback(vlc_object_t *obj, const char *name)
Triggers callbacks on a variable.
Definition variables.c:864
static char * var_CreateGetNonEmptyStringCommand(vlc_object_t *p_obj, const char *psz_name)
Definition vlc_variables.h:681
@ VLC_VAR_INTEGER_OR
Binary OR over an integer bits field.
Definition vlc_variables.h:114
@ VLC_VAR_BOOL_TOGGLE
Invert a boolean value (param ignored)
Definition vlc_variables.h:112
@ VLC_VAR_INTEGER_NAND
Binary NAND over an integer bits field.
Definition vlc_variables.h:115
@ VLC_VAR_INTEGER_ADD
Add parameter to an integer value.
Definition vlc_variables.h:113
const char name[16]
Definition httpd.c:1298
VLC object common members.
Definition vlc_objects.h:53
const char * psz_name
Definition text_style.c:33
VLC value structure.
Definition vlc_variables.h:122
int64_t i_int
Definition vlc_variables.h:123
int32_t x
Definition vlc_variables.h:128
struct vlc_value_t::@293 coords
void * p_address
Definition vlc_variables.h:127
bool b_bool
Definition vlc_variables.h:124
char * psz_string
Definition vlc_variables.h:126
float f_float
Definition vlc_variables.h:125
int32_t y
Definition vlc_variables.h:128
This file is a collection of common definitions and types.