2
* This program is free software; you can redistribute it and/or modify
3
* it under the terms of the GNU General Public License as published by
4
* the Free Software Foundation; either version 2 of the License, or
5
* (at your option) any later version.
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software
14
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
* Copyright (C) 2006-2009 XNeur Team
41
extern struct _xneur_config *xconfig;
43
static void osd_show_thread(void *osd_text)
45
xosd *osd = xosd_create(1);
47
xosd_set_font(osd, xconfig->osd_font);
48
xosd_set_colour(osd, "Red");
49
xosd_set_timeout(osd, 2);
50
xosd_set_shadow_offset(osd, 1);
51
xosd_set_align(osd, XOSD_right);
53
xosd_display(osd, 0, XOSD_string, (char *) osd_text);
55
xosd_wait_until_no_display(osd);
61
void osd_show(char *osd_text)
63
if (!xconfig->show_osd)
69
pthread_attr_t osd_thread_attr;
70
pthread_attr_init(&osd_thread_attr);
71
pthread_attr_setdetachstate(&osd_thread_attr, PTHREAD_CREATE_DETACHED);
73
log_message(DEBUG, _("Show OSD \"%s\""), osd_text);
76
pthread_create(&osd_thread, &osd_thread_attr, (void *) &osd_show_thread, osd_text);
78
pthread_attr_destroy(&osd_thread_attr);
83
void osd_show(char *osd_text)
88
#endif /* WITH_XOSD */