# window_tree_get_target

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

```c
static char * window_tree_get_target(struct window_tree_itemdata *item, struct cmd_find_state *fs)
```

## Parameters

- `item` (`struct window_tree_itemdata *`)
- `fs` (`struct cmd_find_state *`)

## Called by

- [`window_tree_command_each`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_command_each/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1049)
- [`window_tree_key`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1337)

## Calls

- [`cmd_find_clear_state`](/en/tmux/3.7c/reference/c-function-cmd_find_clear_state/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1034)
- [`cmd_find_from_winlink_pane`](/en/tmux/3.7c/reference/c-function-cmd_find_from_winlink_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1036)
- [`window_tree_pull_item`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_pull_item/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1011)
- [`xasprintf`](/en/tmux/3.7c/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L1020)

## Referenced declarations

- [`cmd_find_state`](/en/tmux/3.7c/reference/c-struct-cmd_find_state/) (struct)
- [`window_pane.id`](/en/tmux/3.7c/reference/c-struct-window_pane-id/) (attribute)
- [`winlink.idx`](/en/tmux/3.7c/reference/c-struct-winlink-idx/) (attribute)
- [`session.name`](/en/tmux/3.7c/reference/c-struct-session-name/) (attribute)
- [`window_tree_itemdata.type`](/en/tmux/3.7c/reference/c-struct-window_tree_itemdata-type/) (attribute)
- [`window_tree_itemdata`](/en/tmux/3.7c/reference/c-struct-window_tree_itemdata/) (struct)
- [`WINDOW_TREE_NONE`](/en/tmux/3.7c/reference/c-enum-window_tree_type-window_tree_none/) (constant)
- [`WINDOW_TREE_PANE`](/en/tmux/3.7c/reference/c-enum-window_tree_type-window_tree_pane/) (constant)
- [`WINDOW_TREE_SESSION`](/en/tmux/3.7c/reference/c-enum-window_tree_type-window_tree_session/) (constant)
- [`WINDOW_TREE_WINDOW`](/en/tmux/3.7c/reference/c-enum-window_tree_type-window_tree_window/) (constant)
