Phoc.InputMethodRelay
Description: Reference for Phoc.InputMethodRelay

### Struct

# PhocInputMethodRelay

#### Description [src]

    struct PhocInputMethodRelay {
      PhocSeat* seat;
      wl_list text_inputs;
      wlr_input_method_v2* input_method;
      wl_listener text_input_new;
      wl_listener input_method_new;
      wl_listener input_method_commit;
      wl_listener input_method_grab_keyboard;
      wl_listener input_method_destroy;
      wl_listener input_method_keyboard_grab_destroy;
    }

The relay structure manages the relationship between text-input and input_method interfaces on a given seat.

Multiple text-input interfaces may be bound to a relay, but at most one will be focused (receiving events) at a time. At most one input-method interface may be bound to the seat. The relay manages life cycle of both sides. When both sides are present and focused, the relay passes messages between them.

Text input focus is a subset of keyboard focus - if the text-input is in the focused state, wl_keyboard sent an enter as well. However, having wl_keyboard focused doesn’t mean that text-input will be focused.

###### Structure members

`seat:` `PhocSeat`

  No description available.

`text_inputs:` `wl_list`

  No description available.

`input_method:` `wlr_input_method_v2*`

  No description available.

`text_input_new:` `wl_listener`

  No description available.

`input_method_new:` `wl_listener`

  No description available.

`input_method_commit:` `wl_listener`

  No description available.

`input_method_grab_keyboard:` `wl_listener`

  No description available.

`input_method_destroy:` `wl_listener`

  No description available.

`input_method_keyboard_grab_destroy:` `wl_listener`

  No description available.

#### Functions

###### phoc_input_method_relay_init

No description available.

#### Instance methods

###### phoc_input_method_relay_destroy

No description available.

###### phoc_input_method_relay_im_submit

Submit the input method’s state if the given surface has focus. This allows to e.g. submit any preedit when needed.

###### phoc_input_method_relay_is_enabled

Checks whether input method is currently enabled for surface.

###### phoc_input_method_relay_set_focus

Updates the currently focused surface. Surface must belong to the same seat.