# tty_window_offset

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L940
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-tty_window_offset/

```c
int tty_window_offset(struct tty *tty, u_int *ox, u_int *oy, u_int *sx, u_int *sy)
```

## Parameters

- `tty` (`struct tty *`)
- `ox` (`u_int *`)
- `oy` (`u_int *`)
- `sx` (`u_int *`)
- `sy` (`u_int *`)

## Called by

- [`cmd_copy_mode_exec`](/en/tmux/3.7c/reference/c-function-cmd-copy-mode-c-cmd_copy_mode_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-copy-mode.c#L104)
- [`cmd_display_menu_get_pos`](/en/tmux/3.7c/reference/c-function-cmd-display-menu-c-cmd_display_menu_get_pos/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-display-menu.c#L217)
- [`format_cb_window_bigger`](/en/tmux/3.7c/reference/c-function-format-c-format_cb_window_bigger/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L2778)
- [`format_cb_window_offset_x`](/en/tmux/3.7c/reference/c-function-format-c-format_cb_window_offset_x/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L2950)
- [`format_cb_window_offset_y`](/en/tmux/3.7c/reference/c-function-format-c-format_cb_window_offset_y/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L2964)
- [`screen_redraw_set_context`](/en/tmux/3.7c/reference/c-function-screen-redraw-c-screen_redraw_set_context/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-redraw.c#L794)
- [`screen_write_set_client_cb`](/en/tmux/3.7c/reference/c-function-screen-write-c-screen_write_set_client_cb/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L162)
- [`server_client_check_mouse`](/en/tmux/3.7c/reference/c-function-server-client-c-server_client_check_mouse/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L901)
- [`server_client_reset_state`](/en/tmux/3.7c/reference/c-function-server-client-c-server_client_reset_state/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-client.c#L1811)
- [`window_copy_cmd_scroll_to_mouse`](/en/tmux/3.7c/reference/c-function-window-copy-c-window_copy_cmd_scroll_to_mouse/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L1561)

## Referenced declarations

- [`tty.oflag`](/en/tmux/3.7c/reference/c-struct-tty-oflag/) (attribute)
- [`tty.oox`](/en/tmux/3.7c/reference/c-struct-tty-oox/) (attribute)
- [`tty.ooy`](/en/tmux/3.7c/reference/c-struct-tty-ooy/) (attribute)
- [`tty.osx`](/en/tmux/3.7c/reference/c-struct-tty-osx/) (attribute)
- [`tty.osy`](/en/tmux/3.7c/reference/c-struct-tty-osy/) (attribute)
- [`window.sx`](/en/tmux/3.7c/reference/c-struct-window-sx/) (attribute)
- [`window.sy`](/en/tmux/3.7c/reference/c-struct-window-sy/) (attribute)
- [`tty`](/en/tmux/3.7c/reference/c-struct-tty/) (struct)
