From dc8c9fbeb664518c76066cc28ee29452c6c30128 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Thu, 29 Mar 2018 23:41:33 -0400 Subject: Revert "Merge pull request #1653 from swaywm/revert-1647-refactor-tree" This reverts commit 472e81f35d689d67cda241acafda91c688d61046, reversing changes made to 6b7841b11ff4cd35f54d69dc92029855893e5ce0. --- sway/ipc-json.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sway/ipc-json.c') diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 977f1ecb..7caa2457 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c @@ -3,7 +3,7 @@ #include #include "log.h" #include "sway/ipc-json.h" -#include "sway/container.h" +#include "sway/tree/container.h" #include "sway/output.h" #include "sway/input/input-manager.h" #include "sway/input/seat.h" @@ -25,7 +25,7 @@ json_object *ipc_json_get_version() { return version; } -static json_object *ipc_json_create_rect(swayc_t *c) { +static json_object *ipc_json_create_rect(struct sway_container *c) { json_object *rect = json_object_new_object(); json_object_object_add(rect, "x", json_object_new_int((int32_t)c->x)); @@ -36,7 +36,7 @@ static json_object *ipc_json_create_rect(swayc_t *c) { return rect; } -static void ipc_json_describe_root(swayc_t *root, json_object *object) { +static void ipc_json_describe_root(struct sway_container *root, json_object *object) { json_object_object_add(object, "type", json_object_new_string("root")); json_object_object_add(object, "layout", json_object_new_string("splith")); } @@ -63,7 +63,7 @@ static const char *ipc_json_get_output_transform(enum wl_output_transform transf return NULL; } -static void ipc_json_describe_output(swayc_t *container, json_object *object) { +static void ipc_json_describe_output(struct sway_container *container, json_object *object) { struct wlr_output *wlr_output = container->sway_output->wlr_output; json_object_object_add(object, "type", json_object_new_string("output")); json_object_object_add(object, "active", json_object_new_boolean(true)); @@ -94,7 +94,7 @@ static void ipc_json_describe_output(swayc_t *container, json_object *object) { json_object_object_add(object, "modes", modes_array); } -static void ipc_json_describe_workspace(swayc_t *workspace, json_object *object) { +static void ipc_json_describe_workspace(struct sway_container *workspace, json_object *object) { int num = (isdigit(workspace->name[0])) ? atoi(workspace->name) : -1; json_object_object_add(object, "num", json_object_new_int(num)); @@ -102,11 +102,11 @@ static void ipc_json_describe_workspace(swayc_t *workspace, json_object *object) json_object_object_add(object, "type", json_object_new_string("workspace")); } -static void ipc_json_describe_view(swayc_t *c, json_object *object) { +static void ipc_json_describe_view(struct sway_container *c, json_object *object) { json_object_object_add(object, "name", (c->name) ? json_object_new_string(c->name) : NULL); } -json_object *ipc_json_describe_container(swayc_t *c) { +json_object *ipc_json_describe_container(struct sway_container *c) { if (!(sway_assert(c, "Container must not be null."))) { return NULL; } @@ -147,7 +147,7 @@ json_object *ipc_json_describe_container(swayc_t *c) { return object; } -json_object *ipc_json_describe_container_recursive(swayc_t *c) { +json_object *ipc_json_describe_container_recursive(struct sway_container *c) { json_object *object = ipc_json_describe_container(c); int i; -- cgit v1.2.3