Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorWayland::LayerSurface Class Reference

Wayland layer-shell surface backed by zwlr_layer_shell_v1. More...

#include <phosphor-wayland/include/PhosphorWayland/LayerSurface.h>

Inheritance diagram for PhosphorWayland::LayerSurface:
[legend]

Classes

class  BatchGuard
 RAII guard: suppresses propertiesChanged() until destroyed. More...
 

Public Types

enum  Layer { LayerBackground = 0 , LayerBottom = 1 , LayerTop = 2 , LayerOverlay = 3 }
 
enum  KeyboardInteractivity { KeyboardInteractivityNone = 0 , KeyboardInteractivityExclusive = 1 , KeyboardInteractivityOnDemand = 2 }
 
enum  Anchor {
  AnchorNone = 0 , AnchorTop = 1 , AnchorBottom = 2 , AnchorLeft = 4 ,
  AnchorRight = 8
}
 

Signals

void layerChanged ()
 
void anchorsChanged ()
 
void exclusiveZoneChanged ()
 
void keyboardInteractivityChanged ()
 
void scopeChanged ()
 
void marginsChanged ()
 
void exclusiveEdgeChanged ()
 
void screenChanged ()
 
void desiredSizeChanged ()
 
void propertiesChanged ()
 

Public Member Functions

 ~LayerSurface () override
 
void setLayer (Layer layer)
 
Layer layer () const
 
void setAnchors (Anchors anchors)
 
Anchors anchors () const
 
void setExclusiveZone (int32_t zone)
 
int32_t exclusiveZone () const
 
void setKeyboardInteractivity (KeyboardInteractivity interactivity)
 
KeyboardInteractivity keyboardInteractivity () const
 
void setMargins (const QMargins &margins)
 
QMargins margins () const
 
void setExclusiveEdge (Anchors edge)
 
Anchors exclusiveEdge () const
 
void setDesiredSize (const QSize &size)
 Override the layer-shell set_size value sent on the next configure- triggering commit, decoupling it from QQuickWindow::size().
 
QSize desiredSize () const
 
void setScope (const QString &scope)
 
QString scope () const
 
void setScreen (QScreen *screen)
 
QScreen * screen () const
 

Static Public Member Functions

static LayerSurfaceget (QWindow *window)
 Get or create a LayerSurface for the given window (call before first show()).
 
static LayerSurfacefind (QWindow *window)
 Retrieve existing LayerSurface for the window, or nullptr.
 
static bool isSupported ()
 True if the compositor supports zwlr_layer_shell_v1.
 
static std::pair< uint32_t, uint32_t > computeLayerSize (Anchors anchors, const QSize &windowSize)
 Compute layer-shell size: 0 for axes anchored to both edges.
 

Static Public Attributes

static constexpr Anchors AnchorAll = Anchors(AnchorTop | AnchorBottom | AnchorLeft | AnchorRight)
 

Detailed Description

Wayland layer-shell surface backed by zwlr_layer_shell_v1.

Pure Qt API — no Wayland types exposed.

Member Enumeration Documentation

◆ Anchor

Enumerator
AnchorNone 
AnchorTop 
AnchorBottom 
AnchorLeft 
AnchorRight 

◆ KeyboardInteractivity

Enumerator
KeyboardInteractivityNone 
KeyboardInteractivityExclusive 
KeyboardInteractivityOnDemand 

◆ Layer

Enumerator
LayerBackground 
LayerBottom 
LayerTop 
LayerOverlay 

Constructor & Destructor Documentation

◆ ~LayerSurface()

PhosphorWayland::LayerSurface::~LayerSurface ( )
override

Member Function Documentation

◆ anchors()

Anchors PhosphorWayland::LayerSurface::anchors ( ) const

◆ anchorsChanged

void PhosphorWayland::LayerSurface::anchorsChanged ( )
signal

◆ computeLayerSize()

static std::pair< uint32_t, uint32_t > PhosphorWayland::LayerSurface::computeLayerSize ( Anchors  anchors,
const QSize &  windowSize 
)
static

Compute layer-shell size: 0 for axes anchored to both edges.

◆ desiredSize()

QSize PhosphorWayland::LayerSurface::desiredSize ( ) const

◆ desiredSizeChanged

void PhosphorWayland::LayerSurface::desiredSizeChanged ( )
signal

◆ exclusiveEdge()

Anchors PhosphorWayland::LayerSurface::exclusiveEdge ( ) const

◆ exclusiveEdgeChanged

void PhosphorWayland::LayerSurface::exclusiveEdgeChanged ( )
signal

◆ exclusiveZone()

int32_t PhosphorWayland::LayerSurface::exclusiveZone ( ) const

◆ exclusiveZoneChanged

void PhosphorWayland::LayerSurface::exclusiveZoneChanged ( )
signal

◆ find()

static LayerSurface * PhosphorWayland::LayerSurface::find ( QWindow *  window)
static

Retrieve existing LayerSurface for the window, or nullptr.

◆ get()

static LayerSurface * PhosphorWayland::LayerSurface::get ( QWindow *  window)
static

Get or create a LayerSurface for the given window (call before first show()).

◆ isSupported()

static bool PhosphorWayland::LayerSurface::isSupported ( )
static

True if the compositor supports zwlr_layer_shell_v1.

◆ keyboardInteractivity()

KeyboardInteractivity PhosphorWayland::LayerSurface::keyboardInteractivity ( ) const

◆ keyboardInteractivityChanged

void PhosphorWayland::LayerSurface::keyboardInteractivityChanged ( )
signal

◆ layer()

Layer PhosphorWayland::LayerSurface::layer ( ) const

◆ layerChanged

void PhosphorWayland::LayerSurface::layerChanged ( )
signal

◆ margins()

QMargins PhosphorWayland::LayerSurface::margins ( ) const

◆ marginsChanged

void PhosphorWayland::LayerSurface::marginsChanged ( )
signal

◆ propertiesChanged

void PhosphorWayland::LayerSurface::propertiesChanged ( )
signal

◆ scope()

QString PhosphorWayland::LayerSurface::scope ( ) const

◆ scopeChanged

void PhosphorWayland::LayerSurface::scopeChanged ( )
signal

◆ screen()

QScreen * PhosphorWayland::LayerSurface::screen ( ) const

◆ screenChanged

void PhosphorWayland::LayerSurface::screenChanged ( )
signal

◆ setAnchors()

void PhosphorWayland::LayerSurface::setAnchors ( Anchors  anchors)

◆ setDesiredSize()

void PhosphorWayland::LayerSurface::setDesiredSize ( const QSize &  size)

Override the layer-shell set_size value sent on the next configure- triggering commit, decoupling it from QQuickWindow::size().

Use QSize() (default-constructed) to clear the override and fall back to the window's reported size. See ITransportHandle::setDesiredSize for the architectural rationale (Qt's QWindow::resize is silently clamped against min/max sizing constraints, so client-initiated layer-shell resizes have to push the new value through the protocol directly).

◆ setExclusiveEdge()

void PhosphorWayland::LayerSurface::setExclusiveEdge ( Anchors  edge)

◆ setExclusiveZone()

void PhosphorWayland::LayerSurface::setExclusiveZone ( int32_t  zone)

◆ setKeyboardInteractivity()

void PhosphorWayland::LayerSurface::setKeyboardInteractivity ( KeyboardInteractivity  interactivity)

◆ setLayer()

void PhosphorWayland::LayerSurface::setLayer ( Layer  layer)

◆ setMargins()

void PhosphorWayland::LayerSurface::setMargins ( const QMargins &  margins)

◆ setScope()

void PhosphorWayland::LayerSurface::setScope ( const QString &  scope)

◆ setScreen()

void PhosphorWayland::LayerSurface::setScreen ( QScreen *  screen)

Member Data Documentation

◆ AnchorAll

constexpr Anchors PhosphorWayland::LayerSurface::AnchorAll = Anchors(AnchorTop | AnchorBottom | AnchorLeft | AnchorRight)
staticconstexpr

The documentation for this class was generated from the following file: