Changes in uspace/lib/c/include/io/console.h [79ae36dd:64d2b10] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/io/console.h
r79ae36dd r64d2b10 36 36 #define LIBC_IO_CONSOLE_H_ 37 37 38 #include <sys/time.h>39 #include <async.h>40 38 #include <bool.h> 41 #include <stdio.h> 39 40 typedef enum { 41 KEY_PRESS, 42 KEY_RELEASE 43 } console_ev_type_t; 42 44 43 45 typedef enum { … … 48 50 } console_caps_t; 49 51 50 /** Console control structure. */51 typedef struct {52 /** Console input file */53 FILE *input;54 55 /** Console output file */56 FILE *output;57 58 /** Console input session */59 async_sess_t *input_sess;60 61 /** Console output session */62 async_sess_t *output_sess;63 64 /** Input request call with timeout */65 ipc_call_t input_call;66 67 /** Input response with timeout */68 aid_t input_aid;69 } console_ctrl_t;70 71 typedef enum {72 KEY_PRESS,73 KEY_RELEASE74 } kbd_event_type_t;75 76 52 /** Console event structure. */ 77 53 typedef struct { 78 54 /** Press or release event. */ 79 kbd_event_type_t type;55 console_ev_type_t type; 80 56 81 57 /** Keycode of the key that was pressed or released. */ … … 87 63 /** The character that was generated or '\0' for none. */ 88 64 wchar_t c; 89 } kbd_event_t;65 } console_event_t; 90 66 91 extern console_ctrl_t *console_init(FILE *, FILE *); 92 extern void console_done(console_ctrl_t *); 93 extern bool console_kcon(void); 67 extern void console_clear(int phone); 94 68 95 extern void console_flush(console_ctrl_t *); 96 extern void console_clear(console_ctrl_t *); 69 extern int console_get_size(int phone, sysarg_t *cols, sysarg_t *rows); 70 extern int console_get_pos(int phone, sysarg_t *col, sysarg_t *row); 71 extern void console_set_pos(int phone, sysarg_t col, sysarg_t row); 97 72 98 extern int console_get_size(console_ctrl_t *, sysarg_t *, sysarg_t *); 99 extern int console_get_pos(console_ctrl_t *, sysarg_t *, sysarg_t *); 100 extern void console_set_pos(console_ctrl_t *, sysarg_t, sysarg_t); 73 extern void console_set_style(int phone, uint8_t style); 74 extern void console_set_color(int phone, uint8_t fg_color, uint8_t bg_color, 75 uint8_t flags); 76 extern void console_set_rgb_color(int phone, uint32_t fg_color, uint32_t bg_color); 101 77 102 extern void console_ set_style(console_ctrl_t *, uint8_t);103 extern void console_set_color(console_ctrl_t *, uint8_t, uint8_t, uint8_t);104 extern void console_ set_rgb_color(console_ctrl_t *, uint32_t, uint32_t);78 extern void console_cursor_visibility(int phone, bool show); 79 extern int console_get_color_cap(int phone, sysarg_t *ccap); 80 extern void console_kcon_enable(int phone); 105 81 106 extern void console_cursor_visibility(console_ctrl_t *, bool); 107 extern int console_get_color_cap(console_ctrl_t *, sysarg_t *); 108 extern bool console_get_kbd_event(console_ctrl_t *, kbd_event_t *); 109 extern bool console_get_kbd_event_timeout(console_ctrl_t *, kbd_event_t *, 110 suseconds_t *); 82 extern bool console_get_event(int phone, console_event_t *event); 111 83 112 84 #endif
Note:
See TracChangeset
for help on using the changeset viewer.