---
name: "xosd"
section: "3xosd"
platform: "linux"
package: "libxosd-dev"
version: "0.7.0-4"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/xosd/3xosd"
---

# xosd(3xosd)

X on-screen display library

## NAME

xosd - X on-screen display library

## SYNOPSIS

```
#include <xosd.h>

xosd* xosd_init(char * font, char * colour, int timeout,
		     xosd_pos pos, int offset);

int xosd_uninit (xosd* osd);

int xosd_display (xosd* osd, int line,
                  xosd_command command, ...);

int xosd_hide (xosd* osd);

int xosd_show (xosd* osd);

int xosd_set_pos (xosd* osd, xosd_pos pos);

int xosd_set_offset (xosd* osd, int offset);

int xosd_set_shadow_offset (xosd* osd, int shadow_offset);

int xosd_set_timeout (xosd* osd, int timeout);

int xosd_set_font (xosd* osd, char* font);

int xosd_set_colour (xosd* osd, char* colour);

int xosd_get_colour (xosd* osd,
                     int* red, int* green, int* blue);
```

## ARGUMENTS

- *font*

  String with a font name (in XLFD format)

- *colour*

  A color name string (in a format which **XParseColor***(3x)* recognises)

- *timeout*

  Time the text will be on screen before it gets removed.

- *pos*

  One of **XOSD\_top** or **XOSD\_bottom** (for the top or the bottom of the screen)

- *offset*

  Offset from the top or bottom of the screen.

- *shadow\_offset*

  Offset of black shadow from main text.

- *osd*

  The on-screen display object to act on.

- *command*

  One of  **XOSD\_percentage** , **XOSD\_slider** , **XOSD\_string** or **XOSD\_printf** appropriate number of bars, XOSD\_slider is similar, except it only displays a line at the exact percentage required, rather than a full bar up to that point, XOSD\_string takes a single char \*, and XOSD\_printf takes a print  style string, and its arguments.

## DESCRIPTION

xosd is a library for displaying an on-screen display (like the one on many TVs) on your X display.

The latest version can be found on http://www.ignavus.net/software.html

It is distributed under the GNU General Public License.

## BUGS

No known bugs at the moment.

Bug reports can be sent to xosd@ignavus.net

## EXAMPLE

```
#include <xosd.h>
int main (int argc, char *argv[])
{
	xosd *osd;
	osd = xosd_init ("fixed", "LawnGreen", 3, XOSD_top, 0, 1);
	xosd_display (osd, 0, XOSD_string, "Example XOSD output");
	sleep (5);
	xosd_uninit (osd);
	return EXIT_SUCCESS;
}
```

## AUTHOR

Martijn van de Streek \<martijn@foodfight.org\>

xosd was written by Andre Renaud \<andre@ignavus.net\>

## SEE ALSO

More information on the X OSD Library and its author can be found on http://www.ignavus.net/software.html
