1 |
/* console.h -- Interfaces for the console server. |
/* console.h -- Public interface to the console server. |
2 |
Copyright (C) 2002 Free Software Foundation, Inc. |
Copyright (C) 2002 Free Software Foundation, Inc. |
3 |
Written by Marcus Brinkmann. |
Written by Marcus Brinkmann. |
4 |
|
|
16 |
along with this program; if not, write to the Free Software |
along with this program; if not, write to the Free Software |
17 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
18 |
|
|
19 |
#ifndef CONSOLE_H |
#ifndef _HURD_CONSOLE_H |
20 |
#define CONSOLE_H |
#define _HURD_CONSOLE_H |
21 |
|
|
22 |
#include <hurd/netfs.h> |
#include <sys/types.h> |
|
#include <rwlock.h> |
|
|
#include <maptime.h> |
|
23 |
|
|
24 |
/* Handy source of time. */ |
struct cons_display |
25 |
volatile struct mapped_time_value *console_maptime; |
{ |
26 |
|
#define CONS_MAGIC 0x48555244 /* Hex for "HURD". */ |
27 |
|
u_int32_t magic; /* CONS_MAGIC, use to detect |
28 |
|
endianess. */ |
29 |
|
#define CONS_VERSION_MAJ 0x0 |
30 |
|
#define CONS_VERSION_MAJ_SHIFT 16 |
31 |
|
#define CONS_VERSION_AGE 0x0 |
32 |
|
u_int32_t version; /* Version of interface. Lower 16 |
33 |
|
bits define the age, upper 16 bits |
34 |
|
the major version. */ |
35 |
|
struct |
36 |
|
{ |
37 |
|
u_int32_t width; /* Width of screen matrix. */ |
38 |
|
u_int32_t lines; /* Length of whole matrix. */ |
39 |
|
u_int32_t cur_line; /* Beginning of visible area. */ |
40 |
|
u_int32_t scr_lines;/* Number of lines in scrollback buffer |
41 |
|
preceeding CUR_LINE. */ |
42 |
|
u_int32_t height; /* Number of lines in visible area following |
43 |
|
(and including) CUR_LINE. */ |
44 |
|
u_int32_t matrix; /* Index (in wchar_t) of the beginning of |
45 |
|
screen matrix in this structure. */ |
46 |
|
} screen; |
47 |
|
|
48 |
|
struct |
49 |
|
{ |
50 |
|
u_int32_t col; /* Current column (x-position) of cursor. */ |
51 |
|
u_int32_t row; /* Current row (y-position) of cursor. */ |
52 |
|
|
53 |
|
#define CONS_CURSOR_INVISIBLE 0 |
54 |
|
#define CONS_CURSOR_NORMAL 1 |
55 |
|
#define CONS_CURSOR_VERY_VISIBLE 2 |
56 |
|
u_int32_t status; /* Visibility status of cursor. */ |
57 |
|
} cursor; |
58 |
|
|
59 |
|
/* Don't use this, use ((wchar_t *) cons_display + |
60 |
|
cons_display.screen.matrix) instead. This will make your client |
61 |
|
upward compatible with future versions of this interface. */ |
62 |
|
wchar_t _matrix[0]; |
63 |
|
}; |
64 |
|
|
|
/* A handle for a console device. */ |
|
|
typedef struct cons *cons_t; |
|
65 |
|
|
66 |
/* A handle for a virtual console device. */ |
#endif /* _HURD_CONSOLE_H */ |
|
typedef struct vcons *vcons_t; |
|
|
|
|
|
#endif /* CONSOLE_H */ |
|