Changeset 2595dab in mainline for uspace/lib/libc/include/io/console.h


Ignore:
Timestamp:
2009-06-03T19:26:28Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d00ae4c
Parents:
ca3ba3a
Message:

I/O subsystem overhaul:

  • add more POSIX-like file and stream functions (with real functionality of stdin, stdout, stderr)
  • cleanup console access methods (now generic to any console-like device)
  • remove unsafe stream functions
  • add special open_node(), fd_node(), fd_phone() (file) and fopen_node(), fnode(), fphone() (stream) functions for HelenOS-specific I/O operations
File:
1 moved

Legend:

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

    rca3ba3a r2595dab  
    11/*
    2  * Copyright (c) 2009 Jiri Svoboda
     2 * Copyright (c) 2008 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2828
    2929/** @addtogroup libc
    30  * @{ 
     30 * @{
    3131 */
    3232/** @file
    3333 */
    3434
    35 #ifndef LIBC_KBD_H_
    36 #define LIBC_KBD_H_
     35#ifndef LIBC_IO_CONSOLE_H_
     36#define LIBC_IO_CONSOLE_H_
    3737
    38 #include <sys/types.h>
     38#include <ipc/ipc.h>
     39#include <bool.h>
    3940
    40 typedef enum kbd_ev_type {
    41         KE_PRESS,
    42         KE_RELEASE
    43 } kbd_ev_type_t;
     41typedef enum {
     42        KEY_PRESS,
     43        KEY_RELEASE
     44} console_ev_type_t;
    4445
    45 /** Keyboard event structure. */
     46/** Console event structure. */
    4647typedef struct {
    4748        /** Press or release event. */
    48         kbd_ev_type_t type;
    49 
     49        console_ev_type_t type;
     50       
    5051        /** Keycode of the key that was pressed or released. */
    5152        unsigned int key;
    52 
     53       
    5354        /** Bitmask of modifiers held. */
    5455        unsigned int mods;
    55 
     56       
    5657        /** The character that was generated or '\0' for none. */
    5758        wchar_t c;
    58 } kbd_event_t;
     59} console_event_t;
    5960
    60 extern int kbd_get_event(kbd_event_t *);
     61extern void console_clear(int phone);
     62
     63extern int console_get_size(int phone, ipcarg_t *rows, ipcarg_t *cols);
     64extern void console_goto(int phone, ipcarg_t row, ipcarg_t col);
     65
     66extern void console_set_style(int phone, int style);
     67extern void console_set_color(int phone, int fg_color, int bg_color, int flags);
     68extern void console_set_rgb_color(int phone, int fg_color, int bg_color);
     69
     70extern void console_cursor_visibility(int phone, bool show);
     71extern void console_kcon_enable(int phone);
     72
     73extern bool console_get_event(int phone, console_event_t *event);
    6174
    6275#endif
    63  
     76
    6477/** @}
    6578 */
Note: See TracChangeset for help on using the changeset viewer.