xine-lib: xine-lib-1.2.12/src/post/goom/goom_config_param.h Source File

xine-lib 1.2.12

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
13 typedef enum {
14 PARAM_INTVAL,
15 PARAM_FLOATVAL,
16 PARAM_BOOLVAL,
17 PARAM_STRVAL,
18 PARAM_LISTVAL,
19} ParamType;
20
21 struct IntVal {
22 int value;
23 int min;
24 int max;
25 int step;
26};
27 struct FloatVal {
28 float value;
29 float min;
30 float max;
31 float step;
32};
33 struct StrVal {
34 char *value;
35};
36 struct ListVal {
37 char *value;
38 int nbChoices;
39 char **choices;
40};
41 struct BoolVal {
42 int value;
43};
44
45
46 typedef struct _PARAM {
47 const char *name;
48 const char *desc;
49 char rw;
50 ParamType type;
51 union {
52 struct IntVal ival;
53 struct FloatVal fval;
54 struct StrVal sval;
55 struct ListVal slist;
56 struct BoolVal bval;
57 } param;
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 */
66} PluginParam;
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
82 PluginParam goom_secure_f_param(const char *name);
83 PluginParam goom_secure_i_param(const char *name);
84 PluginParam goom_secure_b_param(const char *name, int value);
85 PluginParam goom_secure_s_param(const char *name);
86
87 PluginParam goom_secure_f_feedback(const char *name);
88 PluginParam goom_secure_i_feedback(const char *name);
89
90void goom_set_str_param_value(PluginParam *p, const char *str);
91void goom_set_list_param_value(PluginParam *p, const char *str);
92
93 typedef struct _PARAMETERS {
94 const char *name;
95 const char *desc;
96 int nbParams;
97 PluginParam **params;
98} PluginParameters;
99
100 PluginParameters 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
goom_set_list_param_value
void goom_set_list_param_value(PluginParam *p, const char *str)
Definition: config_param.c:107
goom_secure_s_param
PluginParam goom_secure_s_param(const char *name)
Definition: config_param.c:54
goom_secure_i_feedback
PluginParam goom_secure_i_feedback(const char *name)
Definition: config_param.c:81
ParamType
ParamType
Definition: goom_config_param.h:13
PARAM_STRVAL
@ PARAM_STRVAL
Definition: goom_config_param.h:17
PARAM_FLOATVAL
@ PARAM_FLOATVAL
Definition: goom_config_param.h:15
PARAM_BOOLVAL
@ PARAM_BOOLVAL
Definition: goom_config_param.h:16
PARAM_LISTVAL
@ PARAM_LISTVAL
Definition: goom_config_param.h:18
PARAM_INTVAL
@ PARAM_INTVAL
Definition: goom_config_param.h:14
goom_plugin_parameters
PluginParameters goom_plugin_parameters(const char *name, int nb)
Definition: config_param.c:87
PluginParameters
struct _PARAMETERS PluginParameters
goom_secure_i_param
PluginParam goom_secure_i_param(const char *name)
Definition: config_param.c:70
goom_secure_f_feedback
PluginParam goom_secure_f_feedback(const char *name)
Definition: config_param.c:48
goom_secure_f_param
PluginParam goom_secure_f_param(const char *name)
Definition: config_param.c:37
goom_set_str_param_value
void goom_set_str_param_value(PluginParam *p, const char *str)
Definition: config_param.c:98
PluginParam
struct _PARAM PluginParam
goom_secure_b_param
PluginParam goom_secure_b_param(const char *name, int value)
Definition: config_param.c:62
BoolVal
Definition: goom_config_param.h:41
BoolVal::value
int value
Definition: goom_config_param.h:42
FloatVal
Definition: goom_config_param.h:27
FloatVal::value
float value
Definition: goom_config_param.h:28
FloatVal::min
float min
Definition: goom_config_param.h:29
FloatVal::max
float max
Definition: goom_config_param.h:30
FloatVal::step
float step
Definition: goom_config_param.h:31
IntVal
Definition: goom_config_param.h:21
IntVal::step
int step
Definition: goom_config_param.h:25
IntVal::max
int max
Definition: goom_config_param.h:24
IntVal::min
int min
Definition: goom_config_param.h:23
IntVal::value
int value
Definition: goom_config_param.h:22
ListVal
Definition: goom_config_param.h:36
ListVal::nbChoices
int nbChoices
Definition: goom_config_param.h:38
ListVal::choices
char ** choices
Definition: goom_config_param.h:39
ListVal::value
char * value
Definition: goom_config_param.h:37
StrVal
Definition: goom_config_param.h:33
StrVal::value
char * value
Definition: goom_config_param.h:34
_PARAMETERS
Definition: goom_config_param.h:93
_PARAMETERS::desc
const char * desc
Definition: goom_config_param.h:95
_PARAMETERS::nbParams
int nbParams
Definition: goom_config_param.h:96
_PARAMETERS::name
const char * name
Definition: goom_config_param.h:94
_PARAMETERS::params
PluginParam ** params
Definition: goom_config_param.h:97
_PARAM
Definition: goom_config_param.h:46
_PARAM::desc
const char * desc
Definition: goom_config_param.h:48
_PARAM::fval
struct FloatVal fval
Definition: goom_config_param.h:53
_PARAM::change_listener
void(* change_listener)(struct _PARAM *_this)
Definition: goom_config_param.h:60
_PARAM::param
union _PARAM::@40 param
_PARAM::rw
char rw
Definition: goom_config_param.h:49
_PARAM::user_data
void * user_data
Definition: goom_config_param.h:65
_PARAM::name
const char * name
Definition: goom_config_param.h:47
_PARAM::slist
struct ListVal slist
Definition: goom_config_param.h:55
_PARAM::ival
struct IntVal ival
Definition: goom_config_param.h:52
_PARAM::type
ParamType type
Definition: goom_config_param.h:50
_PARAM::bval
struct BoolVal bval
Definition: goom_config_param.h:56
_PARAM::sval
struct StrVal sval
Definition: goom_config_param.h:54
_PARAM::changed
void(* changed)(struct _PARAM *_this)
Definition: goom_config_param.h:63
name
const char * name
Definition: xine.c:1569