annotate src/rootvis/config_definition.c @ 946:2d06a4e9b032 trunk

[svn] - use a g_cond_wait() to ensure curl has started up before we try to read.
author nenolod
date Thu, 12 Apr 2007 13:22:28 -0700
parents d985f0dcdeb0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
900
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
1 #include <string.h>
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
2 #include <rootvis.h>
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
3 #include <config.h>
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
4
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
5 inline void add_valb(struct config_def* conf, char* name, int affects, int* var, int def);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
6 inline void add_vali(struct config_def* conf, char* name, int affects, int* var, int def, int from, int to);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
7 inline void add_valf(struct config_def* conf, char* name, int affects, float* var, float def, float from, float to);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
8 inline void add_valt(struct config_def* conf, char* name, int affects, char** var, char* def, int maxlen);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
9 inline void add_valc(struct config_def* conf, char* name, int affects, unsigned char* var, char* def);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
10
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
11 void config_def_init(void)
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
12 {
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
13 Cmain.count = 0;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
14 add_valb(&Cmain, "debug", 0, &conf.debug, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
15 add_valb(&Cmain, "stereo", 32, &conf.stereo, 1);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
16
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
17 Cchannel[0].count = 0;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
18 add_valt(&Cchannel[0], "geometry_display", 32, &conf.geo[0].display, "", 255);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
19 add_vali(&Cchannel[0], "geometry_posx", 1, &conf.geo[0].posx, 520, 0, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
20 add_vali(&Cchannel[0], "geometry_posy", 1, &conf.geo[0].posy, 1, 0, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
21 add_vali(&Cchannel[0], "geometry_orientation", 1, &conf.geo[0].orientation, 0, 0, 3);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
22 add_vali(&Cchannel[0], "geometry_height", 1, &conf.geo[0].height, 50, 0, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
23 add_vali(&Cchannel[0], "geometry_space", 1, &conf.geo[0].space, 1, 0, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
24 add_vali(&Cchannel[0], "bar_width", 1, &conf.bar[0].width, 8, 0, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
25 add_vali(&Cchannel[0], "bar_falloff", 0, &conf.bar[0].falloff, 5, 1, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
26 add_vali(&Cchannel[0], "bar_shadow", 1, &conf.bar[0].shadow, 1, 0, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
27 add_valb(&Cchannel[0], "bar_bevel", 0, &conf.bar[0].bevel, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
28 add_valb(&Cchannel[0], "bar_gradient", 0, &conf.bar[0].gradient, 1);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
29 add_valc(&Cchannel[0], "bar_color_1", 2, conf.bar[0].color[0], "#e6ff64FF");
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
30 add_valc(&Cchannel[0], "bar_color_2", 2, conf.bar[0].color[1], "#cdf62bFF");
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
31 add_valc(&Cchannel[0], "bar_color_3", 2, conf.bar[0].color[2], "#b8dd27FF");
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
32 add_valc(&Cchannel[0], "bar_color_4", 2, conf.bar[0].color[3], "#a3c422FF");
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
33 add_valc(&Cchannel[0], "bar_bevel_color", 2, conf.bar[0].bevel_color, "#00FF00FF");
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
34 add_valc(&Cchannel[0], "bar_shadow_color", 2, conf.bar[0].shadow_color, "#00000066");
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
35 add_valb(&Cchannel[0], "peak_enabled", 1, &conf.peak[0].enabled, 1);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
36 add_vali(&Cchannel[0], "peak_falloff", 0, &conf.peak[0].falloff, 4, 1, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
37 add_vali(&Cchannel[0], "peak_step", 0, &conf.peak[0].step, 5, 0, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
38 add_valc(&Cchannel[0], "peak_color", 2, conf.peak[0].color, "#ffffffdd");
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
39 add_valb(&Cchannel[0], "peak_shadow", 0, &conf.peak[0].shadow, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
40 add_vali(&Cchannel[0], "data_cutoff", 1, &conf.data[0].cutoff, 180, 1, 255);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
41 add_vali(&Cchannel[0], "data_div", 1, &conf.data[0].div, 4, 1, 255);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
42 add_valf(&Cchannel[0], "data_linearity", 0, &conf.data[0].linearity, 0.33, 0.1, 0.9);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
43 add_vali(&Cchannel[0], "data_fps", 0, &conf.data[0].fps, 30, 1, 100);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
44
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
45 Cchannel[1].count = 0;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
46 add_valt(&Cchannel[1], "geometry_display", 32, &conf.geo[1].display, "", 255);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
47 add_vali(&Cchannel[1], "geometry_posx", 1, &conf.geo[1].posx, 520, 0, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
48 add_vali(&Cchannel[1], "geometry_posy", 1, &conf.geo[1].posy, 52, 0, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
49 add_vali(&Cchannel[1], "geometry_orientation", 1, &conf.geo[1].orientation, 1, 0, 3);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
50 add_vali(&Cchannel[1], "geometry_height", 1, &conf.geo[1].height, 40, 0, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
51 add_vali(&Cchannel[1], "geometry_space", 1, &conf.geo[1].space, 2, 0, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
52 add_vali(&Cchannel[1], "bar_width", 1, &conf.bar[1].width, 8, 0, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
53 add_vali(&Cchannel[1], "bar_falloff", 0, &conf.bar[1].falloff, 5, 1, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
54 add_vali(&Cchannel[1], "bar_shadow", 1, &conf.bar[1].shadow, 0, 0, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
55 add_valb(&Cchannel[1], "bar_bevel", 0, &conf.bar[1].bevel, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
56 add_valb(&Cchannel[1], "bar_gradient", 0, &conf.bar[1].gradient, 1);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
57 add_valc(&Cchannel[1], "bar_color_1", 2, conf.bar[1].color[0], "#e6ff6466");
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
58 add_valc(&Cchannel[1], "bar_color_2", 2, conf.bar[1].color[1], "#e6ff6455");
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
59 add_valc(&Cchannel[1], "bar_color_3", 2, conf.bar[1].color[2], "#e6ff6433");
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
60 add_valc(&Cchannel[1], "bar_color_4", 2, conf.bar[1].color[3], "#e6ff6422");
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
61 add_valc(&Cchannel[1], "bar_bevel_color", 2, conf.bar[1].bevel_color, "#00FF00FF");
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
62 add_valc(&Cchannel[1], "bar_shadow_color", 2, conf.bar[1].shadow_color, "#00000066");
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
63 add_valb(&Cchannel[1], "peak_enabled", 1, &conf.peak[1].enabled, 1);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
64 add_vali(&Cchannel[1], "peak_falloff", 0, &conf.peak[1].falloff, 4, 1, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
65 add_vali(&Cchannel[1], "peak_step", 0, &conf.peak[1].step, 5, 0, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
66 add_valc(&Cchannel[1], "peak_color", 2, conf.peak[1].color, "#ffffff88");
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
67 add_valb(&Cchannel[1], "peak_shadow", 0, &conf.peak[1].shadow, 0);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
68 add_vali(&Cchannel[1], "data_cutoff", 1, &conf.data[1].cutoff, 180, 1, 255);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
69 add_vali(&Cchannel[1], "data_div", 1, &conf.data[1].div, 4, 1, 255);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
70 add_valf(&Cchannel[1], "data_linearity", 0, &conf.data[1].linearity, 0.33, 0.1, 0.9);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
71 add_vali(&Cchannel[1], "data_fps", 0, &conf.data[1].fps, 30, 1, 100);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
72 }
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
73
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
74 inline void add_begin(struct config_def* conf, char* name, int affects)
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
75 {
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
76 conf->def = realloc(conf->def, (conf->count+1)*sizeof(struct config_value));
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
77 conf->def[conf->count].name = (char*)malloc(strlen(name) + 1);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
78 strcpy(conf->def[conf->count].name, name);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
79 conf->def[conf->count].affects = affects;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
80 }
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
81
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
82 inline void add_end(struct config_def* conf)
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
83 {
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
84 conf->count++;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
85 }
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
86
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
87 inline void add_valb(struct config_def* conf, char* name, int affects, int* var, int def)
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
88 {
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
89 add_begin(conf, name, affects);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
90
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
91 conf->def[conf->count].type = BOOLN;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
92
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
93 conf->def[conf->count].vali.var = var;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
94 conf->def[conf->count].vali.def_value = def;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
95
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
96 add_end(conf);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
97 }
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
98
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
99 inline void add_vali(struct config_def* conf, char* name, int affects, int* var, int def, int from, int to)
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
100 {
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
101 add_begin(conf, name, affects);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
102
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
103 conf->def[conf->count].type = INT;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
104
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
105 conf->def[conf->count].vali.var = var;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
106 conf->def[conf->count].vali.def_value = def;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
107 conf->def[conf->count].vali.range[0] = from;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
108 conf->def[conf->count].vali.range[1] = to;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
109
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
110 add_end(conf);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
111 }
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
112
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
113 inline void add_valf(struct config_def* conf, char* name, int affects, float* var, float def, float from, float to)
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
114 {
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
115 add_begin(conf, name, affects);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
116
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
117 conf->def[conf->count].type = FLOAT;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
118
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
119 conf->def[conf->count].valf.var = var;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
120 conf->def[conf->count].valf.def_value = def;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
121 conf->def[conf->count].valf.range[0] = from;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
122 conf->def[conf->count].valf.range[1] = to;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
123
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
124 add_end(conf);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
125 }
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
126
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
127 inline void add_valt(struct config_def* conf, char* name, int affects, char** var, char* def, int maxlen)
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
128 {
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
129 add_begin(conf, name, affects);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
130
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
131 conf->def[conf->count].type = TEXT;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
132
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
133 conf->def[conf->count].valt.var = var;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
134 conf->def[conf->count].valt.def_value = (char*)malloc(strlen(def) + 1);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
135 strcpy(conf->def[conf->count].valt.def_value, def);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
136 conf->def[conf->count].valt.maxlength = maxlen;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
137
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
138 add_end(conf);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
139 }
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
140
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
141 inline void add_valc(struct config_def* conf, char* name, int affects, unsigned char* var, char* def)
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
142 {
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
143 add_begin(conf, name, affects);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
144
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
145 conf->def[conf->count].type = COLOR;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
146
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
147 conf->def[conf->count].valc.var = var;
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
148 conf->def[conf->count].valc.def_value = (char*)malloc(strlen(def) + 1);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
149 strcpy(conf->def[conf->count].valc.def_value, def);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
150
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
151 add_end(conf);
d985f0dcdeb0 [svn] - add a starting point for xmms-rootvis port. giacomo will need to
nenolod
parents:
diff changeset
152 }