# grid_wrap_position

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

```c
void grid_wrap_position(struct grid *gd, u_int px, u_int py, u_int *wx, u_int *wy)
```

## Parameters

- `gd` (`struct grid *`)
- `px` (`u_int`)
- `py` (`u_int`)
- `wx` (`u_int *`)
- `wy` (`u_int *`)

## Called by

- [`screen_reflow`](/en/tmux/latest/reference/c-function-screen-c-screen_reflow/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen.c#L654)
- [`window_copy_clone_screen`](/en/tmux/latest/reference/c-function-window-copy-c-window_copy_clone_screen/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L418)
- [`window_copy_resize`](/en/tmux/latest/reference/c-function-window-copy-c-window_copy_resize/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L1085)

## Referenced declarations

- [`grid_line.cellused`](/en/tmux/latest/reference/c-struct-grid_line-cellused/) (attribute)
- [`grid_line.flags`](/en/tmux/latest/reference/c-struct-grid_line-flags/) (attribute)
- [`grid`](/en/tmux/latest/reference/c-struct-grid/) (struct)
- [`GRID_LINE_WRAPPED`](/en/tmux/latest/reference/c-define-tmux-h-grid_line_wrapped/) (constant)
- [`grid.linedata`](/en/tmux/latest/reference/c-struct-grid-linedata/) (attribute)
