Added support for DE200C VFD
[lcdproc-de200c.git] / server / drivers.h
blob9685e6e098d5bdaaa5ea6d84c043b94291281001
1 /*
2 * drivers.h
3 * This file is part of LCDd, the lcdproc server.
5 * This file is released under the GNU General Public License. Refer to the
6 * COPYING file distributed with this package.
8 * Copyright (c) 2001, Joris Robijn
12 #ifndef DRIVERS_H
13 #define DRIVERS_H
15 #include "drivers/lcd.h"
16 #include "shared/LL.h"
18 typedef struct DisplayProps {
19 int width, height;
20 int cellwidth, cellheight;
21 } DisplayProps;
23 extern DisplayProps *display_props;
25 #ifndef bool
26 # define bool short
27 # define true 1
28 # define false 0
29 #endif
32 int
33 drivers_load_driver(const char *name);
35 int
36 drivers_unload_all(void);
38 const char *
39 drivers_get_info(void);
41 void
42 drivers_clear(void);
44 void
45 drivers_flush(void);
47 void
48 drivers_string(int x, int y, const char *string);
50 void
51 drivers_chr(int x, int y, char c);
53 void
54 drivers_vbar(int x, int y, int len, int promille, int pattern);
56 void
57 drivers_hbar(int x, int y, int len, int promille, int pattern);
59 void
60 drivers_num(int x, int num);
62 void
63 drivers_heartbeat(int state);
65 void
66 drivers_icon(int x, int y, int icon);
68 void
69 drivers_set_char(char ch, char *dat);
71 int
72 drivers_get_contrast(void);
74 void
75 drivers_set_contrast(int contrast);
77 void
78 drivers_cursor(int x, int y, int state);
80 void
81 drivers_backlight(int brightness);
83 void
84 drivers_output(int state);
86 const char *
87 drivers_get_key(void);
90 /* Please don't read this list except using the following functions */
91 extern LinkedList *loaded_drivers;
93 static inline Driver *drivers_getfirst(void)
95 return LL_GetFirst(loaded_drivers);
98 static inline Driver *drivers_getnext(void)
100 return LL_GetNext(loaded_drivers);
103 #endif