# screen_write_setselection

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

```c
void screen_write_setselection(struct screen_write_ctx *ctx, const char *clip, u_char *str, u_int len)
```

## Parameters

- `ctx` (`struct screen_write_ctx *`)
- `clip` (`const char *`)
- `str` (`u_char *`)
- `len` (`u_int`)

## Called by

- [`input_osc_52`](/en/tmux/3.7c/reference/c-function-input-c-input_osc_52/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input.c#L3292)
- [`window_copy_append_selection`](/en/tmux/3.7c/reference/c-function-window-copy-c-window_copy_append_selection/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L5584)
- [`window_copy_copy_buffer`](/en/tmux/3.7c/reference/c-function-window-copy-c-window_copy_copy_buffer/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L5498)

## Calls

- [`screen_write_initctx`](/en/tmux/3.7c/reference/c-function-screen-write-c-screen_write_initctx/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L2867)
- [`tty_write`](/en/tmux/3.7c/reference/c-function-tty_write/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L2872)

## Other function references

- [`tty_cmd_setselection`](/en/tmux/3.7c/reference/c-function-tty_cmd_setselection/) (function)

## Referenced declarations

- [`screen_write_ctx`](/en/tmux/3.7c/reference/c-struct-screen_write_ctx/) (struct)
