File: xosdlib_drv.h

package info (click to toggle)
lcdproc 0.5.5-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 5,352 kB
  • sloc: ansic: 53,582; sh: 4,288; perl: 681; makefile: 476
file content (56 lines) | stat: -rw-r--r-- 1,960 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef LCD_XOSDLIB_H
#define LCD_XOSDLIB_H

#include <xosd.h>

#define DEFAULT_FONT		"fixed"
#define DEFAULT_SIZE		"20x4"
#define DEFAULT_OFFSET		"0x0"
#define DEFAULT_CONTRAST	500
#define DEFAULT_BRIGHTNESS	1000
#define DEFAULT_OFFBRIGHTNESS	500
#define DEFAULT_BACKLIGHT	0

#define CELLWIDTH	6
#define CELLHEIGHT	8

/** private data for the \c xosd driver */
typedef struct xosd_private_data {
	xosd *osd;		/**< xosd handle */

	char font[256];		/**< xosd font properties */

	/* dimensions */
	int width, height;
	int xoffs, yoffs;

	/* framebuffer and buffer for old LCD contents */
	unsigned char *framebuf;
	unsigned char *backingstore;

	int contrast;
	int brightness;
	int offbrightness;
} PrivateData;


MODULE_EXPORT int  xosdlib_drv_init (Driver *drvthis);
MODULE_EXPORT void xosdlib_drv_close (Driver *drvthis);
MODULE_EXPORT int  xosdlib_drv_width (Driver *drvthis);
MODULE_EXPORT int  xosdlib_drv_height (Driver *drvthis);
MODULE_EXPORT void xosdlib_drv_clear (Driver *drvthis);
MODULE_EXPORT void xosdlib_drv_flush (Driver *drvthis);
MODULE_EXPORT void xosdlib_drv_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void xosdlib_drv_chr (Driver *drvthis, int x, int y, char c);

MODULE_EXPORT void xosdlib_drv_vbar (Driver *drvthis, int x, int y, int len, int promille, int pattern);
MODULE_EXPORT void xosdlib_drv_hbar (Driver *drvthis, int x, int y, int len, int promille, int pattern);
MODULE_EXPORT void xosdlib_drv_num (Driver *drvthis, int x, int num);
MODULE_EXPORT int  xosdlib_drv_get_free_chars (Driver *drvthis);
MODULE_EXPORT int  xosdlib_drv_get_contrast (Driver *drvthis);
MODULE_EXPORT void xosdlib_drv_set_contrast (Driver *drvthis, int promille);
MODULE_EXPORT int  xosdlib_drv_get_brightness(Driver *drvthis, int state);
MODULE_EXPORT void xosdlib_drv_set_brightness(Driver *drvthis, int state, int promille);
MODULE_EXPORT void xosdlib_drv_backlight (Driver *drvthis, int on);

#endif /* XOSDLIB_H */