Changeset 2595dab in mainline for uspace/lib/libc/include/io
- Timestamp:
- 2009-06-03T19:26:28Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d00ae4c
- Parents:
- ca3ba3a
- Location:
- uspace/lib/libc/include/io
- Files:
-
- 1 edited
- 5 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/include/io/color.h
rca3ba3a r2595dab 28 28 29 29 /** @addtogroup libc 30 * @{ 30 * @{ 31 31 */ 32 32 /** @file 33 33 */ 34 34 35 #ifndef LIBC_ CONSOLE_COLOR_H_36 #define LIBC_ CONSOLE_COLOR_H_35 #ifndef LIBC_IO_COLOR_H_ 36 #define LIBC_IO_COLOR_H_ 37 37 38 38 enum console_color { 39 COLOR_BLACK 40 COLOR_BLUE 41 COLOR_GREEN 42 COLOR_CYAN 43 COLOR_RED 44 COLOR_MAGENTA 45 COLOR_YELLOW 46 COLOR_WHITE 47 48 CATTR_BRIGHT 49 CATTR_BLINK 39 COLOR_BLACK = 0, 40 COLOR_BLUE = 1, 41 COLOR_GREEN = 2, 42 COLOR_CYAN = 3, 43 COLOR_RED = 4, 44 COLOR_MAGENTA = 5, 45 COLOR_YELLOW = 6, 46 COLOR_WHITE = 7, 47 48 CATTR_BRIGHT = 8, 49 CATTR_BLINK = 8 50 50 }; 51 51 52 52 #endif 53 53 54 54 /** @} 55 55 */ -
uspace/lib/libc/include/io/console.h
rca3ba3a r2595dab 1 1 /* 2 * Copyright (c) 200 9Jiri Svoboda2 * Copyright (c) 2008 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 28 28 29 29 /** @addtogroup libc 30 * @{ 30 * @{ 31 31 */ 32 32 /** @file 33 33 */ 34 34 35 #ifndef LIBC_ KBD_H_36 #define LIBC_ KBD_H_35 #ifndef LIBC_IO_CONSOLE_H_ 36 #define LIBC_IO_CONSOLE_H_ 37 37 38 #include <sys/types.h> 38 #include <ipc/ipc.h> 39 #include <bool.h> 39 40 40 typedef enum kbd_ev_type{41 KE _PRESS,42 KE _RELEASE43 } kbd_ev_type_t;41 typedef enum { 42 KEY_PRESS, 43 KEY_RELEASE 44 } console_ev_type_t; 44 45 45 /** Keyboardevent structure. */46 /** Console event structure. */ 46 47 typedef struct { 47 48 /** Press or release event. */ 48 kbd_ev_type_t type;49 49 console_ev_type_t type; 50 50 51 /** Keycode of the key that was pressed or released. */ 51 52 unsigned int key; 52 53 53 54 /** Bitmask of modifiers held. */ 54 55 unsigned int mods; 55 56 56 57 /** The character that was generated or '\0' for none. */ 57 58 wchar_t c; 58 } kbd_event_t;59 } console_event_t; 59 60 60 extern int kbd_get_event(kbd_event_t *); 61 extern void console_clear(int phone); 62 63 extern int console_get_size(int phone, ipcarg_t *rows, ipcarg_t *cols); 64 extern void console_goto(int phone, ipcarg_t row, ipcarg_t col); 65 66 extern void console_set_style(int phone, int style); 67 extern void console_set_color(int phone, int fg_color, int bg_color, int flags); 68 extern void console_set_rgb_color(int phone, int fg_color, int bg_color); 69 70 extern void console_cursor_visibility(int phone, bool show); 71 extern void console_kcon_enable(int phone); 72 73 extern bool console_get_event(int phone, console_event_t *event); 61 74 62 75 #endif 63 76 64 77 /** @} 65 78 */ -
uspace/lib/libc/include/io/keycode.h
rca3ba3a r2595dab 28 28 29 29 /** @addtogroup libc 30 * @{ 30 * @{ 31 31 */ 32 32 /** @file 33 33 */ 34 34 35 #ifndef LIBC_ KBD_KEYCODE_H_36 #define LIBC_ KBD_KEYCODE_H_35 #ifndef LIBC_IO_KEYCODE_H_ 36 #define LIBC_IO_KEYCODE_H_ 37 37 38 38 /** Keycode definitions. … … 200 200 201 201 enum keymod { 202 KM_LSHIFT 203 KM_RSHIFT 204 KM_LCTRL 205 KM_RCTRL 206 KM_LALT 207 KM_RALT 208 KM_CAPS_LOCK 209 KM_NUM_LOCK 210 KM_SCROLL_LOCK 211 212 KM_SHIFT 213 KM_CTRL 214 KM_ALT 202 KM_LSHIFT = 0x001, 203 KM_RSHIFT = 0x002, 204 KM_LCTRL = 0x004, 205 KM_RCTRL = 0x008, 206 KM_LALT = 0x010, 207 KM_RALT = 0x020, 208 KM_CAPS_LOCK = 0x040, 209 KM_NUM_LOCK = 0x080, 210 KM_SCROLL_LOCK = 0x100, 211 212 KM_SHIFT = KM_LSHIFT | KM_RSHIFT, 213 KM_CTRL = KM_LCTRL | KM_RCTRL, 214 KM_ALT = KM_LALT | KM_RALT 215 215 } keymod_t; 216 216 217 217 #endif 218 218 219 219 /** @} 220 220 */ -
uspace/lib/libc/include/io/klog.h
rca3ba3a r2595dab 36 36 #define LIBC_STREAM_H_ 37 37 38 #include < libarch/types.h>38 #include <sys/types.h> 39 39 40 #define EMFILE -17 41 42 extern ssize_t read_stdin(void *, size_t); 43 extern int klog_puts(const char *); 40 extern size_t klog_write(const void *buf, size_t size); 44 41 extern void klog_update(void); 45 42 -
uspace/lib/libc/include/io/printf_core.h
rca3ba3a r2595dab 57 57 /** @} 58 58 */ 59 60 -
uspace/lib/libc/include/io/style.h
rca3ba3a r2595dab 28 28 29 29 /** @addtogroup libc 30 * @{ 30 * @{ 31 31 */ 32 32 /** @file 33 33 */ 34 34 35 #ifndef LIBC_ CONSOLE_STYLE_H_36 #define LIBC_ CONSOLE_STYLE_H_35 #ifndef LIBC_IO_STYLE_H_ 36 #define LIBC_IO_STYLE_H_ 37 37 38 38 enum console_style { 39 STYLE_NORMAL 40 STYLE_EMPHASIS 39 STYLE_NORMAL = 0, 40 STYLE_EMPHASIS = 1 41 41 }; 42 42 43 43 #endif 44 44 45 45 /** @} 46 46 */
Note:
See TracChangeset
for help on using the changeset viewer.