xine-lib 1.2.13-20230125hg15249
goom_config_param.h
Go to the documentation of this file.
1#ifndef _CONFIG_PARAM_H
2#define _CONFIG_PARAM_H
3
4#include <stdlib.h>
5
20
21struct IntVal {
22 int value;
23 int min;
24 int max;
25 int step;
26};
27struct FloatVal {
28 float value;
29 float min;
30 float max;
31 float step;
32};
33struct StrVal {
34 char *value;
35};
36struct ListVal {
37 char *value;
39 char **choices;
40};
41struct BoolVal {
42 int value;
43};
44
45
46typedef struct _PARAM {
47 const char *name;
48 const char *desc;
49 char rw;
51 union {
52 struct IntVal ival;
53 struct FloatVal fval;
54 struct StrVal sval;
55 struct ListVal slist;
56 struct BoolVal bval;
58
59 /* used by the core to inform the GUI of a change */
60 void (*change_listener)(struct _PARAM *_this);
61
62 /* used by the GUI to inform the core of a change */
63 void (*changed)(struct _PARAM *_this);
64
65 void *user_data; /* can be used by the GUI */
67
68#define IVAL(p) ((p).param.ival.value)
69#define SVAL(p) ((p).param.sval.value)
70#define FVAL(p) ((p).param.fval.value)
71#define BVAL(p) ((p).param.bval.value)
72#define LVAL(p) ((p).param.slist.value)
73
74#define FMIN(p) ((p).param.fval.min)
75#define FMAX(p) ((p).param.fval.max)
76#define FSTEP(p) ((p).param.fval.step)
77
78#define IMIN(p) ((p).param.ival.min)
79#define IMAX(p) ((p).param.ival.max)
80#define ISTEP(p) ((p).param.ival.step)
81
84PluginParam goom_secure_b_param(const char *name, int value);
86
89
90void goom_set_str_param_value(PluginParam *p, const char *str);
91void goom_set_list_param_value(PluginParam *p, const char *str);
92
93typedef struct _PARAMETERS {
94 const char *name;
95 const char *desc;
99
100PluginParameters goom_plugin_parameters(const char *name, int nb);
101
102#define secure_f_param goom_secure_f_param
103#define secure_i_param goom_secure_i_param
104#define secure_b_param goom_secure_b_param
105#define secure_s_param goom_secure_s_param
106#define secure_f_feedback goom_secure_f_feedback
107#define secure_i_feedback goom_secure_i_feedback
108#define set_list_param_value goom_set_list_param_value
109#define set_str_param_value goom_set_str_param_value
110#define plugin_parameters goom_plugin_parameters
111
112#endif
void goom_set_list_param_value(PluginParam *p, const char *str)
Definition config_param.c:107
PluginParam goom_secure_s_param(const char *name)
Definition config_param.c:54
PluginParam goom_secure_i_feedback(const char *name)
Definition config_param.c:81
ParamType
Definition goom_config_param.h:13
@ PARAM_STRVAL
Definition goom_config_param.h:17
@ PARAM_FLOATVAL
Definition goom_config_param.h:15
@ PARAM_BOOLVAL
Definition goom_config_param.h:16
@ PARAM_LISTVAL
Definition goom_config_param.h:18
@ PARAM_INTVAL
Definition goom_config_param.h:14
PluginParameters goom_plugin_parameters(const char *name, int nb)
Definition config_param.c:87
struct _PARAMETERS PluginParameters
PluginParam goom_secure_i_param(const char *name)
Definition config_param.c:70
PluginParam goom_secure_f_feedback(const char *name)
Definition config_param.c:48
PluginParam goom_secure_f_param(const char *name)
Definition config_param.c:37
void goom_set_str_param_value(PluginParam *p, const char *str)
Definition config_param.c:98
struct _PARAM PluginParam
PluginParam goom_secure_b_param(const char *name, int value)
Definition config_param.c:62
Definition goom_config_param.h:41
int value
Definition goom_config_param.h:42
Definition goom_config_param.h:27
float value
Definition goom_config_param.h:28
float min
Definition goom_config_param.h:29
float max
Definition goom_config_param.h:30
float step
Definition goom_config_param.h:31
Definition goom_config_param.h:21
int step
Definition goom_config_param.h:25
int max
Definition goom_config_param.h:24
int min
Definition goom_config_param.h:23
int value
Definition goom_config_param.h:22
Definition goom_config_param.h:36
int nbChoices
Definition goom_config_param.h:38
char ** choices
Definition goom_config_param.h:39
char * value
Definition goom_config_param.h:37
Definition goom_config_param.h:33
char * value
Definition goom_config_param.h:34
Definition goom_config_param.h:93
const char * desc
Definition goom_config_param.h:95
int nbParams
Definition goom_config_param.h:96
const char * name
Definition goom_config_param.h:94
PluginParam ** params
Definition goom_config_param.h:97
Definition goom_config_param.h:46
const char * desc
Definition goom_config_param.h:48
struct FloatVal fval
Definition goom_config_param.h:53
void(* change_listener)(struct _PARAM *_this)
Definition goom_config_param.h:60
char rw
Definition goom_config_param.h:49
void * user_data
Definition goom_config_param.h:65
const char * name
Definition goom_config_param.h:47
struct ListVal slist
Definition goom_config_param.h:55
struct IntVal ival
Definition goom_config_param.h:52
ParamType type
Definition goom_config_param.h:50
struct BoolVal bval
Definition goom_config_param.h:56
struct StrVal sval
Definition goom_config_param.h:54
union _PARAM::@46 param
void(* changed)(struct _PARAM *_this)
Definition goom_config_param.h:63
const char * name
Definition xine.c:1575