KWayland::Client::Output

#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)
 
void destroy ()
 
EventQueueeventQueue () const
 
QRect geometry () const
 
QPoint globalPosition () const
 
bool isValid () const
 
QString manufacturer () const
 
QString model () const
 
QList< Mode > modes () 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 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
 
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 (QObject *object)
 
qobject_cast (const 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 *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
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, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &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 55 of file output.h.

Member Function Documentation

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

Emitted whenever at least one of the data changed.

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 380 of file output.cpp.

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

Definition at line 248 of file output.cpp.

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 283 of file output.cpp.

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 375 of file output.cpp.

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

Position within the global compositor space.

Definition at line 301 of file output.cpp.

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

Definition at line 347 of file output.cpp.

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

Textual description of the manufacturer.

Definition at line 306 of file output.cpp.

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
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
QString KWayland::Client::Output::model ( ) const

Textual description of the model.

Definition at line 311 of file output.cpp.

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

Definition at line 362 of file output.cpp.

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

Size in millimeters.

Definition at line 321 of file output.cpp.

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

Size in the current mode.

Definition at line 326 of file output.cpp.

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

Refresh rate in mHz of the current mode.

Definition at line 334 of file output.cpp.

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
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 342 of file output.cpp.

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

Sets the queue to use for bound proxies.

Definition at line 253 of file output.cpp.

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 243 of file output.cpp.

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

Subpixel orientation of this Output.

Definition at line 352 of file output.cpp.

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 357 of file output.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Aug 4 2020 22:49:23 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.