gtkmm
4.0.2
|
Object representing an output. More...
#include <gdkmm/monitor.h>
Public Member Functions | |
Monitor (Monitor&& src) noexcept | |
Monitor& | operator= (Monitor&& src) noexcept |
~Monitor () noexcept override | |
GdkMonitor* | gobj () |
Provides access to the underlying C GObject. More... | |
const GdkMonitor* | gobj () const |
Provides access to the underlying C GObject. More... | |
GdkMonitor* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More... | |
Glib::RefPtr< Display > | get_display () |
Gets the display that this monitor belongs to. More... | |
Glib::RefPtr< const Display > | get_display () const |
Gets the display that this monitor belongs to. More... | |
void | get_geometry (Rectangle& geometry) const |
Retrieves the size and position of an individual monitor within the display coordinate space. More... | |
int | get_width_mm () const |
Gets the width in millimeters of the monitor. More... | |
int | get_height_mm () const |
Gets the height in millimeters of the monitor. More... | |
Glib::ustring | get_manufacturer () const |
Gets the name or PNP ID of the monitor's manufacturer, if available. More... | |
Glib::ustring | get_model () const |
Gets the string identifying the monitor model, if available. More... | |
Glib::ustring | get_connector () const |
Gets the name of the monitor's connector, if available. More... | |
int | get_scale_factor () const |
Gets the internal scale factor that maps from monitor coordinates to the actual device pixels. More... | |
int | get_refresh_rate () const |
Gets the refresh rate of the monitor, if available. More... | |
SubpixelLayout | get_subpixel_layout () const |
Gets information about the layout of red, green and blue primaries for each pixel in this monitor, if available. More... | |
bool | is_valid () const |
Returns true if the monitor object corresponds to a physical monitor. More... | |
Glib::SignalProxy< void()> | signal_invalidate () |
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Display > > | property_display () const |
The display of the monitor. More... | |
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_manufacturer () const |
The manufacturer name. More... | |
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_model () const |
The model name. More... | |
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_connector () const |
The connector name. More... | |
Glib::PropertyProxy_ReadOnly< int > | property_scale_factor () const |
The scale factor. More... | |
Glib::PropertyProxy_ReadOnly< Gdk::Rectangle > | property_geometry () const |
The geometry of the monitor. More... | |
Glib::PropertyProxy_ReadOnly< int > | property_width_mm () const |
The width of the monitor, in millimeters. More... | |
Glib::PropertyProxy_ReadOnly< int > | property_height_mm () const |
The height of the monitor, in millimeters. More... | |
Glib::PropertyProxy_ReadOnly< int > | property_refresh_rate () const |
The refresh rate, in millihertz. More... | |
Glib::PropertyProxy_ReadOnly< SubpixelLayout > | property_subpixel_layout () const |
The subpixel layout. More... | |
Glib::PropertyProxy_ReadOnly< bool > | property_valid () const |
Whether the monitor is still valid. More... | |
![]() | |
Object (const Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&src) noexcept | |
Object & | operator= (Object &&src) noexcept |
void * | get_data (const QueryQuark &key) |
void | set_data (const Quark &key, void *data) |
void | set_data_with_c_callback (const Quark &key, void *data, GDestroyNotify notify) |
void | set_data (const Quark &key, void *data, DestroyNotify notify) |
void | remove_data (const QueryQuark &quark) |
void * | steal_data (const QueryQuark &quark) |
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false) |
![]() | |
ObjectBase (const ObjectBase &)=delete | |
ObjectBase & | operator= (const ObjectBase &)=delete |
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value) |
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const |
void | set_property (const Glib::ustring &property_name, const PropertyType &value) |
void | get_property (const Glib::ustring &property_name, PropertyType &value) const |
PropertyType | get_property (const Glib::ustring &property_name) const |
sigc::connection | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void()> &slot) |
sigc::connection | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void()> &&slot) |
void | freeze_notify () |
void | thaw_notify () |
virtual void | reference () const |
virtual void | unreference () const |
GObject * | gobj () |
const GObject * | gobj () const |
GObject * | gobj_copy () const |
Static Public Member Functions | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. More... | |
Protected Member Functions | |
Monitor () | |
![]() | |
Object () | |
Object (const Glib::ConstructParams &construct_params) | |
Object (GObject *castitem) | |
~Object () noexcept override | |
![]() | |
ObjectBase () | |
ObjectBase (const char *custom_type_name) | |
ObjectBase (const std::type_info &custom_type_info) | |
ObjectBase (ObjectBase &&src) noexcept | |
ObjectBase & | operator= (ObjectBase &&src) noexcept |
virtual | ~ObjectBase () noexcept=0 |
void | initialize (GObject *castitem) |
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper) |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Gdk::Monitor > | wrap (GdkMonitor* object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
Additional Inherited Members | |
![]() | |
typedef void(*)(gpointer data | DestroyNotify) |
Object representing an output.
Gdk::Monitor objects represent the individual outputs that are associated with a Gdk::Display. Display has APIs to enumerate monitors with Display::get_n_monitors() and Display::get_monitor() and to find particular monitors with Display::get_monitor_at_surface().
|
noexcept |
|
overridenoexcept |
|
protected |
Glib::ustring Gdk::Monitor::get_connector | ( | ) | const |
Gets the name of the monitor's connector, if available.
Glib::RefPtr<Display> Gdk::Monitor::get_display | ( | ) |
Gets the display that this monitor belongs to.
Glib::RefPtr<const Display> Gdk::Monitor::get_display | ( | ) | const |
Gets the display that this monitor belongs to.
void Gdk::Monitor::get_geometry | ( | Rectangle& | geometry | ) | const |
Retrieves the size and position of an individual monitor within the display coordinate space.
The returned geometry is in ”application pixels”, not in ”device pixels” (see get_scale_factor()).
geometry | A Gdk::Rectangle to be filled with the monitor geometry. |
int Gdk::Monitor::get_height_mm | ( | ) | const |
Gets the height in millimeters of the monitor.
Glib::ustring Gdk::Monitor::get_manufacturer | ( | ) | const |
Gets the name or PNP ID of the monitor's manufacturer, if available.
Note that this value might also vary depending on actual display backend.
PNP ID registry is located at https://uefi.org/pnp_id_list
nullptr
. Glib::ustring Gdk::Monitor::get_model | ( | ) | const |
Gets the string identifying the monitor model, if available.
nullptr
. int Gdk::Monitor::get_refresh_rate | ( | ) | const |
Gets the refresh rate of the monitor, if available.
The value is in milli-Hertz, so a refresh rate of 60Hz is returned as 60000.
int Gdk::Monitor::get_scale_factor | ( | ) | const |
Gets the internal scale factor that maps from monitor coordinates to the actual device pixels.
On traditional systems this is 1, but on very high density outputs this can be a higher value (often 2).
This can be used if you want to create pixel based data for a particular monitor, but most of the time you’re drawing to a surface where it is better to use Gdk::Surface::get_scale_factor() instead.
SubpixelLayout Gdk::Monitor::get_subpixel_layout | ( | ) | const |
Gets information about the layout of red, green and blue primaries for each pixel in this monitor, if available.
|
static |
Get the GType for this class, for use with the underlying GObject type system.
int Gdk::Monitor::get_width_mm | ( | ) | const |
Gets the width in millimeters of the monitor.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
GdkMonitor* Gdk::Monitor::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool Gdk::Monitor::is_valid | ( | ) | const |
Returns true
if the monitor object corresponds to a physical monitor.
The monitor becomes invalid when the physical monitor is unplugged or removed.
true
if the object corresponds to a physical monitor. Glib::PropertyProxy_ReadOnly< Glib::ustring > Gdk::Monitor::property_connector | ( | ) | const |
The connector name.
Default value: ""
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Display> > Gdk::Monitor::property_display | ( | ) | const |
The display of the monitor.
Glib::PropertyProxy_ReadOnly< Gdk::Rectangle > Gdk::Monitor::property_geometry | ( | ) | const |
The geometry of the monitor.
Glib::PropertyProxy_ReadOnly< int > Gdk::Monitor::property_height_mm | ( | ) | const |
The height of the monitor, in millimeters.
Default value: 0
Glib::PropertyProxy_ReadOnly< Glib::ustring > Gdk::Monitor::property_manufacturer | ( | ) | const |
The manufacturer name.
Default value: ""
Glib::PropertyProxy_ReadOnly< Glib::ustring > Gdk::Monitor::property_model | ( | ) | const |
The model name.
Default value: ""
Glib::PropertyProxy_ReadOnly< int > Gdk::Monitor::property_refresh_rate | ( | ) | const |
The refresh rate, in millihertz.
Default value: 0
Glib::PropertyProxy_ReadOnly< int > Gdk::Monitor::property_scale_factor | ( | ) | const |
The scale factor.
Default value: 1
Glib::PropertyProxy_ReadOnly< SubpixelLayout > Gdk::Monitor::property_subpixel_layout | ( | ) | const |
The subpixel layout.
Default value: Gdk::SubpixelLayout::UNKNOWN
Glib::PropertyProxy_ReadOnly< bool > Gdk::Monitor::property_valid | ( | ) | const |
Whether the monitor is still valid.
Default value: true
Glib::PropertyProxy_ReadOnly< int > Gdk::Monitor::property_width_mm | ( | ) | const |
The width of the monitor, in millimeters.
Default value: 0
Glib::SignalProxy<void()> Gdk::Monitor::signal_invalidate | ( | ) |
void on_my_invalidate()
Flags: Run First
The signal_invalidate() signal gets emitted when the output represented by monitor gets disconnected.
|
related |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |