# tty_update_cursor

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

```c
static int tty_update_cursor(struct tty *tty, int mode, struct screen *s)
```

## Parameters

- `tty` (`struct tty *`)
- `mode` (`int`)
- `s` (`struct screen *`)

## Calls

- [`tty_force_cursor_colour`](/en/tmux/latest/reference/c-function-tty-c-tty_force_cursor_colour/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L776)
- [`tty_putcode`](/en/tmux/latest/reference/c-function-tty_putcode/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L782)
- [`tty_putcode_i`](/en/tmux/latest/reference/c-function-tty_putcode_i/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L821)
- [`tty_term_has`](/en/tmux/latest/reference/c-function-tty_term_has/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/tty.c#L818)

## Referenced by

- [`tty_update_mode`](/en/tmux/latest/reference/c-function-tty_update_mode/) (function)

## Referenced declarations

- [`screen.ccolour`](/en/tmux/latest/reference/c-struct-screen-ccolour/) (attribute)
- [`screen.cstyle`](/en/tmux/latest/reference/c-struct-screen-cstyle/) (attribute)
- [`tty.cstyle`](/en/tmux/latest/reference/c-struct-tty-cstyle/) (attribute)
- [`CURSOR_MODES`](/en/tmux/latest/reference/c-define-tmux-h-cursor_modes/) (constant)
- [`screen.default_ccolour`](/en/tmux/latest/reference/c-struct-screen-default_ccolour/) (attribute)
- [`screen.default_cstyle`](/en/tmux/latest/reference/c-struct-screen-default_cstyle/) (attribute)
- [`screen.default_mode`](/en/tmux/latest/reference/c-struct-screen-default_mode/) (attribute)
- [`tty.mode`](/en/tmux/latest/reference/c-struct-tty-mode/) (attribute)
- [`MODE_CURSOR`](/en/tmux/latest/reference/c-define-tmux-h-mode_cursor/) (constant)
- [`MODE_CURSOR_BLINKING`](/en/tmux/latest/reference/c-define-tmux-h-mode_cursor_blinking/) (constant)
- [`MODE_CURSOR_BLINKING_SET`](/en/tmux/latest/reference/c-define-tmux-h-mode_cursor_blinking_set/) (constant)
- [`MODE_CURSOR_VERY_VISIBLE`](/en/tmux/latest/reference/c-define-tmux-h-mode_cursor_very_visible/) (constant)
- [`screen`](/en/tmux/latest/reference/c-struct-screen/) (struct)
- [`SCREEN_CURSOR_BAR`](/en/tmux/latest/reference/c-enum-screen_cursor_style-screen_cursor_bar/) (constant)
- [`SCREEN_CURSOR_BLOCK`](/en/tmux/latest/reference/c-enum-screen_cursor_style-screen_cursor_block/) (constant)
- [`SCREEN_CURSOR_DEFAULT`](/en/tmux/latest/reference/c-enum-screen_cursor_style-screen_cursor_default/) (constant)
- [`SCREEN_CURSOR_UNDERLINE`](/en/tmux/latest/reference/c-enum-screen_cursor_style-screen_cursor_underline/) (constant)
- [`tty.term`](/en/tmux/latest/reference/c-struct-tty-term/) (attribute)
- [`tty`](/en/tmux/latest/reference/c-struct-tty/) (struct)
- [`TTYC_CIVIS`](/en/tmux/latest/reference/c-enum-tty_code_code-ttyc_civis/) (constant)
- [`TTYC_CNORM`](/en/tmux/latest/reference/c-enum-tty_code_code-ttyc_cnorm/) (constant)
- [`TTYC_CVVIS`](/en/tmux/latest/reference/c-enum-tty_code_code-ttyc_cvvis/) (constant)
- [`TTYC_SE`](/en/tmux/latest/reference/c-enum-tty_code_code-ttyc_se/) (constant)
- [`TTYC_SS`](/en/tmux/latest/reference/c-enum-tty_code_code-ttyc_ss/) (constant)
