]> git.sur5r.net Git - i3/i3/blob - include/i3/ipc.h
Merge branch 'master' into next
[i3/i3] / include / i3 / ipc.h
1 /*
2  * vim:ts=8:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  *
6  * © 2009-2010 Michael Stapelberg and contributors
7  *
8  * See file LICENSE for license information.
9  *
10  * This public header defines the different constants and message types to use
11  * for the IPC interface to i3 (see docs/ipc for more information).
12  *
13  */
14
15 #ifndef _I3_IPC_H
16 #define _I3_IPC_H
17
18 /*
19  * Messages from clients to i3
20  *
21  */
22
23 /** Never change this, only on major IPC breakage (don’t do that) */
24 #define I3_IPC_MAGIC                    "i3-ipc"
25
26 /** The payload of the message will be interpreted as a command */
27 #define I3_IPC_MESSAGE_TYPE_COMMAND             0
28
29 /** Requests the current workspaces from i3 */
30 #define I3_IPC_MESSAGE_TYPE_GET_WORKSPACES      1
31
32 /** Subscribe to the specified events */
33 #define I3_IPC_MESSAGE_TYPE_SUBSCRIBE           2
34
35 /** Requests the current outputs from i3 */
36 #define I3_IPC_MESSAGE_TYPE_GET_OUTPUTS         3
37
38 /** Requests the tree layout from i3 */
39 #define I3_IPC_MESSAGE_TYPE_GET_TREE            4
40
41 /** Request the current defined marks from i3 */
42 #define I3_IPC_MESSAGE_TYPE_GET_MARKS           5
43
44 /*
45  * Messages from i3 to clients
46  *
47  */
48
49 /** Command reply type */
50 #define I3_IPC_REPLY_TYPE_COMMAND               0
51
52 /** Workspaces reply type */
53 #define I3_IPC_REPLY_TYPE_WORKSPACES            1
54
55 /** Subscription reply type */
56 #define I3_IPC_REPLY_TYPE_SUBSCRIBE             2
57
58 /** Outputs reply type */
59 #define I3_IPC_REPLY_TYPE_OUTPUTS               3
60
61 /** Tree reply type */
62 #define I3_IPC_REPLY_TYPE_TREE                  4
63
64 /** Marks reply type*/
65 #define I3_IPC_REPLY_TYPE_MARKS                 5
66
67 /*
68  * Events from i3 to clients. Events have the first bit set high.
69  *
70  */
71 #define I3_IPC_EVENT_MASK                       (1 << 31)
72
73 /* The workspace event will be triggered upon changes in the workspace list */
74 #define I3_IPC_EVENT_WORKSPACE                  (I3_IPC_EVENT_MASK | 0)
75
76 /* The output event will be triggered upon changes in the output list */
77 #define I3_IPC_EVENT_OUTPUT                     (I3_IPC_EVENT_MASK | 1)
78
79 #endif