comparison src/aosd/aosd_trigger.c @ 623:443de962d0a0 trunk

[svn] - aosd: revert window type setting
author giacomo
date Thu, 08 Feb 2007 16:20:27 -0800
parents 9b73eb35f4ff
children a1687bd302ce
comparison
equal deleted inserted replaced
622:70f3b14434b2 623:443de962d0a0
33 33
34 /* trigger codes ( the code values do not need to be sequential ) */ 34 /* trigger codes ( the code values do not need to be sequential ) */
35 enum 35 enum
36 { 36 {
37 AOSD_TRIGGER_PB_START = 0, 37 AOSD_TRIGGER_PB_START = 0,
38 AOSD_TRIGGER_PB_TITLECHANGE = 1 38 AOSD_TRIGGER_PB_TITLECHANGE = 1,
39 AOSD_TRIGGER_VOL_CHANGE = 2
39 }; 40 };
40 41
41 /* trigger codes array size */ 42 /* trigger codes array size */
42 #define AOSD_TRIGGER_CODES_ARRAY_SIZE 2 43 #define AOSD_TRIGGER_CODES_ARRAY_SIZE 3
43 44
44 /* trigger codes array */ 45 /* trigger codes array */
45 gint aosd_trigger_codes[] = 46 gint aosd_trigger_codes[] =
46 { 47 {
47 AOSD_TRIGGER_PB_START, 48 AOSD_TRIGGER_PB_START,
48 AOSD_TRIGGER_PB_TITLECHANGE 49 AOSD_TRIGGER_PB_TITLECHANGE,
50 AOSD_TRIGGER_VOL_CHANGE
49 }; 51 };
50 52
51 /* prototypes of trigger functions */ 53 /* prototypes of trigger functions */
52 static void aosd_trigger_func_pb_start_onoff ( gboolean ); 54 static void aosd_trigger_func_pb_start_onoff ( gboolean );
53 static void aosd_trigger_func_pb_start_cb ( gpointer , gpointer ); 55 static void aosd_trigger_func_pb_start_cb ( gpointer , gpointer );
54 static void aosd_trigger_func_pb_titlechange_onff ( gboolean ); 56 static void aosd_trigger_func_pb_titlechange_onoff ( gboolean );
55 static void aosd_trigger_func_pb_titlechange_cb ( gpointer , gpointer ); 57 static void aosd_trigger_func_pb_titlechange_cb ( gpointer , gpointer );
58 static void aosd_trigger_func_vol_change_onoff ( gboolean );
59 static void aosd_trigger_func_vol_change_cb ( gpointer , gpointer );
56 60
57 /* map trigger codes to trigger objects */ 61 /* map trigger codes to trigger objects */
58 aosd_trigger_t aosd_triggers[] = 62 aosd_trigger_t aosd_triggers[] =
59 { 63 {
60 [AOSD_TRIGGER_PB_START] = { N_("Playback Start") , 64 [AOSD_TRIGGER_PB_START] = { N_("Playback Start") ,
64 68
65 [AOSD_TRIGGER_PB_TITLECHANGE] = { N_("Title Change") , 69 [AOSD_TRIGGER_PB_TITLECHANGE] = { N_("Title Change") ,
66 N_("Trigger OSD when, during playback, the song title changes " 70 N_("Trigger OSD when, during playback, the song title changes "
67 "but the filename is the same. This is mostly useful to display " 71 "but the filename is the same. This is mostly useful to display "
68 "title changes in internet streams.") , 72 "title changes in internet streams.") ,
69 aosd_trigger_func_pb_titlechange_onff , 73 aosd_trigger_func_pb_titlechange_onoff ,
70 aosd_trigger_func_pb_titlechange_cb } 74 aosd_trigger_func_pb_titlechange_cb },
75
76 [AOSD_TRIGGER_VOL_CHANGE] = { N_("Volume Change") ,
77 N_("Volume blah blah.") ,
78 aosd_trigger_func_vol_change_onoff ,
79 aosd_trigger_func_vol_change_cb }
71 }; 80 };
72 81
73 82
74 83
75 /* TRIGGER API */ 84 /* TRIGGER API */
174 } 183 }
175 aosd_pb_titlechange_prevs_t; 184 aosd_pb_titlechange_prevs_t;
176 185
177 186
178 static void 187 static void
179 aosd_trigger_func_pb_titlechange_onff ( gboolean turn_on ) 188 aosd_trigger_func_pb_titlechange_onoff ( gboolean turn_on )
180 { 189 {
181 static aosd_pb_titlechange_prevs_t *prevs = NULL; 190 static aosd_pb_titlechange_prevs_t *prevs = NULL;
182 191
183 if ( turn_on == TRUE ) 192 if ( turn_on == TRUE )
184 { 193 {
247 g_free(prevs->filename); 256 g_free(prevs->filename);
248 prevs->filename = g_strdup(pl_entry->filename); 257 prevs->filename = g_strdup(pl_entry->filename);
249 } 258 }
250 } 259 }
251 } 260 }
261
262
263 static void
264 aosd_trigger_func_vol_change_onoff ( gboolean turn_on )
265 {
266 return;
267 }
268
269 static void
270 aosd_trigger_func_vol_change_cb ( gpointer plentry_gp , gpointer prevs_gp )
271 {
272 return;
273 }