diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2002-06-24 01:05:27 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2002-06-24 01:05:27 +0000 |
commit | 52be5cefb4852e6c2921fd1b19c4d0b4952860ea (patch) | |
tree | c2c5d6d53248df64e218b6148a95c26825a5b5bf /console/console.h | |
parent | 98f81ca345424f0e3af7bd4c4eb492481b7f3573 (diff) |
2002-06-24 Marcus Brinkmann <marcus@gnu.org>
* console.h (cons_color_t): New enum type replacing color macros.
(CONS_COLOR_MAX): New macro.
(cons_change_t): New type.
(struct cons_display): New member CHANGES.
* console.c: Include "console.h".
(DEFAULT_FOREGROUND, DEFAULT_FOREGROUND_NAME, DEFAULT_BACKGROUND,
DEFAULT_BACKGROUND_NAME): New macros.
(struct cons): New members foreground and background.
(vcons_lookup): Pass colors to display_create invocation.
(new_node): Fix st_size for display node.
(color_names): New array.
(options): Add options to set default foreground and background
color.
(parse_color): New function.
(parse_opt): Implement new options.
(netfs_append_args): Add new options to output.
(main): Set default colors.
* Makefile (DIST_FILES): Remove target.
(MIGSTUBS): Remove ourfs_notifyUser.o and add notifyServer.o.
* display.c: Do not include "ourfs_notify_U.h".
(struct modreq): New member PENDING.
(struct notify): New structure.
(struct display): New members FILEMOD_REQS_PENDING and
NOTIFY_PORT.
(pager_read_page): Hand out previously returned pages.
(pager_unlock_page): Assert that this is not called.
(notify_class, notify_bucket): New port class and bucket global
variables.
(nowait_file_changed): New function, modified from mig output.
(do_mach_notify_port_deleted): New stub function.
(do_mach_notify_port_destroyed): New stub function.
(do_mach_notify_no_senders): New stub function.
(do_mach_notify_dead_name): New stub function.
(do_mach_notify_send_once): New stub function.
(do_mach_notify_msg_accepted): New function.
(service_notifications): New function.
(display_notice_changes): Call nowait_file_changed with new
argument. Initialize REQ->pending.
(display_notice_filechange): Remove arguments except DISPLAY. Set
PENDING flags in pending filemod requests. Call
nowait_file_changed with new notify argument. If notification
will be sent, move modreq structure to pending list.
(display_flush_filechange): Rewritten to use ring buffer to store
changes.
(user_create): Initialize new members of struct cons_display.
(display_init): Initialize notify_class and notify_bucket.
(display_create): Accept new arguments for default colors.
Initialize new members of struct display.
(display_destroy): Remove pending filemod requests and destroy the
notification port. Do not free the display structure memory.
(display_destroy_complete): New function.
* display.h: Add new arguments to prototype of display_create.
Diffstat (limited to 'console/console.h')
-rw-r--r-- | console/console.h | 46 |
1 files changed, 37 insertions, 9 deletions
diff --git a/console/console.h b/console/console.h index 36ad54a1..81940f9e 100644 --- a/console/console.h +++ b/console/console.h @@ -21,14 +21,12 @@ #include <stdint.h> -#define CONS_COLOR_BLACK 0 -#define CONS_COLOR_RED 1 -#define CONS_COLOR_GREEN 2 -#define CONS_COLOR_YELLOW 3 -#define CONS_COLOR_BLUE 4 -#define CONS_COLOR_MAGENTA 5 -#define CONS_COLOR_CYAN 6 -#define CONS_COLOR_WHITE 7 +typedef enum + { + CONS_COLOR_BLACK = 0, CONS_COLOR_RED, CONS_COLOR_GREEN, CONS_COLOR_YELLOW, + CONS_COLOR_BLUE, CONS_COLOR_MAGENTA, CONS_COLOR_CYAN, CONS_COLOR_WHITE + } cons_color_t; +#define CONS_COLOR_MAX (CONS_COLOR_WHITE) typedef struct { @@ -50,6 +48,25 @@ typedef struct conchar_attr_t attr; } conchar_t; +typedef union +{ + struct + { + /* Only the first 31 bits are available (see WHAT.not_matrix). */ + uint32_t start; + uint32_t end; + } matrix; + struct + { + uint32_t cursor_pos : 1; + uint32_t cursor_status : 1; + uint32_t screen_cur_line : 1; + uint32_t screen_scr_lines : 1; + uint32_t _unused : 27; + uint32_t not_matrix : 1; + } what; +} cons_change_t; + struct cons_display { #define CONS_MAGIC 0x48555244 /* Hex for "HURD". */ @@ -68,7 +85,7 @@ struct cons_display uint32_t cur_line; /* Beginning of visible area. This is only ever increased by the server, so clients can optimize scrolling. */ - uint32_t scr_lines;/* Number of lines in scrollback buffer + uint32_t scr_lines; /* Number of lines in scrollback buffer preceeding CUR_LINE. */ uint32_t height; /* Number of lines in visible area following (and including) CUR_LINE. */ @@ -87,6 +104,17 @@ struct cons_display uint32_t status; /* Visibility status of cursor. */ } cursor; + struct + { + uint32_t buffer; /* Index (in uint32_t) of the beginning of the + changes buffer in this structure. */ + uint32_t length; /* Length of buffer. */ + uint32_t written; /* Number of records written by server. */ + +#define _CONS_CHANGES_LENGTH 512 + cons_change_t _buffer[_CONS_CHANGES_LENGTH]; + } changes; + /* Don't use this, use ((wchar_t *) cons_display + cons_display.screen.matrix) instead. This will make your client upward compatible with future versions of this interface. */ |