23 lines
613 B
C
23 lines
613 B
C
#ifndef CURSETREE_DIMS_H
|
|
#define CURSETREE_DIMS_H
|
|
|
|
enum ct_axis {
|
|
AXIS_X,
|
|
AXIS_Y,
|
|
};
|
|
|
|
/* Stores a node's starting x,y coordinates, width, & height.
|
|
* NOTE: Intended for interfunction communication.
|
|
*/
|
|
struct ct_dims {
|
|
int x, y, width, height;
|
|
};
|
|
|
|
struct ct_dims *new_dims(int x, int y, int width, int height);
|
|
struct ct_dims *dup_dims(const struct ct_dims *const dims);
|
|
|
|
int bifurcate_dims(const struct ct_dims *const parent_dims,
|
|
const enum ct_axis axis, const float ratio,
|
|
struct ct_dims **const dims0, struct ct_dims **const dims1);
|
|
|
|
#endif /* CURSETREE_DIMS_H */
|