# screen_write_preview

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

```c
void screen_write_preview(struct screen_write_ctx *ctx, struct screen *src, u_int nx, u_int ny)
```

## Parameters

- `ctx` (`struct screen_write_ctx *`)
- `src` (`struct screen *`)
- `nx` (`u_int`)
- `ny` (`u_int`)

## Called by

- [`window_client_draw`](/en/tmux/latest/reference/c-function-window-client-c-window_client_draw/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-client.c#L187)
- [`window_tree_draw`](/en/tmux/latest/reference/c-function-window-tree-c-window_tree_draw/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L726)
- [`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#L543)
- [`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#L680)

## Calls

- [`grid_view_get_cell`](/en/tmux/latest/reference/c-function-grid_view_get_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L929)
- [`screen_write_cell`](/en/tmux/latest/reference/c-function-screen_write_cell/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L933)
- [`screen_write_fast_copy`](/en/tmux/latest/reference/c-function-screen_write_fast_copy/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L926)
- [`screen_write_set_cursor`](/en/tmux/latest/reference/c-function-screen-write-c-screen_write_set_cursor/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L931)

## Referenced declarations

- [`grid_cell.attr`](/en/tmux/latest/reference/c-struct-grid_cell-attr/) (attribute)
- [`screen.cx`](/en/tmux/latest/reference/c-struct-screen-cx/) (attribute)
- [`screen.cy`](/en/tmux/latest/reference/c-struct-screen-cy/) (attribute)
- [`screen.grid`](/en/tmux/latest/reference/c-struct-screen-grid/) (attribute)
- [`GRID_ATTR_REVERSE`](/en/tmux/latest/reference/c-define-tmux-h-grid_attr_reverse/) (constant)
- [`grid.hsize`](/en/tmux/latest/reference/c-struct-grid-hsize/) (attribute)
- [`screen.mode`](/en/tmux/latest/reference/c-struct-screen-mode/) (attribute)
- [`MODE_CURSOR`](/en/tmux/latest/reference/c-define-tmux-h-mode_cursor/) (constant)
- [`screen_write_ctx.s`](/en/tmux/latest/reference/c-struct-screen_write_ctx-s/) (attribute)
- [`screen`](/en/tmux/latest/reference/c-struct-screen/) (struct)
- [`screen_size_x`](/en/tmux/latest/reference/c-define-tmux-h-screen_size_x/) (constant)
- [`screen_size_y`](/en/tmux/latest/reference/c-define-tmux-h-screen_size_y/) (constant)
- [`screen_write_ctx`](/en/tmux/latest/reference/c-struct-screen_write_ctx/) (struct)
