]> git.sur5r.net Git - i3/i3/blob - i3bar/include/ipc.h
Use #pragma once
[i3/i3] / i3bar / include / ipc.h
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3bar - an xcb-based status- and ws-bar for i3
5  * © 2010-2012 Axel Wagner and contributors (see also: LICENSE)
6  *
7  * ipc.c: Communicating with i3
8  *
9  */
10 #pragma once
11
12 #include <stdint.h>
13
14 /*
15  * Initiate a connection to i3.
16  * socket-path must be a valid path to the ipc_socket of i3
17  *
18  */
19 int init_connection(const char *socket_path);
20
21 /*
22  * Destroy the connection to i3.
23  *
24  */
25 void destroy_connection(void);
26
27 /*
28  * Sends a Message to i3.
29  * type must be a valid I3_IPC_MESSAGE_TYPE (see i3/ipc.h for further information)
30  *
31  */
32 int i3_send_msg(uint32_t type, const char* payload);
33
34 /*
35  * Subscribe to all the i3-events, we need
36  *
37  */
38 void subscribe_events(void);