summaryrefslogtreecommitdiffstats
path: root/include/container.h
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-08-18 07:19:20 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-08-18 07:20:34 -0400
commit2139001c9f61a84ed1ac581a54bb2bde68928afd (patch)
treea6efb486fdb71675775253d79e9550b5fc1d2f67 /include/container.h
parentfixed floating window crashing bug (diff)
downloadsway-2139001c9f61a84ed1ac581a54bb2bde68928afd.tar.gz
sway-2139001c9f61a84ed1ac581a54bb2bde68928afd.tar.zst
sway-2139001c9f61a84ed1ac581a54bb2bde68928afd.zip
Coding style enforcement
This was done by hand, so I might have missed things. If anyone knows of a good C style enforcement tool, let me know.
Diffstat (limited to 'include/container.h')
-rw-r--r--include/container.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/include/container.h b/include/container.h
index 5f386368..186ee8b6 100644
--- a/include/container.h
+++ b/include/container.h
@@ -30,7 +30,6 @@ struct sway_container {
30 wlc_handle handle; 30 wlc_handle handle;
31 31
32 enum swayc_types type; 32 enum swayc_types type;
33
34 enum swayc_layouts layout; 33 enum swayc_layouts layout;
35 34
36 // Not including borders or margins 35 // Not including borders or margins
@@ -42,9 +41,7 @@ struct sway_container {
42 int x, y; 41 int x, y;
43 42
44 bool visible; 43 bool visible;
45
46 bool is_floating; 44 bool is_floating;
47
48 bool is_focused; 45 bool is_focused;
49 46
50 int weight; 47 int weight;
@@ -52,8 +49,6 @@ struct sway_container {
52 char *name; 49 char *name;
53 50
54 list_t *children; 51 list_t *children;
55
56 // Special list for floating windows in workspaces
57 list_t *floating; 52 list_t *floating;
58 53
59 struct sway_container *parent; 54 struct sway_container *parent;
@@ -62,17 +57,17 @@ struct sway_container {
62 57
63 58
64swayc_t *new_output(wlc_handle handle); 59swayc_t *new_output(wlc_handle handle);
65swayc_t *new_workspace(swayc_t * output, const char *name); 60swayc_t *new_workspace(swayc_t *output, const char *name);
66//Creates container Around child (parent child) -> (parent (container child)) 61// Creates container Around child (parent child) -> (parent (container child))
67swayc_t *new_container(swayc_t *child, enum swayc_layouts layout); 62swayc_t *new_container(swayc_t *child, enum swayc_layouts layout);
68//Creates view as a sibling of current focused container, or as child of a workspace 63// Creates view as a sibling of current focused container, or as child of a workspace
69swayc_t *new_view(swayc_t *sibling, wlc_handle handle); 64swayc_t *new_view(swayc_t *sibling, wlc_handle handle);
70//Creates view as a new floating view which is in the active workspace 65// Creates view as a new floating view which is in the active workspace
71swayc_t *new_floating_view(wlc_handle handle); 66swayc_t *new_floating_view(wlc_handle handle);
72 67
73 68
74swayc_t *destroy_output(swayc_t *output); 69swayc_t *destroy_output(swayc_t *output);
75//destroys workspace if empty and returns parent pointer, else returns NULL 70// Destroys workspace if empty and returns parent pointer, else returns NULL
76swayc_t *destroy_workspace(swayc_t *workspace); 71swayc_t *destroy_workspace(swayc_t *workspace);
77swayc_t *destroy_container(swayc_t *container); 72swayc_t *destroy_container(swayc_t *container);
78swayc_t *destroy_view(swayc_t *view); 73swayc_t *destroy_view(swayc_t *view);
@@ -80,7 +75,7 @@ swayc_t *destroy_view(swayc_t *view);
80swayc_t *find_container(swayc_t *container, bool (*test)(swayc_t *view, void *data), void *data); 75swayc_t *find_container(swayc_t *container, bool (*test)(swayc_t *view, void *data), void *data);
81void container_map(swayc_t *, void (*f)(swayc_t *, void *), void *); 76void container_map(swayc_t *, void (*f)(swayc_t *, void *), void *);
82 77
83//Mappings 78// Mappings
84void set_view_visibility(swayc_t *view, void *data); 79void set_view_visibility(swayc_t *view, void *data);
85 80
86#endif 81#endif