Changeset 369a5f8 in mainline for uspace/lib/c/include/io/screenbuffer.h
- Timestamp:
- 2010-04-20T15:01:43Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9efff92
- Parents:
- 9f1362d4
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/io/screenbuffer.h
r9f1362d4 r369a5f8 33 33 */ 34 34 35 #ifndef SCREENBUFFER_H__36 #define SCREENBUFFER_H__35 #ifndef LIBC_SCREENBUFFER_H__ 36 #define LIBC_SCREENBUFFER_H__ 37 37 38 38 #include <stdint.h> … … 41 41 #include <bool.h> 42 42 43 #define DEFAULT_FOREGROUND 0x000000 /**< default console foreground color */ 44 #define DEFAULT_BACKGROUND 0xf0f0f0 /**< default console background color */ 43 typedef enum { 44 at_style, 45 at_idx, 46 at_rgb 47 } attr_type_t; 45 48 46 49 typedef struct { … … 59 62 } attr_rgb_t; 60 63 64 typedef union { 65 attr_style_t s; 66 attr_idx_t i; 67 attr_rgb_t r; 68 } attr_val_t; 69 61 70 typedef 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; 72 73 } attrs_t; 73 74 … … 121 122 * 122 123 */ 123 static inline intattrs_same(attrs_t a1, attrs_t a2)124 static inline bool attrs_same(attrs_t a1, attrs_t a2) 124 125 { 125 126 if (a1.t != a2.t) 126 return 0;127 return false; 127 128 128 129 switch (a1.t) { … … 138 139 } 139 140 140 return 0;141 return false; 141 142 } 142 143
Note:
See TracChangeset
for help on using the changeset viewer.