i3
queue.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _Q_INVALIDATE(a)
 
#define SLIST_HEAD(name, type)
 
#define SLIST_HEAD_INITIALIZER(head)
 
#define SLIST_ENTRY(type)
 
#define SLIST_FIRST(head)
 
#define SLIST_END(head)
 
#define SLIST_EMPTY(head)
 
#define SLIST_NEXT(elm, field)
 
#define SLIST_FOREACH(var, head, field)
 
#define SLIST_FOREACH_PREVPTR(var, varp, head, field)
 
#define SLIST_INIT(head)
 
#define SLIST_INSERT_AFTER(slistelm, elm, field)
 
#define SLIST_INSERT_HEAD(head, elm, field)
 
#define SLIST_REMOVE_NEXT(head, elm, field)
 
#define SLIST_REMOVE_HEAD(head, field)
 
#define SLIST_REMOVE(head, elm, type, field)
 
#define LIST_HEAD(name, type)
 
#define LIST_HEAD_INITIALIZER(head)
 
#define LIST_ENTRY(type)
 
#define LIST_FIRST(head)
 
#define LIST_END(head)
 
#define LIST_EMPTY(head)
 
#define LIST_NEXT(elm, field)
 
#define LIST_FOREACH(var, head, field)
 
#define LIST_INIT(head)
 
#define LIST_INSERT_AFTER(listelm, elm, field)
 
#define LIST_INSERT_BEFORE(listelm, elm, field)
 
#define LIST_INSERT_HEAD(head, elm, field)
 
#define LIST_REMOVE(elm, field)
 
#define LIST_REPLACE(elm, elm2, field)
 
#define SIMPLEQ_HEAD(name, type)
 
#define SIMPLEQ_HEAD_INITIALIZER(head)
 
#define SIMPLEQ_ENTRY(type)
 
#define SIMPLEQ_FIRST(head)
 
#define SIMPLEQ_END(head)
 
#define SIMPLEQ_EMPTY(head)
 
#define SIMPLEQ_NEXT(elm, field)
 
#define SIMPLEQ_FOREACH(var, head, field)
 
#define SIMPLEQ_INIT(head)
 
#define SIMPLEQ_INSERT_HEAD(head, elm, field)
 
#define SIMPLEQ_INSERT_TAIL(head, elm, field)
 
#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field)
 
#define SIMPLEQ_REMOVE_HEAD(head, field)
 
#define TAILQ_HEAD(name, type)
 
#define TAILQ_HEAD_INITIALIZER(head)
 
#define TAILQ_ENTRY(type)
 
#define TAILQ_FIRST(head)
 
#define TAILQ_END(head)
 
#define TAILQ_NEXT(elm, field)
 
#define TAILQ_LAST(head, headname)
 
#define TAILQ_PREV(elm, headname, field)
 
#define TAILQ_EMPTY(head)
 
#define TAILQ_FOREACH(var, head, field)
 
#define TAILQ_FOREACH_REVERSE(var, head, headname, field)
 
#define TAILQ_INIT(head)
 
#define TAILQ_INSERT_HEAD(head, elm, field)
 
#define TAILQ_INSERT_TAIL(head, elm, field)
 
#define TAILQ_INSERT_AFTER(head, listelm, elm, field)
 
#define TAILQ_INSERT_BEFORE(listelm, elm, field)
 
#define TAILQ_REMOVE(head, elm, field)
 
#define TAILQ_REPLACE(head, elm, elm2, field)
 
#define TAILQ_SWAP(first, second, head, field)
 
#define CIRCLEQ_HEAD(name, type)
 
#define CIRCLEQ_HEAD_INITIALIZER(head)
 
#define CIRCLEQ_ENTRY(type)
 
#define CIRCLEQ_FIRST(head)
 
#define CIRCLEQ_LAST(head)
 
#define CIRCLEQ_END(head)
 
#define CIRCLEQ_NEXT(elm, field)
 
#define CIRCLEQ_PREV(elm, field)
 
#define CIRCLEQ_EMPTY(head)
 
#define CIRCLEQ_FOREACH(var, head, field)
 
#define CIRCLEQ_FOREACH_REVERSE(var, head, field)
 
#define CIRCLEQ_INIT(head)
 
#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field)
 
#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field)
 
#define CIRCLEQ_INSERT_HEAD(head, elm, field)
 
#define CIRCLEQ_INSERT_TAIL(head, elm, field)
 
#define CIRCLEQ_REMOVE(head, elm, field)
 
#define CIRCLEQ_REPLACE(head, elm, elm2, field)
 

Macro Definition Documentation

◆ _Q_INVALIDATE

#define _Q_INVALIDATE ( a)

Definition at line 87 of file queue.h.

◆ CIRCLEQ_EMPTY

#define CIRCLEQ_EMPTY ( head)
Value:
(CIRCLEQ_FIRST(head) == CIRCLEQ_END(head))
#define CIRCLEQ_FIRST(head)
Definition queue.h:463
#define CIRCLEQ_END(head)
Definition queue.h:465

Definition at line 468 of file queue.h.

◆ CIRCLEQ_END

#define CIRCLEQ_END ( head)
Value:
((void *)(head))

Definition at line 465 of file queue.h.

Referenced by x_push_changes().

◆ CIRCLEQ_ENTRY

#define CIRCLEQ_ENTRY ( type)
Value:
struct { \
struct type *cqe_next; /* next element */ \
struct type *cqe_prev; /* previous element */ \
}

Definition at line 454 of file queue.h.

◆ CIRCLEQ_FIRST

#define CIRCLEQ_FIRST ( head)
Value:
((head)->cqh_first)

Definition at line 463 of file queue.h.

◆ CIRCLEQ_FOREACH

#define CIRCLEQ_FOREACH ( var,
head,
field )
Value:
for ((var) = CIRCLEQ_FIRST(head); \
(var) != CIRCLEQ_END(head); \
(var) = CIRCLEQ_NEXT(var, field))
#define CIRCLEQ_NEXT(elm, field)
Definition queue.h:466

Definition at line 471 of file queue.h.

Referenced by x_push_changes().

◆ CIRCLEQ_FOREACH_REVERSE

#define CIRCLEQ_FOREACH_REVERSE ( var,
head,
field )
Value:
for ((var) = CIRCLEQ_LAST(head); \
(var) != CIRCLEQ_END(head); \
(var) = CIRCLEQ_PREV(var, field))
#define CIRCLEQ_LAST(head)
Definition queue.h:464
#define CIRCLEQ_PREV(elm, field)
Definition queue.h:467

Definition at line 476 of file queue.h.

Referenced by x_mask_event_mask(), and x_push_changes().

◆ CIRCLEQ_HEAD

#define CIRCLEQ_HEAD ( name,
type )
Value:
struct name { \
struct type *cqh_first; /* first element */ \
struct type *cqh_last; /* last element */ \
}

Definition at line 442 of file queue.h.

◆ CIRCLEQ_HEAD_INITIALIZER

#define CIRCLEQ_HEAD_INITIALIZER ( head)
Value:
{ \
CIRCLEQ_END(&head) \
, CIRCLEQ_END(&head) \
}

Definition at line 448 of file queue.h.

◆ CIRCLEQ_INIT

#define CIRCLEQ_INIT ( head)
Value:
do { \
(head)->cqh_first = CIRCLEQ_END(head); \
(head)->cqh_last = CIRCLEQ_END(head); \
} while (0)

Definition at line 484 of file queue.h.

◆ CIRCLEQ_INSERT_AFTER

#define CIRCLEQ_INSERT_AFTER ( head,
listelm,
elm,
field )
Value:
do { \
(elm)->field.cqe_next = (listelm)->field.cqe_next; \
(elm)->field.cqe_prev = (listelm); \
if ((listelm)->field.cqe_next == CIRCLEQ_END(head)) \
(head)->cqh_last = (elm); \
else \
(listelm)->field.cqe_next->field.cqe_prev = (elm); \
(listelm)->field.cqe_next = (elm); \
} while (0)

Definition at line 490 of file queue.h.

◆ CIRCLEQ_INSERT_BEFORE

#define CIRCLEQ_INSERT_BEFORE ( head,
listelm,
elm,
field )
Value:
do { \
(elm)->field.cqe_next = (listelm); \
(elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
if ((listelm)->field.cqe_prev == CIRCLEQ_END(head)) \
(head)->cqh_first = (elm); \
else \
(listelm)->field.cqe_prev->field.cqe_next = (elm); \
(listelm)->field.cqe_prev = (elm); \
} while (0)

Definition at line 501 of file queue.h.

◆ CIRCLEQ_INSERT_HEAD

#define CIRCLEQ_INSERT_HEAD ( head,
elm,
field )
Value:
do { \
(elm)->field.cqe_next = (head)->cqh_first; \
(elm)->field.cqe_prev = CIRCLEQ_END(head); \
if ((head)->cqh_last == CIRCLEQ_END(head)) \
(head)->cqh_last = (elm); \
else \
(head)->cqh_first->field.cqe_prev = (elm); \
(head)->cqh_first = (elm); \
} while (0)

Definition at line 512 of file queue.h.

Referenced by x_con_init(), and x_raise_con().

◆ CIRCLEQ_INSERT_TAIL

#define CIRCLEQ_INSERT_TAIL ( head,
elm,
field )
Value:
do { \
(elm)->field.cqe_next = CIRCLEQ_END(head); \
(elm)->field.cqe_prev = (head)->cqh_last; \
if ((head)->cqh_first == CIRCLEQ_END(head)) \
(head)->cqh_first = (elm); \
else \
(head)->cqh_last->field.cqe_next = (elm); \
(head)->cqh_last = (elm); \
} while (0)

Definition at line 523 of file queue.h.

Referenced by x_push_changes().

◆ CIRCLEQ_LAST

#define CIRCLEQ_LAST ( head)
Value:
((head)->cqh_last)

Definition at line 464 of file queue.h.

◆ CIRCLEQ_NEXT

#define CIRCLEQ_NEXT ( elm,
field )
Value:
((elm)->field.cqe_next)

Definition at line 466 of file queue.h.

◆ CIRCLEQ_PREV

#define CIRCLEQ_PREV ( elm,
field )
Value:
((elm)->field.cqe_prev)

Definition at line 467 of file queue.h.

Referenced by x_push_changes().

◆ CIRCLEQ_REMOVE

#define CIRCLEQ_REMOVE ( head,
elm,
field )
Value:
do { \
if ((elm)->field.cqe_next == CIRCLEQ_END(head)) \
(head)->cqh_last = (elm)->field.cqe_prev; \
else \
(elm)->field.cqe_next->field.cqe_prev = (elm)->field.cqe_prev; \
if ((elm)->field.cqe_prev == CIRCLEQ_END(head)) \
(head)->cqh_first = (elm)->field.cqe_next; \
else \
(elm)->field.cqe_prev->field.cqe_next = (elm)->field.cqe_next; \
_Q_INVALIDATE((elm)->field.cqe_prev); \
_Q_INVALIDATE((elm)->field.cqe_next); \
} while (0)

Definition at line 534 of file queue.h.

Referenced by _x_con_kill(), x_push_changes(), and x_raise_con().

◆ CIRCLEQ_REPLACE

#define CIRCLEQ_REPLACE ( head,
elm,
elm2,
field )
Value:
do { \
if (((elm2)->field.cqe_next = (elm)->field.cqe_next) == CIRCLEQ_END(head)) \
(head)->cqh_last = (elm2); \
else \
(elm2)->field.cqe_next->field.cqe_prev = (elm2); \
if (((elm2)->field.cqe_prev = (elm)->field.cqe_prev) == CIRCLEQ_END(head)) \
(head)->cqh_first = (elm2); \
else \
(elm2)->field.cqe_prev->field.cqe_next = (elm2); \
_Q_INVALIDATE((elm)->field.cqe_prev); \
_Q_INVALIDATE((elm)->field.cqe_next); \
} while (0)

Definition at line 548 of file queue.h.

◆ LIST_EMPTY

#define LIST_EMPTY ( head)
Value:
(LIST_FIRST(head) == LIST_END(head))
#define LIST_END(head)
Definition queue.h:189
#define LIST_FIRST(head)
Definition queue.h:188

Definition at line 190 of file queue.h.

◆ LIST_END

#define LIST_END ( head)
Value:
NULL

Definition at line 189 of file queue.h.

◆ LIST_ENTRY

#define LIST_ENTRY ( type)
Value:
struct { \
struct type *le_next; /* next element */ \
struct type **le_prev; /* address of previous next element */ \
}

Definition at line 179 of file queue.h.

◆ LIST_FIRST

#define LIST_FIRST ( head)
Value:
((head)->lh_first)

Definition at line 188 of file queue.h.

◆ LIST_FOREACH

#define LIST_FOREACH ( var,
head,
field )
Value:
for ((var) = LIST_FIRST(head); \
(var) != LIST_END(head); \
(var) = LIST_NEXT(var, field))
#define LIST_NEXT(elm, field)
Definition queue.h:191

Definition at line 193 of file queue.h.

◆ LIST_HEAD

#define LIST_HEAD ( name,
type )
Value:
struct name { \
struct type *lh_first; /* first element */ \
}

Definition at line 171 of file queue.h.

◆ LIST_HEAD_INITIALIZER

#define LIST_HEAD_INITIALIZER ( head)
Value:
{ NULL }

Definition at line 176 of file queue.h.

◆ LIST_INIT

#define LIST_INIT ( head)
Value:
do { \
LIST_FIRST(head) = LIST_END(head); \
} while (0)

Definition at line 201 of file queue.h.

◆ LIST_INSERT_AFTER

#define LIST_INSERT_AFTER ( listelm,
elm,
field )
Value:
do { \
if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
(listelm)->field.le_next->field.le_prev = &(elm)->field.le_next; \
(listelm)->field.le_next = (elm); \
(elm)->field.le_prev = &(listelm)->field.le_next; \
} while (0)

Definition at line 206 of file queue.h.

◆ LIST_INSERT_BEFORE

#define LIST_INSERT_BEFORE ( listelm,
elm,
field )
Value:
do { \
(elm)->field.le_prev = (listelm)->field.le_prev; \
(elm)->field.le_next = (listelm); \
*(listelm)->field.le_prev = (elm); \
(listelm)->field.le_prev = &(elm)->field.le_next; \
} while (0)

Definition at line 214 of file queue.h.

◆ LIST_INSERT_HEAD

#define LIST_INSERT_HEAD ( head,
elm,
field )
Value:
do { \
if (((elm)->field.le_next = (head)->lh_first) != NULL) \
(head)->lh_first->field.le_prev = &(elm)->field.le_next; \
(head)->lh_first = (elm); \
(elm)->field.le_prev = &(head)->lh_first; \
} while (0)

Definition at line 222 of file queue.h.

◆ LIST_NEXT

#define LIST_NEXT ( elm,
field )
Value:
((elm)->field.le_next)

Definition at line 191 of file queue.h.

◆ LIST_REMOVE

#define LIST_REMOVE ( elm,
field )
Value:
do { \
if ((elm)->field.le_next != NULL) \
(elm)->field.le_next->field.le_prev = (elm)->field.le_prev; \
*(elm)->field.le_prev = (elm)->field.le_next; \
_Q_INVALIDATE((elm)->field.le_prev); \
_Q_INVALIDATE((elm)->field.le_next); \
} while (0)

Definition at line 230 of file queue.h.

◆ LIST_REPLACE

#define LIST_REPLACE ( elm,
elm2,
field )
Value:
do { \
if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \
(elm2)->field.le_next->field.le_prev = &(elm2)->field.le_next; \
(elm2)->field.le_prev = (elm)->field.le_prev; \
*(elm2)->field.le_prev = (elm2); \
_Q_INVALIDATE((elm)->field.le_prev); \
_Q_INVALIDATE((elm)->field.le_next); \
} while (0)

Definition at line 239 of file queue.h.

◆ SIMPLEQ_EMPTY

#define SIMPLEQ_EMPTY ( head)
Value:
(SIMPLEQ_FIRST(head) == SIMPLEQ_END(head))
#define SIMPLEQ_FIRST(head)
Definition queue.h:269
#define SIMPLEQ_END(head)
Definition queue.h:270

Definition at line 271 of file queue.h.

◆ SIMPLEQ_END

#define SIMPLEQ_END ( head)
Value:
NULL

Definition at line 270 of file queue.h.

◆ SIMPLEQ_ENTRY

#define SIMPLEQ_ENTRY ( type)
Value:
struct { \
struct type *sqe_next; /* next element */ \
}

Definition at line 261 of file queue.h.

◆ SIMPLEQ_FIRST

#define SIMPLEQ_FIRST ( head)
Value:
((head)->sqh_first)

Definition at line 269 of file queue.h.

◆ SIMPLEQ_FOREACH

#define SIMPLEQ_FOREACH ( var,
head,
field )
Value:
for ((var) = SIMPLEQ_FIRST(head); \
(var) != SIMPLEQ_END(head); \
(var) = SIMPLEQ_NEXT(var, field))
#define SIMPLEQ_NEXT(elm, field)
Definition queue.h:272

Definition at line 274 of file queue.h.

◆ SIMPLEQ_HEAD

#define SIMPLEQ_HEAD ( name,
type )
Value:
struct name { \
struct type *sqh_first; /* first element */ \
struct type **sqh_last; /* addr of last next element */ \
}

Definition at line 252 of file queue.h.

◆ SIMPLEQ_HEAD_INITIALIZER

#define SIMPLEQ_HEAD_INITIALIZER ( head)
Value:
{ NULL, &(head).sqh_first }

Definition at line 258 of file queue.h.

◆ SIMPLEQ_INIT

#define SIMPLEQ_INIT ( head)
Value:
do { \
(head)->sqh_first = NULL; \
(head)->sqh_last = &(head)->sqh_first; \
} while (0)

Definition at line 282 of file queue.h.

◆ SIMPLEQ_INSERT_AFTER

#define SIMPLEQ_INSERT_AFTER ( head,
listelm,
elm,
field )
Value:
do { \
if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL) \
(head)->sqh_last = &(elm)->field.sqe_next; \
(listelm)->field.sqe_next = (elm); \
} while (0)

Definition at line 302 of file queue.h.

◆ SIMPLEQ_INSERT_HEAD

#define SIMPLEQ_INSERT_HEAD ( head,
elm,
field )
Value:
do { \
if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
(head)->sqh_last = &(elm)->field.sqe_next; \
(head)->sqh_first = (elm); \
} while (0)

Definition at line 288 of file queue.h.

◆ SIMPLEQ_INSERT_TAIL

#define SIMPLEQ_INSERT_TAIL ( head,
elm,
field )
Value:
do { \
(elm)->field.sqe_next = NULL; \
*(head)->sqh_last = (elm); \
(head)->sqh_last = &(elm)->field.sqe_next; \
} while (0)

Definition at line 295 of file queue.h.

◆ SIMPLEQ_NEXT

#define SIMPLEQ_NEXT ( elm,
field )
Value:
((elm)->field.sqe_next)

Definition at line 272 of file queue.h.

◆ SIMPLEQ_REMOVE_HEAD

#define SIMPLEQ_REMOVE_HEAD ( head,
field )
Value:
do { \
if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
(head)->sqh_last = &(head)->sqh_first; \
} while (0)

Definition at line 309 of file queue.h.

◆ SLIST_EMPTY

#define SLIST_EMPTY ( head)
Value:
(SLIST_FIRST(head) == SLIST_END(head))
#define SLIST_END(head)
Definition queue.h:110
#define SLIST_FIRST(head)
Definition queue.h:109

Definition at line 111 of file queue.h.

Referenced by free_configuration(), free_variables(), and handle_output().

◆ SLIST_END

#define SLIST_END ( head)
Value:
NULL

Definition at line 110 of file queue.h.

Referenced by event_is_ignored().

◆ SLIST_ENTRY

#define SLIST_ENTRY ( type)
Value:
struct { \
struct type *sle_next; /* next element */ \
}

Definition at line 101 of file queue.h.

◆ SLIST_FIRST

#define SLIST_FIRST ( head)
Value:
((head)->slh_first)

Definition at line 109 of file queue.h.

Referenced by event_is_ignored(), free_configuration(), free_variables(), handle_output(), and output_primary_name().

◆ SLIST_FOREACH

#define SLIST_FOREACH ( var,
head,
field )
Value:
for ((var) = SLIST_FIRST(head); \
(var) != SLIST_END(head); \
(var) = SLIST_NEXT(var, field))
#define SLIST_NEXT(elm, field)
Definition queue.h:112

Definition at line 114 of file queue.h.

Referenced by CFGFUN(), event_is_ignored(), get_output_by_name(), IPC_HANDLER(), mode_from_name(), parse_file(), reorder_bindings(), switch_mode(), and upsert_variable().

◆ SLIST_FOREACH_PREVPTR

#define SLIST_FOREACH_PREVPTR ( var,
varp,
head,
field )
Value:
for ((varp) = &SLIST_FIRST((head)); \
((var) = *(varp)) != SLIST_END(head); \
(varp) = &SLIST_NEXT((var), field))

Definition at line 119 of file queue.h.

◆ SLIST_HEAD

#define SLIST_HEAD ( name,
type )
Value:
struct name { \
struct type *slh_first; /* first element */ \
}

Definition at line 93 of file queue.h.

◆ SLIST_HEAD_INITIALIZER

#define SLIST_HEAD_INITIALIZER ( head)
Value:
{ NULL }

Definition at line 98 of file queue.h.

◆ SLIST_INIT

#define SLIST_INIT ( head)
Value:
{ \
SLIST_FIRST(head) = SLIST_END(head); \
}

Definition at line 127 of file queue.h.

Referenced by create_root_output(), fake_outputs_init(), handle_output(), load_configuration(), query_screens(), and randr_query_outputs_15().

◆ SLIST_INSERT_AFTER

#define SLIST_INSERT_AFTER ( slistelm,
elm,
field )
Value:
do { \
(elm)->field.sle_next = (slistelm)->field.sle_next; \
(slistelm)->field.sle_next = (elm); \
} while (0)

Definition at line 132 of file queue.h.

Referenced by upsert_variable().

◆ SLIST_INSERT_HEAD

#define SLIST_INSERT_HEAD ( head,
elm,
field )
Value:
do { \
(elm)->field.sle_next = (head)->slh_first; \
(head)->slh_first = (elm); \
} while (0)

Definition at line 138 of file queue.h.

Referenced by create_root_output(), fake_outputs_init(), handle_output(), load_configuration(), mode_from_name(), query_screens(), randr_query_outputs_15(), SLIST_HEAD(), and upsert_variable().

◆ SLIST_NEXT

#define SLIST_NEXT ( elm,
field )
Value:
((elm)->field.sle_next)

Definition at line 112 of file queue.h.

Referenced by event_is_ignored().

◆ SLIST_REMOVE

#define SLIST_REMOVE ( head,
elm,
type,
field )
Value:
do { \
if ((head)->slh_first == (elm)) { \
SLIST_REMOVE_HEAD((head), field); \
} else { \
struct type *curelm = (head)->slh_first; \
\
while (curelm->field.sle_next != (elm)) \
curelm = curelm->field.sle_next; \
curelm->field.sle_next = curelm->field.sle_next->field.sle_next; \
_Q_INVALIDATE((elm)->field.sle_next); \
} \
} while (0)

Definition at line 154 of file queue.h.

Referenced by event_is_ignored(), and free_configuration().

◆ SLIST_REMOVE_HEAD

#define SLIST_REMOVE_HEAD ( head,
field )
Value:
do { \
(head)->slh_first = (head)->slh_first->field.sle_next; \
} while (0)

Definition at line 149 of file queue.h.

Referenced by free_variables(), and handle_output().

◆ SLIST_REMOVE_NEXT

#define SLIST_REMOVE_NEXT ( head,
elm,
field )
Value:
do { \
(elm)->field.sle_next = (elm)->field.sle_next->field.sle_next; \
} while (0)

Definition at line 144 of file queue.h.

◆ TAILQ_EMPTY

◆ TAILQ_END

◆ TAILQ_ENTRY

#define TAILQ_ENTRY ( type)
Value:
struct { \
struct type *tqe_next; /* next element */ \
struct type **tqe_prev; /* address of previous next element */ \
}

Definition at line 327 of file queue.h.

◆ TAILQ_FIRST

◆ TAILQ_FOREACH

#define TAILQ_FOREACH ( var,
head,
field )
Value:
for ((var) = TAILQ_FIRST(head); \
(var) != TAILQ_END(head); \
(var) = TAILQ_NEXT(var, field))
#define TAILQ_NEXT(elm, field)
Definition queue.h:338

Definition at line 347 of file queue.h.

Referenced by _con_attach(), _con_move_to_con(), _get_sticky(), any_randr_output_active(), assignment_for(), bar_configure_binding(), binding_copy(), bindings_get_buttons_to_grab(), CFGFUN(), CFGFUN(), check_for_duplicate_bindings(), cmd_bar_hidden_state(), cmd_bar_mode(), cmd_border(), cmd_criteria_match_windows(), cmd_exec(), cmd_floating(), cmd_focus(), cmd_focus_direction(), cmd_focus_output(), cmd_focus_sibling(), cmd_focus_window_mode(), cmd_fullscreen(), cmd_kill(), cmd_layout(), cmd_layout_toggle(), cmd_move_con_to_mark(), cmd_move_con_to_output(), cmd_move_direction(), cmd_move_scratchpad(), cmd_move_window_to_center(), cmd_move_window_to_mouse(), cmd_move_window_to_position(), cmd_reload(), cmd_resize(), cmd_resize_set(), cmd_resize_tiling_width_height(), cmd_scratchpad_show(), cmd_split(), cmd_sticky(), cmd_title_format(), cmd_title_window_icon(), cmd_unmark(), con_by_con_id(), con_by_frame_id(), con_by_mark(), con_by_window_id(), con_descend_direction(), con_descend_tiling_focused(), con_fix_percent(), con_for_window(), con_get_fullscreen_con(), con_get_tree_representation(), con_has_mark(), con_has_urgent_child(), con_is_sticky(), con_merge_into(), con_minimum_size(), con_num_children(), con_num_visible_children(), con_num_windows(), con_unmark(), configure_notify(), create_gaps_assignment(), display_running_version(), dump_bar_bindings(), dump_bar_config(), dump_node(), ewmh_update_wm_desktop(), ewmh_update_wm_desktop_recursively(), expose_event(), extract_workspace_names_from_bindings(), find_drop_target(), floating_enable(), floating_set_hint_atom(), free_configuration(), gaps_for_workspace(), gaps_reapply_workspace_assignments(), gaps_update(), get_assigned_output(), get_binding(), get_existing_workspace_by_name(), get_existing_workspace_by_num(), get_first_output(), get_focus_order(), get_output_by_id(), get_output_by_name(), get_output_containing(), get_output_next(), get_output_with_dimensions(), get_screen_at(), get_screen_at(), get_urgency_flag(), grab_all_keys(), handle_button_press(), has_drop_targets(), init_ws_for_output(), insert_con_into(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), IPC_HANDLER(), ipc_send_event(), is_con_attached(), json_end_array(), json_end_map(), load_configuration(), main(), mark_unmapped(), match_matches_window(), move_content(), move_matches_to_workspace(), num_focus_heads(), open_placeholder_window(), output_change_mode(), output_containing_rect(), output_get_content(), output_init_con(), output_push_sticky_windows(), precalculate_sizes(), randr_query_outputs(), randr_query_outputs_15(), regrab_all_buttons(), render_con(), render_output(), render_root(), reorder_bindings_of_mode(), restore_geometry(), restore_kill_placeholder(), restore_open_placeholder_windows(), run_assignments(), scratchpad_fix_resolution(), scratchpad_show(), sighandler_create_dialogs(), sighandler_handle_expose(), startup_monitor_event(), startup_sequence_get(), startup_sequence_rename_workspace(), switch_mode(), TAILQ_HEAD(), TAILQ_HEAD(), total_outputs_dimensions(), translate_keysyms(), update_placeholder_contents(), user_output_names_find_next(), workspace_move_to_output(), workspace_next(), workspace_reassign_sticky(), workspace_show(), x_deco_recurse(), x_draw_decoration(), x_push_changes(), x_push_node(), and x_push_node_unmaps().

◆ TAILQ_FOREACH_REVERSE

#define TAILQ_FOREACH_REVERSE ( var,
head,
headname,
field )
Value:
for ((var) = TAILQ_LAST(head, headname); \
(var) != TAILQ_END(head); \
(var) = TAILQ_PREV(var, headname, field))
#define TAILQ_PREV(elm, headname, field)
Definition queue.h:342
#define TAILQ_LAST(head, headname)
Definition queue.h:339

Definition at line 352 of file queue.h.

Referenced by handle_button_press(), handle_enter_notify(), handle_motion_notify(), json_end_array(), render_con(), and workspace_prev().

◆ TAILQ_HEAD

#define TAILQ_HEAD ( name,
type )
Value:
struct name { \
struct type *tqh_first; /* first element */ \
struct type **tqh_last; /* addr of last next element */ \
}

Definition at line 318 of file queue.h.

Referenced by con_get_fullscreen_con().

◆ TAILQ_HEAD_INITIALIZER

#define TAILQ_HEAD_INITIALIZER ( head)
Value:
{ NULL, &(head).tqh_first }

Definition at line 324 of file queue.h.

Referenced by cmd_focus_output(), cmd_move_con_to_output(), and con_get_fullscreen_con().

◆ TAILQ_INIT

#define TAILQ_INIT ( head)
Value:
do { \
(head)->tqh_first = NULL; \
(head)->tqh_last = &(head)->tqh_first; \
} while (0)

Definition at line 360 of file queue.h.

Referenced by binding_copy(), CFGFUN(), cmd_criteria_match_windows(), con_merge_into(), con_new_skeleton(), configure_binding(), load_configuration(), mode_from_name(), reorder_bindings_of_mode(), and TAILQ_HEAD().

◆ TAILQ_INSERT_AFTER

#define TAILQ_INSERT_AFTER ( head,
listelm,
elm,
field )
Value:
do { \
if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL) \
(elm)->field.tqe_next->field.tqe_prev = &(elm)->field.tqe_next; \
else \
(head)->tqh_last = &(elm)->field.tqe_next; \
(listelm)->field.tqe_next = (elm); \
(elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
} while (0)

Definition at line 384 of file queue.h.

Referenced by _con_attach(), floating_enable(), insert_con_into(), and manage_window().

◆ TAILQ_INSERT_BEFORE

#define TAILQ_INSERT_BEFORE ( listelm,
elm,
field )
Value:
do { \
(elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
(elm)->field.tqe_next = (listelm); \
*(listelm)->field.tqe_prev = (elm); \
(listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
} while (0)

Definition at line 394 of file queue.h.

Referenced by _con_attach(), floating_enable(), insert_con_into(), and tree_flatten().

◆ TAILQ_INSERT_HEAD

#define TAILQ_INSERT_HEAD ( head,
elm,
field )
Value:
do { \
if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
(head)->tqh_first->field.tqe_prev = &(elm)->field.tqe_next; \
else \
(head)->tqh_last = &(elm)->field.tqe_next; \
(head)->tqh_first = (elm); \
(elm)->field.tqe_prev = &(head)->tqh_first; \
} while (0)

Definition at line 366 of file queue.h.

Referenced by _con_attach(), attach_to_workspace(), con_focus(), fake_outputs_init(), floating_enable(), handle_output(), insert_con_into(), json_end_array(), open_placeholder_window(), output_init_con(), query_screens(), randr_query_outputs_15(), tree_flatten(), tree_next(), and tree_restore().

◆ TAILQ_INSERT_TAIL

◆ TAILQ_LAST

#define TAILQ_LAST ( head,
headname )
Value:
(*(((struct headname *)((head)->tqh_last))->tqh_last))

Definition at line 339 of file queue.h.

Referenced by cmd_mark(), cmd_swap(), con_descend_direction(), get_tree_next(), tiling_drag(), and tree_next().

◆ TAILQ_NEXT

◆ TAILQ_PREV

#define TAILQ_PREV ( elm,
headname,
field )
Value:
(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))

Definition at line 342 of file queue.h.

Referenced by floating_enable(), get_tree_next(), get_tree_next_sibling(), insert_con_into(), resize_find_tiling_participants(), tree_move(), workspace_prev(), workspace_prev_on_output(), and x_draw_decoration().

◆ TAILQ_REMOVE

#define TAILQ_REMOVE ( head,
elm,
field )
Value:
do { \
if (((elm)->field.tqe_next) != NULL) \
(elm)->field.tqe_next->field.tqe_prev = (elm)->field.tqe_prev; \
else \
(head)->tqh_last = (elm)->field.tqe_prev; \
*(elm)->field.tqe_prev = (elm)->field.tqe_next; \
_Q_INVALIDATE((elm)->field.tqe_prev); \
_Q_INVALIDATE((elm)->field.tqe_next); \
} while (0)

Definition at line 402 of file queue.h.

Referenced by _remove_matches(), _x_con_kill(), binding_free(), CFGFUN(), con_detach(), con_focus(), con_free(), con_get_fullscreen_con(), con_unmark(), floating_raise_con(), free_configuration(), free_ipc_client(), insert_con_into(), json_end_array(), json_end_map(), load_configuration(), log_broadcast_to_clients(), main(), manage_window(), output_init_con(), reorder_bindings_of_mode(), restore_connect(), restore_kill_placeholder(), set_focus_order(), sighandler_destroy_dialogs(), startup_sequence_delete(), TAILQ_HEAD(), translate_keysyms(), tree_flatten(), tree_next(), tree_restore(), and user_output_names_free().

◆ TAILQ_REPLACE

#define TAILQ_REPLACE ( head,
elm,
elm2,
field )
Value:
do { \
if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != NULL) \
(elm2)->field.tqe_next->field.tqe_prev = &(elm2)->field.tqe_next; \
else \
(head)->tqh_last = &(elm2)->field.tqe_next; \
(elm2)->field.tqe_prev = (elm)->field.tqe_prev; \
*(elm2)->field.tqe_prev = (elm2); \
_Q_INVALIDATE((elm)->field.tqe_prev); \
_Q_INVALIDATE((elm)->field.tqe_next); \
} while (0)

Definition at line 413 of file queue.h.

Referenced by tree_split().

◆ TAILQ_SWAP

#define TAILQ_SWAP ( first,
second,
head,
field )
Value:
do { \
*((first)->field.tqe_prev) = (second); \
(second)->field.tqe_prev = (first)->field.tqe_prev; \
(first)->field.tqe_prev = &((second)->field.tqe_next); \
(first)->field.tqe_next = (second)->field.tqe_next; \
if ((second)->field.tqe_next) \
(second)->field.tqe_next->field.tqe_prev = &((first)->field.tqe_next); \
(second)->field.tqe_next = first; \
if ((head)->tqh_last == &((second)->field.tqe_next)) \
(head)->tqh_last = &((first)->field.tqe_next); \
} while (0)

Definition at line 426 of file queue.h.

Referenced by tree_move().