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
315 int32_t x, int32_t y )
400 int32_t *px, int32_t *py )
747 unsigned *den,
const char *
name);
770#define var_Create(a,b,c) var_Create(VLC_OBJECT(a), b, c)
771#define var_Destroy(a,b) var_Destroy(VLC_OBJECT(a), b)
772#define var_Change(a,b,...) var_Change(VLC_OBJECT(a), b, __VA_ARGS__)
773#define var_Type(a,b) var_Type(VLC_OBJECT(a), b)
774#define var_Set(a,b,c) var_Set(VLC_OBJECT(a), b, c)
775#define var_Get(a,b,c) var_Get(VLC_OBJECT(a), b, c)
776#define var_SetChecked(o,n,t,v) var_SetChecked(VLC_OBJECT(o), n, t, v)
777#define var_GetChecked(o,n,t,v) var_GetChecked(VLC_OBJECT(o), n, t, v)
779#define var_AddCallback(a,b,c,d) var_AddCallback(VLC_OBJECT(a), b, c, d)
780#define var_DelCallback(a,b,c,d) var_DelCallback(VLC_OBJECT(a), b, c, d)
781#define var_TriggerCallback(a,b) var_TriggerCallback(VLC_OBJECT(a), b)
782#define var_AddListCallback(a,b,c,d) \
783 var_AddListCallback(VLC_OBJECT(a), b, c, d)
784#define var_DelListCallback(a,b,c,d) \
785 var_DelListCallback(VLC_OBJECT(a), b, c, d)
787#define var_SetInteger(a,b,c) var_SetInteger(VLC_OBJECT(a), b, c)
788#define var_SetBool(a,b,c) var_SetBool(VLC_OBJECT(a), b, c)
789#define var_SetCoords(o,n,x,y) var_SetCoords(VLC_OBJECT(o), n, x, y)
790#define var_SetFloat(a,b,c) var_SetFloat(VLC_OBJECT(a), b, c)
791#define var_SetString(a,b,c) var_SetString(VLC_OBJECT(a), b, c)
792#define var_SetAddress(o, n, p) var_SetAddress(VLC_OBJECT(o), n, p)
794#define var_GetCoords(o,n,x,y) var_GetCoords(VLC_OBJECT(o), n, x, y)
796#define var_IncInteger(a,b) var_IncInteger(VLC_OBJECT(a), b)
797#define var_DecInteger(a,b) var_DecInteger(VLC_OBJECT(a), b)
798#define var_OrInteger(a,b,c) var_OrInteger(VLC_OBJECT(a), b, c)
799#define var_NAndInteger(a,b,c) var_NAndInteger(VLC_OBJECT(a), b, c)
801#define var_CreateGetInteger(a,b) var_CreateGetInteger(VLC_OBJECT(a), b)
802#define var_CreateGetBool(a,b) var_CreateGetBool(VLC_OBJECT(a), b)
803#define var_CreateGetFloat(a,b) var_CreateGetFloat(VLC_OBJECT(a), b)
804#define var_CreateGetString(a,b) var_CreateGetString(VLC_OBJECT(a), b)
805#define var_CreateGetNonEmptyString(a,b) \
806 var_CreateGetNonEmptyString(VLC_OBJECT(a), b)
807#define var_CreateGetAddress(a,b) var_CreateGetAddress( VLC_OBJECT(a), b)
809#define var_CreateGetIntegerCommand(a,b) var_CreateGetIntegerCommand( VLC_OBJECT(a),b)
810#define var_CreateGetBoolCommand(a,b) var_CreateGetBoolCommand( VLC_OBJECT(a),b)
811#define var_CreateGetFloatCommand(a,b) var_CreateGetFloatCommand( VLC_OBJECT(a),b)
812#define var_CreateGetStringCommand(a,b) var_CreateGetStringCommand( VLC_OBJECT(a),b)
813#define var_CreateGetNonEmptyStringCommand(a,b) var_CreateGetNonEmptyStringCommand( VLC_OBJECT(a),b)
815#define var_CountChoices(a,b) var_CountChoices(VLC_OBJECT(a),b)
816#define var_ToggleBool(a,b) var_ToggleBool(VLC_OBJECT(a),b )
818#define var_InheritBool(o, n) var_InheritBool(VLC_OBJECT(o), n)
819#define var_InheritInteger(o, n) var_InheritInteger(VLC_OBJECT(o), n)
820#define var_InheritFloat(o, n) var_InheritFloat(VLC_OBJECT(o), n)
821#define var_InheritString(o, n) var_InheritString(VLC_OBJECT(o), n)
822#define var_InheritAddress(o, n) var_InheritAddress(VLC_OBJECT(o), n)
823#define var_InheritURational(a,b,c,d) var_InheritURational(VLC_OBJECT(a), b, c, d)
825#define var_GetInteger(a,b) var_GetInteger(VLC_OBJECT(a),b)
826#define var_GetBool(a,b) var_GetBool(VLC_OBJECT(a),b)
827#define var_GetFloat(a,b) var_GetFloat(VLC_OBJECT(a),b)
828#define var_GetString(a,b) var_GetString(VLC_OBJECT(a),b)
829#define var_GetNonEmptyString(a,b) var_GetNonEmptyString( VLC_OBJECT(a),b)
830#define var_GetAddress(a,b) var_GetAddress(VLC_OBJECT(a),b)
832#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:164
#define likely(p)
Predicted true condition.
Definition: vlc_common.h:248
#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:705
static void var_GetCoords(vlc_object_t *obj, const char *name, int32_t *px, int32_t *py)
Definition: vlc_variables.h:400
static float var_GetFloat(vlc_object_t *p_obj, const char *psz_name)
Get a float value.
Definition: vlc_variables.h:421
static char * var_GetNonEmptyString(vlc_object_t *p_obj, const char *psz_name)
Definition: vlc_variables.h:447
int var_InheritURational(vlc_object_t *obj, unsigned *num, unsigned *den, const char *name)
Inherit a string as a fractional value.
Definition: variables.c:1073
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:345
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:1039
static uint64_t var_OrInteger(vlc_object_t *obj, const char *name, unsigned v)
Definition: vlc_variables.h:496
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:293
static char * var_CreateGetNonEmptyString(vlc_object_t *p_obj, const char *psz_name)
Definition: vlc_variables.h:570
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:374
static float var_InheritFloat(vlc_object_t *obj, const char *name)
Definition: vlc_variables.h:695
static bool var_ToggleBool(vlc_object_t *p_obj, const char *psz_name)
Definition: vlc_variables.h:666
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:523
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:308
static bool var_InheritBool(vlc_object_t *obj, const char *name)
Definition: vlc_variables.h:675
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:331
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:612
static void * var_GetAddress(vlc_object_t *p_obj, const char *psz_name)
Definition: vlc_variables.h:459
static int64_t var_DecInteger(vlc_object_t *p_obj, const char *psz_name)
Decrement an integer variable.
Definition: vlc_variables.h:487
static int var_SetCoords(vlc_object_t *obj, const char *name, int32_t x, int32_t y)
Definition: vlc_variables.h:315
static int64_t var_InheritInteger(vlc_object_t *obj, const char *name)
Definition: vlc_variables.h:685
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:640
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:584
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:549
static uint64_t var_NAndInteger(vlc_object_t *obj, const char *name, unsigned v)
Definition: vlc_variables.h:506
static size_t var_CountChoices(vlc_object_t *p_obj, const char *psz_name)
Definition: vlc_variables.h:658
int var_LocationParse(vlc_object_t *obj, const char *mrl, const char *prefix)
Parses a string with multiple options.
Definition: variables.c:1010
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:360
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:437
static int64_t var_IncInteger(vlc_object_t *p_obj, const char *psz_name)
Increment an integer variable.
Definition: vlc_variables.h:473
static bool var_GetBool(vlc_object_t *p_obj, const char *psz_name)
Get a boolean value.
Definition: vlc_variables.h:390
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:562
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:598
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:536
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:626
static void * var_InheritAddress(vlc_object_t *obj, const char *name)
Definition: vlc_variables.h:720
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:649
@ 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:1281
VLC object common members.
Definition: vlc_objects.h:45
const char * psz_name
Definition: text_style.c:33
VLC value structure.
Definition: vlc_common.h:487
int64_t i_int
Definition: vlc_common.h:488
int32_t x
Definition: vlc_common.h:493
void * p_address
Definition: vlc_common.h:492
bool b_bool
Definition: vlc_common.h:489
char * psz_string
Definition: vlc_common.h:491
float f_float
Definition: vlc_common.h:490
struct vlc_value_t::@202 coords
int32_t y
Definition: vlc_common.h:493
This file is a collection of common definitions and types.
int(* vlc_list_callback_t)(vlc_object_t *, char const *, int, vlc_value_t *, void *)
Definition: vlc_common.h:533
int(* vlc_callback_t)(vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *)
Definition: vlc_common.h:524