Ignore:
Timestamp:
2010-04-20T15:01:43Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9efff92
Parents:
9f1362d4
Message:

add STYLE_SELECTED and STYLE_INVERTED into serial output driver
move screenbuffer.{c|h} into libc, make it slightly more generic
collateral changes

File:
1 moved

Legend:

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

    r9f1362d4 r369a5f8  
    3333 */
    3434
    35 #ifndef SCREENBUFFER_H__
    36 #define SCREENBUFFER_H__
     35#ifndef LIBC_SCREENBUFFER_H__
     36#define LIBC_SCREENBUFFER_H__
    3737
    3838#include <stdint.h>
     
    4141#include <bool.h>
    4242
    43 #define DEFAULT_FOREGROUND  0x000000  /**< default console foreground color */
    44 #define DEFAULT_BACKGROUND  0xf0f0f0  /**< default console background color */
     43typedef enum {
     44        at_style,
     45        at_idx,
     46        at_rgb
     47} attr_type_t;
    4548
    4649typedef struct {
     
    5962} attr_rgb_t;
    6063
     64typedef union {
     65        attr_style_t s;
     66        attr_idx_t i;
     67        attr_rgb_t r;
     68} attr_val_t;
     69
    6170typedef struct {
    62         enum {
    63                 at_style,
    64                 at_idx,
    65                 at_rgb
    66         } t;
    67         union {
    68                 attr_style_t s;
    69                 attr_idx_t i;
    70                 attr_rgb_t r;
    71         } a;
     71        attr_type_t t;
     72        attr_val_t a;
    7273} attrs_t;
    7374
     
    121122 *
    122123 */
    123 static inline int attrs_same(attrs_t a1, attrs_t a2)
     124static inline bool attrs_same(attrs_t a1, attrs_t a2)
    124125{
    125126        if (a1.t != a2.t)
    126                 return 0;
     127                return false;
    127128       
    128129        switch (a1.t) {
     
    138139        }
    139140       
    140         return 0;
     141        return false;
    141142}
    142143
Note: See TracChangeset for help on using the changeset viewer.