KWayland::Client::Output

Search for usage in LXR

#include <output.h>

Inheritance diagram for KWayland::Client::Output:

Public Types

enum  SubPixel {
  Unknown, None, HorizontalRGB, HorizontalBGR,
  VerticalRGB, VerticalBGR
}
 
enum  Transform {
  Normal, Rotated90, Rotated180, Rotated270,
  Flipped, Flipped90, Flipped180, Flipped270
}
 

Signals

void changed ()
 
void modeAdded (const KWayland::Client::Output::Mode &mode)
 
void modeChanged (const KWayland::Client::Output::Mode &mode)
 
void removed ()
 

Public Member Functions

 Output (QObject *parent=nullptr)
 
QString description () const
 
void destroy ()
 
EventQueueeventQueue () const
 
QRect geometry () const
 
QPoint globalPosition () const
 
bool isValid () const
 
QString manufacturer () const
 
QString model () const
 
QList< Mode > modes () const
 
QString name () const
 
 operator wl_output * ()
 
 operator wl_output * () const
 
wl_output * output ()
 
QSize physicalSize () const
 
QSize pixelSize () const
 
int refreshRate () const
 
int scale () const
 
void setEventQueue (EventQueue *queue)
 
void setup (wl_output *output)
 
SubPixel subPixel () const
 
Transform transform () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Static Public Member Functions

static Outputget (wl_output *native)
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 

Additional Inherited Members

- Properties inherited from QObject
 objectName
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Detailed Description

Wrapper for the wl_output interface.

This class provides a convenient wrapper for the wl_output interface. Its main purpose is to hold the information about one Output.

To use this class one needs to interact with the Registry. There are two possible ways to create an Output interface:

Output *c = registry->createOutput(name, version);

This creates the Output and sets it up directly. As an alternative this can also be done in a more low level way:

Output *c = new Output;
c->setup(registry->bindOutput(name, version));

The Output can be used as a drop-in replacement for any wl_output pointer as it provides matching cast operators.

Please note that all properties of Output are not valid until the changed signal has been emitted. The wayland server is pushing the information in an async way to the Output instance. By emitting changed the Output indicates that all relevant information is available.

See also
Registry

Definition at line 54 of file output.h.

Member Function Documentation

◆ changed

void KWayland::Client::Output::changed ( )
signal

Emitted whenever at least one of the data changed.

◆ description()

QString KWayland::Client::Output::description ( ) const

Returns the human readable description of the output.

Definition at line 399 of file output.cpp.

◆ destroy()

void KWayland::Client::Output::destroy ( )

Destroys the data hold by this Output.

This method is supposed to be used when the connection to the Wayland server goes away. If the connection is not valid any more, it's not possible to call release any more as that calls into the Wayland connection and the call would fail.

This method is automatically invoked when the Registry which created this Output gets destroyed.

Definition at line 419 of file output.cpp.

◆ eventQueue()

EventQueue * KWayland::Client::Output::eventQueue ( ) const
Returns
The event queue to use for bound proxies.

Definition at line 275 of file output.cpp.

◆ geometry()

QRect KWayland::Client::Output::geometry ( ) const

The geometry of this Output in pixels.

Convenient for QRect(globalPosition(), pixelSize()).

See also
globalPosition
pixelSize

Definition at line 310 of file output.cpp.

◆ get()

Output * KWayland::Client::Output::get ( wl_output *  native)
static
Returns
The Output for the native wl_output. null if there is no Output for it.
Since
5.27

Definition at line 414 of file output.cpp.

◆ globalPosition()

QPoint KWayland::Client::Output::globalPosition ( ) const

Position within the global compositor space.

Definition at line 328 of file output.cpp.

◆ isValid()

bool KWayland::Client::Output::isValid ( ) const
Returns
true if managing a wl_output.

Definition at line 374 of file output.cpp.

◆ manufacturer()

QString KWayland::Client::Output::manufacturer ( ) const

Textual description of the manufacturer.

Definition at line 333 of file output.cpp.

◆ modeAdded

void KWayland::Client::Output::modeAdded ( const KWayland::Client::Output::Mode &  mode)
signal

Emitted whenever a new Mode is added.

This normally only happens during the initial promoting of modes. Afterwards only modeChanged should be emitted.

Parameters
modeThe newly added Mode.
See also
modeChanged

◆ modeChanged

void KWayland::Client::Output::modeChanged ( const KWayland::Client::Output::Mode &  mode)
signal

Emitted whenever a Mode changes.

This normally means that the Mode::Flag::Current is added or removed.

Parameters
modeThe changed Mode

◆ model()

QString KWayland::Client::Output::model ( ) const

Textual description of the model.

Definition at line 338 of file output.cpp.

◆ modes()

QList< Output::Mode > KWayland::Client::Output::modes ( ) const
Returns
The Modes of this Output.

Definition at line 389 of file output.cpp.

◆ name()

QString KWayland::Client::Output::name ( ) const

Returns the name of the output.

Definition at line 394 of file output.cpp.

◆ physicalSize()

QSize KWayland::Client::Output::physicalSize ( ) const

Size in millimeters.

Definition at line 348 of file output.cpp.

◆ pixelSize()

QSize KWayland::Client::Output::pixelSize ( ) const

Size in the current mode.

Definition at line 353 of file output.cpp.

◆ refreshRate()

int KWayland::Client::Output::refreshRate ( ) const

Refresh rate in mHz of the current mode.

Definition at line 361 of file output.cpp.

◆ removed

void KWayland::Client::Output::removed ( )
signal

The corresponding global for this interface on the Registry got removed.

This signal gets only emitted if the Compositor got created by Registry::createOutput

Since
5.5

◆ scale()

int KWayland::Client::Output::scale ( ) const

Scaling factor of this output.

A scale larger than 1 means that the compositor will automatically scale surface buffers by this amount when rendering. This is used for very high resolution displays where applications rendering at the native resolution would be too small to be legible.

Definition at line 369 of file output.cpp.

◆ setEventQueue()

void KWayland::Client::Output::setEventQueue ( EventQueue queue)

Sets the queue to use for bound proxies.

Definition at line 280 of file output.cpp.

◆ setup()

void KWayland::Client::Output::setup ( wl_output *  output)

Setup this Compositor to manage the output.

When using Registry::createOutput there is no need to call this method.

Definition at line 270 of file output.cpp.

◆ subPixel()

Output::SubPixel KWayland::Client::Output::subPixel ( ) const

Subpixel orientation of this Output.

Definition at line 379 of file output.cpp.

◆ transform()

Output::Transform KWayland::Client::Output::transform ( ) const

Transform that maps framebuffer to Output.

The purpose is mainly to allow clients render accordingly and tell the compositor, so that for fullscreen surfaces, the compositor will still be able to scan out directly from client surfaces.

Definition at line 384 of file output.cpp.


The documentation for this class was generated from the following files:
QString name() const
Returns the name of the output.
Definition: output.cpp:394
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Jun 6 2023 03:50:27 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.