pub struct OrgKdePlasmaSurface {
    id: ObjectId,
    version: u32,
    data: Option<Arc<dyn ObjectData>>,
    backend: WeakBackend,
}
Expand description

metadata interface

An interface that may be implemented by a wl_surface, for implementations that provide the shell user interface.

It provides requests to set surface roles, assign an output or set the position in output coordinates.

On the server side the object is automatically destroyed when the related wl_surface is destroyed. On client side, org_kde_plasma_surface.destroy() must be called before destroying the wl_surface object.

See also the Event enum for this interface.

Fields§

§id: ObjectId§version: u32§data: Option<Arc<dyn ObjectData>>§backend: WeakBackend

Implementations§

source§

impl OrgKdePlasmaSurface

source

pub fn destroy(&self)

remove org_kde_plasma_surface interface

The org_kde_plasma_surface interface is removed from the wl_surface object that was turned into a shell surface with the org_kde_plasma_shell.get_surface request. The shell surface role is lost and wl_surface is unmapped.

source

pub fn set_output(&self, output: &WlOutput)

assign an output to this shell surface

Assign an output to this shell surface. The compositor will use this information to set the position when org_kde_plasma_surface.set_position request is called.

source

pub fn set_position(&self, x: i32, y: i32)

change the shell surface position

Move the surface to new coordinates.

Coordinates are global, for example 50,50 for a 1920,0+1920x1080 output is 1970,50 in global coordinates space.

Use org_kde_plasma_surface.set_output to assign an output to this surface.

source

pub fn set_role(&self, role: u32)

assign a role to this surface

Assign a role to a shell surface.

The compositor handles surfaces depending on their role. See the explanation below.

This request fails if the surface already has a role, this means the surface role may be assigned only once.

== Surfaces with splash role ==

Splash surfaces are placed above every other surface during the shell startup phase.

The surfaces are placed according to the output coordinates. No size is imposed to those surfaces, the shell has to resize them according to output size.

These surfaces are meant to hide the desktop during the startup phase so that the user will always see a ready to work desktop.

A shell might not create splash surfaces if the compositor reveals the desktop in an alternative fashion, for example with a fade in effect.

That depends on how much time the desktop usually need to prepare the workspace or specific design decisions. This specification doesn’t impose any particular design.

When the startup phase is finished, the shell will send the org_kde_plasma.desktop_ready request to the compositor.

== Surfaces with desktop role ==

Desktop surfaces are placed below all other surfaces and are used to show the actual desktop view with icons, search results or controls the user will interact with. What to show depends on the shell implementation.

The surfaces are placed according to the output coordinates. No size is imposed to those surfaces, the shell has to resize them according to output size.

Only one surface per output can have the desktop role.

== Surfaces with dashboard role ==

Dashboard surfaces are placed above desktop surfaces and are used to show additional widgets and controls.

The surfaces are placed according to the output coordinates. No size is imposed to those surfaces, the shell has to resize them according to output size.

Only one surface per output can have the dashboard role.

== Surfaces with config role ==

A configuration surface is shown when the user wants to configure panel or desktop views.

Only one surface per output can have the config role.

TODO: This should grab the input like popup menus, right?

== Surfaces with overlay role ==

Overlays are special surfaces that shows for a limited amount of time. Such surfaces are useful to display things like volume, brightness and status changes.

Compositors may decide to show those surfaces in a layer above all surfaces, even full screen ones if so is desired.

== Surfaces with notification role ==

Notification surfaces display informative content for a limited amount of time. The compositor may decide to show them in a corner depending on the configuration.

These surfaces are shown in a layer above all other surfaces except for full screen ones.

== Surfaces with lock role ==

The lock surface is shown by the compositor when the session is locked, users interact with it to unlock the session.

Compositors should move lock surfaces to 0,0 in output coordinates space and hide all other surfaces for security sake. For the same reason it is recommended that clients make the lock surface as big as the screen.

Only one surface per output can have the lock role.

source

pub fn set_panel_behavior(&self, flag: u32)

set or unset the panel

Set flags bitmask as described by the flag enum. Pass 0 to unset any flag, the surface will adjust its behavior to the default.

source

pub fn set_skip_taskbar(&self, skip: u32)

make the window skip the taskbar

Setting this bit to the window, will make it say it prefers to not be listed in the taskbar. Taskbar implementations may or may not follow this hint.

source

pub fn panel_auto_hide_hide(&self)

Hide the auto-hiding panel

A panel surface with panel_behavior auto_hide can perform this request to hide the panel on a screen edge without unmapping it. The compositor informs the client about the panel being hidden with the event auto_hidden_panel_hidden.

The compositor will restore the visibility state of the surface when the pointer touches the screen edge the panel borders. Once the compositor restores the visibility the event auto_hidden_panel_shown will be sent. This event will also be sent if the compositor is unable to hide the panel.

The client can also request to show the panel again with the request panel_auto_hide_show.

source

pub fn panel_auto_hide_show(&self)

Show the auto-hiding panel

A panel surface with panel_behavior auto_hide can perform this request to show the panel again which got hidden with panel_auto_hide_hide.

source

pub fn set_panel_takes_focus(&self, takes_focus: u32)

Whether a panel takes focus

By default various org_kde_plasma_surface roles do not take focus and cannot be activated. With this request the compositor can be instructed to pass focus also to this org_kde_plasma_surface.

source

pub fn set_skip_switcher(&self, skip: u32)

make the window not appear in a switcher

Setting this bit will indicate that the window prefers not to be listed in a switcher.

source

pub fn open_under_cursor(&self)

open under cursor

Request the initial position of this surface to be under the current cursor position. Has to be called before attaching any buffer to this surface.

Trait Implementations§

source§

impl Borrow<ObjectId> for OrgKdePlasmaSurface

source§

fn borrow(&self) -> &ObjectId

Immutably borrows from an owned value. Read more
source§

impl Clone for OrgKdePlasmaSurface

source§

fn clone(&self) -> OrgKdePlasmaSurface

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 OrgKdePlasmaSurface

source§

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

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

impl Hash for OrgKdePlasmaSurface

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<Weak<OrgKdePlasmaSurface>> for OrgKdePlasmaSurface

source§

fn eq(&self, other: &Weak<OrgKdePlasmaSurface>) -> 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 PartialEq for OrgKdePlasmaSurface

source§

fn eq(&self, other: &OrgKdePlasmaSurface) -> 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 Proxy for OrgKdePlasmaSurface

§

type Request<'request> = Request<'request>

The request enum for this interface
§

type Event = Event

The event enum for this interface
source§

fn interface() -> &'static Interface

The interface description
source§

fn id(&self) -> ObjectId

The ID of this object
source§

fn version(&self) -> u32

The version of this object
source§

fn data<U: Send + Sync + 'static>(&self) -> Option<&U>

Access the user-data associated with this object
source§

fn object_data(&self) -> Option<&Arc<dyn ObjectData>>

Access the raw data associated with this object. Read more
source§

fn backend(&self) -> &WeakBackend

Access the backend associated with this object
source§

fn send_request(&self, req: Self::Request<'_>) -> Result<(), InvalidId>

Send a request for this object. Read more
source§

fn send_constructor<I: Proxy>( &self, req: Self::Request<'_>, data: Arc<dyn ObjectData>, ) -> Result<I, InvalidId>

Send a request for this object that creates another object. Read more
source§

fn from_id(conn: &Connection, id: ObjectId) -> Result<Self, InvalidId>

Create an object proxy from its ID Read more
source§

fn inert(backend: WeakBackend) -> Self

Create an inert object proxy Read more
source§

fn parse_event( conn: &Connection, msg: Message<ObjectId, OwnedFd>, ) -> Result<(Self, Self::Event), DispatchError>

Parse a event for this object Read more
source§

fn write_request<'a>( &self, conn: &Connection, msg: Self::Request<'a>, ) -> Result<(Message<ObjectId, BorrowedFd<'a>>, Option<(&'static Interface, u32)>), InvalidId>

Serialize a request for this object Read more
source§

fn is_alive(&self) -> bool

Checks if the Wayland object associated with this proxy is still alive
source§

fn downgrade(&self) -> Weak<Self>

Creates a weak handle to this object Read more
source§

impl Eq for OrgKdePlasmaSurface

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