annotate src/aosd/aosd_cfg.c @ 3168:7e58928783b3

alsa-ng: Set thread handles to NULL when threads exit.
author William Pitcock <nenolod@atheme.org>
date Fri, 15 May 2009 00:05:48 -0500
parents 3134a0987162
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
1 /*
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
2 *
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
3 * Author: Giacomo Lozito <james@develia.org>, (C) 2005-2007
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
4 *
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
5 * This program is free software; you can redistribute it and/or modify it
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
6 * under the terms of the GNU General Public License as published by the
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
7 * Free Software Foundation; either version 2 of the License, or (at your
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
8 * option) any later version.
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
9 *
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful, but
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
13 * General Public License for more details.
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
14 *
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License along
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
16 * with this program; if not, write to the Free Software Foundation, Inc.,
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
18 *
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
19 */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
20
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
21 #include "aosd_cfg.h"
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
22 #include "aosd_style.h"
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
23 #include <glib.h>
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
24 #include <stdlib.h>
2971
3134a0987162 - changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 2523
diff changeset
25 #include <audlegacy/plugin.h>
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
26
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
27
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
28 static gint
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
29 aosd_cfg_util_str_to_color ( gchar * str , aosd_color_t * color )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
30 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
31 /* color strings are in format "x,x,x,x", where x are numbers
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
32 that represent respectively red, green, blue and alpha values (0-65535) */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
33 gchar **str_values = g_strsplit( str , "," , 4 );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
34 gint col_values[4] = { 0 , 0 , 0, 65535 };
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
35 gint i = 0;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
36 while ( str_values[i] != NULL )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
37 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
38 col_values[i] = (gint)strtol( str_values[i] , NULL , 10 );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
39 i++;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
40 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
41 g_strfreev( str_values );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
42 color->red = col_values[0];
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
43 color->green = col_values[1];
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
44 color->blue = col_values[2];
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
45 color->alpha = col_values[3];
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
46 if ( i < 4 )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
47 return -1;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
48 else
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
49 return 0;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
50 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
51
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
52
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
53 static gint
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
54 aosd_cfg_util_color_to_str ( aosd_color_t color , gchar ** str )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
55 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
56 /* color strings are in format "x,x,x,x", where x are numbers
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
57 that represent respectively red, green, blue and alpha values (0-65535) */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
58 *str = g_strdup_printf( "%i,%i,%i,%i" , color.red , color.green , color.blue , color.alpha );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
59 if ( *str != NULL )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
60 return 0;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
61 else
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
62 return -1;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
63 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
64
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
65
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
66 aosd_cfg_t *
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
67 aosd_cfg_new ( void )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
68 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
69 aosd_cfg_t *cfg = g_malloc0(sizeof(aosd_cfg_t));
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
70 aosd_cfg_osd_t *cfg_osd = aosd_cfg_osd_new();
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
71 cfg->set = FALSE;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
72 cfg->osd = cfg_osd;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
73 return cfg;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
74 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
75
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
76
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
77 void
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
78 aosd_cfg_delete ( aosd_cfg_t * cfg )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
79 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
80 if ( cfg != NULL )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
81 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
82 if ( cfg->osd != NULL )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
83 aosd_cfg_osd_delete( cfg->osd );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
84 g_free( cfg );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
85 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
86 return;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
87 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
88
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
89
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
90 aosd_cfg_osd_t *
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
91 aosd_cfg_osd_new( void )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
92 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
93 aosd_cfg_osd_t *cfg_osd = g_malloc0(sizeof(aosd_cfg_osd_t));
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
94 cfg_osd->decoration.colors = g_array_sized_new( FALSE , TRUE , sizeof(aosd_color_t) ,
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
95 aosd_deco_style_get_max_numcol() );
574
664f68db1657 [svn] - aosd: paranoid fixes part 2
giacomo
parents: 573
diff changeset
96 cfg_osd->decoration.skin_file = NULL; /* TODO paranoid, remove me when implemented */
893
ca9907354db6 [svn] - aosd: added an option to enable/disable utf8 text conversion done by the plugin
giacomo
parents: 596
diff changeset
97 cfg_osd->trigger.active = g_array_new( FALSE , TRUE , sizeof(gint) );
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
98 return cfg_osd;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
99 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
100
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
101
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
102 void
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
103 aosd_cfg_osd_delete ( aosd_cfg_osd_t * cfg_osd )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
104 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
105 if ( cfg_osd != NULL )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
106 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
107 gint i = 0;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
108 /* free configuration fields */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
109 for ( i = 0 ; i < AOSD_TEXT_FONTS_NUM ; i++ )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
110 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
111 if ( cfg_osd->text.fonts_name[i] != NULL )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
112 g_free( cfg_osd->text.fonts_name[i] );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
113 }
571
5e9019d528d5 [svn] - aosd: remove other skin_file manipulation
giacomo
parents: 570
diff changeset
114 /* TODO not implemented yet
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
115 if ( cfg_osd->decoration.skin_file != NULL )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
116 g_free( cfg_osd->decoration.skin_file );
571
5e9019d528d5 [svn] - aosd: remove other skin_file manipulation
giacomo
parents: 570
diff changeset
117 */
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
118 if ( cfg_osd->decoration.colors != NULL )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
119 g_array_free( cfg_osd->decoration.colors , TRUE );
893
ca9907354db6 [svn] - aosd: added an option to enable/disable utf8 text conversion done by the plugin
giacomo
parents: 596
diff changeset
120 if ( cfg_osd->trigger.active != NULL )
ca9907354db6 [svn] - aosd: added an option to enable/disable utf8 text conversion done by the plugin
giacomo
parents: 596
diff changeset
121 g_array_free( cfg_osd->trigger.active , TRUE );
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
122 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
123 g_free( cfg_osd );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
124 return;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
125 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
126
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
127
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
128 /* makes a copy of a aosd_cfg_osd_t object (mostly used by aosd_display) */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
129 aosd_cfg_osd_t *
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
130 aosd_cfg_osd_copy ( aosd_cfg_osd_t * cfg_osd )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
131 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
132 aosd_cfg_osd_t *cfg_osd_copy = aosd_cfg_osd_new();
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
133 gint i = 0;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
134 /* copy information */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
135 cfg_osd_copy->position.placement = cfg_osd->position.placement;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
136 cfg_osd_copy->position.offset_x = cfg_osd->position.offset_x;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
137 cfg_osd_copy->position.offset_y = cfg_osd->position.offset_y;
586
26519231a4f4 [svn] - aosd: added experimental multiple monitor support, plus max_width setting
giacomo
parents: 574
diff changeset
138 cfg_osd_copy->position.maxsize_width = cfg_osd->position.maxsize_width;
26519231a4f4 [svn] - aosd: added experimental multiple monitor support, plus max_width setting
giacomo
parents: 574
diff changeset
139 cfg_osd_copy->position.multimon_id = cfg_osd->position.multimon_id;
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
140 cfg_osd_copy->animation.timing_display = cfg_osd->animation.timing_display;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
141 cfg_osd_copy->animation.timing_fadein = cfg_osd->animation.timing_fadein;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
142 cfg_osd_copy->animation.timing_fadeout = cfg_osd->animation.timing_fadeout;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
143 for ( i = 0 ; i < AOSD_TEXT_FONTS_NUM ; i++ )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
144 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
145 cfg_osd_copy->text.fonts_name[i] = g_strdup( cfg_osd->text.fonts_name[i] );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
146 cfg_osd_copy->text.fonts_color[i] = cfg_osd->text.fonts_color[i];
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
147 cfg_osd_copy->text.fonts_draw_shadow[i] = cfg_osd->text.fonts_draw_shadow[i];
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
148 cfg_osd_copy->text.fonts_shadow_color[i] = cfg_osd->text.fonts_shadow_color[i];
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
149 }
893
ca9907354db6 [svn] - aosd: added an option to enable/disable utf8 text conversion done by the plugin
giacomo
parents: 596
diff changeset
150 cfg_osd_copy->text.utf8conv_disable = cfg_osd->text.utf8conv_disable;
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
151 cfg_osd_copy->decoration.code = cfg_osd->decoration.code;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
152 cfg_osd_copy->decoration.skin_file = g_strdup( cfg_osd->decoration.skin_file );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
153 for ( i = 0 ; i < cfg_osd->decoration.colors->len ; i++ )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
154 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
155 aosd_color_t color = g_array_index( cfg_osd->decoration.colors , aosd_color_t , i );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
156 g_array_insert_val( cfg_osd_copy->decoration.colors , i , color );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
157 }
893
ca9907354db6 [svn] - aosd: added an option to enable/disable utf8 text conversion done by the plugin
giacomo
parents: 596
diff changeset
158 for ( i = 0 ; i < cfg_osd->trigger.active->len ; i++ )
ca9907354db6 [svn] - aosd: added an option to enable/disable utf8 text conversion done by the plugin
giacomo
parents: 596
diff changeset
159 {
ca9907354db6 [svn] - aosd: added an option to enable/disable utf8 text conversion done by the plugin
giacomo
parents: 596
diff changeset
160 gint trigger_id = g_array_index( cfg_osd->trigger.active , gint , i );
ca9907354db6 [svn] - aosd: added an option to enable/disable utf8 text conversion done by the plugin
giacomo
parents: 596
diff changeset
161 g_array_insert_val( cfg_osd_copy->trigger.active , i , trigger_id );
ca9907354db6 [svn] - aosd: added an option to enable/disable utf8 text conversion done by the plugin
giacomo
parents: 596
diff changeset
162 }
906
16e51fb5908e [svn] - aosd: beta4, ghosd source was rewritten to support argb visual (x composite extension) as an option, this allows to have real transparency in the OSD
giacomo
parents: 893
diff changeset
163 cfg_osd_copy->misc.transparency_mode = cfg_osd->misc.transparency_mode;
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
164 return cfg_osd_copy;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
165 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
166
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
167
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
168 #ifdef DEBUG
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
169 void
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
170 aosd_cfg_debug ( aosd_cfg_t * cfg )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
171 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
172 gint i = 0;
596
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
173 GString *string = g_string_new( "" );
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
174 g_print("\n***** debug configuration *****\n\n");
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
175 g_print("POSITION\n");
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
176 g_print(" placement: %i\n", cfg->osd->position.placement);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
177 g_print(" offset x: %i\n", cfg->osd->position.offset_x);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
178 g_print(" offset y: %i\n", cfg->osd->position.offset_y);
586
26519231a4f4 [svn] - aosd: added experimental multiple monitor support, plus max_width setting
giacomo
parents: 574
diff changeset
179 g_print(" max OSD width: %i\n", cfg->osd->position.maxsize_width);
26519231a4f4 [svn] - aosd: added experimental multiple monitor support, plus max_width setting
giacomo
parents: 574
diff changeset
180 g_print(" multi-monitor id: %i\n", cfg->osd->position.multimon_id);
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
181 g_print("\nANIMATION\n");
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
182 g_print(" timing display: %i\n", cfg->osd->animation.timing_display);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
183 g_print(" timing fade in: %i\n", cfg->osd->animation.timing_fadein);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
184 g_print(" timing fade out: %i\n", cfg->osd->animation.timing_fadeout);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
185 g_print("\nTEXT\n");
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
186 for ( i = 0 ; i < AOSD_TEXT_FONTS_NUM ; i++ )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
187 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
188 g_print(" font %i: %s\n", i, cfg->osd->text.fonts_name[i]);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
189 g_print(" font color %i: %i,%i,%i (alpha %i)\n", i,
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
190 cfg->osd->text.fonts_color[i].red, cfg->osd->text.fonts_color[i].green,
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
191 cfg->osd->text.fonts_color[i].blue, cfg->osd->text.fonts_color[i].alpha);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
192 g_print(" font %i use shadow: %i\n", i, cfg->osd->text.fonts_draw_shadow[i]);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
193 g_print(" font %i shadow color: %i,%i,%i (alpha %i)\n", i,
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
194 cfg->osd->text.fonts_shadow_color[i].red, cfg->osd->text.fonts_shadow_color[i].green,
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
195 cfg->osd->text.fonts_shadow_color[i].blue, cfg->osd->text.fonts_shadow_color[i].alpha);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
196 }
893
ca9907354db6 [svn] - aosd: added an option to enable/disable utf8 text conversion done by the plugin
giacomo
parents: 596
diff changeset
197 g_print(" disable utf8 conversion: %i\n", cfg->osd->text.utf8conv_disable);
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
198 g_print("\nDECORATION\n");
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
199 g_print(" code: %i\n", cfg->osd->decoration.code);
571
5e9019d528d5 [svn] - aosd: remove other skin_file manipulation
giacomo
parents: 570
diff changeset
200 /*g_print(" custom skin file: %s\n", cfg->osd->decoration.skin_file);*/
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
201 for ( i = 0 ; i < cfg->osd->decoration.colors->len ; i++ )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
202 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
203 aosd_color_t color = g_array_index( cfg->osd->decoration.colors , aosd_color_t , i );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
204 g_print(" color %i: %i,%i,%i (alpha %i)\n", i, color.red, color.green, color.blue, color.alpha);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
205 }
911
0010163f8e25 [svn] - aosd: added support to detect whether a composite manager is running (either standard with _NET_WM_CM_Sn or xcompmgr)
giacomo
parents: 906
diff changeset
206 g_print("\nTRIGGER\n");
596
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
207 for ( i = 0 ; i < cfg->osd->trigger.active->len ; i++ )
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
208 g_string_append_printf( string , "%i," , g_array_index( cfg->osd->trigger.active , gint , i ) );
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
209 if ( string->len > 1 )
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
210 g_string_truncate( string , string->len - 1 );
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
211 g_print(" active: %s\n", string->str);
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
212 g_string_free( string , TRUE );
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
213 g_print("\nEXTRA\n");
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
214 g_print(" set: %i\n", cfg->set);
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
215 g_print("\n*******************************\n\n");
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
216 return;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
217 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
218 #endif
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
219
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
220
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
221 gint
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
222 aosd_cfg_load ( aosd_cfg_t * cfg )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
223 {
2523
769e17da93dd Replaced s/ConfigDb/mcs_handle_t/g, as per changes in the core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2498
diff changeset
224 mcs_handle_t *cfgfile = aud_cfg_db_open();
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
225 gint i = 0;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
226 gint max_numcol;
596
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
227 gchar *trig_active_str;
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
228
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
229 /* position */
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
230 if ( !aud_cfg_db_get_int( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
231 "position_placement" , &(cfg->osd->position.placement) ) )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
232 cfg->osd->position.placement = AOSD_POSITION_PLACEMENT_TOPLEFT;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
233
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
234 if ( !aud_cfg_db_get_int( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
235 "position_offset_x" , &(cfg->osd->position.offset_x) ) )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
236 cfg->osd->position.offset_x = 0;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
237
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
238 if ( !aud_cfg_db_get_int( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
239 "position_offset_y" , &(cfg->osd->position.offset_y) ) )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
240 cfg->osd->position.offset_y = 0;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
241
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
242 if ( !aud_cfg_db_get_int( cfgfile , "aosd" ,
586
26519231a4f4 [svn] - aosd: added experimental multiple monitor support, plus max_width setting
giacomo
parents: 574
diff changeset
243 "position_maxsize_width" , &(cfg->osd->position.maxsize_width) ) )
26519231a4f4 [svn] - aosd: added experimental multiple monitor support, plus max_width setting
giacomo
parents: 574
diff changeset
244 cfg->osd->position.maxsize_width = 0;
26519231a4f4 [svn] - aosd: added experimental multiple monitor support, plus max_width setting
giacomo
parents: 574
diff changeset
245
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
246 if ( !aud_cfg_db_get_int( cfgfile , "aosd" ,
586
26519231a4f4 [svn] - aosd: added experimental multiple monitor support, plus max_width setting
giacomo
parents: 574
diff changeset
247 "position_multimon_id" , &(cfg->osd->position.multimon_id) ) )
26519231a4f4 [svn] - aosd: added experimental multiple monitor support, plus max_width setting
giacomo
parents: 574
diff changeset
248 cfg->osd->position.multimon_id = -1;
26519231a4f4 [svn] - aosd: added experimental multiple monitor support, plus max_width setting
giacomo
parents: 574
diff changeset
249
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
250 /* animation */
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
251 if ( !aud_cfg_db_get_int( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
252 "animation_timing_display" , &(cfg->osd->animation.timing_display) ) )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
253 cfg->osd->animation.timing_display = 3000;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
254
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
255 if ( !aud_cfg_db_get_int( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
256 "animation_timing_fadein" , &(cfg->osd->animation.timing_fadein) ) )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
257 cfg->osd->animation.timing_fadein = 300;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
258
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
259 if ( !aud_cfg_db_get_int( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
260 "animation_timing_fadeout" , &(cfg->osd->animation.timing_fadeout) ) )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
261 cfg->osd->animation.timing_fadeout = 300;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
262
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
263 /* text */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
264 for ( i = 0 ; i < AOSD_TEXT_FONTS_NUM ; i++ )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
265 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
266 gchar *color_str = NULL;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
267 gchar *key_str = NULL;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
268 key_str = g_strdup_printf( "text_fonts_name_%i" , i );
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
269 if ( !aud_cfg_db_get_string( cfgfile , "aosd" , key_str , &(cfg->osd->text.fonts_name[i]) ) )
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
270 cfg->osd->text.fonts_name[i] = g_strdup( "Sans 26" );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
271 g_free( key_str );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
272 key_str = g_strdup_printf( "text_fonts_color_%i" , i );
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
273 if ( !aud_cfg_db_get_string( cfgfile , "aosd" , key_str , &color_str ) )
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
274 color_str = g_strdup( "65535,65535,65535,65535" ); /* white , alpha 100% */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
275 aosd_cfg_util_str_to_color( color_str , &(cfg->osd->text.fonts_color[i]) );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
276 g_free( key_str );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
277 g_free( color_str );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
278 key_str = g_strdup_printf( "text_fonts_draw_shadow_%i" , i );
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
279 if ( !aud_cfg_db_get_bool( cfgfile , "aosd" , key_str , &(cfg->osd->text.fonts_draw_shadow[i]) ) )
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
280 cfg->osd->text.fonts_draw_shadow[i] = TRUE;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
281 g_free( key_str );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
282 key_str = g_strdup_printf( "text_fonts_shadow_color_%i" , i );
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
283 if ( !aud_cfg_db_get_string( cfgfile , "aosd" , key_str , &color_str ) )
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
284 color_str = g_strdup( "0,0,0,32767" ); /* black , alpha 50% */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
285 aosd_cfg_util_str_to_color( color_str , &(cfg->osd->text.fonts_shadow_color[i]) );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
286 g_free( key_str );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
287 g_free( color_str );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
288 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
289
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
290 if ( !aud_cfg_db_get_bool( cfgfile , "aosd" ,
893
ca9907354db6 [svn] - aosd: added an option to enable/disable utf8 text conversion done by the plugin
giacomo
parents: 596
diff changeset
291 "text_utf8conv_disable" , &(cfg->osd->text.utf8conv_disable) ) )
ca9907354db6 [svn] - aosd: added an option to enable/disable utf8 text conversion done by the plugin
giacomo
parents: 596
diff changeset
292 cfg->osd->text.utf8conv_disable = FALSE;
ca9907354db6 [svn] - aosd: added an option to enable/disable utf8 text conversion done by the plugin
giacomo
parents: 596
diff changeset
293
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
294 /* decoration */
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
295 if ( !aud_cfg_db_get_int( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
296 "decoration_code" , &(cfg->osd->decoration.code) ) )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
297 cfg->osd->decoration.code = aosd_deco_style_get_first_code();
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
298
571
5e9019d528d5 [svn] - aosd: remove other skin_file manipulation
giacomo
parents: 570
diff changeset
299 /* TODO not implemented yet
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
300 if ( !aud_cfg_db_get_string( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
301 "decoration_skin_file" , &(cfg->osd->decoration.skin_file) ) )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
302 cfg->osd->decoration.skin_file = g_strdup( "" );
571
5e9019d528d5 [svn] - aosd: remove other skin_file manipulation
giacomo
parents: 570
diff changeset
303 */
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
304
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
305 /* decoration - colors */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
306 max_numcol = aosd_deco_style_get_max_numcol();
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
307 for ( i = 0 ; i < max_numcol ; i++ )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
308 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
309 gchar *key_str = NULL;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
310 gchar *color_str = NULL;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
311 aosd_color_t color;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
312 key_str = g_strdup_printf( "decoration_color_%i" , i );
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
313 if ( !aud_cfg_db_get_string( cfgfile , "aosd" , key_str , &color_str ) )
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
314 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
315 /* we have different default values for the decoration colors */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
316 switch ( i )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
317 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
318 case 0:
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
319 color_str = g_strdup( "0,0,65535,32767" ); /* blue , alpha 50% */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
320 break;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
321 case 1:
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
322 color_str = g_strdup( "65535,65535,65535,65535" ); /* white , alpha 100% */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
323 break;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
324 case 2:
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
325 color_str = g_strdup( "51400,51400,51400,65535" ); /* gray , alpha 100% */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
326 break;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
327 default:
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
328 color_str = g_strdup( "51400,51400,51400,65535" ); /* gray , alpha 100% */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
329 break;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
330 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
331 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
332 aosd_cfg_util_str_to_color( color_str , &color );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
333 g_array_insert_val( cfg->osd->decoration.colors , i , color );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
334 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
335
596
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
336 /* trigger */
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
337 if ( !aud_cfg_db_get_string( cfgfile , "aosd" , "trigger_active" , &trig_active_str ) )
596
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
338 {
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
339 gint trig_active_defval = 0;
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
340 g_array_append_val( cfg->osd->trigger.active , trig_active_defval );
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
341 }
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
342 else if ( strcmp("x",trig_active_str) )
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
343 {
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
344 gchar **trig_active_strv = g_strsplit( trig_active_str , "," , 0 );
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
345 gint j = 0;
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
346 while ( trig_active_strv[j] != NULL )
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
347 {
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
348 gint trig_active_val = strtol( trig_active_strv[j] , NULL , 10 );
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
349 g_array_append_val( cfg->osd->trigger.active , trig_active_val );
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
350 j++;
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
351 }
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
352 g_strfreev( trig_active_strv );
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
353 }
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
354
906
16e51fb5908e [svn] - aosd: beta4, ghosd source was rewritten to support argb visual (x composite extension) as an option, this allows to have real transparency in the OSD
giacomo
parents: 893
diff changeset
355 /* miscellanous */
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
356 if ( !aud_cfg_db_get_int( cfgfile , "aosd" ,
906
16e51fb5908e [svn] - aosd: beta4, ghosd source was rewritten to support argb visual (x composite extension) as an option, this allows to have real transparency in the OSD
giacomo
parents: 893
diff changeset
357 "transparency_mode" , &(cfg->osd->misc.transparency_mode) ) )
16e51fb5908e [svn] - aosd: beta4, ghosd source was rewritten to support argb visual (x composite extension) as an option, this allows to have real transparency in the OSD
giacomo
parents: 893
diff changeset
358 cfg->osd->misc.transparency_mode = AOSD_MISC_TRANSPARENCY_FAKE;
16e51fb5908e [svn] - aosd: beta4, ghosd source was rewritten to support argb visual (x composite extension) as an option, this allows to have real transparency in the OSD
giacomo
parents: 893
diff changeset
359
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
360 aud_cfg_db_close( cfgfile );
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
361
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
362 /* the config object has been filled with information */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
363 cfg->set = TRUE;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
364
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
365 return 0;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
366 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
367
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
368
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
369 gint
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
370 aosd_cfg_save ( aosd_cfg_t * cfg )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
371 {
2523
769e17da93dd Replaced s/ConfigDb/mcs_handle_t/g, as per changes in the core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2498
diff changeset
372 mcs_handle_t *cfgfile = aud_cfg_db_open();
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
373 gint i = 0;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
374 gint max_numcol;
596
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
375 GString *string = g_string_new( "" );
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
376
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
377 if ( cfg->set == FALSE )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
378 return -1;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
379
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
380 /* position */
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
381 aud_cfg_db_set_int( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
382 "position_placement" , cfg->osd->position.placement );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
383
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
384 aud_cfg_db_set_int( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
385 "position_offset_x" , cfg->osd->position.offset_x );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
386
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
387 aud_cfg_db_set_int( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
388 "position_offset_y" , cfg->osd->position.offset_y );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
389
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
390 aud_cfg_db_set_int( cfgfile , "aosd" ,
586
26519231a4f4 [svn] - aosd: added experimental multiple monitor support, plus max_width setting
giacomo
parents: 574
diff changeset
391 "position_maxsize_width" , cfg->osd->position.maxsize_width );
26519231a4f4 [svn] - aosd: added experimental multiple monitor support, plus max_width setting
giacomo
parents: 574
diff changeset
392
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
393 aud_cfg_db_set_int( cfgfile , "aosd" ,
586
26519231a4f4 [svn] - aosd: added experimental multiple monitor support, plus max_width setting
giacomo
parents: 574
diff changeset
394 "position_multimon_id" , cfg->osd->position.multimon_id );
26519231a4f4 [svn] - aosd: added experimental multiple monitor support, plus max_width setting
giacomo
parents: 574
diff changeset
395
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
396 /* animation */
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
397 aud_cfg_db_set_int( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
398 "animation_timing_display" , cfg->osd->animation.timing_display );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
399
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
400 aud_cfg_db_set_int( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
401 "animation_timing_fadein" , cfg->osd->animation.timing_fadein );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
402
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
403 aud_cfg_db_set_int( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
404 "animation_timing_fadeout" , cfg->osd->animation.timing_fadeout );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
405
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
406 /* text */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
407 for ( i = 0 ; i < AOSD_TEXT_FONTS_NUM ; i++ )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
408 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
409 gchar *color_str = NULL;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
410 gchar *key_str = NULL;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
411 key_str = g_strdup_printf( "text_fonts_name_%i" , i );
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
412 aud_cfg_db_set_string( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
413 key_str , cfg->osd->text.fonts_name[i] );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
414 g_free( key_str );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
415 key_str = g_strdup_printf( "text_fonts_color_%i" , i );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
416 aosd_cfg_util_color_to_str( cfg->osd->text.fonts_color[i] , &color_str );
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
417 aud_cfg_db_set_string( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
418 key_str , color_str );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
419 g_free( key_str );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
420 g_free( color_str );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
421 key_str = g_strdup_printf( "text_fonts_draw_shadow_%i" , i );
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
422 aud_cfg_db_set_bool( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
423 key_str , cfg->osd->text.fonts_draw_shadow[i] );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
424 g_free( key_str );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
425 key_str = g_strdup_printf( "text_fonts_shadow_color_%i" , i );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
426 aosd_cfg_util_color_to_str( cfg->osd->text.fonts_shadow_color[i] , &color_str );
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
427 aud_cfg_db_set_string( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
428 key_str , color_str );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
429 g_free( key_str );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
430 g_free( color_str );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
431 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
432
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
433 aud_cfg_db_set_bool( cfgfile , "aosd" ,
893
ca9907354db6 [svn] - aosd: added an option to enable/disable utf8 text conversion done by the plugin
giacomo
parents: 596
diff changeset
434 "text_utf8conv_disable" , cfg->osd->text.utf8conv_disable );
ca9907354db6 [svn] - aosd: added an option to enable/disable utf8 text conversion done by the plugin
giacomo
parents: 596
diff changeset
435
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
436 /* decoration */
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
437 aud_cfg_db_set_int( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
438 "decoration_code" , cfg->osd->decoration.code );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
439
570
9774ac406bde [svn] - aosd: do not try to save skin_file, not implemented yet
giacomo
parents: 569
diff changeset
440 /* TODO skip this since it's not implemented yet
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
441 aud_cfg_db_set_string( cfgfile , "aosd" ,
570
9774ac406bde [svn] - aosd: do not try to save skin_file, not implemented yet
giacomo
parents: 569
diff changeset
442 "decoration_skin_file" , cfg->osd->decoration.skin_file ); */
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
443
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
444 /* decoration - colors */
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
445 max_numcol = aosd_deco_style_get_max_numcol();
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
446 for ( i = 0 ; i < max_numcol ; i++ )
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
447 {
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
448 gchar *key_str = NULL;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
449 gchar *color_str = NULL;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
450 aosd_color_t color = g_array_index( cfg->osd->decoration.colors , aosd_color_t , i );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
451 key_str = g_strdup_printf( "decoration_color_%i" , i );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
452 aosd_cfg_util_color_to_str( color , &color_str );
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
453 aud_cfg_db_set_string( cfgfile , "aosd" ,
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
454 key_str , color_str );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
455 g_free( key_str );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
456 g_free( color_str );
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
457 }
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
458
596
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
459 /* trigger */
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
460 for ( i = 0 ; i < cfg->osd->trigger.active->len ; i++ )
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
461 g_string_append_printf( string , "%i," , g_array_index( cfg->osd->trigger.active , gint , i ) );
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
462 if ( string->len > 1 )
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
463 g_string_truncate( string , string->len - 1 );
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
464 else
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
465 g_string_assign( string , "x" );
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
466 aud_cfg_db_set_string( cfgfile , "aosd" , "trigger_active" , string->str );
596
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
467 g_string_free( string , TRUE );
1708b03e116c [svn] - aosd: replaced polling with hooks; added trigger options as well, working triggers are playback start and title changes
giacomo
parents: 586
diff changeset
468
906
16e51fb5908e [svn] - aosd: beta4, ghosd source was rewritten to support argb visual (x composite extension) as an option, this allows to have real transparency in the OSD
giacomo
parents: 893
diff changeset
469 /* miscellaneous */
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
470 aud_cfg_db_set_int( cfgfile , "aosd" ,
906
16e51fb5908e [svn] - aosd: beta4, ghosd source was rewritten to support argb visual (x composite extension) as an option, this allows to have real transparency in the OSD
giacomo
parents: 893
diff changeset
471 "transparency_mode" , cfg->osd->misc.transparency_mode );
16e51fb5908e [svn] - aosd: beta4, ghosd source was rewritten to support argb visual (x composite extension) as an option, this allows to have real transparency in the OSD
giacomo
parents: 893
diff changeset
472
2124
b8da6a0b0da2 s/bmp_cfg_/aud_cfg_/g
Matti Hamalainen <ccr@tnsp.org>
parents: 1975
diff changeset
473 aud_cfg_db_close( cfgfile );
569
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
474
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
475 return 0;
d401f87f89f7 [svn] - added Audacious OSD, yet-another-written-from-scratch plugin to display OSD, based on Ghosd library; currently untied from configure, to compile it you have to run make in its directory; will be added to configure after some testing
giacomo
parents:
diff changeset
476 }