Files

97 lines
1.5 KiB
C
Raw Permalink Normal View History

2008-11-30 22:31:20 +00:00
/** \file server/drivers.h
*/
/* This file is part of LCDd, the lcdproc server.
*
2008-11-30 22:31:20 +00:00
* This file is released under the GNU General Public License.
* Refer to the COPYING file distributed with this package.
*
2001-12-30 00:15:25 +00:00
* Copyright (c) 2001, Joris Robijn
*/
2001-12-30 00:15:25 +00:00
#ifndef DRIVERS_H
#define DRIVERS_H
#include "drivers/lcd.h"
2002-05-26 19:21:23 +00:00
#include "shared/LL.h"
2001-12-30 00:15:25 +00:00
typedef struct DisplayProps {
int width, height;
int cellwidth, cellheight;
} DisplayProps;
2007-04-02 21:29:53 +00:00
extern DisplayProps *display_props;
2001-12-30 00:15:25 +00:00
int
2007-04-02 21:29:53 +00:00
drivers_load_driver(const char *name);
2001-12-30 00:15:25 +00:00
int
2007-04-02 21:29:53 +00:00
drivers_unload_all(void);
2001-12-30 00:15:25 +00:00
const char *
2007-04-02 21:29:53 +00:00
drivers_get_info(void);
2001-12-30 00:15:25 +00:00
void
2007-04-02 21:29:53 +00:00
drivers_clear(void);
2001-12-30 00:15:25 +00:00
void
2007-04-02 21:29:53 +00:00
drivers_flush(void);
2001-12-30 00:15:25 +00:00
void
2007-04-02 21:29:53 +00:00
drivers_string(int x, int y, const char *string);
2001-12-30 00:15:25 +00:00
void
2007-04-02 21:29:53 +00:00
drivers_chr(int x, int y, char c);
2001-12-30 00:15:25 +00:00
void
2007-04-02 21:29:53 +00:00
drivers_vbar(int x, int y, int len, int promille, int pattern);
2001-12-30 00:15:25 +00:00
void
2007-04-02 21:29:53 +00:00
drivers_hbar(int x, int y, int len, int promille, int pattern);
2001-12-30 00:15:25 +00:00
void
2007-04-02 21:29:53 +00:00
drivers_num(int x, int num);
2001-12-30 00:15:25 +00:00
void
2007-04-02 21:29:53 +00:00
drivers_heartbeat(int state);
2001-12-30 00:15:25 +00:00
void
2007-04-02 21:29:53 +00:00
drivers_icon(int x, int y, int icon);
2001-12-30 00:15:25 +00:00
void
2007-04-02 21:29:53 +00:00
drivers_set_char(char ch, char *dat);
2001-12-30 00:15:25 +00:00
int
2007-04-02 21:29:53 +00:00
drivers_get_contrast(void);
2001-12-30 00:15:25 +00:00
void
2007-04-02 21:29:53 +00:00
drivers_set_contrast(int contrast);
2001-12-30 00:15:25 +00:00
2002-05-26 19:21:23 +00:00
void
2007-04-02 21:29:53 +00:00
drivers_cursor(int x, int y, int state);
2002-05-26 19:21:23 +00:00
2001-12-30 00:15:25 +00:00
void
2007-04-02 21:29:53 +00:00
drivers_backlight(int brightness);
2001-12-30 00:15:25 +00:00
void
2007-04-02 21:29:53 +00:00
drivers_output(int state);
2001-12-30 00:15:25 +00:00
const char *
2007-04-02 21:29:53 +00:00
drivers_get_key(void);
2001-12-30 00:15:25 +00:00
2006-10-22 20:10:06 +00:00
2002-05-26 19:21:23 +00:00
/* Please don't read this list except using the following functions */
2007-04-02 21:29:53 +00:00
extern LinkedList *loaded_drivers;
2002-05-26 19:21:23 +00:00
2007-04-02 21:29:53 +00:00
static inline Driver *drivers_getfirst(void)
2002-05-26 19:21:23 +00:00
{
return LL_GetFirst(loaded_drivers);
}
2007-04-02 21:29:53 +00:00
static inline Driver *drivers_getnext(void)
2002-05-26 19:21:23 +00:00
{
return LL_GetNext(loaded_drivers);
}
2001-12-30 00:15:25 +00:00
#endif