# screen_set_selection

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen.c#L369
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-screen_set_selection/

```c
void screen_set_selection(struct screen *s, u_int sx, u_int sy, u_int ex, u_int ey, u_int rectangle, int modekeys, struct grid_cell *gc)
```

## Parameters

- `s` (`struct screen *`)
- `sx` (`u_int`)
- `sy` (`u_int`)
- `ex` (`u_int`)
- `ey` (`u_int`)
- `rectangle` (`u_int`)
- `modekeys` (`int`)
- `gc` (`struct grid_cell *`)

## Called by

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

## Calls

- [`xcalloc`](/en/tmux/3.2a/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen.c#L373)

## Referenced by

- [`server_client_push_stderr`](/en/tmux/3.2a/reference/c-function-server_client_push_stderr/) (function)

## Referenced declarations

- [`screen_sel.cell`](/en/tmux/3.2a/reference/c-struct-screen_sel-cell/) (attribute)
- [`screen_sel.ex`](/en/tmux/3.2a/reference/c-struct-screen_sel-ex/) (attribute)
- [`screen_sel.ey`](/en/tmux/3.2a/reference/c-struct-screen_sel-ey/) (attribute)
- [`grid_cell`](/en/tmux/3.2a/reference/c-struct-grid_cell/) (struct)
- [`screen_sel.hidden`](/en/tmux/3.2a/reference/c-struct-screen_sel-hidden/) (attribute)
- [`screen_sel.modekeys`](/en/tmux/3.2a/reference/c-struct-screen_sel-modekeys/) (attribute)
- [`screen_sel.rectangle`](/en/tmux/3.2a/reference/c-struct-screen_sel-rectangle/) (attribute)
- [`screen`](/en/tmux/3.2a/reference/c-struct-screen/) (struct)
- [`screen.sel`](/en/tmux/3.2a/reference/c-struct-screen-sel/) (attribute)
- [`grid.sx`](/en/tmux/3.2a/reference/c-struct-grid-sx/) (attribute)
- [`screen_sel.sx`](/en/tmux/3.2a/reference/c-struct-screen_sel-sx/) (attribute)
- [`grid.sy`](/en/tmux/3.2a/reference/c-struct-grid-sy/) (attribute)
- [`screen_sel.sy`](/en/tmux/3.2a/reference/c-struct-screen_sel-sy/) (attribute)
