# format_defaults

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L5890
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-format_defaults/

```c
void format_defaults(struct format_tree *ft, struct client *c, struct session *s, struct winlink *wl, struct window_pane *wp)
```

## Parameters

- `ft` (`struct format_tree *`)
- `c` (`struct client *`)
- `s` (`struct session *`)
- `wl` (`struct winlink *`)
- `wp` (`struct window_pane *`)

## Called by

- [`cmd_display_message_exec`](/en/tmux/latest/reference/c-function-cmd-display-message-c-cmd_display_message_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-display-message.c#L130)
- [`cmd_list_clients_exec`](/en/tmux/latest/reference/c-function-cmd-list-clients-c-cmd_list_clients_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-clients.c#L90)
- [`cmd_list_commands`](/en/tmux/latest/reference/c-function-cmd-list-commands-c-cmd_list_commands/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-commands.c#L87)
- [`cmd_list_keys_exec`](/en/tmux/latest/reference/c-function-cmd-list-keys-c-cmd_list_keys_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-keys.c#L230)
- [`cmd_list_panes_window`](/en/tmux/latest/reference/c-function-cmd-list-panes-c-cmd_list_panes_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-panes.c#L150)
- [`cmd_list_sessions_exec`](/en/tmux/latest/reference/c-function-cmd-list-sessions-c-cmd_list_sessions_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-sessions.c#L79)
- [`cmd_list_windows_exec`](/en/tmux/latest/reference/c-function-cmd-list-windows-c-cmd_list_windows_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-list-windows.c#L97)
- [`cmd_pipe_pane_exec`](/en/tmux/latest/reference/c-function-cmd-pipe-pane-c-cmd_pipe_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-pipe-pane.c#L119)
- [`format_create_defaults`](/en/tmux/latest/reference/c-function-format_create_defaults/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L5867)
- [`format_loop_clients`](/en/tmux/latest/reference/c-function-format-c-format_loop_clients/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4894)
- [`format_loop_panes`](/en/tmux/latest/reference/c-function-format-c-format_loop_panes/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4851)
- [`format_loop_sessions`](/en/tmux/latest/reference/c-function-format-c-format_loop_sessions/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4665)
- [`format_loop_windows`](/en/tmux/latest/reference/c-function-format-c-format_loop_windows/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4781)
- [`screen_redraw_make_pane_status`](/en/tmux/latest/reference/c-function-screen-redraw-c-screen_redraw_make_pane_status/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-redraw.c#L606)
- [`server_client_set_title`](/en/tmux/latest/reference/c-function-server-client-c-server_client_set_title/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L2154)
- [`status_redraw`](/en/tmux/latest/reference/c-function-status_redraw/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/status.c#L387)
- [`tty_style_changed`](/en/tmux/latest/reference/c-function-tty-c-tty_style_changed/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L3069)
- [`window_buffer_build`](/en/tmux/latest/reference/c-function-window-buffer-c-window_buffer_build/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-buffer.c#L170)
- [`window_buffer_get_key`](/en/tmux/latest/reference/c-function-window-buffer-c-window_buffer_get_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-buffer.c#L312)
- [`window_client_get_key`](/en/tmux/latest/reference/c-function-window-client-c-window_client_get_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-client.c#L225)
- [`window_tree_build_pane`](/en/tmux/latest/reference/c-function-window-tree-c-window_tree_build_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L215)
- [`window_tree_build_session`](/en/tmux/latest/reference/c-function-window-tree-c-window_tree_build_session/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L324)
- [`window_tree_build_window`](/en/tmux/latest/reference/c-function-window-tree-c-window_tree_build_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L265)
- [`window_tree_draw_session`](/en/tmux/latest/reference/c-function-window-tree-c-window_tree_draw_session/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L528)
- [`window_tree_draw_window`](/en/tmux/latest/reference/c-function-window-tree-c-window_tree_draw_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L665)
- [`window_tree_get_key`](/en/tmux/latest/reference/c-function-window-tree-c-window_tree_get_key/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L805)

## Calls

- [`format_defaults_client`](/en/tmux/latest/reference/c-function-format-c-format_defaults_client/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L5932)
- [`format_defaults_pane`](/en/tmux/latest/reference/c-function-format_defaults_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L5938)
- [`format_defaults_paste_buffer`](/en/tmux/latest/reference/c-function-format_defaults_paste_buffer/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L5942)
- [`format_defaults_session`](/en/tmux/latest/reference/c-function-format-c-format_defaults_session/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L5934)
- [`format_defaults_winlink`](/en/tmux/latest/reference/c-function-format-c-format_defaults_winlink/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L5936)
- [`log_debug`](/en/tmux/latest/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L5896)
- [`paste_get_top`](/en/tmux/latest/reference/c-function-paste_get_top/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L5940)

## Referenced declarations

- [`window.active`](/en/tmux/latest/reference/c-struct-window-active/) (attribute)
- [`client`](/en/tmux/latest/reference/c-struct-client/) (struct)
- [`session.curw`](/en/tmux/latest/reference/c-struct-session-curw/) (attribute)
- [`format_tree`](/en/tmux/latest/reference/c-struct-format_tree/) (struct)
- [`FORMAT_TYPE_PANE`](/en/tmux/latest/reference/c-enum-format_type-format_type_pane/) (constant)
- [`FORMAT_TYPE_SESSION`](/en/tmux/latest/reference/c-enum-format_type-format_type_session/) (constant)
- [`FORMAT_TYPE_UNKNOWN`](/en/tmux/latest/reference/c-enum-format_type-format_type_unknown/) (constant)
- [`FORMAT_TYPE_WINDOW`](/en/tmux/latest/reference/c-enum-format_type-format_type_window/) (constant)
- [`session.id`](/en/tmux/latest/reference/c-struct-session-id/) (attribute)
- [`window_pane.id`](/en/tmux/latest/reference/c-struct-window_pane-id/) (attribute)
- [`winlink.idx`](/en/tmux/latest/reference/c-struct-winlink-idx/) (attribute)
- [`client.name`](/en/tmux/latest/reference/c-struct-client-name/) (attribute)
- [`client.session`](/en/tmux/latest/reference/c-struct-client-session/) (attribute)
- [`session`](/en/tmux/latest/reference/c-struct-session/) (struct)
- [`format_tree.type`](/en/tmux/latest/reference/c-struct-format_tree-type/) (attribute)
- [`winlink.window`](/en/tmux/latest/reference/c-struct-winlink-window/) (attribute)
- [`window_pane`](/en/tmux/latest/reference/c-struct-window_pane/) (struct)
- [`winlink`](/en/tmux/latest/reference/c-struct-winlink/) (struct)
