Changes in uspace/lib/c/include/io/console.h [64d2b10:79ae36dd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/io/console.h
r64d2b10 r79ae36dd 36 36 #define LIBC_IO_CONSOLE_H_ 37 37 38 #include <sys/time.h> 39 #include <async.h> 38 40 #include <bool.h> 39 40 typedef enum { 41 KEY_PRESS, 42 KEY_RELEASE 43 } console_ev_type_t; 41 #include <stdio.h> 44 42 45 43 typedef enum { … … 50 48 } console_caps_t; 51 49 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_RELEASE 74 } kbd_event_type_t; 75 52 76 /** Console event structure. */ 53 77 typedef struct { 54 78 /** Press or release event. */ 55 console_ev_type_t type;79 kbd_event_type_t type; 56 80 57 81 /** Keycode of the key that was pressed or released. */ … … 63 87 /** The character that was generated or '\0' for none. */ 64 88 wchar_t c; 65 } console_event_t;89 } kbd_event_t; 66 90 67 extern void console_clear(int phone); 91 extern console_ctrl_t *console_init(FILE *, FILE *); 92 extern void console_done(console_ctrl_t *); 93 extern bool console_kcon(void); 68 94 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); 95 extern void console_flush(console_ctrl_t *); 96 extern void console_clear(console_ctrl_t *); 72 97 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); 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); 77 101 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);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); 81 105 82 extern bool console_get_event(int phone, console_event_t *event); 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 *); 83 111 84 112 #endif
Note:
See TracChangeset
for help on using the changeset viewer.