20 #include <t3window/terminal.h>
27 #define T3_PARENT(_x) ((_x) << 4)
29 #define T3_CHILD(_x) ((_x) << 8)
31 #define T3_GETPARENT(_x) (((_x) >> 4) & 0xf)
33 #define T3_GETCHILD(_x) (((_x) >> 8) & 0xf)
47 T3_ANCHOR_BOTTOMRIGHT,
50 T3_ANCHOR_BOTTOMCENTER,
int t3_win_get_width(t3_window_t *win)
Get a t3_window_t's width.
Definition: window.c:419
int t3_win_addstr(t3_window_t *win, const char *str, t3_attr_t attr)
Add a nul-terminated string to a t3_window_t with specified attributes.
Definition: window_paint.c:655
int t3_win_addnstrrep(t3_window_t *win, const char *str, size_t n, t3_attr_t attr, int rep)
Add a string with explicitly specified size to a t3_window_t with specified attributes and repetition...
Definition: window_paint.c:678
int t3_win_get_abs_y(t3_window_t *win)
Get a t3_window_t's absolute vertical position.
Definition: window.c:530
t3_window_t * t3_win_new_unbacked(t3_window_t *parent, int height, int width, int y, int x, int depth)
Create a new t3_window_t with relative position without backing store.
Definition: window.c:161
int t3_win_addstrrep(t3_window_t *win, const char *str, t3_attr_t attr, int rep)
Add a nul-terminated string to a t3_window_t with specified attributes and repetition.
Definition: window_paint.c:698
char t3_bool
A boolean type that does not clash with C++ or C99 bool.
Definition: window_api.h:47
void t3_win_show(t3_window_t *win)
Make a t3_window_t visible.
Definition: window.c:604
int t3_win_get_abs_x(t3_window_t *win)
Get a t3_window_t's absolute horizontal position.
Definition: window.c:473
void t3_win_clrtoeol(t3_window_t *win)
Clear current t3_window_t painting line to end.
Definition: window_paint.c:918
int t3_win_addch(t3_window_t *win, char c, t3_attr_t attr)
Add a single character to a t3_window_t with specified attributes.
Definition: window_paint.c:665
void t3_win_set_depth(t3_window_t *win, int depth)
Change the depth of a t3_window_t.
Definition: window.c:254
t3_bool t3_win_resize(t3_window_t *win, int height, int width)
Change a t3_window_t's size.
Definition: window.c:354
An opaque struct representing a window which can be shown on the terminal.
Definition: internal.h:47
int t3_win_get_height(t3_window_t *win)
Get a t3_window_t's height.
Definition: window.c:424
void t3_win_del(t3_window_t *win)
Discard a t3_window_t.
Definition: window.c:325
t3_win_anchor_t
Anchor points for defining relations between the positions of two windows.
Definition: window.h:43
void t3_win_clrtobot(t3_window_t *win)
Clear current t3_window_t painting line to end and all subsequent lines fully.
Definition: window_paint.c:996
void t3_win_set_cursor(t3_window_t *win, int y, int x)
Position the cursor relative to a t3_window_t.
Definition: window.c:592
int t3_win_addnstr(t3_window_t *win, const char *str, size_t n, t3_attr_t attr)
Add a string with explicitly specified size to a t3_window_t with specified attributes.
Definition: window_paint.c:604
void t3_win_move(t3_window_t *win, int y, int x)
Change a t3_window_t's position.
Definition: window.c:413
t3_bool t3_win_set_anchor(t3_window_t *win, t3_window_t *anchor, int relation)
Link a t3_window_t's position to the position of another t3_window_t.
Definition: window.c:222
void t3_win_hide(t3_window_t *win)
Make a t3_window_t invisible.
Definition: window.c:609
int t3_win_get_x(t3_window_t *win)
Get a t3_window_t's horizontal position.
Definition: window.c:433
int t3_win_addchrep(t3_window_t *win, char c, t3_attr_t attr, int rep)
Add a character to a t3_window_t with specified attributes and repetition.
Definition: window_paint.c:711
int t3_win_get_depth(t3_window_t *win)
Get a t3_window_t's depth.
Definition: window.c:448
t3_bool t3_win_set_parent(t3_window_t *win, t3_window_t *parent)
Change a t3_window_t's parent.
Definition: window.c:192
t3_window_t * t3_win_at_location(int search_y, int search_x)
Find the top-most window at a location.
Definition: window_paint.c:1012
t3_window_t * t3_win_get_parent(t3_window_t *win)
Get a t3_window_t's parent window.
Definition: window.c:468
t3_bool t3_win_set_restrict(t3_window_t *win, t3_window_t *restrict)
Set the restrictw window.
Definition: window.c:293
int t3_win_box(t3_window_t *win, int y, int x, int height, int width, t3_attr_t attr)
Draw a box on a t3_window_t.
Definition: window_paint.c:969
int t3_win_get_relation(t3_window_t *win, t3_window_t **anchor)
Get a t3_window_t's relative positioning information.
Definition: window.c:461
t3_window_t * t3_win_new(t3_window_t *parent, int height, int width, int y, int x, int depth)
Create a new t3_window_t.
Definition: window.c:122
int t3_win_get_y(t3_window_t *win)
Get a t3_window_t's vertical position.
Definition: window.c:443
void t3_win_set_default_attrs(t3_window_t *win, t3_attr_t attr)
Set default attributes for a window.
Definition: window.c:279
void t3_win_set_paint(t3_window_t *win, int y, int x)
Change the position where characters are written to the t3_window_t.
Definition: window.c:598
long t3_attr_t
Type to hold attributes used for terminal display.
Definition: terminal.h:63