1XOSD_DISPLAY(3xosd)                                        XOSD_DISPLAY(3xosd)
2
3
4

NAME

6       xosd_display - Display data to an XOSD window
7

SYNOPSIS

9       #include <xosd.h>
10
11
12       int xosd_display (xosd *osd, int line, xosd_command command, ...);
13
14

DESCRIPTION

16       xosd_display  displays  either  a  string,  a  percentage  bar  (like a
17       progress bar) or a slider on an X display. The data is displayed  in  a
18       borderless  shaped-window,  so  it appears to float on top of the other
19       windows, like the on-screen displays found in many  televisions.  Users
20       cannot interact with the display in any way.
21
22
23       The  data  is  displayed  until  the  timeout  limit,  set  by  calling
24       xosd_set_timeout(3xosd), is reached, but xosd_display  returns  immedi‐
25       ately. If blocking is required xosd_wait_until_no_display(3xosd) should
26       be called after xosd_display. A window that is displaying data  can  be
27       hidden by calling xosd_hide(3xosd).
28
29
30       The type of data displayed is determined by the command argument. There
31       are two types of data that can be displayed: text or integers.
32
33
34   Displaying Textual Data
35       Text is normally displayed by passing XOSD_string as  the  argument  to
36       command, followed by a string in UTF-8 format. If formatted text is de‐
37       sired, pass XOSD_printf as the argument to command, followed by  string
38       that has the same format as printf(3), and as many additional arguments
39       as is required by the format string.
40
41
42   Displaying Integer Values
43       Integer values (which must be within the range 0 to 100)  can  be  dis‐
44       played  in  two  ways:  a  percentage-bar or a slider. A percentage bar
45       looks like a volume  display  on  a  TV,  and  is  created  by  passing
46       XOSD_percentage  as  the  argument  to  command. A slider (see the XOSD
47       plug-in for xmms(1) for an example) is created by  passing  XOSD_slider
48       as the argument to command. An int between 0 and 100 is expected as the
49       final argument when either XOSD_percentage or XOSD_slider is passed  as
50       the argument to command.
51
52

ARGUMENTS

54       osd    The XOSD window to use as the display.
55
56
57       line   The  line  of  the  display to change. The value of line must be
58              less than number_lines, set in the call to xosd_create(3xosd).
59
60
61       command
62              One of XOSD_percentage, XOSD_slider or XOSD_string. If the value
63              of  command  is  XOSD_string, then the next argument should be a
64              string in UTF-8 format. If  XOSD_percentage  or  XOSD_slider  is
65              given  then an int between 1 and 100 is expected as the next ar‐
66              gument.
67
68

RETURN VALUE

70       If the command is either XOSD_percentage or XOSD_slider then the  inte‐
71       ger  value  of  the  bar or slider is returned (between 1 and 100). For
72       XOSD_string and XOSD_printf the number of  characters  written  to  the
73       display is returned.
74
75
76       On  error  -1  is returned and xosd_error is set to indicate the reason
77       for the error.
78
79

ENVIRONMENT

81       char *xosd_error
82              A string describing the error, if one occurred.
83
84
85       enum xosd_command
86              The type of information that can be  displayed,  defined  as  an
87              enumerated type. There are four values defined: XOSD_percentage,
88              XOSD_string, XOSD_printf, and XOSD_slider.
89
90

AUTHORS

92       The XOSD library was originally written by André Renaud,  and  is  cur‐
93       rently  maintained  by Tim Wright. This document was written by Michael
94       JasonSmith.
95
96

BUGS

98       There are no known bugs with xosd_display. Bug reports can be  sent  to
99       <xosd@ignavus.net>.
100
101

SEE ALSO

103        xosd_create(3xosd),  xosd_set_timeout(3xosd),  xosd_wait_until_no_dis‐
104       play(3xosd), xosd_hide(3xosd), printf(3)
105
106
107
108
109                                                           XOSD_DISPLAY(3xosd)
Impressum