Skip to main content

Request

#[non_exhaustive]
pub enum Request { Destroy, Commit { serial: u32, }, SetString { text: String, }, SetAction { action: Action, }, }

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Destroy

destroy the text input

Destroys the gamescope_text_input object.

This is a destructor, once received this object cannot be used any longer.

§

Commit

apply state

Apply state changes from set_string and set_action requests.

The state relating to these events is double-buffered, and each one modifies the pending state. This request replaces the current state with the pending state.

The client must set the serial to the last received serial in the done event.

Fields

§serial: u32
§

SetString

set string to be committed

Send the string text for insertion to the application.

Inserts a string at current cursor position (see commit event sequence). The string to commit could be either just a single character after a key press or the result of some composing.

Values set with this event are double-buffered. They must be applied and reset to initial on the next gamescope_text_input.commit request.

The initial value of text is an empty string.

Fields

§text: String
§

SetAction

perform an action

Set the action to be performed on commit.

Values set with this event are double-buffered. They must be applied and reset to initial on the next gamescope_text_input.commit request.

Fields

§action: Action

Trait Implementations§

Source§

impl Debug for Request

Source§

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

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

impl MessageGroup for Request

Source§

const MESSAGES: &'static [MessageDesc]

Wire representation of this MessageGroup
Source§

type Map = ResourceMap

The wrapper type for ObjectMap allowing the mapping of Object and NewId arguments to the object map during parsing.
Source§

fn is_destructor(&self) -> bool

Whether this message is a destructor Read more
Source§

fn opcode(&self) -> u16

The opcode of this message
Source§

fn since(&self) -> u32

The minimal object version for which this message exists
Source§

fn child<Meta: ObjectMetadata>( opcode: u16, version: u32, meta: &Meta, ) -> Option<Object<Meta>>

Retrieve the child Object associated with this message if any
Source§

fn from_raw(msg: Message, map: &mut Self::Map) -> Result<Self, ()>

Construct a message from its raw representation
Source§

fn into_raw(self, sender_id: u32) -> Message

Turn this message into its raw representation
Source§

unsafe fn from_raw_c( obj: *mut c_void, opcode: u32, args: *const wl_argument, ) -> Result<Request, ()>

Construct a message of this group from its C representation Read more
Source§

fn as_raw_c_in<F, T>(self, f: F) -> T
where F: FnOnce(u32, &mut [wl_argument]) -> T,

Build a C representation of this message Read more

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> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.