KWin
Loading...
Searching...
No Matches
Public Types | Signals | Public Member Functions | Static Public Member Functions | Friends | List of all members
KWin::XdgToplevelInterface Class Reference

#include <xdgshell.h>

Inheritance diagram for KWin::XdgToplevelInterface:

Public Types

enum  State {
  MaximizedHorizontal = 0x1 , MaximizedVertical = 0x2 , FullScreen = 0x4 , Resizing = 0x8 ,
  Activated = 0x10 , TiledLeft = 0x20 , TiledTop = 0x40 , TiledRight = 0x80 ,
  TiledBottom = 0x100 , Suspended = 0x200 , Maximized = MaximizedHorizontal | MaximizedVertical
}
 
enum class  ResizeAnchor {
  None = 0 , Top = 1 , Bottom = 2 , Left = 4 ,
  TopLeft = 5 , BottomLeft = 6 , Right = 8 , TopRight = 9 ,
  BottomRight = 10
}
 
enum class  Capability { WindowMenu = 0x1 , Maximize = 0x2 , FullScreen = 0x4 , Minimize = 0x8 }
 

Signals

void aboutToBeDestroyed ()
 
void initializeRequested ()
 
void resetOccurred ()
 
void windowTitleChanged (const QString &windowTitle)
 
void windowClassChanged (const QString &windowClass)
 
void windowMenuRequested (KWin::SeatInterface *seat, const QPoint &pos, quint32 serial)
 
void minimumSizeChanged (const QSize &size)
 
void maximumSizeChanged (const QSize &size)
 
void moveRequested (KWin::SeatInterface *seat, quint32 serial)
 
void resizeRequested (KWin::SeatInterface *seat, KWin::XdgToplevelInterface::ResizeAnchor anchor, quint32 serial)
 
void maximizeRequested ()
 
void unmaximizeRequested ()
 
void fullscreenRequested (KWin::OutputInterface *output)
 
void unfullscreenRequested ()
 
void minimizeRequested ()
 
void parentXdgToplevelChanged ()
 

Public Member Functions

 XdgToplevelInterface (XdgSurfaceInterface *surface, ::wl_resource *resource)
 
 ~XdgToplevelInterface () override
 
XdgShellInterfaceshell () const
 
XdgSurfaceInterfacexdgSurface () const
 
SurfaceInterfacesurface () const
 
XdgToplevelInterfaceparentXdgToplevel () const
 
bool isConfigured () const
 
QString windowTitle () const
 
QString windowClass () const
 
QSize minimumSize () const
 
QSize maximumSize () const
 
quint32 sendConfigure (const QSize &size, const States &states)
 
void sendClose ()
 
void sendConfigureBounds (const QSize &size)
 
void sendWmCapabilities (Capabilities capabilities)
 

Static Public Member Functions

static SurfaceRolerole ()
 
static XdgToplevelInterfaceget (::wl_resource *resource)
 

Friends

class XdgToplevelInterfacePrivate
 

Detailed Description

The XdgToplevelInterface class represents a surface with window-like functionality such as maximize, fullscreen, resizing, minimizing, etc.

XdgToplevelInterface corresponds to the Wayland interface xdg_toplevel.

Definition at line 208 of file xdgshell.h.

Member Enumeration Documentation

◆ Capability

Enumerator
WindowMenu 
Maximize 
FullScreen 
Minimize 

Definition at line 241 of file xdgshell.h.

◆ ResizeAnchor

Enumerator
None 
Top 
Bottom 
Left 
TopLeft 
BottomLeft 
Right 
TopRight 
BottomRight 

Definition at line 228 of file xdgshell.h.

◆ State

Enumerator
MaximizedHorizontal 
MaximizedVertical 
FullScreen 
Resizing 
Activated 
TiledLeft 
TiledTop 
TiledRight 
TiledBottom 
Suspended 
Maximized 

Definition at line 213 of file xdgshell.h.

Constructor & Destructor Documentation

◆ XdgToplevelInterface()

KWin::XdgToplevelInterface::XdgToplevelInterface ( XdgSurfaceInterface * surface,
::wl_resource * resource )

Constructs an XdgToplevelInterface for the given xdg-surface surface.

Definition at line 517 of file xdgshell.cpp.

◆ ~XdgToplevelInterface()

KWin::XdgToplevelInterface::~XdgToplevelInterface ( )
override

Destructs the XdgToplevelInterface object.

Definition at line 527 of file xdgshell.cpp.

Member Function Documentation

◆ aboutToBeDestroyed

void KWin::XdgToplevelInterface::aboutToBeDestroyed ( )
signal

This signal is emitted when the xdg-toplevel is about to be destroyed.

◆ fullscreenRequested

void KWin::XdgToplevelInterface::fullscreenRequested ( KWin::OutputInterface * output)
signal

This signal is emitted when the toplevel wants to be shown in the full screen mode.

◆ get()

XdgToplevelInterface * KWin::XdgToplevelInterface::get ( ::wl_resource * resource)
static

Returns the XdgToplevelInterface for the specified wayland resource object resource.

Definition at line 678 of file xdgshell.cpp.

◆ initializeRequested

void KWin::XdgToplevelInterface::initializeRequested ( )
signal

This signal is emitted when the xdg-toplevel has commited the initial state and wants to be configured. After initializing the toplevel, you must send a configure event.

◆ isConfigured()

bool KWin::XdgToplevelInterface::isConfigured ( ) const

Returns true if the toplevel has been configured; otherwise returns false.

Definition at line 557 of file xdgshell.cpp.

◆ maximizeRequested

void KWin::XdgToplevelInterface::maximizeRequested ( )
signal

This signal is emitted when the toplevel surface wants to become maximized.

◆ maximumSize()

QSize KWin::XdgToplevelInterface::maximumSize ( ) const

Returns the maximum window geometry size of the toplevel surface.

Definition at line 582 of file xdgshell.cpp.

◆ maximumSizeChanged

void KWin::XdgToplevelInterface::maximumSizeChanged ( const QSize & size)
signal

This signal is emitted when the toplevel's maximum size has been changed.

◆ minimizeRequested

void KWin::XdgToplevelInterface::minimizeRequested ( )
signal

This signal is emitted when the toplevel wants to be iconified.

◆ minimumSize()

QSize KWin::XdgToplevelInterface::minimumSize ( ) const

Returns the minimum window geometry size of the toplevel surface.

Definition at line 577 of file xdgshell.cpp.

◆ minimumSizeChanged

void KWin::XdgToplevelInterface::minimumSizeChanged ( const QSize & size)
signal

This signal is emitted when the toplevel's minimum size has been changed.

◆ moveRequested

void KWin::XdgToplevelInterface::moveRequested ( KWin::SeatInterface * seat,
quint32 serial )
signal

This signal is emitted when the toplevel wants to be interactively moved. The seat and the serial indicate the user action in response to which this request has been issued.

◆ parentXdgToplevel()

XdgToplevelInterface * KWin::XdgToplevelInterface::parentXdgToplevel ( ) const

Returns the parent XdgToplevelInterface above which this toplevel is stacked.

Definition at line 562 of file xdgshell.cpp.

◆ parentXdgToplevelChanged

void KWin::XdgToplevelInterface::parentXdgToplevelChanged ( )
signal

This signal is emitted when the parent toplevel has changed.

◆ resetOccurred

void KWin::XdgToplevelInterface::resetOccurred ( )
signal

This signal is emitted when the toplevel has been unmapped and its state has been reset.

◆ resizeRequested

void KWin::XdgToplevelInterface::resizeRequested ( KWin::SeatInterface * seat,
KWin::XdgToplevelInterface::ResizeAnchor anchor,
quint32 serial )
signal

This signal is emitted when the toplevel wants to be interactively resized by dragging the specified anchor. The seat and the serial indicate the user action in response to which this request has been issued.

◆ role()

SurfaceRole * KWin::XdgToplevelInterface::role ( )
static

Definition at line 536 of file xdgshell.cpp.

◆ sendClose()

void KWin::XdgToplevelInterface::sendClose ( )

Sends a close event to the client. The client may choose to ignore this request.

Definition at line 640 of file xdgshell.cpp.

◆ sendConfigure()

quint32 KWin::XdgToplevelInterface::sendConfigure ( const QSize & size,
const States & states )

Sends a configure event to the client. size specifies the new window geometry size. A size of zero means the client should decide its own window dimensions.

Definition at line 587 of file xdgshell.cpp.

◆ sendConfigureBounds()

void KWin::XdgToplevelInterface::sendConfigureBounds ( const QSize & size)

Sends an event to the client specifying the maximum bounds for the surface size. Must be called before sendConfigure().

Definition at line 645 of file xdgshell.cpp.

◆ sendWmCapabilities()

void KWin::XdgToplevelInterface::sendWmCapabilities ( Capabilities capabilities)

Sends an event to the client specifying allowed actions by the compositor.

Definition at line 652 of file xdgshell.cpp.

◆ shell()

XdgShellInterface * KWin::XdgToplevelInterface::shell ( ) const

Returns the XdgShellInterface for this XdgToplevelInterface.

This is equivalent to xdgSurface()->shell().

Definition at line 542 of file xdgshell.cpp.

◆ surface()

SurfaceInterface * KWin::XdgToplevelInterface::surface ( ) const

Returns the SurfaceInterface associated with the XdgToplevelInterface.

Definition at line 552 of file xdgshell.cpp.

◆ unfullscreenRequested

void KWin::XdgToplevelInterface::unfullscreenRequested ( )
signal

This signal is emitted when the toplevel surface wants to leave the full screen mode.

◆ unmaximizeRequested

void KWin::XdgToplevelInterface::unmaximizeRequested ( )
signal

This signal is emitted when the toplevel surface wants to become unmaximized.

◆ windowClass()

QString KWin::XdgToplevelInterface::windowClass ( ) const

Returns the window class of the toplevel surface.

Definition at line 572 of file xdgshell.cpp.

◆ windowClassChanged

void KWin::XdgToplevelInterface::windowClassChanged ( const QString & windowClass)
signal

This signal is emitted when the toplevel's application id has been changed.

◆ windowMenuRequested

void KWin::XdgToplevelInterface::windowMenuRequested ( KWin::SeatInterface * seat,
const QPoint & pos,
quint32 serial )
signal

This signal is emitted when the toplevel has requested the window menu to be shown at pos. The seat and the serial indicate the user action that triggerred the request.

◆ windowTitle()

QString KWin::XdgToplevelInterface::windowTitle ( ) const

Returns the window title of the toplevel surface.

Definition at line 567 of file xdgshell.cpp.

◆ windowTitleChanged

void KWin::XdgToplevelInterface::windowTitleChanged ( const QString & windowTitle)
signal

This signal is emitted when the toplevel's title has been changed.

◆ xdgSurface()

XdgSurfaceInterface * KWin::XdgToplevelInterface::xdgSurface ( ) const

Returns the XdgSurfaceInterface associated with the XdgToplevelInterface.

Definition at line 547 of file xdgshell.cpp.

Friends And Related Symbol Documentation

◆ XdgToplevelInterfacePrivate

friend class XdgToplevelInterfacePrivate
friend

Definition at line 422 of file xdgshell.h.


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