# window_tree_kill_each

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1098
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-window-tree-c-window_tree_kill_each/

```c
static void window_tree_kill_each(void *modedata, void *itemdata, struct client *c, key_code key)
```

## Parameters

- `modedata` (`void *`)
- `itemdata` (`void *`)
- `c` (`struct client *`)
- `key` (`key_code`)

## Called by

- [`window_tree_kill_current_callback`](/en/tmux/latest/reference/c-function-window-tree-c-window_tree_kill_current_callback/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1140)

## Calls

- [`server_destroy_session`](/en/tmux/latest/reference/c-function-server_destroy_session/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1113)
- [`server_kill_pane`](/en/tmux/latest/reference/c-function-server_kill_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1123)
- [`server_kill_window`](/en/tmux/latest/reference/c-function-server_kill_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1119)
- [`session_destroy`](/en/tmux/latest/reference/c-function-session_destroy/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1114)
- [`window_tree_pull_item`](/en/tmux/latest/reference/c-function-window-tree-c-window_tree_pull_item/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1106)

## Referenced by

- [`window_tree_kill_tagged_callback`](/en/tmux/latest/reference/c-function-window-tree-c-window_tree_kill_tagged_callback/) (function)

## Referenced declarations

- [`__unused`](/en/tmux/latest/reference/c-define-compat-h-__unused/) (constant)
- [`client`](/en/tmux/latest/reference/c-struct-client/) (struct)
- [`key_code`](/en/tmux/latest/reference/c-typedef-key_code/) (typealias)
- [`window_tree_itemdata.type`](/en/tmux/latest/reference/c-struct-window_tree_itemdata-type/) (attribute)
- [`winlink.window`](/en/tmux/latest/reference/c-struct-winlink-window/) (attribute)
- [`WINDOW_TREE_NONE`](/en/tmux/latest/reference/c-enum-window_tree_type-window_tree_none/) (constant)
- [`WINDOW_TREE_PANE`](/en/tmux/latest/reference/c-enum-window_tree_type-window_tree_pane/) (constant)
- [`WINDOW_TREE_SESSION`](/en/tmux/latest/reference/c-enum-window_tree_type-window_tree_session/) (constant)
- [`WINDOW_TREE_WINDOW`](/en/tmux/latest/reference/c-enum-window_tree_type-window_tree_window/) (constant)
