]> git.sesse.net Git - vlc/blob - src/misc/variables.h
misc/events.c: Remove unwanted code.
[vlc] / src / misc / variables.h
1 typedef struct callback_entry_t callback_entry_t;
2
3 /**
4  * The structure describing a variable.
5  * \note vlc_value_t is the common union for variable values
6  */
7 struct variable_t
8 {
9     /** The variable's exported value */
10     vlc_value_t  val;
11
12     char *       psz_name; /**< The variable unique name */
13     uint32_t     i_hash;   /**< (almost) unique hashed value */
14     int          i_type;   /**< The type of the variable */
15
16     /** The variable display name, mainly for use by the interfaces */
17     char *       psz_text;
18
19     /** A pointer to a comparison function */
20     int      ( * pf_cmp ) ( vlc_value_t, vlc_value_t );
21     /** A pointer to a duplication function */
22     void     ( * pf_dup ) ( vlc_value_t * );
23     /** A pointer to a deallocation function */
24     void     ( * pf_free ) ( vlc_value_t * );
25
26     /** Creation count: we only destroy the variable if it reaches 0 */
27     int          i_usage;
28
29     /** If the variable has min/max/step values */
30     vlc_value_t  min, max, step;
31
32     /** Index of the default choice, if the variable is to be chosen in
33      * a list */
34     int          i_default;
35     /** List of choices */
36     vlc_list_t   choices;
37     /** List of friendly names for the choices */
38     vlc_list_t   choices_text;
39
40     /** Set to TRUE if the variable is in a callback */
41     vlc_bool_t   b_incallback;
42
43     /** Number of registered callbacks */
44     int                i_entries;
45     /** Array of registered callbacks */
46     callback_entry_t * p_entries;
47 };
48