# screen_write_mode_set

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L939
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-screen_write_mode_set/

```c
void screen_write_mode_set(struct screen_write_ctx *ctx, int mode)
```

## Parameters

- `ctx` (`struct screen_write_ctx *`)
- `mode` (`int`)

## Calls

- [`log_debug`](/en/tmux/latest/reference/c-function-log_debug/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L946)
- [`log_get_level`](/en/tmux/latest/reference/c-function-log_get_level/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L945)

## Other function references

- [`screen_mode_to_string`](/en/tmux/latest/reference/c-function-screen_mode_to_string/) (function)

## Referenced by

- [`input_csi_dispatch`](/en/tmux/latest/reference/c-function-input-c-input_csi_dispatch/) (function)
- [`input_csi_dispatch_rm`](/en/tmux/latest/reference/c-function-input-c-input_csi_dispatch_rm/) (function)
- [`input_csi_dispatch_rm_private`](/en/tmux/latest/reference/c-function-input-c-input_csi_dispatch_rm_private/) (function)
- [`input_csi_dispatch_sm`](/en/tmux/latest/reference/c-function-input-c-input_csi_dispatch_sm/) (function)
- [`input_csi_dispatch_sm_private`](/en/tmux/latest/reference/c-function-input-c-input_csi_dispatch_sm_private/) (function)
- [`input_esc_dispatch`](/en/tmux/latest/reference/c-function-input-c-input_esc_dispatch/) (function)
- [`input_restore_state`](/en/tmux/latest/reference/c-function-input-c-input_restore_state/) (function)

## Referenced declarations

- [`screen.mode`](/en/tmux/latest/reference/c-struct-screen-mode/) (attribute)
- [`screen_write_ctx.s`](/en/tmux/latest/reference/c-struct-screen_write_ctx-s/) (attribute)
- [`screen_write_ctx`](/en/tmux/latest/reference/c-struct-screen_write_ctx/) (struct)
