From ab92cac18652f72be12f68b5a96095ba8eb5afdf Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Fri, 17 Nov 2023 15:42:49 +0100 Subject: Reorganize project structure --- src/connect.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/connect.h (limited to 'src/connect.h') diff --git a/src/connect.h b/src/connect.h new file mode 100644 index 0000000..e348bcf --- /dev/null +++ b/src/connect.h @@ -0,0 +1,41 @@ +#ifndef COMET_CONNEC_H +#define COMET_CONNEC_H + +#include +#include +#include +#include +#include +#include + +// Forward declaration +typedef struct State State; + +typedef struct Connection Connection; + +// TODO: Make this opaque +struct Connection { + xcb_connection_t *connection; + xcb_screen_t *screen; + xcb_randr_screen_size_t *screen_size; + double screen_dpi; + int screen_depth; + xcb_visualtype_t *visual_type; + xcb_xrm_database_t *database; + xcb_errors_context_t *errors; + xcb_ewmh_connection_t ewmh; + GSource *source; + GPtrArray *states; +}; + +Connection *connect_create(); + +void connect_attach_source(Connection *con); + +void connect_attach_state(Connection *con, State *state); + +void connect_destroy(Connection *con); + +#endif + +// vim: ts=4 sw=4 et -- cgit v1.2.3