# window_tree_draw_window

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L663
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-window-tree-c-window_tree_draw_window/

```c
static void window_tree_draw_window(struct window_tree_modedata *data, struct session *s, struct window *w, struct screen_write_ctx *ctx, u_int sx, u_int sy)
```

## Parameters

- `data` (`struct window_tree_modedata *`)
- `s` (`struct session *`)
- `w` (`struct window *`)
- `ctx` (`struct screen_write_ctx *`)
- `sx` (`u_int`)
- `sy` (`u_int`)

## Called by

- [`window_tree_draw`](/en/tmux/3.2a/reference/c-function-window-tree-c-window_tree_draw/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L814)

## Calls

- [`options_get_number`](/en/tmux/3.2a/reference/c-function-options_get_number/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L678)
- [`screen_write_cursormove`](/en/tmux/3.2a/reference/c-function-screen_write_cursormove/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L732)
- [`screen_write_preview`](/en/tmux/3.2a/reference/c-function-screen_write_preview/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L775)
- [`screen_write_puts`](/en/tmux/3.2a/reference/c-function-screen_write_puts/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L735)
- [`screen_write_vline`](/en/tmux/3.2a/reference/c-function-screen_write_vline/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L733)
- [`window_count_panes`](/en/tmux/3.2a/reference/c-function-window_count_panes/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L675)
- [`window_pane_index`](/en/tmux/3.2a/reference/c-function-window_pane_index/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L777)
- [`window_tree_draw_label`](/en/tmux/3.2a/reference/c-function-window-tree-c-window_tree_draw_label/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L780)
- [`xasprintf`](/en/tmux/3.2a/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L779)

## Referenced declarations

- [`window.active`](/en/tmux/3.2a/reference/c-struct-window-active/) (attribute)
- [`window_pane.base`](/en/tmux/3.2a/reference/c-struct-window_pane-base/) (attribute)
- [`screen.cx`](/en/tmux/3.2a/reference/c-struct-screen-cx/) (attribute)
- [`screen.cy`](/en/tmux/3.2a/reference/c-struct-screen-cy/) (attribute)
- [`grid_cell.data`](/en/tmux/3.2a/reference/c-struct-grid_cell-data/) (attribute)
- [`grid_cell.fg`](/en/tmux/3.2a/reference/c-struct-grid_cell-fg/) (attribute)
- [`grid_default_cell`](/en/tmux/3.2a/reference/c-variable-grid_default_cell/) (attribute)
- [`window_pane.offset`](/en/tmux/3.2a/reference/c-struct-window_pane-offset/) (attribute)
- [`session.options`](/en/tmux/3.2a/reference/c-struct-session-options/) (attribute)
- [`window.panes`](/en/tmux/3.2a/reference/c-struct-window-panes/) (attribute)
- [`screen_write_ctx.s`](/en/tmux/3.2a/reference/c-struct-screen_write_ctx-s/) (attribute)
- [`screen_write_ctx`](/en/tmux/3.2a/reference/c-struct-screen_write_ctx/) (struct)
- [`session`](/en/tmux/3.2a/reference/c-struct-session/) (struct)
- [`window`](/en/tmux/3.2a/reference/c-struct-window/) (struct)
- [`window_tree_modedata`](/en/tmux/3.2a/reference/c-struct-window_tree_modedata/) (struct)
