rename crs_* types to ct_*
This commit is contained in:
parent
2d76f8221e
commit
1dd5dd79c8
6 changed files with 75 additions and 75 deletions
|
|
@ -9,13 +9,13 @@ typedef struct _win_st WINDOW;
|
|||
|
||||
/* MACRO:
|
||||
* Get widnow node start x,y coordinates, width, & height.
|
||||
* void NODEDIMS(struct crs_node *node, struct crs_nodedims dims);
|
||||
* void NODEDIMS(struct ct_node *node, struct ct_dims dims);
|
||||
*/
|
||||
#define GET_WNODEDIMS(dims, node) \
|
||||
(getbegyx((node)->win, dims.y, dims.x)); \
|
||||
getmaxyx((node)->win, dims.y, dims.x)
|
||||
|
||||
enum crs_nodetype {
|
||||
enum ct_nodetype {
|
||||
NODE_WINDOW,
|
||||
NODE_ABSTRACT,
|
||||
};
|
||||
|
|
@ -23,37 +23,37 @@ enum crs_nodetype {
|
|||
/* Stores a node's starting x,y coordinates, width, & height.
|
||||
* NOTE: Intended for interfunction communication.
|
||||
*/
|
||||
struct crs_nodedims {
|
||||
struct ct_dims {
|
||||
int x, y, width, height;
|
||||
};
|
||||
|
||||
enum crs_axis {
|
||||
enum ct_axis {
|
||||
AXIS_X,
|
||||
AXIS_Y,
|
||||
};
|
||||
|
||||
struct crs_node {
|
||||
enum crs_nodetype type;
|
||||
// union value depends on crs_node.type
|
||||
struct ct_node {
|
||||
enum ct_nodetype type;
|
||||
// union value depends on ct_node.type
|
||||
union {
|
||||
WINDOW *win;
|
||||
struct {
|
||||
enum crs_axis axis;
|
||||
enum ct_axis axis;
|
||||
float ratio;
|
||||
struct crs_nodedims *dims;
|
||||
struct crs_node *child[NODE_CHILD_N];
|
||||
struct ct_dims *dims;
|
||||
struct ct_node *child[NODE_CHILD_N];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/* === External Interface === */
|
||||
struct crs_node *init_window_node(WINDOW *const win);
|
||||
void destroy_node(struct crs_node *const node);
|
||||
void resize_node(struct crs_node *const node,
|
||||
struct crs_nodedims *const new_dims);
|
||||
struct ct_node *init_window_node(WINDOW *const win);
|
||||
void destroy_node(struct ct_node *const node);
|
||||
void resize_node(struct ct_node *const node,
|
||||
struct ct_dims *const new_dims);
|
||||
|
||||
void bifurcate_window_node(struct crs_node **const node,
|
||||
const enum crs_axis axis, const int invert_axis,
|
||||
void bifurcate_window_node(struct ct_node **const node,
|
||||
const enum ct_axis axis, const int invert_axis,
|
||||
const float ratio);
|
||||
|
||||
#endif /* CURSETREE_NODE_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue