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
9 | 9 | SpaceBeforeParens: ControlStatements |
10 | 10 | SortIncludes: false |
11 | 11 | 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 ] |
76 | 76 | char *name; |
77 | 77 | char *instance; |
78 | 78 | |
79 | TAILQ_ENTRY(status_block) | |
80 | blocks; | |
79 | TAILQ_ENTRY(status_block) blocks; | |
81 | 80 | }; |
82 | 81 | |
83 | extern TAILQ_HEAD(statusline_head, status_block) | |
84 | statusline_head; | |
82 | extern TAILQ_HEAD(statusline_head, status_block) statusline_head; | |
85 | 83 | |
86 | 84 | #include "child.h" |
87 | 85 | #include "ipc.h" |
28 | 28 | char *command; |
29 | 29 | bool release; |
30 | 30 | |
31 | TAILQ_ENTRY(binding_t) | |
32 | bindings; | |
31 | TAILQ_ENTRY(binding_t) bindings; | |
33 | 32 | } binding_t; |
34 | 33 | |
35 | 34 | typedef struct tray_output_t { |
36 | 35 | char *output; |
37 | 36 | |
38 | TAILQ_ENTRY(tray_output_t) | |
39 | tray_outputs; | |
37 | TAILQ_ENTRY(tray_output_t) tray_outputs; | |
40 | 38 | } tray_output_t; |
41 | 39 | |
42 | 40 | typedef struct config_t { |
43 | 41 | uint32_t modifier; |
44 | ||
45 | TAILQ_HEAD(bindings_head, binding_t) | |
46 | bindings; | |
47 | ||
42 | TAILQ_HEAD(bindings_head, binding_t) bindings; | |
48 | 43 | position_t position; |
49 | 44 | bool verbose; |
50 | 45 | bool transparency; |
58 | 53 | char *command; |
59 | 54 | char *fontname; |
60 | 55 | 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; | |
65 | 57 | int tray_padding; |
66 | 58 | int num_outputs; |
67 | 59 | char **outputs; |
72 | 72 | struct ws_head* workspaces; /* The workspaces on this output */ |
73 | 73 | struct tc_head* trayclients; /* The tray clients on this output */ |
74 | 74 | |
75 | SLIST_ENTRY(i3_output) | |
76 | slist; /* Pointer for the SLIST-Macro */ | |
75 | SLIST_ENTRY(i3_output) slist; /* Pointer for the SLIST-Macro */ | |
77 | 76 | }; |
20 | 20 | char *class_class; |
21 | 21 | char *class_instance; |
22 | 22 | |
23 | TAILQ_ENTRY(trayclient) | |
24 | tailq; /* Pointer for the TAILQ-Macro */ | |
23 | TAILQ_ENTRY(trayclient) tailq; /* Pointer for the TAILQ-Macro */ | |
25 | 24 | }; |
40 | 40 | rect rect; /* The rect of the ws (not used (yet)) */ |
41 | 41 | struct i3_output *output; /* The current output of the ws */ |
42 | 42 | |
43 | TAILQ_ENTRY(i3_ws) | |
44 | tailq; /* Pointer for the TAILQ-Macro */ | |
43 | TAILQ_ENTRY(i3_ws) tailq; /* Pointer for the TAILQ-Macro */ | |
45 | 44 | }; |
65 | 65 | char *value; |
66 | 66 | char *next_match; |
67 | 67 | |
68 | SLIST_ENTRY(Variable) | |
69 | variables; | |
68 | SLIST_ENTRY(Variable) variables; | |
70 | 69 | }; |
71 | 70 | |
72 | 71 | /** |
80 | 79 | bool pango_markup; |
81 | 80 | struct bindings_head *bindings; |
82 | 81 | |
83 | SLIST_ENTRY(Mode) | |
84 | modes; | |
82 | SLIST_ENTRY(Mode) modes; | |
85 | 83 | }; |
86 | 84 | |
87 | 85 | /** |
271 | 269 | /* List of outputs on which the tray is allowed to be shown, in order. |
272 | 270 | * The special value "none" disables it (per default, it will be shown) and |
273 | 271 | * 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; | |
276 | 273 | |
277 | 274 | /* Padding around the tray icons. */ |
278 | 275 | int tray_padding; |
294 | 291 | /** Bar modifier (to show bar when in hide mode). */ |
295 | 292 | uint32_t modifier; |
296 | 293 | |
297 | TAILQ_HEAD(bar_bindings_head, Barbinding) | |
298 | bar_bindings; | |
294 | TAILQ_HEAD(bar_bindings_head, Barbinding) bar_bindings; | |
299 | 295 | |
300 | 296 | /** Bar position (bottom by default). */ |
301 | 297 | enum { P_BOTTOM = 0, |
369 | 365 | char *binding_mode_text; |
370 | 366 | } colors; |
371 | 367 | |
372 | TAILQ_ENTRY(Barconfig) | |
373 | configs; | |
368 | TAILQ_ENTRY(Barconfig) configs; | |
374 | 369 | }; |
375 | 370 | |
376 | 371 | /** |
388 | 383 | /** If true, the command will be executed after the button is released. */ |
389 | 384 | bool release; |
390 | 385 | |
391 | TAILQ_ENTRY(Barbinding) | |
392 | bindings; | |
386 | TAILQ_ENTRY(Barbinding) bindings; | |
393 | 387 | }; |
394 | 388 | |
395 | 389 | struct tray_output_t { |
396 | 390 | char *output; |
397 | 391 | |
398 | TAILQ_ENTRY(tray_output_t) | |
399 | tray_outputs; | |
392 | TAILQ_ENTRY(tray_output_t) tray_outputs; | |
400 | 393 | }; |
401 | 394 | |
402 | 395 | typedef enum { |
205 | 205 | char *name; |
206 | 206 | char *output; |
207 | 207 | |
208 | TAILQ_ENTRY(Workspace_Assignment) | |
209 | ws_assignments; | |
208 | TAILQ_ENTRY(Workspace_Assignment) ws_assignments; | |
210 | 209 | }; |
211 | 210 | |
212 | 211 | struct Ignore_Event { |
214 | 213 | int response_type; |
215 | 214 | time_t added; |
216 | 215 | |
217 | SLIST_ENTRY(Ignore_Event) | |
218 | ignore_events; | |
216 | SLIST_ENTRY(Ignore_Event) ignore_events; | |
219 | 217 | }; |
220 | 218 | |
221 | 219 | /** |
234 | 232 | * completed) */ |
235 | 233 | time_t delete_at; |
236 | 234 | |
237 | TAILQ_ENTRY(Startup_Sequence) | |
238 | sequences; | |
235 | TAILQ_ENTRY(Startup_Sequence) sequences; | |
239 | 236 | }; |
240 | 237 | |
241 | 238 | /** |
261 | 258 | struct Binding_Keycode { |
262 | 259 | xcb_keycode_t keycode; |
263 | 260 | i3_event_state_mask_t modifiers; |
264 | ||
265 | TAILQ_ENTRY(Binding_Keycode) | |
266 | keycodes; | |
261 | TAILQ_ENTRY(Binding_Keycode) keycodes; | |
267 | 262 | }; |
268 | 263 | |
269 | 264 | /****************************************************************************** |
324 | 319 | /** Only in use if symbol != NULL. Contains keycodes which generate the |
325 | 320 | * specified symbol. Useful for unbinding and checking which binding was |
326 | 321 | * 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; | |
329 | 323 | |
330 | 324 | /** Command, like in command mode */ |
331 | 325 | char *command; |
332 | 326 | |
333 | TAILQ_ENTRY(Binding) | |
334 | bindings; | |
327 | TAILQ_ENTRY(Binding) bindings; | |
335 | 328 | }; |
336 | 329 | |
337 | 330 | /** |
347 | 340 | /** no_startup_id flag for start_application(). Determines whether a |
348 | 341 | * startup notification context/ID should be created. */ |
349 | 342 | 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; | |
356 | 345 | }; |
357 | 346 | |
358 | 347 | struct output_name { |
359 | 348 | char *name; |
360 | ||
361 | SLIST_ENTRY(output_name) | |
362 | names; | |
349 | SLIST_ENTRY(output_name) names; | |
363 | 350 | }; |
364 | 351 | |
365 | 352 | /** |
386 | 373 | /** List of names for the output. |
387 | 374 | * An output always has at least one name; the first name is |
388 | 375 | * considered the primary one. */ |
389 | SLIST_HEAD(names_head, output_name) | |
390 | names_head; | |
376 | SLIST_HEAD(names_head, output_name) names_head; | |
391 | 377 | |
392 | 378 | /** Pointer to the Con which represents this output */ |
393 | 379 | Con *con; |
395 | 381 | /** x, y, width, height */ |
396 | 382 | Rect rect; |
397 | 383 | |
398 | TAILQ_ENTRY(xoutput) | |
399 | outputs; | |
384 | TAILQ_ENTRY(xoutput) outputs; | |
400 | 385 | }; |
401 | 386 | |
402 | 387 | /** |
547 | 532 | M_ASSIGN_WS, |
548 | 533 | M_BELOW } insert_where; |
549 | 534 | |
550 | TAILQ_ENTRY(Match) | |
551 | matches; | |
535 | TAILQ_ENTRY(Match) matches; | |
552 | 536 | |
553 | 537 | /* Whether this match was generated when restarting i3 inplace. |
554 | 538 | * Leads to not setting focus when managing a new window, because the old |
595 | 579 | char *output; |
596 | 580 | } dest; |
597 | 581 | |
598 | TAILQ_ENTRY(Assignment) | |
599 | assignments; | |
582 | TAILQ_ENTRY(Assignment) assignments; | |
600 | 583 | }; |
601 | 584 | |
602 | 585 | /** Fullscreen modes. Used by Con.fullscreen_mode. */ |
607 | 590 | struct mark_t { |
608 | 591 | char *name; |
609 | 592 | |
610 | TAILQ_ENTRY(mark_t) | |
611 | marks; | |
593 | TAILQ_ENTRY(mark_t) marks; | |
612 | 594 | }; |
613 | 595 | |
614 | 596 | /** |
672 | 654 | char *sticky_group; |
673 | 655 | |
674 | 656 | /* 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; | |
677 | 658 | /* cached to decide whether a redraw is needed */ |
678 | 659 | bool mark_changed; |
679 | 660 | |
692 | 673 | struct deco_render_params *deco_render_params; |
693 | 674 | |
694 | 675 | /* 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; | |
706 | 682 | |
707 | 683 | fullscreen_mode_t fullscreen_mode; |
708 | 684 | |
740 | 716 | FLOATING_USER_ON = 3 |
741 | 717 | } floating; |
742 | 718 | |
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; | |
754 | 723 | |
755 | 724 | /** callbacks */ |
756 | 725 | void (*on_remove_child)(Con *); |
56 | 56 | extern char **start_argv; |
57 | 57 | extern Display *xlibdpy, *xkbdpy; |
58 | 58 | extern int xkb_current_group; |
59 | extern TAILQ_HEAD(bindings_head, Binding) * bindings; | |
59 | extern TAILQ_HEAD(bindings_head, Binding) *bindings; | |
60 | 60 | extern const char *current_binding_mode; |
61 | 61 | extern TAILQ_HEAD(autostarts_head, Autostart) autostarts; |
62 | 62 | extern TAILQ_HEAD(autostarts_always_head, Autostart) autostarts_always; |
39 | 39 | uint8_t *buffer; |
40 | 40 | size_t buffer_size; |
41 | 41 | |
42 | TAILQ_ENTRY(ipc_client) | |
43 | clients; | |
42 | TAILQ_ENTRY(ipc_client) clients; | |
44 | 43 | } ipc_client; |
45 | 44 | |
46 | 45 | /* |
14 | 14 | char hex[8]; |
15 | 15 | uint32_t pixel; |
16 | 16 | |
17 | SLIST_ENTRY(Colorpixel) | |
18 | colorpixels; | |
17 | SLIST_ENTRY(Colorpixel) colorpixels; | |
19 | 18 | }; |
20 | 19 | |
21 | SLIST_HEAD(colorpixel_head, Colorpixel) | |
22 | colorpixels; | |
20 | SLIST_HEAD(colorpixel_head, Colorpixel) colorpixels; | |
23 | 21 | |
24 | 22 | /* |
25 | 23 | * Returns the colorpixel to use for the given hex color (think of HTML). |
128 | 128 | */ |
129 | 129 | typedef struct owindow { |
130 | 130 | Con *con; |
131 | ||
132 | TAILQ_ENTRY(owindow) | |
133 | owindows; | |
131 | TAILQ_ENTRY(owindow) owindows; | |
134 | 132 | } owindow; |
135 | 133 | |
136 | 134 | typedef TAILQ_HEAD(owindows_head, owindow) owindows_head; |
513 | 513 | struct bfs_entry { |
514 | 514 | Con *con; |
515 | 515 | |
516 | TAILQ_ENTRY(bfs_entry) | |
517 | entries; | |
516 | TAILQ_ENTRY(bfs_entry) entries; | |
518 | 517 | }; |
519 | 518 | |
520 | 519 | /* |
526 | 525 | |
527 | 526 | /* TODO: is breadth-first-search really appropriate? (check as soon as |
528 | 527 | * 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); | |
532 | 529 | struct bfs_entry *entry = smalloc(sizeof(struct bfs_entry)); |
533 | 530 | entry->con = con; |
534 | 531 | TAILQ_INSERT_TAIL(&bfs_head, entry, entries); |
24 | 24 | |
25 | 25 | char *current_socketpath = NULL; |
26 | 26 | |
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); | |
29 | 28 | |
30 | 29 | /* |
31 | 30 | * Puts the given socket file descriptor into non-blocking mode or dies if |
43 | 43 | * array. */ |
44 | 44 | struct focus_mapping { |
45 | 45 | int old_id; |
46 | ||
47 | TAILQ_ENTRY(focus_mapping) | |
48 | focus_mappings; | |
46 | TAILQ_ENTRY(focus_mapping) focus_mappings; | |
49 | 47 | }; |
50 | 48 | |
51 | 49 | static TAILQ_HEAD(focus_mappings_head, focus_mapping) focus_mappings = |
28 | 28 | /** The drawable surface */ |
29 | 29 | surface_t surface; |
30 | 30 | |
31 | TAILQ_ENTRY(placeholder_state) | |
32 | state; | |
31 | TAILQ_ENTRY(placeholder_state) state; | |
33 | 32 | } placeholder_state; |
34 | 33 | |
35 | 34 | static TAILQ_HEAD(state_head, placeholder_state) state_head = |
15 | 15 | xcb_colormap_t colormap; |
16 | 16 | Rect dims; |
17 | 17 | surface_t surface; |
18 | ||
19 | TAILQ_ENTRY(dialog_t) | |
20 | dialogs; | |
18 | TAILQ_ENTRY(dialog_t) dialogs; | |
21 | 19 | } dialog_t; |
22 | 20 | |
23 | 21 | static TAILQ_HEAD(dialogs_head, dialog_t) dialogs = TAILQ_HEAD_INITIALIZER(dialogs); |
62 | 62 | |
63 | 63 | char *name; |
64 | 64 | |
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; | |
73 | 68 | } con_state; |
74 | 69 | |
75 | CIRCLEQ_HEAD(state_head, con_state) | |
76 | state_head = | |
70 | CIRCLEQ_HEAD(state_head, con_state) state_head = | |
77 | 71 | CIRCLEQ_HEAD_INITIALIZER(state_head); |
78 | 72 | |
79 | CIRCLEQ_HEAD(old_state_head, con_state) | |
80 | old_state_head = | |
73 | CIRCLEQ_HEAD(old_state_head, con_state) old_state_head = | |
81 | 74 | CIRCLEQ_HEAD_INITIALIZER(old_state_head); |
82 | 75 | |
83 | TAILQ_HEAD(initial_mapping_head, con_state) | |
84 | initial_mapping_head = | |
76 | TAILQ_HEAD(initial_mapping_head, con_state) initial_mapping_head = | |
85 | 77 | TAILQ_HEAD_INITIALIZER(initial_mapping_head); |
86 | 78 | |
87 | 79 | /* |