]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/include/ipc.h
Merge branch 'release-4.16.1'
[i3/i3] / i3bar / include / ipc.h
index 45565618bec029f4852a5259d82da82abfb40e57..5056e5f37454f2c909422f04320d013f7bc3b5f8 100644 (file)
@@ -1,14 +1,40 @@
-#ifndef IPC_H_
-#define IPC_H_
+/*
+ * vim:ts=4:sw=4:expandtab
+ *
+ * i3bar - an xcb-based status- and ws-bar for i3
+ * © 2010 Axel Wagner and contributors (see also: LICENSE)
+ *
+ * ipc.c: Communicating with i3
+ *
+ */
+#pragma once
 
-#include <ev.h>
+#include <config.h>
 
-ev_io* i3_events;
-ev_io* outputs_watcher;
-ev_io* workspaces_watcher;
+#include <stdint.h>
 
-void init_i3(const char* socket_path);
-void get_outputs_json(void (*callback)(char*, void*), void* params);
-void get_workspaces_json(void (*callback)(char*, void*), void* params);
+/*
+ * Initiate a connection to i3.
+ * socket_path must be a valid path to the ipc_socket of i3
+ *
+ */
+int init_connection(const char *socket_path);
 
-#endif
+/*
+ * Destroy the connection to i3.
+ *
+ */
+void destroy_connection(void);
+
+/*
+ * Sends a message to i3.
+ * type must be a valid I3_IPC_MESSAGE_TYPE (see i3/ipc.h for further information)
+ *
+ */
+int i3_send_msg(uint32_t type, const char *payload);
+
+/*
+ * Subscribe to all the i3-events, we need
+ *
+ */
+void subscribe_events(void);