2 * Copyright (C) 12 Jun 2003 Tomas Cermak
4 * This file is part of wmradio preogram.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 int osd_init(char *progname
, char *font
, char *color
,
30 int x
, int y
, int shadow
, int timeout
) {
34 osd = xosd_init(! font ? font : "fixed" ,
35 ! color ? color : "LawnGreen",
42 fprintf(stderr, "%s: OSD error\n", progname);
47 if (!(osd
= xosd_create(1))) {
48 fprintf(stderr
, "%s: OSD error\n", progname
);
53 if (xosd_set_font(osd
, font
)) {
54 fprintf(stderr
, "%s: OSD font init error\n", progname
);
55 xosd_set_font(osd
, "fixed");
58 else xosd_set_font(osd
, "fixed");
61 if (xosd_set_colour(osd
, color
)) {
62 fprintf(stderr
, "%s: OSD color init error\n", progname
);
63 xosd_set_colour(osd
, "LawnGreen");
66 else xosd_set_colour(osd
, "LawnGreen");
68 xosd_set_vertical_offset(osd
, y
);
69 xosd_set_horizontal_offset(osd
, x
);
70 xosd_set_shadow_offset(osd
, shadow
);
71 xosd_set_timeout(osd
, timeout
);
75 printf("wmradio: warning - compiled without osd\n");
77 #endif /* HAVE_XOSD */
80 void osd_print(char *string
) {
82 xosd_display (osd
, 0, XOSD_string
, string
);
83 #endif /* HAVE_XOSD */
89 #endif /* HAVE_XOSD */