diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2002-09-17 12:26:10 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2002-09-17 12:26:10 +0000 |
commit | 09e69605b16070de8ce317d86ad736d665a58906 (patch) | |
tree | 7c0dc29f4fc660a44d2f7d6ec9d099cc4f8301a6 /console-client/input.h | |
parent | dbe4c7712b652b7ad3126e94c47b00fa2bbb0a05 (diff) |
2002-09-17 Marcus Brinkmann <marcus@gnu.org>
* Makefile (prog-subdirs): Add console-client.
sutils/
2002-09-17 Marcus Brinkmann <marcus@gnu.org>
* MAKEDEV.sh (mkdev: vcs): New console device.
(mkdev: tty[0-9a-f]|tty[0-9][0-9a-f]): Replaced with new rules for
tty[1-9][0-9].
utils/
2002-09-17 Marcus Brinkmann <marcus@gnu.org>
* console-ncurses.c: File removed (the ncursesw console client is
now a driver in the console-client).
* Makefile: Revert 2002-08-22 change:
Do not include`../config.make'.
(targets) [LIBNCURSES]: Removed.
(SRCS) [LIBNCURSES]: Likewise.
(HURDLIBS) [LIBNCURSES]: Likewise.
(console-ncurses): Target removed.
(console-ncurses-CPPFLAGS): Removed.
(console-ncurses-LDLIBS): Likewise.
console-client/
2002-09-17 Marcus Brinkmann <marcus@gnu.org>
* Makefile, bdf.c, bdf.h, bell.h, console.c, display.h, driver.c,
driver.h, generic-speaker.c, input.h, pc-kbd.c, timer.c, timer.h,
unicode.h, vga.c, vga-dynacolor.c, vga-dynacolor.h, vga-dynafont.c,
vga-dynafont.h, vga-hw.h, vga-support.c, vga-support.h: New file.
Diffstat (limited to 'console-client/input.h')
-rw-r--r-- | console-client/input.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/console-client/input.h b/console-client/input.h new file mode 100644 index 00000000..38c2a64f --- /dev/null +++ b/console-client/input.h @@ -0,0 +1,83 @@ +/* input.h - The interface to and for an input driver. + Copyright (C) 2002 Free Software Foundation, Inc. + Written by Marcus Brinkmann. + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2, or (at + your option) any later version. + + The GNU Hurd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ + +#ifndef _INPUT_H_ +#define _INPUT_H_ 1 + +#include <errno.h> +#include <stddef.h> + +#include <hurd/cons.h> + + +/* The input drivers are set up by the driver's initialization routine + and added to the console client with driver_add_input. All + subsequent operations on the display are fully synchronized by the + caller. The driver deinitialization routine should call + driver_remove_input. */ + +/* Forward declaration. */ +struct input_ops; +typedef struct input_ops *input_ops_t; + +/* Add the input source HANDLE with the operations OPS to the console + client. As soon as this is called, operations on this input source + may be performed, even before the function returns. */ +error_t driver_add_input (input_ops_t ops, void *handle); + +/* Remove the input HANDLE with the operations OPS from the console + client. As soon as this function returns, no operations will be + performed on the input source anymore. */ +error_t driver_remove_input (input_ops_t ops, void *handle); + +/* Enter SIZE bytes from the buffer BUF into the currently active + console. This can be called by the input driver at any time. */ +error_t console_input (char *buf, size_t size); + +/* Scroll the active console by TYPE and VALUE as specified by + cons_vcons_scrollback. */ +int console_scrollback (cons_scroll_t type, float value); + +/* Switch the active console to console ID or DELTA (relative to the + active console). */ +error_t console_switch (int id, int delta); + +/* Signal an error to the user. */ +void console_error (const wchar_t *const err_msg); + +/* Exit the console client. Does not return. */ +void console_exit (void); + +#if QUAERENDO_INVENIETIS +/* Do not use, do not remove. */ +void console_deprecated (int key); +#endif + + +struct input_ops +{ + /* Set the status of the scroll lock indication. */ + error_t (*set_scroll_lock_status) (void *handle, int onoff); + + /* Do not use, do not remove. */ + void (*deprecated) (void *handle, int key); +}; + +#endif /* _INPUT_H_ */ |