File: drivers.h

package info (click to toggle)
lcdproc 0.5.9-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,064 kB
  • sloc: ansic: 59,645; sh: 1,740; perl: 681; makefile: 417
file content (96 lines) | stat: -rw-r--r-- 1,553 bytes parent folder | download | duplicates (3)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/** \file server/drivers.h
 */

/* This file is part of LCDd, the lcdproc server.
 *
 * This file is released under the GNU General Public License.
 * Refer to the COPYING file distributed with this package.
 *
 * Copyright (c) 2001, Joris Robijn
 */

#ifndef DRIVERS_H
#define DRIVERS_H

#include "drivers/lcd.h"
#include "shared/LL.h"

typedef struct DisplayProps {
	int width, height;
	int cellwidth, cellheight;
} DisplayProps;

extern DisplayProps *display_props;

int
drivers_load_driver(const char *name);

int
drivers_unload_all(void);

const char *
drivers_get_info(void);

void
drivers_clear(void);

void
drivers_flush(void);

void
drivers_string(int x, int y, const char *string);

void
drivers_chr(int x, int y, char c);

void
drivers_vbar(int x, int y, int len, int promille, int pattern);

void
drivers_hbar(int x, int y, int len, int promille, int pattern);

void
drivers_num(int x, int num);

void
drivers_heartbeat(int state);

void
drivers_icon(int x, int y, int icon);

void
drivers_set_char(char ch, char *dat);

int
drivers_get_contrast(void);

void
drivers_set_contrast(int contrast);

void
drivers_cursor(int x, int y, int state);

void
drivers_backlight(int brightness);

void
drivers_output(int state);

const char *
drivers_get_key(void);


/* Please don't read this list except using the following functions */
extern LinkedList *loaded_drivers;

static inline Driver *drivers_getfirst(void)
{
	return LL_GetFirst(loaded_drivers);
}

static inline Driver *drivers_getnext(void)
{
	return LL_GetNext(loaded_drivers);
}

#endif