1
/* This is the LCDproc driver for ncurses.
2
It displays an emulated LCD display at on a terminal screen
5
Copyright (C) 1999, William Ferrell and Scott Scriven
13
This program is free software; you can redistribute it and/or modify
14
it under the terms of the GNU General Public License as published by
15
the Free Software Foundation; either version 2 of the License, or
18
This program is distributed in the hope that it will be useful,
19
but WITHOUT ANY WARRANTY; without even the implied warranty of
20
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
GNU General Public License for more details.
23
You should have received a copy of the GNU General Public License
24
along with this program; if not, write to the Free Software
25
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 */
27
1
#ifndef LCD_CURSES_H
28
2
#define LCD_CURSES_H
30
extern lcd_logical_driver *curses_drv;
32
int curses_drv_init (struct lcd_logical_driver *driver, char *args);
33
void curses_drv_backlight (int on);
34
void curses_drv_close ();
35
void curses_drv_clear ();
36
void curses_drv_flush ();
37
void curses_drv_string (int x, int y, char string[]);
38
void curses_drv_chr (int x, int y, char c);
39
void curses_drv_vbar (int x, int len);
40
void curses_drv_hbar (int x, int y, int len);
41
void curses_drv_icon (int which, char dest);
42
void curses_drv_flush ();
43
void curses_drv_flush_box (int lft, int top, int rgt, int bot);
44
void curses_drv_draw_frame (char *dat);
45
char curses_drv_getkey ();
46
void curses_drv_init_num ();
47
void curses_drv_num (int x, int num);
48
void curses_drv_heartbeat (int type);
6
MODULE_EXPORT int curses_init (Driver * drvthis);
7
MODULE_EXPORT void curses_close (Driver *drvthis);
8
MODULE_EXPORT int curses_width (Driver *drvthis);
9
MODULE_EXPORT int curses_height (Driver *drvthis);
10
MODULE_EXPORT void curses_clear (Driver *drvthis);
11
MODULE_EXPORT void curses_flush (Driver *drvthis);
12
MODULE_EXPORT void curses_string (Driver *drvthis, int x, int y, char string[]);
13
MODULE_EXPORT void curses_chr (Driver *drvthis, int x, int y, char c);
15
MODULE_EXPORT void curses_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
16
MODULE_EXPORT void curses_hbar (Driver *drvthis, int x, int y, int len, int promille, int options);
17
MODULE_EXPORT void curses_num (Driver *drvthis, int x, int num);
18
MODULE_EXPORT void curses_heartbeat (Driver *drvthis, int type);
19
MODULE_EXPORT int curses_icon (Driver *drvthis, int x, int y, int icon);
21
MODULE_EXPORT void curses_backlight (Driver *drvthis, int on);
23
MODULE_EXPORT const char *curses_get_key (Driver *drvthis);
50
25
/*Default settings for config file parsing*/
51
#define CURSESDRV_DEF_FOREGR "blue"
52
#define CURSESDRV_DEF_BACKGR "cyan"
53
#define CURSESDRV_DEF_BACKLIGHT "red"
54
#define CURSESDRV_DEF_SIZE "20x4"
55
#define CURSESDRV_DEF_TOP_LEFT_X 7
56
#define CURSESDRV_DEF_TOP_LEFT_Y 7
26
#define CONF_DEF_FOREGR "blue"
27
#define CONF_DEF_BACKGR "cyan"
28
#define CONF_DEF_BACKLIGHT "red"
29
#define CONF_DEF_SIZE "20x4"
30
#define CONF_DEF_TOP_LEFT_X 7
31
#define CONF_DEF_TOP_LEFT_Y 7