Rev 1630 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1630 | Rev 1649 | ||
|---|---|---|---|
| Line 24... | Line 24... | ||
| 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | */ |
27 | */ |
| 28 | 28 | ||
| - | 29 | /** @addtogroup console |
|
| - | 30 | * @{ |
|
| - | 31 | */ |
|
| - | 32 | /** @file |
|
| - | 33 | */ |
|
| - | 34 | ||
| 29 | #ifndef __SCREENBUFFER_H__ |
35 | #ifndef __SCREENBUFFER_H__ |
| 30 | #define __SCREENBUFFER_H__ |
36 | #define __SCREENBUFFER_H__ |
| 31 | 37 | ||
| 32 | 38 | ||
| 33 | #define DEFAULT_FOREGROUND 0x0 /**< default console foreground color */ |
39 | #define DEFAULT_FOREGROUND 0x0 /**< default console foreground color */ |
| Line 55... | Line 61... | ||
| 55 | unsigned char is_cursor_visible; /**< Cursor state - default is visible */ |
61 | unsigned char is_cursor_visible; /**< Cursor state - default is visible */ |
| 56 | } screenbuffer_t; |
62 | } screenbuffer_t; |
| 57 | 63 | ||
| 58 | /** Returns keyfield for position on screen. Screenbuffer->buffer is cyclic buffer so we must couted in index of the topmost line. |
64 | /** Returns keyfield for position on screen. Screenbuffer->buffer is cyclic buffer so we must couted in index of the topmost line. |
| 59 | * @param scr screenbuffer |
65 | * @param scr screenbuffer |
| 60 | * @oaram x position on screen |
66 | * @param x position on screen |
| 61 | * @param y position on screen |
67 | * @param y position on screen |
| 62 | * @return keyfield structure with character and its attributes on x,y |
68 | * @return keyfield structure with character and its attributes on x,y |
| 63 | */ |
69 | */ |
| 64 | static inline keyfield_t *get_field_at(screenbuffer_t *scr, unsigned int x, unsigned int y) |
70 | static inline keyfield_t *get_field_at(screenbuffer_t *scr, unsigned int x, unsigned int y) |
| 65 | { |
71 | { |
| Line 86... | Line 92... | ||
| 86 | void screenbuffer_goto(screenbuffer_t *scr, unsigned int x, unsigned int y); |
92 | void screenbuffer_goto(screenbuffer_t *scr, unsigned int x, unsigned int y); |
| 87 | void screenbuffer_set_style(screenbuffer_t *scr, unsigned int fg_color, unsigned int bg_color); |
93 | void screenbuffer_set_style(screenbuffer_t *scr, unsigned int fg_color, unsigned int bg_color); |
| 88 | 94 | ||
| 89 | #endif |
95 | #endif |
| 90 | 96 | ||
| - | 97 | ||
| - | 98 | /** @} |
|
| - | 99 | */ |
|
| - | 100 | ||