diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-30 00:02:29 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-03-30 00:04:04 -0400 |
commit | f26ecd9f58bb672fe107660ce9b37f4bf0777a8c (patch) | |
tree | 997658454de40db3f8b76b68d658efaf2b686188 /sway/ipc-json.c | |
parent | Early return from render functions if necessary (diff) | |
parent | Merge pull request #1654 from acrisci/refactor-2-electric-boogaloo (diff) | |
download | sway-f26ecd9f58bb672fe107660ce9b37f4bf0777a8c.tar.gz sway-f26ecd9f58bb672fe107660ce9b37f4bf0777a8c.tar.zst sway-f26ecd9f58bb672fe107660ce9b37f4bf0777a8c.zip |
Merge remote-tracking branch 'origin/wlroots' into swaybar-layers
Diffstat (limited to 'sway/ipc-json.c')
-rw-r--r-- | sway/ipc-json.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 24e41581..eab6399f 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c | |||
@@ -3,7 +3,7 @@ | |||
3 | #include <ctype.h> | 3 | #include <ctype.h> |
4 | #include "log.h" | 4 | #include "log.h" |
5 | #include "sway/ipc-json.h" | 5 | #include "sway/ipc-json.h" |
6 | #include "sway/container.h" | 6 | #include "sway/tree/container.h" |
7 | #include "sway/output.h" | 7 | #include "sway/output.h" |
8 | #include "sway/input/input-manager.h" | 8 | #include "sway/input/input-manager.h" |
9 | #include "sway/input/seat.h" | 9 | #include "sway/input/seat.h" |
@@ -26,7 +26,7 @@ json_object *ipc_json_get_version() { | |||
26 | return version; | 26 | return version; |
27 | } | 27 | } |
28 | 28 | ||
29 | static json_object *ipc_json_create_rect(swayc_t *c) { | 29 | static json_object *ipc_json_create_rect(struct sway_container *c) { |
30 | json_object *rect = json_object_new_object(); | 30 | json_object *rect = json_object_new_object(); |
31 | 31 | ||
32 | json_object_object_add(rect, "x", json_object_new_int((int32_t)c->x)); | 32 | json_object_object_add(rect, "x", json_object_new_int((int32_t)c->x)); |
@@ -37,7 +37,7 @@ static json_object *ipc_json_create_rect(swayc_t *c) { | |||
37 | return rect; | 37 | return rect; |
38 | } | 38 | } |
39 | 39 | ||
40 | static void ipc_json_describe_root(swayc_t *root, json_object *object) { | 40 | static void ipc_json_describe_root(struct sway_container *root, json_object *object) { |
41 | json_object_object_add(object, "type", json_object_new_string("root")); | 41 | json_object_object_add(object, "type", json_object_new_string("root")); |
42 | json_object_object_add(object, "layout", json_object_new_string("splith")); | 42 | json_object_object_add(object, "layout", json_object_new_string("splith")); |
43 | } | 43 | } |
@@ -64,7 +64,7 @@ static const char *ipc_json_get_output_transform(enum wl_output_transform transf | |||
64 | return NULL; | 64 | return NULL; |
65 | } | 65 | } |
66 | 66 | ||
67 | static void ipc_json_describe_output(swayc_t *container, json_object *object) { | 67 | static void ipc_json_describe_output(struct sway_container *container, json_object *object) { |
68 | struct wlr_output *wlr_output = container->sway_output->wlr_output; | 68 | struct wlr_output *wlr_output = container->sway_output->wlr_output; |
69 | json_object_object_add(object, "type", json_object_new_string("output")); | 69 | json_object_object_add(object, "type", json_object_new_string("output")); |
70 | json_object_object_add(object, "active", json_object_new_boolean(true)); | 70 | json_object_object_add(object, "active", json_object_new_boolean(true)); |
@@ -95,7 +95,7 @@ static void ipc_json_describe_output(swayc_t *container, json_object *object) { | |||
95 | json_object_object_add(object, "modes", modes_array); | 95 | json_object_object_add(object, "modes", modes_array); |
96 | } | 96 | } |
97 | 97 | ||
98 | static void ipc_json_describe_workspace(swayc_t *workspace, json_object *object) { | 98 | static void ipc_json_describe_workspace(struct sway_container *workspace, json_object *object) { |
99 | int num = (isdigit(workspace->name[0])) ? atoi(workspace->name) : -1; | 99 | int num = (isdigit(workspace->name[0])) ? atoi(workspace->name) : -1; |
100 | 100 | ||
101 | json_object_object_add(object, "num", json_object_new_int(num)); | 101 | json_object_object_add(object, "num", json_object_new_int(num)); |
@@ -103,11 +103,11 @@ static void ipc_json_describe_workspace(swayc_t *workspace, json_object *object) | |||
103 | json_object_object_add(object, "type", json_object_new_string("workspace")); | 103 | json_object_object_add(object, "type", json_object_new_string("workspace")); |
104 | } | 104 | } |
105 | 105 | ||
106 | static void ipc_json_describe_view(swayc_t *c, json_object *object) { | 106 | static void ipc_json_describe_view(struct sway_container *c, json_object *object) { |
107 | json_object_object_add(object, "name", (c->name) ? json_object_new_string(c->name) : NULL); | 107 | json_object_object_add(object, "name", (c->name) ? json_object_new_string(c->name) : NULL); |
108 | } | 108 | } |
109 | 109 | ||
110 | json_object *ipc_json_describe_container(swayc_t *c) { | 110 | json_object *ipc_json_describe_container(struct sway_container *c) { |
111 | if (!(sway_assert(c, "Container must not be null."))) { | 111 | if (!(sway_assert(c, "Container must not be null."))) { |
112 | return NULL; | 112 | return NULL; |
113 | } | 113 | } |
@@ -148,7 +148,7 @@ json_object *ipc_json_describe_container(swayc_t *c) { | |||
148 | return object; | 148 | return object; |
149 | } | 149 | } |
150 | 150 | ||
151 | json_object *ipc_json_describe_container_recursive(swayc_t *c) { | 151 | json_object *ipc_json_describe_container_recursive(struct sway_container *c) { |
152 | json_object *object = ipc_json_describe_container(c); | 152 | json_object *object = ipc_json_describe_container(c); |
153 | int i; | 153 | int i; |
154 | 154 | ||