aboutsummaryrefslogtreecommitdiff
path: root/connection.h
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2023-11-17 15:07:14 +0100
committerFederico Angelilli <code@fedang.net>2023-11-17 15:07:14 +0100
commitf8363e89257e8b0a4ff71accbd7b6be22935274f (patch)
tree62e6b17d11b174f6683bf090ed678dddd7a263d4 /connection.h
parent41729222431449a81535b28ad27ce2620cb5819b (diff)
Attach state to the event loop
Diffstat (limited to 'connection.h')
-rw-r--r--connection.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/connection.h b/connection.h
index b187b7a..21cbf3f 100644
--- a/connection.h
+++ b/connection.h
@@ -8,6 +8,9 @@
#include <xcb/xcb_errors.h>
#include <xcb/randr.h>
+// Forward declaration
+typedef struct State State;
+
typedef struct Connection Connection;
// TODO: Make this opaque
@@ -22,10 +25,15 @@ struct Connection {
xcb_errors_context_t *errors;
xcb_ewmh_connection_t ewmh;
GSource *source;
+ GPtrArray *states;
};
Connection *connection_create();
+void connection_attach_source(Connection *con);
+
+void connection_attach_state(Connection *con, State *state);
+
void connection_destroy(Connection *con);
#endif