32,33 → 32,46 |
/** @file |
*/ |
|
#ifndef LIBC_CONSOLE_H_ |
#define LIBC_CONSOLE_H_ |
#ifndef LIBC_IO_CONSOLE_H_ |
#define LIBC_IO_CONSOLE_H_ |
|
#include <console/style.h> |
#include <console/color.h> |
#include <sys/types.h> |
#include <ipc/ipc.h> |
#include <bool.h> |
|
extern int console_open(bool); |
extern void console_close(void); |
extern void console_wait(void); |
typedef enum { |
KEY_PRESS, |
KEY_RELEASE |
} console_ev_type_t; |
|
extern void console_clear(void); |
extern void console_goto(int, int); |
extern void console_putchar(wchar_t); |
extern ssize_t console_write(const char *, size_t); |
extern void console_putstr(const char *); |
extern void console_flush(void); |
/** Console event structure. */ |
typedef struct { |
/** Press or release event. */ |
console_ev_type_t type; |
|
/** Keycode of the key that was pressed or released. */ |
unsigned int key; |
|
/** Bitmask of modifiers held. */ |
unsigned int mods; |
|
/** The character that was generated or '\0' for none. */ |
wchar_t c; |
} console_event_t; |
|
extern int console_get_size(int *, int *); |
extern void console_set_style(int); |
extern void console_set_color(int, int, int); |
extern void console_set_rgb_color(int, int); |
extern void console_cursor_visibility(int); |
extern void console_clear(int phone); |
|
extern void console_kcon_enable(void); |
extern int console_get_size(int phone, ipcarg_t *rows, ipcarg_t *cols); |
extern void console_goto(int phone, ipcarg_t row, ipcarg_t col); |
|
extern void console_set_style(int phone, int style); |
extern void console_set_color(int phone, int fg_color, int bg_color, int flags); |
extern void console_set_rgb_color(int phone, int fg_color, int bg_color); |
|
extern void console_cursor_visibility(int phone, bool show); |
extern void console_kcon_enable(int phone); |
|
extern bool console_get_event(int phone, console_event_t *event); |
|
#endif |
|
/** @} |