diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2002-06-05 02:00:32 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2002-06-05 02:00:32 +0000 |
commit | cb387b25d318025c67c422d509253d824a7764f1 (patch) | |
tree | 671b4093bcce8ffe84524a4b52be00fb762274f6 /console/display.h | |
parent | 94d1c5884949b21303e66b80c00c1690ec0d9d60 (diff) |
2002-06-05 Marcus Brinkmann <marcus@gnu.org>
* input.h: New file.
* input.c: Likewise.
* console.h: Likewise.
* console.c: Likewise.
* display.h: New development version.
* display.c: Likewise.
* Makefile (SRCS): Replace with files for new console server.
(LCLHDRS): Likewise.
(HURDLIBS): Likewise.
(OBJS): Likewise.
Diffstat (limited to 'console/display.h')
-rw-r--r-- | console/display.h | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/console/display.h b/console/display.h index 0043fb3e..6762e1b7 100644 --- a/console/display.h +++ b/console/display.h @@ -26,9 +26,46 @@ struct display; typedef struct display *display_t; +/* Create a new virtual console display, with the system encoding + being ENCODING. */ error_t display_create (display_t *r_display, const char *encoding); + +/* Destroy the display DISPLAY. */ void display_destroy (display_t display); -error_t display_output (display_t display, char **buffer, size_t *length); + +/* Return the dimensions of the display DISPLAY in *WINSIZE. */ void display_getsize (display_t display, struct winsize *winsize); +/* Set the owner of the display DISPLAY to PID. The owner receives + the SIGWINCH signal when the terminal size changes. */ +error_t display_set_owner (display_t display, pid_t pid); + +/* Return the owner of the display DISPLAY in PID. If there is no + owner, return ENOTTY. */ +error_t display_get_owner (display_t display, pid_t *pid); + +/* Output DATALEN characters from the buffer DATA on display DISPLAY. + The DATA must be supplied in the system encoding configured for + DISPLAY. The function returns the amount of bytes written (might + be smaller than DATALEN) or -1 and the error number in errno. If + NONBLOCK is not zero, return with -1 and set errno to EWOULDBLOCK + if operation would block for a long time. */ +ssize_t display_output (display_t display, int nonblock, char *data, + size_t datalen); + +ssize_t display_read (display_t display, int nonblock, off_t off, + char *data, size_t len); + +/* Resume the output on the display DISPLAY. */ +void display_start_output (display_t display); + +/* Stop all output on the display DISPLAY. */ +void display_stop_output (display_t display); + +/* Return the number of pending output bytes for DISPLAY. */ +size_t display_pending_output (display_t display); + +/* Flush the output buffer, discarding all pending data. */ +void display_discard_output (display_t display); + #endif /* DISPLAY_H */ |