hide <ncursesw/ncurses.h> behind ncrswrap.*

isolate ct_dims implementation to dims.*
This commit is contained in:
Emile Clark-Boman 2025-09-13 12:44:58 +10:00
parent 1dd5dd79c8
commit b04f0b4aa3
8 changed files with 142 additions and 113 deletions

View file

@ -1,9 +1,11 @@
#ifndef CURSETREE_NODE_H
#define CURSETREE_NODE_H
#ifndef __NCURSES_H
#include "dims.h"
# ifndef __NCURSES_H
typedef struct _win_st WINDOW;
#endif /* __NCURSES_H */
# endif /* __NCURSES_H */
#define NODE_CHILD_N 2
@ -20,18 +22,6 @@ enum ct_nodetype {
NODE_ABSTRACT,
};
/* Stores a node's starting x,y coordinates, width, & height.
* NOTE: Intended for interfunction communication.
*/
struct ct_dims {
int x, y, width, height;
};
enum ct_axis {
AXIS_X,
AXIS_Y,
};
struct ct_node {
enum ct_nodetype type;
// union value depends on ct_node.type