#pragma once #include #include #include #include #include "base.h" #include "color.h" typedef struct client_t client_t; typedef struct monitor_t monitor_t; typedef struct tag_t tag_t; typedef struct task_in_tag_t task_in_tag_t; struct client_t { client_t *stack_next; client_t *next; tag_t *tag; area_t geometry; color_t border_color; uint16_t border_width; bool floating; bool fullscreen; bool maximize; bool minimize; bool sticky; char *name; char *class; char *instance; xcb_window_t transient_for_window; xcb_window_t frame_window; xcb_window_t window; }; struct monitor_t { monitor_t *next; area_t geometry; area_t workarea; tag_t *tag_list; tag_t *selected_tag; xcb_window_t bar_window; }; struct tag_t { uint32_t index; /* index in all tags */ uint32_t mask; extent_in_bar_t bar_extent; tag_t *next; char *name; monitor_t *monitor; task_in_tag_t *task_list; }; struct task_in_tag_t { client_t *client; task_in_tag_t *next; area_t geometry; extent_in_bar_t bar_extent; }; typedef struct global_state_t { bool need_restart; GMainLoop *loop; client_t *client_list; client_t *client_stack_list; client_t *client_focused; monitor_t *monitor_list; monitor_t *current_monitor; xcb_connection_t *xcb_conn; xcb_screen_t *screen; int default_screen; bool have_xfixes; bool have_xinerama; bool have_randr; } global_state_t; extern global_state_t global_state;