i3
load_layout.h
Go to the documentation of this file.
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  * © 2009-2014 Michael Stapelberg and contributors (see also: LICENSE)
6  *
7  * load_layout.c: Restore (parts of) the layout, for example after an inplace
8  * restart.
9  *
10  */
11 #pragma once
12 
13 typedef enum {
14  // We could not determine the content of the JSON file. This typically
15  // means it’s unreadable or contains garbage.
17 
18  // The JSON file contains a “normal” container, i.e. a container to be
19  // appended to an existing workspace (or split container!).
21 
22  // The JSON file contains a workspace container, which needs to be appended
23  // to the output (next to the other workspaces) with special care to avoid
24  // naming conflicts and ensuring that the workspace _has_ a name.
27 
28 /* Parses the given JSON file until it encounters the first “type” property to
29  * determine whether the file contains workspaces or regular containers, which
30  * is important to know when deciding where (and how) to append the contents.
31  * */
32 json_content_t json_determine_content(const char *filename);
33 
34 void tree_append_json(Con *con, const char *filename, char **errormsg);
json_content_t
Definition: load_layout.h:13
A 'Con' represents everything from the X11 root window down to a single X11 window.
Definition: data.h:496
json_content_t json_determine_content(const char *filename)
Definition: load_layout.c:454
void tree_append_json(Con *con, const char *filename, char **errormsg)
Definition: load_layout.c:511