Event

Enum Event 

Source
#[non_exhaustive]
pub enum Event { NamespaceInUse, LayoutDemand(LayoutDemandArgs), UserCommand(CString), UserCommandTags(u32), }
Expand description

The event enum for RiverLayoutV3

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.
§

NamespaceInUse

the requested namespace is already in use

After this event is sent, all requests aside from the destroy event will be ignored by the server. If the client wishes to try again with a different namespace they must create a new river_layout_v3 object.

Since version 1.

§

LayoutDemand(LayoutDemandArgs)

the compositor requires a layout

The compositor sends this event to inform the client that it requires a layout for a set of views.

The usable width and height indicate the space in which the client can safely position views without interfering with desktop widgets such as panels.

The serial of this event is used to identify subsequent requests as belonging to this layout demand. Beware that the client might need to handle multiple layout demands at the same time.

The server will ignore responses to all but the most recent layout demand. Thus, clients are only required to respond to the most recent layout_demand received. If a newer layout_demand is received before the client has finished responding to an old demand, the client should abort work on the old demand as any further work would be wasted.

Since version 1.

§

UserCommand(CString)

a command sent by the user

This event informs the client of a command sent to it by the user.

The semantic meaning of the command is left for the client to decide. It is also free to ignore it entirely if it so chooses.

A layout_demand will be sent after this event if the compositor is currently using this layout object to arrange the output.

If version 2 or higher of the river_layout_v3 object is bound, the user_command_tags event is guaranteed to be sent directly before the user_command event.

Since version 1.

Tuple Fields

§0: CString

command

§

UserCommandTags(u32)

a command sent by the user

If version 2 or higher of the river_layout_v3 object is bound, this event will be sent directly before every user_command event. This allows layout generators to be aware of the active tags when a user command is sent. This is necessary for generators wanting to keep settings on a per-tag basis.

Since version 2.

Tuple Fields

§0: u32

tags

tags of the output, 32-bit bitfield

Trait Implementations§

Source§

impl Debug for Event

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

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