VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc_variables.h File Reference

VLC object variables and callbacks interface. More...

Include dependency graph for vlc_variables.h:

Go to the source code of this file.

Data Structures

union  vlc_value_t
 VLC value structure. More...
 

Macros

#define VLC_VAR_TYPE   0x00ff
 
#define VLC_VAR_CLASS   0x00f0
 
#define VLC_VAR_FLAGS   0xff00
 
#define VLC_VAR_VOID   0x0010
 
#define VLC_VAR_BOOL   0x0020
 
#define VLC_VAR_INTEGER   0x0030
 
#define VLC_VAR_STRING   0x0040
 
#define VLC_VAR_FLOAT   0x0050
 
#define VLC_VAR_ADDRESS   0x0070
 
#define VLC_VAR_COORDS   0x00A0
 
#define VLC_VAR_HASCHOICE   0x0100
 
#define VLC_VAR_ISCOMMAND   0x2000
 
#define VLC_VAR_DOINHERIT   0x8000
 Creation flag.
 
#define VLC_VAR_SETSTEP   0x0012
 
#define VLC_VAR_SETVALUE   0x0013
 Set the value of this variable without triggering any callbacks.
 
#define VLC_VAR_SETTEXT   0x0014
 
#define VLC_VAR_GETTEXT   0x0015
 
#define VLC_VAR_GETMIN   0x0016
 
#define VLC_VAR_GETMAX   0x0017
 
#define VLC_VAR_GETSTEP   0x0018
 
#define VLC_VAR_ADDCHOICE   0x0020
 
#define VLC_VAR_DELCHOICE   0x0021
 
#define VLC_VAR_CLEARCHOICES   0x0022
 
#define VLC_VAR_GETCHOICES   0x0024
 
#define VLC_VAR_CHOICESCOUNT   0x0026
 
#define VLC_VAR_SETMINMAX   0x0027
 

Typedefs

typedef int(* vlc_callback_t) (vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *)
 
typedef int(* vlc_list_callback_t) (vlc_object_t *, char const *, int, vlc_value_t *, void *)
 

Enumerations

enum  vlc_var_atomic_op { VLC_VAR_BOOL_TOGGLE , VLC_VAR_INTEGER_ADD , VLC_VAR_INTEGER_OR , VLC_VAR_INTEGER_NAND }
 Variable actions. More...
 

Functions

int var_Create (vlc_object_t *obj, const char *name, int type)
 Creates a VLC object variable.
 
void var_Destroy (vlc_object_t *obj, const char *name)
 Destroys a VLC object variable.
 
int var_Change (vlc_object_t *obj, const char *name, int action,...)
 Performs a special action on a variable.
 
int var_Type (vlc_object_t *obj, const char *name)
 Get the type of a variable.
 
int var_Set (vlc_object_t *obj, const char *name, vlc_value_t val)
 Sets a variable value.
 
int var_Get (vlc_object_t *obj, const char *name, vlc_value_t *valp)
 Gets a variable value.
 
int var_SetChecked (vlc_object_t *, const char *, int, vlc_value_t)
 
int var_GetChecked (vlc_object_t *, const char *, int, vlc_value_t *)
 
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.
 
int var_Inherit (vlc_object_t *, const char *, int, vlc_value_t *)
 Finds the value of a variable.
 
void var_AddCallback (vlc_object_t *obj, const char *name, vlc_callback_t callback, void *opaque)
 Registers a callback for a variable.
 
void var_DelCallback (vlc_object_t *obj, const char *name, vlc_callback_t callback, void *opaque)
 Deregisters a callback from a variable.
 
void var_TriggerCallback (vlc_object_t *obj, const char *name)
 Triggers callbacks on a variable.
 
void var_AddListCallback (vlc_object_t *, const char *, vlc_list_callback_t, void *)
 Register a callback for a list variable.
 
void var_DelListCallback (vlc_object_t *, const char *, vlc_list_callback_t, void *)
 Remove a callback from a list variable.
 
static int var_SetInteger (vlc_object_t *p_obj, const char *psz_name, int64_t i)
 Set the value of an integer variable.
 
static int var_SetBool (vlc_object_t *p_obj, const char *psz_name, bool b)
 Set the value of an boolean variable.
 
static int var_SetCoords (vlc_object_t *obj, const char *name, int32_t x, int32_t y)
 
static int var_SetFloat (vlc_object_t *p_obj, const char *psz_name, float f)
 Set the value of a float variable.
 
static int var_SetString (vlc_object_t *p_obj, const char *psz_name, const char *psz_string)
 Set the value of a string variable.
 
static int var_SetAddress (vlc_object_t *p_obj, const char *psz_name, void *ptr)
 Set the value of a pointer variable.
 
static int64_t var_GetInteger (vlc_object_t *p_obj, const char *psz_name)
 Get an integer value.
 
static bool var_GetBool (vlc_object_t *p_obj, const char *psz_name)
 Get a boolean value.
 
static void var_GetCoords (vlc_object_t *obj, const char *name, int32_t *px, int32_t *py)
 
static float var_GetFloat (vlc_object_t *p_obj, const char *psz_name)
 Get a float value.
 
static char * var_GetString (vlc_object_t *p_obj, const char *psz_name)
 Get a string value.
 
static char * var_GetNonEmptyString (vlc_object_t *p_obj, const char *psz_name)
 
static void * var_GetAddress (vlc_object_t *p_obj, const char *psz_name)
 
static int64_t var_IncInteger (vlc_object_t *p_obj, const char *psz_name)
 Increment an integer variable.
 
static int64_t var_DecInteger (vlc_object_t *p_obj, const char *psz_name)
 Decrement an integer variable.
 
static uint64_t var_OrInteger (vlc_object_t *obj, const char *name, unsigned v)
 
static uint64_t var_NAndInteger (vlc_object_t *obj, const char *name, unsigned v)
 
static int64_t var_CreateGetInteger (vlc_object_t *p_obj, const char *psz_name)
 Create a integer variable with inherit and get its value.
 
static bool var_CreateGetBool (vlc_object_t *p_obj, const char *psz_name)
 Create a boolean variable with inherit and get its value.
 
static float var_CreateGetFloat (vlc_object_t *p_obj, const char *psz_name)
 Create a float variable with inherit and get its value.
 
static char * var_CreateGetString (vlc_object_t *p_obj, const char *psz_name)
 Create a string variable with inherit and get its value.
 
static char * var_CreateGetNonEmptyString (vlc_object_t *p_obj, const char *psz_name)
 
static void * var_CreateGetAddress (vlc_object_t *p_obj, const char *psz_name)
 Create an address variable with inherit and get its value.
 
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.
 
static bool var_CreateGetBoolCommand (vlc_object_t *p_obj, const char *psz_name)
 Create a boolean command variable with inherit and get its value.
 
static float var_CreateGetFloatCommand (vlc_object_t *p_obj, const char *psz_name)
 Create a float command variable with inherit and get its value.
 
static char * var_CreateGetStringCommand (vlc_object_t *p_obj, const char *psz_name)
 Create a string command variable with inherit and get its value.
 
static char * var_CreateGetNonEmptyStringCommand (vlc_object_t *p_obj, const char *psz_name)
 
static size_t var_CountChoices (vlc_object_t *p_obj, const char *psz_name)
 
static bool var_ToggleBool (vlc_object_t *p_obj, const char *psz_name)
 
static bool var_InheritBool (vlc_object_t *obj, const char *name)
 
static int64_t var_InheritInteger (vlc_object_t *obj, const char *name)
 
static float var_InheritFloat (vlc_object_t *obj, const char *name)
 
static char * var_InheritString (vlc_object_t *obj, const char *name)
 
static void * var_InheritAddress (vlc_object_t *obj, const char *name)
 
int var_InheritURational (vlc_object_t *obj, unsigned *num, unsigned *den, const char *name)
 Inherit a string as a fractional value.
 
int var_LocationParse (vlc_object_t *obj, const char *mrl, const char *prefix)
 Parses a string with multiple options.
 

Detailed Description

VLC object variables and callbacks interface.