From 6686a58ae125b56a0bf016fcccd6f9a8441fb1d1 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Sun, 21 Nov 2021 01:22:36 +0500 Subject: [PATCH] Organize "src/state.h" --- src/state.h | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/state.h b/src/state.h index ae5f6b7..1a9a222 100644 --- a/src/state.h +++ b/src/state.h @@ -4,25 +4,40 @@ #include #include -typedef struct BasicGeometry { - int x, y, w, h; -} *BasicGeometry; +/***************** + * Pointer types * + *****************/ -typedef struct ClientGeometry { +typedef struct BasicGeometry *BasicGeometry; +typedef struct ClientGeometry *ClientGeometry; +typedef struct ClientSizeHints *ClientSizeHints; +typedef struct ClientState *ClientState; + +/************** + * Structures * + **************/ + +struct BasicGeometry { int x, y, w, h; }; + +struct ClientGeometry { struct BasicGeometry basic; int bw; -} *ClientGeometry; +}; -typedef struct ClientSizeHints { +struct ClientSizeHints { float mina, maxa; int basew, baseh, incw, inch, maxw, maxh, minw, minh; -} *ClientSizeHints; +}; -typedef struct ClientState { +struct ClientState { char name[256]; struct ClientGeometry geometry; bool is_fixed, is_floating, is_urgent, never_focus, is_fullscreen; -} *ClientState; +}; + +/************* + * Functions * + *************/ void basic_geometry_init(BasicGeometry basic_geometry); void client_geometry_init(ClientGeometry client_geometry);