# sort_winlink_cmp

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/sort.c#L242
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-sort-c-sort_winlink_cmp/

```c
static int sort_winlink_cmp(const void *a0, const void *b0)
```

## Parameters

- `a0` (`const void *`)
- `b0` (`const void *`)

## Called by

- [`sort_would_window_tree_swap`](/en/tmux/3.7c/reference/c-function-sort_would_window_tree_swap/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/sort.c#L411)

## Referenced by

- [`sort_get_winlinks`](/en/tmux/3.7c/reference/c-function-sort_get_winlinks/) (function)
- [`sort_get_winlinks_session`](/en/tmux/3.7c/reference/c-function-sort_get_winlinks_session/) (function)

## Referenced declarations

- [`window.activity_time`](/en/tmux/3.7c/reference/c-struct-window-activity_time/) (attribute)
- [`window.creation_time`](/en/tmux/3.7c/reference/c-struct-window-creation_time/) (attribute)
- [`winlink.idx`](/en/tmux/3.7c/reference/c-struct-winlink-idx/) (attribute)
- [`window.name`](/en/tmux/3.7c/reference/c-struct-window-name/) (attribute)
- [`sort_criteria.order`](/en/tmux/3.7c/reference/c-struct-sort_criteria-order/) (attribute)
- [`sort_criteria.reversed`](/en/tmux/3.7c/reference/c-struct-sort_criteria-reversed/) (attribute)
- [`SORT_ACTIVITY`](/en/tmux/3.7c/reference/c-enum-sort_order-sort_activity/) (constant)
- [`SORT_CREATION`](/en/tmux/3.7c/reference/c-enum-sort_order-sort_creation/) (constant)
- [`SORT_END`](/en/tmux/3.7c/reference/c-enum-sort_order-sort_end/) (constant)
- [`SORT_INDEX`](/en/tmux/3.7c/reference/c-enum-sort_order-sort_index/) (constant)
- [`SORT_MODIFIER`](/en/tmux/3.7c/reference/c-enum-sort_order-sort_modifier/) (constant)
- [`SORT_NAME`](/en/tmux/3.7c/reference/c-enum-sort_order-sort_name/) (constant)
- [`SORT_ORDER`](/en/tmux/3.7c/reference/c-enum-sort_order-sort_order/) (constant)
- [`SORT_SIZE`](/en/tmux/3.7c/reference/c-enum-sort_order-sort_size/) (constant)
- [`SORT_Z`](/en/tmux/3.7c/reference/c-enum-sort_order-sort_z/) (constant)
- [`window.sx`](/en/tmux/3.7c/reference/c-struct-window-sx/) (attribute)
- [`window.sy`](/en/tmux/3.7c/reference/c-struct-window-sy/) (attribute)
- [`timercmp`](/en/tmux/3.7c/reference/c-define-compat-h-timercmp/) (constant)
- [`winlink.window`](/en/tmux/3.7c/reference/c-struct-winlink-window/) (attribute)
