Files
lcdproc/server/drivers.h
T

118 lines
1.9 KiB
C
Raw Normal View History

/*
* 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.
*
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;
extern DisplayProps * display_props;
2002-05-26 19:21:23 +00:00
#ifndef bool
# define bool short
# define true 1
# define false 0
#endif
2001-12-30 00:15:25 +00:00
int
2002-02-21 22:50:12 +00:00
drivers_load_driver( char * name );
2001-12-30 00:15:25 +00:00
/* returns:
* <0 error
* 0 ok, driver is an input driver only
* 1 ok, driver is an output driver
* 2 ok, driver is an output driver that needs to run in the foreground
*/
int
drivers_unload_all();
char *
drivers_get_info();
void
drivers_clear();
void
drivers_flush();
void
drivers_string( int x, int y, char * string );
void
drivers_chr( int x, int y, char c );
void
drivers_init_vbar(); /* TO BE REMOVED */
void
drivers_init_hbar(); /* TO BE REMOVED */
void
drivers_init_num(); /* TO BE REMOVED */
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
drivers_set_contrast( int contrast );
2002-05-26 19:21:23 +00:00
void
drivers_cursor( int x, int y, int state );
2001-12-30 00:15:25 +00:00
void
drivers_backlight( int brightness );
void
drivers_output( int state );
const char *
2001-12-30 00:15:25 +00:00
drivers_get_key();
2002-05-26 19:21:23 +00:00
extern LinkedList * loaded_drivers;
/* Please don't read this list except using the following functions */
static inline Driver * drivers_getfirst ()
{
return LL_GetFirst(loaded_drivers);
}
static inline Driver * drivers_getnext ()
{
return LL_GetNext(loaded_drivers);
}
2001-12-30 00:15:25 +00:00
#endif