# tty_window_offset

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L780
- **Page:** https://libtmux.org/en/tmux/3.2a/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_display_menu_get_position`](/en/tmux/3.2a/reference/c-function-cmd-display-menu-c-cmd_display_menu_get_position/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-display-menu.c#L189)
- [`format_cb_window_bigger`](/en/tmux/3.2a/reference/c-function-format-c-format_cb_window_bigger/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/format.c#L2165)
- [`format_cb_window_offset_x`](/en/tmux/3.2a/reference/c-function-format-c-format_cb_window_offset_x/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/format.c#L2308)
- [`format_cb_window_offset_y`](/en/tmux/3.2a/reference/c-function-format-c-format_cb_window_offset_y/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/format.c#L2322)
- [`screen_redraw_set_context`](/en/tmux/3.2a/reference/c-function-screen-redraw-c-screen_redraw_set_context/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-redraw.c#L585)
- [`screen_write_set_client_cb`](/en/tmux/3.2a/reference/c-function-screen-write-c-screen_write_set_client_cb/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/screen-write.c#L153)
- [`server_client_check_mouse`](/en/tmux/3.2a/reference/c-function-server-client-c-server_client_check_mouse/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-client.c#L631)
- [`server_client_reset_state`](/en/tmux/3.2a/reference/c-function-server-client-c-server_client_reset_state/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-client.c#L1703)

## Referenced declarations

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