Codebase list i3-gaps / e3a1c5b
clang-format: use TypenameMacros This commit removes line breaks and extra empty lines introduced in commit fff3f79da9a87a1f790c6328f6615422f2b69b47. Albert Safin authored 4 years ago Orestis Floros committed 3 years ago
18 changed file(s) with 59 addition(s) and 131 deletion(s). Raw diff Collapse all Expand all
99 SpaceBeforeParens: ControlStatements
1010 SortIncludes: false
1111 ForEachMacros: [ TAILQ_FOREACH, TAILQ_FOREACH_REVERSE, SLIST_FOREACH, CIRCLEQ_FOREACH, CIRCLEQ_FOREACH_REVERSE, NODES_FOREACH, NODES_FOREACH_REVERSE, FOREACH_NONINTERNAL]
12 TypenameMacros: [ SLIST_HEAD, SLIST_ENTRY, LIST_HEAD, LIST_ENTRY, SIMPLEQ_HEAD, SIMPLEQ_ENTRY, TAILQ_HEAD, TAILQ_ENTRY, CIRCLEQ_HEAD, CIRCLEQ_ENTRY ]
7676 char *name;
7777 char *instance;
7878
79 TAILQ_ENTRY(status_block)
80 blocks;
79 TAILQ_ENTRY(status_block) blocks;
8180 };
8281
83 extern TAILQ_HEAD(statusline_head, status_block)
84 statusline_head;
82 extern TAILQ_HEAD(statusline_head, status_block) statusline_head;
8583
8684 #include "child.h"
8785 #include "ipc.h"
2828 char *command;
2929 bool release;
3030
31 TAILQ_ENTRY(binding_t)
32 bindings;
31 TAILQ_ENTRY(binding_t) bindings;
3332 } binding_t;
3433
3534 typedef struct tray_output_t {
3635 char *output;
3736
38 TAILQ_ENTRY(tray_output_t)
39 tray_outputs;
37 TAILQ_ENTRY(tray_output_t) tray_outputs;
4038 } tray_output_t;
4139
4240 typedef struct config_t {
4341 uint32_t modifier;
44
45 TAILQ_HEAD(bindings_head, binding_t)
46 bindings;
47
42 TAILQ_HEAD(bindings_head, binding_t) bindings;
4843 position_t position;
4944 bool verbose;
5045 bool transparency;
5853 char *command;
5954 char *fontname;
6055 i3String *separator_symbol;
61
62 TAILQ_HEAD(tray_outputs_head, tray_output_t)
63 tray_outputs;
64
56 TAILQ_HEAD(tray_outputs_head, tray_output_t) tray_outputs;
6557 int tray_padding;
6658 int num_outputs;
6759 char **outputs;
7272 struct ws_head* workspaces; /* The workspaces on this output */
7373 struct tc_head* trayclients; /* The tray clients on this output */
7474
75 SLIST_ENTRY(i3_output)
76 slist; /* Pointer for the SLIST-Macro */
75 SLIST_ENTRY(i3_output) slist; /* Pointer for the SLIST-Macro */
7776 };
2020 char *class_class;
2121 char *class_instance;
2222
23 TAILQ_ENTRY(trayclient)
24 tailq; /* Pointer for the TAILQ-Macro */
23 TAILQ_ENTRY(trayclient) tailq; /* Pointer for the TAILQ-Macro */
2524 };
4040 rect rect; /* The rect of the ws (not used (yet)) */
4141 struct i3_output *output; /* The current output of the ws */
4242
43 TAILQ_ENTRY(i3_ws)
44 tailq; /* Pointer for the TAILQ-Macro */
43 TAILQ_ENTRY(i3_ws) tailq; /* Pointer for the TAILQ-Macro */
4544 };
6565 char *value;
6666 char *next_match;
6767
68 SLIST_ENTRY(Variable)
69 variables;
68 SLIST_ENTRY(Variable) variables;
7069 };
7170
7271 /**
8079 bool pango_markup;
8180 struct bindings_head *bindings;
8281
83 SLIST_ENTRY(Mode)
84 modes;
82 SLIST_ENTRY(Mode) modes;
8583 };
8684
8785 /**
271269 /* List of outputs on which the tray is allowed to be shown, in order.
272270 * The special value "none" disables it (per default, it will be shown) and
273271 * the special value "primary" enabled it on the primary output. */
274 TAILQ_HEAD(tray_outputs_head, tray_output_t)
275 tray_outputs;
272 TAILQ_HEAD(tray_outputs_head, tray_output_t) tray_outputs;
276273
277274 /* Padding around the tray icons. */
278275 int tray_padding;
294291 /** Bar modifier (to show bar when in hide mode). */
295292 uint32_t modifier;
296293
297 TAILQ_HEAD(bar_bindings_head, Barbinding)
298 bar_bindings;
294 TAILQ_HEAD(bar_bindings_head, Barbinding) bar_bindings;
299295
300296 /** Bar position (bottom by default). */
301297 enum { P_BOTTOM = 0,
369365 char *binding_mode_text;
370366 } colors;
371367
372 TAILQ_ENTRY(Barconfig)
373 configs;
368 TAILQ_ENTRY(Barconfig) configs;
374369 };
375370
376371 /**
388383 /** If true, the command will be executed after the button is released. */
389384 bool release;
390385
391 TAILQ_ENTRY(Barbinding)
392 bindings;
386 TAILQ_ENTRY(Barbinding) bindings;
393387 };
394388
395389 struct tray_output_t {
396390 char *output;
397391
398 TAILQ_ENTRY(tray_output_t)
399 tray_outputs;
392 TAILQ_ENTRY(tray_output_t) tray_outputs;
400393 };
401394
402395 typedef enum {
205205 char *name;
206206 char *output;
207207
208 TAILQ_ENTRY(Workspace_Assignment)
209 ws_assignments;
208 TAILQ_ENTRY(Workspace_Assignment) ws_assignments;
210209 };
211210
212211 struct Ignore_Event {
214213 int response_type;
215214 time_t added;
216215
217 SLIST_ENTRY(Ignore_Event)
218 ignore_events;
216 SLIST_ENTRY(Ignore_Event) ignore_events;
219217 };
220218
221219 /**
234232 * completed) */
235233 time_t delete_at;
236234
237 TAILQ_ENTRY(Startup_Sequence)
238 sequences;
235 TAILQ_ENTRY(Startup_Sequence) sequences;
239236 };
240237
241238 /**
261258 struct Binding_Keycode {
262259 xcb_keycode_t keycode;
263260 i3_event_state_mask_t modifiers;
264
265 TAILQ_ENTRY(Binding_Keycode)
266 keycodes;
261 TAILQ_ENTRY(Binding_Keycode) keycodes;
267262 };
268263
269264 /******************************************************************************
324319 /** Only in use if symbol != NULL. Contains keycodes which generate the
325320 * specified symbol. Useful for unbinding and checking which binding was
326321 * used when a key press event comes in. */
327 TAILQ_HEAD(keycodes_head, Binding_Keycode)
328 keycodes_head;
322 TAILQ_HEAD(keycodes_head, Binding_Keycode) keycodes_head;
329323
330324 /** Command, like in command mode */
331325 char *command;
332326
333 TAILQ_ENTRY(Binding)
334 bindings;
327 TAILQ_ENTRY(Binding) bindings;
335328 };
336329
337330 /**
347340 /** no_startup_id flag for start_application(). Determines whether a
348341 * startup notification context/ID should be created. */
349342 bool no_startup_id;
350
351 TAILQ_ENTRY(Autostart)
352 autostarts;
353
354 TAILQ_ENTRY(Autostart)
355 autostarts_always;
343 TAILQ_ENTRY(Autostart) autostarts;
344 TAILQ_ENTRY(Autostart) autostarts_always;
356345 };
357346
358347 struct output_name {
359348 char *name;
360
361 SLIST_ENTRY(output_name)
362 names;
349 SLIST_ENTRY(output_name) names;
363350 };
364351
365352 /**
386373 /** List of names for the output.
387374 * An output always has at least one name; the first name is
388375 * considered the primary one. */
389 SLIST_HEAD(names_head, output_name)
390 names_head;
376 SLIST_HEAD(names_head, output_name) names_head;
391377
392378 /** Pointer to the Con which represents this output */
393379 Con *con;
395381 /** x, y, width, height */
396382 Rect rect;
397383
398 TAILQ_ENTRY(xoutput)
399 outputs;
384 TAILQ_ENTRY(xoutput) outputs;
400385 };
401386
402387 /**
547532 M_ASSIGN_WS,
548533 M_BELOW } insert_where;
549534
550 TAILQ_ENTRY(Match)
551 matches;
535 TAILQ_ENTRY(Match) matches;
552536
553537 /* Whether this match was generated when restarting i3 inplace.
554538 * Leads to not setting focus when managing a new window, because the old
595579 char *output;
596580 } dest;
597581
598 TAILQ_ENTRY(Assignment)
599 assignments;
582 TAILQ_ENTRY(Assignment) assignments;
600583 };
601584
602585 /** Fullscreen modes. Used by Con.fullscreen_mode. */
607590 struct mark_t {
608591 char *name;
609592
610 TAILQ_ENTRY(mark_t)
611 marks;
593 TAILQ_ENTRY(mark_t) marks;
612594 };
613595
614596 /**
672654 char *sticky_group;
673655
674656 /* user-definable marks to jump to this container later */
675 TAILQ_HEAD(marks_head, mark_t)
676 marks_head;
657 TAILQ_HEAD(marks_head, mark_t) marks_head;
677658 /* cached to decide whether a redraw is needed */
678659 bool mark_changed;
679660
692673 struct deco_render_params *deco_render_params;
693674
694675 /* Only workspace-containers can have floating clients */
695 TAILQ_HEAD(floating_head, Con)
696 floating_head;
697
698 TAILQ_HEAD(nodes_head, Con)
699 nodes_head;
700
701 TAILQ_HEAD(focus_head, Con)
702 focus_head;
703
704 TAILQ_HEAD(swallow_head, Match)
705 swallow_head;
676 TAILQ_HEAD(floating_head, Con) floating_head;
677
678 TAILQ_HEAD(nodes_head, Con) nodes_head;
679 TAILQ_HEAD(focus_head, Con) focus_head;
680
681 TAILQ_HEAD(swallow_head, Match) swallow_head;
706682
707683 fullscreen_mode_t fullscreen_mode;
708684
740716 FLOATING_USER_ON = 3
741717 } floating;
742718
743 TAILQ_ENTRY(Con)
744 nodes;
745
746 TAILQ_ENTRY(Con)
747 focused;
748
749 TAILQ_ENTRY(Con)
750 all_cons;
751
752 TAILQ_ENTRY(Con)
753 floating_windows;
719 TAILQ_ENTRY(Con) nodes;
720 TAILQ_ENTRY(Con) focused;
721 TAILQ_ENTRY(Con) all_cons;
722 TAILQ_ENTRY(Con) floating_windows;
754723
755724 /** callbacks */
756725 void (*on_remove_child)(Con *);
5656 extern char **start_argv;
5757 extern Display *xlibdpy, *xkbdpy;
5858 extern int xkb_current_group;
59 extern TAILQ_HEAD(bindings_head, Binding) * bindings;
59 extern TAILQ_HEAD(bindings_head, Binding) *bindings;
6060 extern const char *current_binding_mode;
6161 extern TAILQ_HEAD(autostarts_head, Autostart) autostarts;
6262 extern TAILQ_HEAD(autostarts_always_head, Autostart) autostarts_always;
3939 uint8_t *buffer;
4040 size_t buffer_size;
4141
42 TAILQ_ENTRY(ipc_client)
43 clients;
42 TAILQ_ENTRY(ipc_client) clients;
4443 } ipc_client;
4544
4645 /*
1414 char hex[8];
1515 uint32_t pixel;
1616
17 SLIST_ENTRY(Colorpixel)
18 colorpixels;
17 SLIST_ENTRY(Colorpixel) colorpixels;
1918 };
2019
21 SLIST_HEAD(colorpixel_head, Colorpixel)
22 colorpixels;
20 SLIST_HEAD(colorpixel_head, Colorpixel) colorpixels;
2321
2422 /*
2523 * Returns the colorpixel to use for the given hex color (think of HTML).
128128 */
129129 typedef struct owindow {
130130 Con *con;
131
132 TAILQ_ENTRY(owindow)
133 owindows;
131 TAILQ_ENTRY(owindow) owindows;
134132 } owindow;
135133
136134 typedef TAILQ_HEAD(owindows_head, owindow) owindows_head;
513513 struct bfs_entry {
514514 Con *con;
515515
516 TAILQ_ENTRY(bfs_entry)
517 entries;
516 TAILQ_ENTRY(bfs_entry) entries;
518517 };
519518
520519 /*
526525
527526 /* TODO: is breadth-first-search really appropriate? (check as soon as
528527 * fullscreen levels and fullscreen for containers is implemented) */
529 TAILQ_HEAD(bfs_head, bfs_entry)
530 bfs_head = TAILQ_HEAD_INITIALIZER(bfs_head);
531
528 TAILQ_HEAD(bfs_head, bfs_entry) bfs_head = TAILQ_HEAD_INITIALIZER(bfs_head);
532529 struct bfs_entry *entry = smalloc(sizeof(struct bfs_entry));
533530 entry->con = con;
534531 TAILQ_INSERT_TAIL(&bfs_head, entry, entries);
2424
2525 char *current_socketpath = NULL;
2626
27 TAILQ_HEAD(ipc_client_head, ipc_client)
28 all_clients = TAILQ_HEAD_INITIALIZER(all_clients);
27 TAILQ_HEAD(ipc_client_head, ipc_client) all_clients = TAILQ_HEAD_INITIALIZER(all_clients);
2928
3029 /*
3130 * Puts the given socket file descriptor into non-blocking mode or dies if
4343 * array. */
4444 struct focus_mapping {
4545 int old_id;
46
47 TAILQ_ENTRY(focus_mapping)
48 focus_mappings;
46 TAILQ_ENTRY(focus_mapping) focus_mappings;
4947 };
5048
5149 static TAILQ_HEAD(focus_mappings_head, focus_mapping) focus_mappings =
2828 /** The drawable surface */
2929 surface_t surface;
3030
31 TAILQ_ENTRY(placeholder_state)
32 state;
31 TAILQ_ENTRY(placeholder_state) state;
3332 } placeholder_state;
3433
3534 static TAILQ_HEAD(state_head, placeholder_state) state_head =
1515 xcb_colormap_t colormap;
1616 Rect dims;
1717 surface_t surface;
18
19 TAILQ_ENTRY(dialog_t)
20 dialogs;
18 TAILQ_ENTRY(dialog_t) dialogs;
2119 } dialog_t;
2220
2321 static TAILQ_HEAD(dialogs_head, dialog_t) dialogs = TAILQ_HEAD_INITIALIZER(dialogs);
6262
6363 char *name;
6464
65 CIRCLEQ_ENTRY(con_state)
66 state;
67
68 CIRCLEQ_ENTRY(con_state)
69 old_state;
70
71 TAILQ_ENTRY(con_state)
72 initial_mapping_order;
65 CIRCLEQ_ENTRY(con_state) state;
66 CIRCLEQ_ENTRY(con_state) old_state;
67 TAILQ_ENTRY(con_state) initial_mapping_order;
7368 } con_state;
7469
75 CIRCLEQ_HEAD(state_head, con_state)
76 state_head =
70 CIRCLEQ_HEAD(state_head, con_state) state_head =
7771 CIRCLEQ_HEAD_INITIALIZER(state_head);
7872
79 CIRCLEQ_HEAD(old_state_head, con_state)
80 old_state_head =
73 CIRCLEQ_HEAD(old_state_head, con_state) old_state_head =
8174 CIRCLEQ_HEAD_INITIALIZER(old_state_head);
8275
83 TAILQ_HEAD(initial_mapping_head, con_state)
84 initial_mapping_head =
76 TAILQ_HEAD(initial_mapping_head, con_state) initial_mapping_head =
8577 TAILQ_HEAD_INITIALIZER(initial_mapping_head);
8678
8779 /*