# input_init

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

```c
struct input_ctx * input_init(struct window_pane *wp, struct bufferevent *bev, struct colour_palette *palette, struct client *c)
```

## Parameters

- `wp` (`struct window_pane *`)
- `bev` (`struct bufferevent *`)
- `palette` (`struct colour_palette *`)
- `c` (`struct client *`)

## Called by

- [`popup_display`](/en/tmux/latest/reference/c-function-popup_display/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/popup.c#L862)
- [`window_copy_view_init`](/en/tmux/latest/reference/c-function-window-copy-c-window_copy_view_init/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-copy.c#L530)
- [`window_pane_set_event`](/en/tmux/latest/reference/c-function-window_pane_set_event/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window.c#L1188)

## Calls

- [`fatalx`](/en/tmux/latest/reference/c-function-fatalx/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input.c#L876)
- [`input_reset`](/en/tmux/latest/reference/c-function-input_reset/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input.c#L882)
- [`xcalloc`](/en/tmux/latest/reference/c-function-xcalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/input.c#L865)

## Other function references

- [`input_ground_timer_callback`](/en/tmux/latest/reference/c-function-input-c-input_ground_timer_callback/) (function)
- [`input_request_timer_callback`](/en/tmux/latest/reference/c-function-input-c-input_request_timer_callback/) (function)
- [`xmalloc`](/en/tmux/latest/reference/c-function-xmalloc/) (function)

## Referenced declarations

- [`input_ctx.c`](/en/tmux/latest/reference/c-struct-input_ctx-c/) (attribute)
- [`client`](/en/tmux/latest/reference/c-struct-client/) (struct)
- [`colour_palette`](/en/tmux/latest/reference/c-struct-colour_palette/) (struct)
- [`input_ctx.event`](/en/tmux/latest/reference/c-struct-input_ctx-event/) (attribute)
- [`input_ctx.ground_timer`](/en/tmux/latest/reference/c-struct-input_ctx-ground_timer/) (attribute)
- [`input_ctx.input_buf`](/en/tmux/latest/reference/c-struct-input_ctx-input_buf/) (attribute)
- [`INPUT_BUF_START`](/en/tmux/latest/reference/c-define-input-c-input_buf_start/) (constant)
- [`input_ctx`](/en/tmux/latest/reference/c-struct-input_ctx/) (struct)
- [`input_ctx.input_space`](/en/tmux/latest/reference/c-struct-input_ctx-input_space/) (attribute)
- [`input_ctx.palette`](/en/tmux/latest/reference/c-struct-input_ctx-palette/) (attribute)
- [`input_ctx.request_timer`](/en/tmux/latest/reference/c-struct-input_ctx-request_timer/) (attribute)
- [`input_ctx.requests`](/en/tmux/latest/reference/c-struct-input_ctx-requests/) (attribute)
- [`input_ctx.since_ground`](/en/tmux/latest/reference/c-struct-input_ctx-since_ground/) (attribute)
- [`window_pane`](/en/tmux/latest/reference/c-struct-window_pane/) (struct)
- [`input_ctx.wp`](/en/tmux/latest/reference/c-struct-input_ctx-wp/) (attribute)
