gtkmm 3.89.4

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Related Functions | List of all members
Gdk::Screen Class Reference

Object representing a physical screen Gdk::Screen objects are the GDK representation of a physical screen. More...

`#include <gdkmm/screen.h>`

Inheritance diagram for Gdk::Screen:
[legend]

## Public Member Functions
| Screen (Screen&& src) noexcept
Screen& | operator= (Screen&& src) noexcept
| ~Screen () noexceptoverride
GdkScreen* | gobj ()
| Provides access to the underlying C GObject. More...
const GdkScreen* | gobj () const
| Provides access to the underlying C GObject. More...
GdkScreen* | 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< Window > | get_root_window ()
| Gets the root window of screen. More...
Glib::RefPtr< const Window > | get_root_window () const
| Gets the root window of screen. More...
Glib::RefPtr< Display > | get_display ()
| Gets the display to which the screen belongs. More...
Glib::RefPtr< const Display > | get_display () const
| Gets the display to which the screen belongs. More...
std::vector< Glib::RefPtr< Window > > | get_toplevel_windows ()
| Obtains a list of all toplevel windows known to GDK on the screen screen. More...
template<class ValueType >
bool | get_setting (const Glib::ustring& name, ValueType& value) const
void | set_resolution (double dpi)
| Sets the resolution for font handling on the screen. More...
double | get_resolution () const
| Gets the resolution for font handling on the screen; see set_resolution() for full details. More...
Glib::SignalProxy< void()> | signal_monitors_changed ()
Glib::PropertyProxy< double > | property_resolution ()
| The resolution for fonts on the screen. More...
Glib::PropertyProxy_ReadOnly< double > | property_resolution () const
| The resolution for fonts on the screen. More...
Public Member Functions inherited from Glib::Object
| 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 (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)
Public Member Functions inherited from Glib::ObjectBase
| 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
Public Member Functions inherited from sigc::trackable
| trackable () noexcept
| trackable (const trackable &src) noexcept
| trackable (trackable &&src)
| ~trackable ()
void | add_destroy_notify_callback (void *data, func_destroy_notify func) const
void | notify_callbacks ()
trackable & | operator= (const trackable &src)
trackable & | operator= (trackable &&src)
void | remove_destroy_notify_callback (void *data) const

## Static Public Member Functions
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
static Glib::RefPtr< Screen > | get_default ()
| Gets the default screen for the default display. More...

## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Gdk::Screen > | wrap (GdkScreen* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Additional Inherited Members
Public Types inherited from Glib::Object
typedef void(*)(gpointer data | DestroyNotify)
Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify | func_destroy_notify
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams &construct_params)
| Object (GObject *castitem)
| ~Object () noexceptoverride
Protected Member Functions inherited from Glib::ObjectBase
| 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)

## Detailed Description

Object representing a physical screen Gdk::Screen objects are the GDK representation of a physical screen.

It is used throughout GDK and GTK+ to specify which screen the top level windows are to be displayed on. It is also used to query the screen specification and default settings such as the screen width (get_width()), etc. Note that a screen may consist of multiple monitors which are merged to form a large screen area.

## Constructor & Destructor Documentation

Gdk::Screen::Screen | ( | Screen&& | src | ) |
| noexcept

Gdk::Screen::~Screen | ( |  | ) |
| override noexcept

## Member Function Documentation

static Glib::RefPtr<Screen> Gdk::Screen::get_default | ( |  | ) |
| static

Gets the default screen for the default display.

(See Gdk::Display::get_default()).

Since gtkmm 2.2:

Returns
  A Gdk::Screen, or `nullptr` if there is no default display.

Glib::RefPtr<Display> Gdk::Screen::get_display | ( |  | ) |

Gets the display to which the screen belongs.

Since gtkmm 2.2:

Returns
  The display to which screen belongs.

Glib::RefPtr<const Display> Gdk::Screen::get_display | ( |  | ) | const

Gets the display to which the screen belongs.

Since gtkmm 2.2:

Returns
  The display to which screen belongs.

double Gdk::Screen::get_resolution | ( |  | ) | const

Gets the resolution for font handling on the screen; see set_resolution() for full details.

Since gtkmm 2.10:

Returns
  The current resolution, or -1 if no resolution has been set.

Glib::RefPtr<Window> Gdk::Screen::get_root_window | ( |  | ) |

Gets the root window of screen.

Since gtkmm 2.2:

Returns
  The root window.

Glib::RefPtr<const Window> Gdk::Screen::get_root_window | ( |  | ) | const

Gets the root window of screen.

Since gtkmm 2.2:

Returns
  The root window.

template <class ValueType >

bool Gdk::Screen::get_setting | ( | const Glib::ustring & | name,
|  | ValueType & | value
| ) |  | const

std::vector< Glib::RefPtr<Window> > Gdk::Screen::get_toplevel_windows | ( |  | ) |

Obtains a list of all toplevel windows known to GDK on the screen screen.

A toplevel window is a child of the root window (see gdk_get_default_root_window()).

Since gtkmm 2.2:

Returns
  List of toplevel windows.

static GType Gdk::Screen::get_type | ( |  | ) |
| static

Get the GType for this class, for use with the underlying GObject type system.

GdkScreen* Gdk::Screen::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

const GdkScreen* Gdk::Screen::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

GdkScreen* Gdk::Screen::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Screen& Gdk::Screen::operator= | ( | Screen&& | src | ) |
| noexcept

Glib::PropertyProxy< double > Gdk::Screen::property_resolution | ( |  | ) |

The resolution for fonts on the screen.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< double > Gdk::Screen::property_resolution | ( |  | ) | const

The resolution for fonts on the screen.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

void Gdk::Screen::set_resolution | ( | double | dpi | ) |

Sets the resolution for font handling on the screen.

This is a scale factor between points specified in a Pango::FontDescription and cairo units. The default value is 96, meaning that a 10 point font will be 13 units high. (10 * 96. / 72. = 13.3).

Since gtkmm 2.10:

Parameters

  dpi | The resolution in “dots per inch”. (Physical inches aren’t actually involved; the terminology is conventional.).

Glib::SignalProxy<void()> Gdk::Screen::signal_monitors_changed | ( |  | ) |

Slot Prototype:
  `void on_my_monitors_changed()`

The signal_monitors_changed() signal is emitted when the number, size or position of the monitors attached to the screen change.

Only for X11 and OS X for now. A future implementation for Win32 may be a possibility.

Since gtkmm 2.14:

## Friends And Related Function Documentation

Glib::RefPtr< Gdk::Screen > wrap | ( | GdkScreen * | object,
|  | bool | take_copy = `false`
| ) |  |
| related

A Glib::wrap() method for this object.

Parameters

  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.

Returns
  A C++ instance that wraps this C instance.