pub struct ZwpTextInputV1(/* private fields */);

Implementations§

source§

impl ZwpTextInputV1

source

pub fn activate(&self, seat: &WlSeat, surface: &WlSurface)

request activation

Requests the text_input object to be activated (typically when the text entry gets focus).

The seat argument is a wl_seat which maintains the focus for this activation. The surface argument is a wl_surface assigned to the text_input object and tracked for focus lost. The enter event is emitted on successful activation.

source

pub fn deactivate(&self, seat: &WlSeat)

request deactivation

Requests the text_input object to be deactivated (typically when the text entry lost focus). The seat argument is a wl_seat which was used for activation.

source

pub fn show_input_panel(&self)

show input panels

Requests input panels (virtual keyboard) to show.

source

pub fn hide_input_panel(&self)

hide input panels

Requests input panels (virtual keyboard) to hide.

source

pub fn reset(&self)

reset

Should be called by an editor widget when the input state should be reset, for example after the text was changed outside of the normal input method flow.

source

pub fn set_surrounding_text(&self, text: String, cursor: u32, anchor: u32)

sets the surrounding text

Sets the plain surrounding text around the input position. Text is UTF-8 encoded. Cursor is the byte offset within the surrounding text. Anchor is the byte offset of the selection anchor within the surrounding text. If there is no selected text anchor, then it is the same as cursor.

source

pub fn set_content_type(&self, hint: ContentHint, purpose: ContentPurpose)

set content purpose and hint

Sets the content purpose and content hint. While the purpose is the basic purpose of an input field, the hint flags allow to modify some of the behavior.

When no content type is explicitly set, a normal content purpose with default hints (auto completion, auto correction, auto capitalization) should be assumed.

source

pub fn set_cursor_rectangle(&self, x: i32, y: i32, width: i32, height: i32)

source

pub fn set_preferred_language(&self, language: String)

sets preferred language

Sets a specific language. This allows for example a virtual keyboard to show a language specific layout. The “language” argument is an RFC-3066 format language tag.

It could be used for example in a word processor to indicate the language of the currently edited document or in an instant message application which tracks languages of contacts.

source

pub fn commit_state(&self, serial: u32)

source

pub fn invoke_action(&self, button: u32, index: u32)

Trait Implementations§

source§

impl AsRef<Proxy<ZwpTextInputV1>> for ZwpTextInputV1

source§

fn as_ref(&self) -> &Proxy<Self>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for ZwpTextInputV1

source§

fn clone(&self) -> ZwpTextInputV1

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ZwpTextInputV1

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Proxy<ZwpTextInputV1>> for ZwpTextInputV1

source§

fn from(value: Proxy<Self>) -> Self

Converts to this type from the input type.
source§

impl From<ZwpTextInputV1> for Proxy<ZwpTextInputV1>

source§

fn from(value: ZwpTextInputV1) -> Self

Converts to this type from the input type.
source§

impl Interface for ZwpTextInputV1

§

type Request = Request

Set of requests associated to this interface Read more
§

type Event = Event

Set of events associated to this interface Read more
source§

const NAME: &'static str = "zwp_text_input_v1"

Name of this interface
source§

const VERSION: u32 = 1u32

Maximum supported version of this interface Read more
source§

fn c_interface() -> *const wl_interface

Pointer to the C representation of this interface
source§

impl PartialEq for ZwpTextInputV1

source§

fn eq(&self, other: &ZwpTextInputV1) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for ZwpTextInputV1

source§

impl StructuralEq for ZwpTextInputV1

source§

impl StructuralPartialEq for ZwpTextInputV1

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.