Changeset 5e718d9 in mainline for uspace/lib/c/include/io/charfield.h
- Timestamp:
- 2012-08-21T10:04:16Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 67edca6
- Parents:
- 0da6c04 (diff), 6a97f2e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/io/charfield.h
r0da6c04 r5e718d9 1 1 /* 2 2 * Copyright (c) 2006 Josef Cejka 3 * Copyright (c) 2011 Petr Koupy 3 4 * All rights reserved. 4 5 * … … 33 34 */ 34 35 35 #ifndef IMGMAP_SCREENBUFFER_H__36 #define IMGMAP_SCREENBUFFER_H__36 #ifndef LIBC_IO_CHARFIELD_H_ 37 #define LIBC_IO_CHARFIELD_H_ 37 38 38 39 #include <sys/types.h> … … 40 41 #include <io/color.h> 41 42 #include <io/style.h> 42 #include "fb.h"43 #include <io/pixel.h> 43 44 44 45 typedef enum { 45 SCREENBUFFER_FLAG_NONE = 0,46 SCREENBUFFER_FLAG_SHARED= 147 } screenbuffer_flag_t;46 CHAR_FLAG_NONE = 0, 47 CHAR_FLAG_DIRTY = 1 48 } char_flags_t; 48 49 49 50 typedef enum { … … 52 53 CHAR_ATTR_RGB 53 54 } char_attr_type_t; 54 55 typedef enum {56 CHAR_FLAG_NONE = 0,57 CHAR_FLAG_DIRTY = 158 } char_flags_t;59 55 60 56 typedef struct { … … 65 61 66 62 typedef struct { 67 pixel_t bgcolor; /**< Background color */68 pixel_t fgcolor; /**< Foreground color */63 pixel_t bgcolor; 64 pixel_t fgcolor; 69 65 } char_attr_rgb_t; 70 66 … … 80 76 } char_attrs_t; 81 77 82 /** One field on screen. It contain one character and its attributes. */83 78 typedef struct { 84 wchar_t ch; /**< Character itself */85 char_attrs_t attrs; /**< Character attributes */86 char_flags_t flags; /**< Character flags */79 wchar_t ch; 80 char_attrs_t attrs; 81 char_flags_t flags; 87 82 } charfield_t; 88 83 89 /** Compare two sets of attributes.90 *91 * @param a1 First attribute.92 * @param a2 Second attribute.93 *94 * @return True on equality95 *96 */97 84 static inline bool attrs_same(char_attrs_t a1, char_attrs_t a2) 98 85 { … … 115 102 } 116 103 117 extern screenbuffer_t *screenbuffer_create(sysarg_t, sysarg_t,118 screenbuffer_flag_t);119 120 extern charfield_t *screenbuffer_field_at(screenbuffer_t *, sysarg_t, sysarg_t);121 extern bool screenbuffer_cursor_at(screenbuffer_t *, sysarg_t, sysarg_t);122 123 extern sysarg_t screenbuffer_get_top_row(screenbuffer_t *);124 125 extern sysarg_t screenbuffer_putchar(screenbuffer_t *, wchar_t, bool);126 extern sysarg_t screenbuffer_newline(screenbuffer_t *);127 extern sysarg_t screenbuffer_tabstop(screenbuffer_t *, sysarg_t);128 extern sysarg_t screenbuffer_backspace(screenbuffer_t *);129 130 extern void screenbuffer_clear(screenbuffer_t *);131 extern void screenbuffer_clear_row(screenbuffer_t *, sysarg_t);132 133 extern void screenbuffer_set_cursor(screenbuffer_t *, sysarg_t, sysarg_t);134 extern void screenbuffer_set_cursor_visibility(screenbuffer_t *, bool);135 extern bool screenbuffer_get_cursor_visibility(screenbuffer_t *);136 137 extern void screenbuffer_get_cursor(screenbuffer_t *, sysarg_t *, sysarg_t *);138 139 extern void screenbuffer_set_style(screenbuffer_t *, console_style_t);140 extern void screenbuffer_set_color(screenbuffer_t *, console_color_t,141 console_color_t, console_color_attr_t);142 extern void screenbuffer_set_rgb_color(screenbuffer_t *, pixel_t, pixel_t);143 144 104 #endif 145 105
Note:
See TracChangeset
for help on using the changeset viewer.