KWin::LogicalOutput Class

Generic output representation for window management purposes. More...

Header: #include <core/output.h>
CMake: find_package(KWin REQUIRED)
target_link_libraries(mytarget PRIVATE KWin::kwin)
In QML: LogicalOutput

Properties

Public Functions

KWin::BackendOutput *backendOutput() const
const std::shared_ptr<KWin::ColorDescription> &blendingColor() const
KWin::Rect geometry() const
KWin::RectF geometryF() const
bool isInternal() const
bool isPlaceholder() const
QString manufacturer() const
KWin::Rect mapFromGlobal(const KWin::Rect &rect) const
KWin::RectF mapFromGlobal(const KWin::RectF &rect) const
QPointF mapFromGlobal(const QPointF &pos) const
KWin::RectF mapToGlobal(const KWin::RectF &rect) const
KWin::Region mapToGlobal(const KWin::Region &region) const
QPointF mapToGlobal(const QPointF &pos) const
QSize modeSize() const
QString model() const
QString name() const
QSize orientateSize(const QSize &size) const
QSize physicalSize() const
QSize pixelSize() const
KWin::Rect rect() const
KWin::RectF rectF() const
uint32_t refreshRate() const
qreal scale() const
QString serialNumber() const
KWin::OutputTransform transform() const

Signals

void aboutToChange(KWin::OutputChangeSet *changeSet)
void blendingColorChanged()
void changed()
void currentModeChanged()
void geometryChanged()
void scaleChanged()
void transformChanged()

Detailed Description

Property Documentation

[read-only] devicePixelRatio : qreal

The ratio between physical pixels and logical pixels

Access functions:

qreal scale() const

Notifier signal:

void scaleChanged()

[read-only] geometry : KWin::Rect

Returns geometry of this output in device independent pixels

Access functions:

KWin::Rect geometry() const

Notifier signal:

[read-only] manufacturer : const QString

The name of this output's manufacturer

Access functions:

QString manufacturer() const

[read-only] model : const QString

The model name for this output

Access functions:

QString model() const

[read-only] name : const QString

A short identifiable name of this output

Access functions:

QString name() const

[read-only] serialNumber : const QString

The serial number for this output

Access functions:

QString serialNumber() const

Member Function Documentation

[signal] void LogicalOutput::aboutToChange(KWin::OutputChangeSet *changeSet)

Notifies that the output is about to change configuration based on a user interaction.

Be it because it gets a transformation or moved around.

Only to be used for effects

KWin::BackendOutput *LogicalOutput::backendOutput() const

Returns the associated physical/backend output device

const std::shared_ptr<KWin::ColorDescription> &LogicalOutput::blendingColor() const

The color space in which the scene is blended

[signal] void LogicalOutput::blendingColorChanged()

This signal is emitted when the blending color description changes

[signal] void LogicalOutput::changed()

Notifies that the output changed based on a user interaction.

Be it because it gets a transformation or moved around.

Only to be used for effects

[signal] void LogicalOutput::currentModeChanged()

This signal is emitted when either modeSize or refreshRate change

[signal] void LogicalOutput::geometryChanged()

This signal is emitted when the geometry of this output has changed.

Note: Notifier signal for property geometry.

KWin::RectF LogicalOutput::geometryF() const

Returns geometry of this output in device independent pixels, without rounding

bool LogicalOutput::isInternal() const

Returns whether this output is connected through an internal connector, e.g. LVDS, or eDP.

bool LogicalOutput::isPlaceholder() const

Returns true if this is a placeholder output; otherwise returns false.

A placeholder output is created when there are no any physical outputs.

KWin::Rect LogicalOutput::mapFromGlobal(const KWin::Rect &rect) const

Maps the specified rect from the global coordinate system to the output-local coords.

KWin::RectF LogicalOutput::mapFromGlobal(const KWin::RectF &rect) const

Maps the specified rect from the global coordinate system to the output-local coords.

[invokable] QPointF LogicalOutput::mapFromGlobal(const QPointF &pos) const

Maps the specified pos from the global coordinate system to the output-local coords

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

KWin::RectF LogicalOutput::mapToGlobal(const KWin::RectF &rect) const

Maps a rect in this output coordinates to the global coordinate system.

KWin::Region LogicalOutput::mapToGlobal(const KWin::Region &region) const

Maps a region in this output coordinates to the global coordinate system.

[invokable] QPointF LogicalOutput::mapToGlobal(const QPointF &pos) const

Maps a pos in this output coordinates to the global coordinate system.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

QSize LogicalOutput::modeSize() const

Returns the native resolution of the output, unaffected by the output transform

QSize LogicalOutput::orientateSize(const QSize &size) const

Orientates the size according to the current output transform

QSize LogicalOutput::physicalSize() const

Returns the non-rotated physical size of this output, in millimeters.

QSize LogicalOutput::pixelSize() const

Returns the resolution of the output.

KWin::Rect LogicalOutput::rect() const

Equivalent to Rect(QPoint(0, 0), geometry().size())

KWin::RectF LogicalOutput::rectF() const

Equivalent to RectF(QPointF(0, 0), geometryF().size())

uint32_t LogicalOutput::refreshRate() const

Returns the refresh rate of the output, in milli-Hertz

qreal LogicalOutput::scale() const

Returns the ratio between physical pixels and logical pixels.

Note: Getter function for property devicePixelRatio.

[signal] void LogicalOutput::scaleChanged()

This signal is emitted when the device pixel ratio of the output has changed.

Note: Notifier signal for property devicePixelRatio.

KWin::OutputTransform LogicalOutput::transform() const

Returns the output transform

[signal] void LogicalOutput::transformChanged()

This signal is emitted when the output transform changes, e.g. the output gets rotated, etc