Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/io/console.h

    r07b7c48 r7c014d1  
    3737
    3838#include <sys/time.h>
    39 #include <io/concaps.h>
    40 #include <io/kbd_event.h>
    41 #include <io/cons_event.h>
    4239#include <io/keycode.h>
    4340#include <async.h>
    44 #include <stdbool.h>
     41#include <bool.h>
    4542#include <stdio.h>
     43
     44typedef enum {
     45        CONSOLE_CAP_NONE = 0,
     46        CONSOLE_CAP_STYLE = 1,
     47        CONSOLE_CAP_INDEXED = 2,
     48        CONSOLE_CAP_RGB = 4
     49} console_caps_t;
    4650
    4751/** Console control structure. */
     
    6670} console_ctrl_t;
    6771
     72typedef enum {
     73        KEY_PRESS,
     74        KEY_RELEASE
     75} kbd_event_type_t;
     76
     77/** Console event structure. */
     78typedef struct {
     79        /** List handle */
     80        link_t link;
     81       
     82        /** Press or release event. */
     83        kbd_event_type_t type;
     84       
     85        /** Keycode of the key that was pressed or released. */
     86        keycode_t key;
     87       
     88        /** Bitmask of modifiers held. */
     89        keymod_t mods;
     90       
     91        /** The character that was generated or '\0' for none. */
     92        wchar_t c;
     93} kbd_event_t;
     94
    6895extern console_ctrl_t *console_init(FILE *, FILE *);
    6996extern void console_done(console_ctrl_t *);
     
    83110extern void console_cursor_visibility(console_ctrl_t *, bool);
    84111extern int console_get_color_cap(console_ctrl_t *, sysarg_t *);
    85 extern bool console_get_event(console_ctrl_t *, cons_event_t *);
    86 extern bool console_get_event_timeout(console_ctrl_t *, cons_event_t *,
     112extern bool console_get_kbd_event(console_ctrl_t *, kbd_event_t *);
     113extern bool console_get_kbd_event_timeout(console_ctrl_t *, kbd_event_t *,
    87114    suseconds_t *);
    88115
Note: See TracChangeset for help on using the changeset viewer.