KWin
Loading...
Searching...
No Matches
Classes | Public Types | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
KWin::Output Class Referenceabstract

#include <output.h>

Inheritance diagram for KWin::Output:
FakeOutput KWin::DrmAbstractOutput KWin::PlaceholderOutput KWin::VirtualOutput KWin::Wayland::WaylandOutput KWin::X11Output KWin::X11PlaceholderOutput KWin::X11WindowedOutput

Classes

struct  Information
 
struct  State
 

Public Types

enum class  DpmsMode { On , Standby , Suspend , Off }
 
enum class  Capability : uint {
  Dpms = 1 , Overscan = 1 << 1 , Vrr = 1 << 2 , RgbRange = 1 << 3 ,
  HighDynamicRange = 1 << 4 , WideColorGamut = 1 << 5 , AutoRotation = 1 << 6 , IccProfile = 1 << 7 ,
  Tearing = 1 << 8
}
 
enum class  SubPixel {
  Unknown , None , Horizontal_RGB , Horizontal_BGR ,
  Vertical_RGB , Vertical_BGR
}
 
enum class  RgbRange { Automatic = 0 , Full = 1 , Limited = 2 }
 
enum class  AutoRotationPolicy { Never = 0 , InTabletMode , Always }
 

Signals

void geometryChanged ()
 
void enabledChanged ()
 
void scaleChanged ()
 
void aboutToTurnOff (std::chrono::milliseconds time)
 
void wakeUp ()
 
void aboutToChange (OutputChangeSet *changeSet)
 
void changed ()
 
void currentModeChanged ()
 
void modesChanged ()
 
void outputChange (const QRegion &damagedRegion)
 
void transformChanged ()
 
void dpmsModeChanged ()
 
void capabilitiesChanged ()
 
void overscanChanged ()
 
void vrrPolicyChanged ()
 
void rgbRangeChanged ()
 
void wideColorGamutChanged ()
 
void sdrBrightnessChanged ()
 
void highDynamicRangeChanged ()
 
void autoRotationPolicyChanged ()
 
void iccProfileChanged ()
 
void iccProfilePathChanged ()
 
void brightnessMetadataChanged ()
 
void sdrGamutWidenessChanged ()
 
void colorDescriptionChanged ()
 

Public Member Functions

 Q_ENUM (AutoRotationPolicy)
 
 Output (QObject *parent=nullptr)
 
 ~Output () override
 
void ref ()
 
void unref ()
 
QRect mapFromGlobal (const QRect &rect) const
 
QRectF mapFromGlobal (const QRectF &rect) const
 
QRectF mapToGlobal (const QRectF &rect) const
 
Q_INVOKABLE QPointF mapToGlobal (const QPointF &pos) const
 
Q_INVOKABLE QPointF mapFromGlobal (const QPointF &pos) const
 
QString name () const
 
QUuid uuid () const
 
bool isEnabled () const
 
QRect geometry () const
 
QRectF geometryF () const
 
QRect rect () const
 
QRectF rectF () const
 
uint32_t refreshRate () const
 
bool isInternal () const
 
qreal scale () const
 
QSize physicalSize () const
 
QSize pixelSize () const
 
QSize modeSize () const
 
QString eisaId () const
 
QString manufacturer () const
 
QString model () const
 
QString serialNumber () const
 
virtual RenderLooprenderLoop () const =0
 
void inhibitDirectScanout ()
 
void uninhibitDirectScanout ()
 
bool directScanoutInhibited () const
 
OutputTransform transform () const
 
OutputTransform manualTransform () const
 
QSize orientateSize (const QSize &size) const
 
void applyChanges (const OutputConfiguration &config)
 
SubPixel subPixel () const
 
QString description () const
 
Capabilities capabilities () const
 
const Edidedid () const
 
QList< std::shared_ptr< OutputMode > > modes () const
 
std::shared_ptr< OutputModecurrentMode () const
 
DpmsMode dpmsMode () const
 
virtual void setDpmsMode (DpmsMode mode)
 
uint32_t overscan () const
 
VrrPolicy vrrPolicy () const
 
RgbRange rgbRange () const
 
bool isPlaceholder () const
 
bool isNonDesktop () const
 
OutputTransform panelOrientation () const
 
bool wideColorGamut () const
 
bool highDynamicRange () const
 
uint32_t sdrBrightness () const
 
AutoRotationPolicy autoRotationPolicy () const
 
std::shared_ptr< IccProfileiccProfile () const
 
QString iccProfilePath () const
 
QByteArray mstPath () const
 
virtual bool setGammaRamp (const std::shared_ptr< ColorTransformation > &transformation)
 
virtual bool setChannelFactors (const QVector3D &rgb)
 
virtual bool updateCursorLayer ()
 
std::optional< double > maxPeakBrightness () const
 
std::optional< double > maxAverageBrightness () const
 
double minBrightness () const
 
std::optional< double > maxPeakBrightnessOverride () const
 
std::optional< double > maxAverageBrightnessOverride () const
 
std::optional< double > minBrightnessOverride () const
 
double sdrGamutWideness () const
 
const ColorDescriptioncolorDescription () const
 

Static Public Member Functions

static std::chrono::milliseconds dimAnimationTime ()
 

Protected Member Functions

void setInformation (const Information &information)
 
void setState (const State &state)
 

Protected Attributes

State m_state
 
Information m_information
 
QUuid m_uuid
 
int m_directScanoutCount = 0
 
int m_refCount = 1
 

Properties

QRect geometry
 
qreal devicePixelRatio
 
QString name
 
QString manufacturer
 
QString model
 
QString serialNumber
 

Detailed Description

Generic output representation.

Definition at line 131 of file output.h.

Member Enumeration Documentation

◆ AutoRotationPolicy

Enumerator
Never 
InTabletMode 
Always 

Definition at line 180 of file output.h.

◆ Capability

enum class KWin::Output::Capability : uint
strong
Enumerator
Dpms 
Overscan 
Vrr 
RgbRange 
HighDynamicRange 
WideColorGamut 
AutoRotation 
IccProfile 
Tearing 

Definition at line 150 of file output.h.

◆ DpmsMode

enum class KWin::Output::DpmsMode
strong
Enumerator
On 
Standby 
Suspend 
Off 

Definition at line 142 of file output.h.

◆ RgbRange

enum class KWin::Output::RgbRange
strong
Enumerator
Automatic 
Full 
Limited 

Definition at line 173 of file output.h.

◆ SubPixel

enum class KWin::Output::SubPixel
strong
Enumerator
Unknown 
None 
Horizontal_RGB 
Horizontal_BGR 
Vertical_RGB 
Vertical_BGR 

Definition at line 163 of file output.h.

Constructor & Destructor Documentation

◆ Output()

KWin::Output::Output ( QObject * parent = nullptr)
explicit

Definition at line 336 of file output.cpp.

◆ ~Output()

KWin::Output::~Output ( )
override

Definition at line 341 of file output.cpp.

Member Function Documentation

◆ aboutToChange

void KWin::Output::aboutToChange ( OutputChangeSet * changeSet)
signal

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

◆ aboutToTurnOff

void KWin::Output::aboutToTurnOff ( std::chrono::milliseconds time)
signal

Notifies that the display will be dimmed in time ms. This allows effects to plan for it and hopefully animate it

◆ applyChanges()

void KWin::Output::applyChanges ( const OutputConfiguration & config)

Definition at line 510 of file output.cpp.

◆ autoRotationPolicy()

Output::AutoRotationPolicy KWin::Output::autoRotationPolicy ( ) const

Definition at line 707 of file output.cpp.

◆ autoRotationPolicyChanged

void KWin::Output::autoRotationPolicyChanged ( )
signal

◆ brightnessMetadataChanged

void KWin::Output::brightnessMetadataChanged ( )
signal

◆ capabilities()

Output::Capabilities KWin::Output::capabilities ( ) const

Definition at line 450 of file output.cpp.

◆ capabilitiesChanged

void KWin::Output::capabilitiesChanged ( )
signal

◆ changed

void KWin::Output::changed ( )
signal

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

◆ colorDescription()

const ColorDescription & KWin::Output::colorDescription ( ) const

Definition at line 732 of file output.cpp.

◆ colorDescriptionChanged

void KWin::Output::colorDescriptionChanged ( )
signal

◆ currentMode()

std::shared_ptr< OutputMode > KWin::Output::currentMode ( ) const

Definition at line 500 of file output.cpp.

◆ currentModeChanged

void KWin::Output::currentModeChanged ( )
signal

◆ description()

QString KWin::Output::description ( ) const

Definition at line 541 of file output.cpp.

◆ dimAnimationTime()

std::chrono::milliseconds KWin::Output::dimAnimationTime ( )
static
Returns
the configured time for an output to dim

This allows the backends to coordinate with the front-end the time they allow to decorate the dimming until the display is turned off

See also
aboutToTurnOff

Definition at line 419 of file output.cpp.

◆ directScanoutInhibited()

bool KWin::Output::directScanoutInhibited ( ) const

Definition at line 414 of file output.cpp.

◆ dpmsMode()

Output::DpmsMode KWin::Output::dpmsMode ( ) const

Definition at line 647 of file output.cpp.

◆ dpmsModeChanged

void KWin::Output::dpmsModeChanged ( )
signal

◆ edid()

const Edid & KWin::Output::edid ( ) const

Definition at line 490 of file output.cpp.

◆ eisaId()

QString KWin::Output::eisaId ( ) const

Definition at line 379 of file output.cpp.

◆ enabledChanged

void KWin::Output::enabledChanged ( )
signal

This signal is emitted when the output has been enabled or disabled.

◆ geometry()

QRect KWin::Output::geometry ( ) const

Returns geometry of this output in device independent pixels.

Definition at line 460 of file output.cpp.

◆ geometryChanged

void KWin::Output::geometryChanged ( )
signal

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

◆ geometryF()

QRectF KWin::Output::geometryF ( ) const

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

Definition at line 465 of file output.cpp.

◆ highDynamicRange()

bool KWin::Output::highDynamicRange ( ) const

Definition at line 697 of file output.cpp.

◆ highDynamicRangeChanged

void KWin::Output::highDynamicRangeChanged ( )
signal

◆ iccProfile()

std::shared_ptr< IccProfile > KWin::Output::iccProfile ( ) const

Definition at line 712 of file output.cpp.

◆ iccProfileChanged

void KWin::Output::iccProfileChanged ( )
signal

◆ iccProfilePath()

QString KWin::Output::iccProfilePath ( ) const

Definition at line 717 of file output.cpp.

◆ iccProfilePathChanged

void KWin::Output::iccProfilePathChanged ( )
signal

◆ inhibitDirectScanout()

void KWin::Output::inhibitDirectScanout ( )

Definition at line 404 of file output.cpp.

◆ isEnabled()

bool KWin::Output::isEnabled ( ) const

Returns true if the output is enabled; otherwise returns false.

Definition at line 536 of file output.cpp.

◆ isInternal()

bool KWin::Output::isInternal ( ) const

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

Definition at line 399 of file output.cpp.

◆ isNonDesktop()

bool KWin::Output::isNonDesktop ( ) const

Definition at line 667 of file output.cpp.

◆ isPlaceholder()

bool KWin::Output::isPlaceholder ( ) const

Definition at line 662 of file output.cpp.

◆ manualTransform()

OutputTransform KWin::Output::manualTransform ( ) const

The transform that the user has configured, and which doesn't get changed by automatic rotation

Definition at line 374 of file output.cpp.

◆ manufacturer()

QString KWin::Output::manufacturer ( ) const

Returns the manufacturer of the screen.

Definition at line 384 of file output.cpp.

◆ mapFromGlobal() [1/3]

QPointF KWin::Output::mapFromGlobal ( const QPointF & pos) const

Definition at line 445 of file output.cpp.

◆ mapFromGlobal() [2/3]

QRect KWin::Output::mapFromGlobal ( const QRect & rect) const

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

Definition at line 425 of file output.cpp.

◆ mapFromGlobal() [3/3]

QRectF KWin::Output::mapFromGlobal ( const QRectF & rect) const

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

Definition at line 430 of file output.cpp.

◆ mapToGlobal() [1/2]

QPointF KWin::Output::mapToGlobal ( const QPointF & pos) const

Definition at line 440 of file output.cpp.

◆ mapToGlobal() [2/2]

QRectF KWin::Output::mapToGlobal ( const QRectF & rect) const

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

Definition at line 435 of file output.cpp.

◆ maxAverageBrightness()

std::optional< double > KWin::Output::maxAverageBrightness ( ) const

Definition at line 742 of file output.cpp.

◆ maxAverageBrightnessOverride()

std::optional< double > KWin::Output::maxAverageBrightnessOverride ( ) const

Definition at line 757 of file output.cpp.

◆ maxPeakBrightness()

std::optional< double > KWin::Output::maxPeakBrightness ( ) const

Definition at line 737 of file output.cpp.

◆ maxPeakBrightnessOverride()

std::optional< double > KWin::Output::maxPeakBrightnessOverride ( ) const

Definition at line 752 of file output.cpp.

◆ minBrightness()

double KWin::Output::minBrightness ( ) const

Definition at line 747 of file output.cpp.

◆ minBrightnessOverride()

std::optional< double > KWin::Output::minBrightnessOverride ( ) const

Definition at line 762 of file output.cpp.

◆ model()

QString KWin::Output::model ( ) const

Returns the model of the screen.

Definition at line 389 of file output.cpp.

◆ modes()

QList< std::shared_ptr< OutputMode > > KWin::Output::modes ( ) const

Definition at line 495 of file output.cpp.

◆ modesChanged

void KWin::Output::modesChanged ( )
signal

◆ modeSize()

QSize KWin::Output::modeSize ( ) const

Definition at line 480 of file output.cpp.

◆ mstPath()

QByteArray KWin::Output::mstPath ( ) const
Returns
the mst path of this output. Is empty if invalid

Definition at line 722 of file output.cpp.

◆ name()

QString KWin::Output::name ( ) const

Returns a short identifiable name of this output.

Definition at line 359 of file output.cpp.

◆ orientateSize()

QSize KWin::Output::orientateSize ( const QSize & size) const

Definition at line 630 of file output.cpp.

◆ outputChange

void KWin::Output::outputChange ( const QRegion & damagedRegion)
signal

◆ overscan()

uint32_t KWin::Output::overscan ( ) const

Definition at line 652 of file output.cpp.

◆ overscanChanged

void KWin::Output::overscanChanged ( )
signal

◆ panelOrientation()

OutputTransform KWin::Output::panelOrientation ( ) const

Definition at line 687 of file output.cpp.

◆ physicalSize()

QSize KWin::Output::physicalSize ( ) const

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

Definition at line 470 of file output.cpp.

◆ pixelSize()

QSize KWin::Output::pixelSize ( ) const

Returns the resolution of the output.

Definition at line 485 of file output.cpp.

◆ Q_ENUM()

KWin::Output::Q_ENUM ( AutoRotationPolicy )

◆ rect()

QRect KWin::Output::rect ( ) const
inline

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

Definition at line 484 of file output.h.

◆ rectF()

QRectF KWin::Output::rectF ( ) const
inline

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

Definition at line 489 of file output.h.

◆ ref()

void KWin::Output::ref ( )

Definition at line 345 of file output.cpp.

◆ refreshRate()

uint32_t KWin::Output::refreshRate ( ) const

Returns the approximate vertical refresh rate of this output, in mHz.

Definition at line 475 of file output.cpp.

◆ renderLoop()

virtual RenderLoop * KWin::Output::renderLoop ( ) const
pure virtual

Returns the RenderLoop for this output. If the platform does not support per screen rendering, all outputs will share the same render loop. FIXME: remove this and decouple RenderLoop from Output

Implemented in KWin::DrmAbstractOutput, KWin::VirtualOutput, KWin::Wayland::WaylandOutput, KWin::X11Output, KWin::X11PlaceholderOutput, KWin::X11WindowedOutput, KWin::PlaceholderOutput, and FakeOutput.

◆ rgbRange()

Output::RgbRange KWin::Output::rgbRange ( ) const

Definition at line 672 of file output.cpp.

◆ rgbRangeChanged

void KWin::Output::rgbRangeChanged ( )
signal

◆ scale()

qreal KWin::Output::scale ( ) const

Returns the ratio between physical pixels and logical pixels.

Definition at line 455 of file output.cpp.

◆ scaleChanged

void KWin::Output::scaleChanged ( )
signal

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

◆ sdrBrightness()

uint32_t KWin::Output::sdrBrightness ( ) const

Definition at line 702 of file output.cpp.

◆ sdrBrightnessChanged

void KWin::Output::sdrBrightnessChanged ( )
signal

◆ sdrGamutWideness()

double KWin::Output::sdrGamutWideness ( ) const

Definition at line 767 of file output.cpp.

◆ sdrGamutWidenessChanged

void KWin::Output::sdrGamutWidenessChanged ( )
signal

◆ serialNumber()

QString KWin::Output::serialNumber ( ) const

Returns the serial number of the screen.

Definition at line 394 of file output.cpp.

◆ setChannelFactors()

bool KWin::Output::setChannelFactors ( const QVector3D & rgb)
virtual

Reimplemented in KWin::DrmOutput, and KWin::X11Output.

Definition at line 677 of file output.cpp.

◆ setDpmsMode()

void KWin::Output::setDpmsMode ( DpmsMode mode)
virtual

Reimplemented in KWin::Wayland::WaylandOutput.

Definition at line 643 of file output.cpp.

◆ setGammaRamp()

bool KWin::Output::setGammaRamp ( const std::shared_ptr< ColorTransformation > & transformation)
virtual

Definition at line 682 of file output.cpp.

◆ setInformation()

void KWin::Output::setInformation ( const Information & information)
protected

Definition at line 556 of file output.cpp.

◆ setState()

void KWin::Output::setState ( const State & state)
protected

Definition at line 562 of file output.cpp.

◆ subPixel()

Output::SubPixel KWin::Output::subPixel ( ) const

Definition at line 505 of file output.cpp.

◆ transform()

OutputTransform KWin::Output::transform ( ) const

Definition at line 369 of file output.cpp.

◆ transformChanged

void KWin::Output::transformChanged ( )
signal

◆ uninhibitDirectScanout()

void KWin::Output::uninhibitDirectScanout ( )

Definition at line 409 of file output.cpp.

◆ unref()

void KWin::Output::unref ( )

Definition at line 350 of file output.cpp.

◆ updateCursorLayer()

bool KWin::Output::updateCursorLayer ( )
virtual

Reimplemented in KWin::DrmOutput, KWin::Wayland::WaylandOutput, and KWin::X11WindowedOutput.

Definition at line 727 of file output.cpp.

◆ uuid()

QUuid KWin::Output::uuid ( ) const

Returns the identifying uuid of this output.

Definition at line 364 of file output.cpp.

◆ vrrPolicy()

VrrPolicy KWin::Output::vrrPolicy ( ) const

Definition at line 657 of file output.cpp.

◆ vrrPolicyChanged

void KWin::Output::vrrPolicyChanged ( )
signal

◆ wakeUp

void KWin::Output::wakeUp ( )
signal

Notifies that the output has been turned on and the wake can be decorated.

◆ wideColorGamut()

bool KWin::Output::wideColorGamut ( ) const

Definition at line 692 of file output.cpp.

◆ wideColorGamutChanged

void KWin::Output::wideColorGamutChanged ( )
signal

Member Data Documentation

◆ m_directScanoutCount

int KWin::Output::m_directScanoutCount = 0
protected

Definition at line 480 of file output.h.

◆ m_information

Information KWin::Output::m_information
protected

Definition at line 478 of file output.h.

◆ m_refCount

int KWin::Output::m_refCount = 1
protected

Definition at line 481 of file output.h.

◆ m_state

State KWin::Output::m_state
protected

Definition at line 477 of file output.h.

◆ m_uuid

QUuid KWin::Output::m_uuid
protected

Definition at line 479 of file output.h.

Property Documentation

◆ devicePixelRatio

qreal KWin::Output::devicePixelRatio
read

Definition at line 135 of file output.h.

◆ geometry

QRect KWin::Output::geometry
read

Definition at line 134 of file output.h.

◆ manufacturer

QString KWin::Output::manufacturer
read

Definition at line 137 of file output.h.

◆ model

QString KWin::Output::model
read

Definition at line 138 of file output.h.

◆ name

QString KWin::Output::name
read

Definition at line 136 of file output.h.

◆ serialNumber

QString KWin::Output::serialNumber
read

Definition at line 139 of file output.h.


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