Class

GdkScreen

Description [src]

final class Gdk.Screen : GObject.Object
{
  /* No available fields */
}

GdkScreen objects are the GDK representation of the screen on which windows can be displayed and on which the pointer moves. X originally identified screens with physical screens, but nowadays it is more common to have a single GdkScreen which combines several physical monitors (see gdk_screen_get_n_monitors()).

GdkScreen 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 default visual (gdk_screen_get_system_visual()), the dimensions of the physical monitors (gdk_screen_get_monitor_geometry()), etc.

Hierarchy

hierarchy this GdkScreen ancestor_0 GObject ancestor_0--this

Ancestors

Functions

gdk_screen_get_default

Gets the default screen for the default display. (See gdk_display_get_default ()).

since: 2.2

gdk_screen_height

Gets the height of the default screen in pixels. The returned size is in ”application pixels”, not in ”device pixels” (see gdk_screen_get_monitor_scale_factor()).

deprecated: 3.22 

gdk_screen_height_mm

Returns the height of the default screen in millimeters. Note that on many X servers this value will not be correct.

deprecated: 3.22 

gdk_screen_width

Gets the width of the default screen in pixels. The returned size is in ”application pixels”, not in ”device pixels” (see gdk_screen_get_monitor_scale_factor()).

deprecated: 3.22 

gdk_screen_width_mm

Returns the width of the default screen in millimeters. Note that on many X servers this value will not be correct.

deprecated: 3.22 

Instance methods

gdk_screen_get_active_window

Returns the screen’s currently active window.

deprecated: 3.22 since: 2.10

gdk_screen_get_display

Gets the display to which the screen belongs.

since: 2.2

gdk_screen_get_font_options

Gets any options previously set with gdk_screen_set_font_options().

since: 2.10

gdk_screen_get_height

Gets the height of screen in pixels. The returned size is in ”application pixels”, not in ”device pixels” (see gdk_screen_get_monitor_scale_factor()).

deprecated: 3.22 since: 2.2

gdk_screen_get_height_mm

Returns the height of screen in millimeters.

deprecated: 3.22 since: 2.2

gdk_screen_get_monitor_at_point

Returns the monitor number in which the point (x,y) is located.

deprecated: 3.22 since: 2.2

gdk_screen_get_monitor_at_window

Returns the number of the monitor in which the largest area of the bounding rectangle of window resides.

deprecated: 3.22 since: 2.2

gdk_screen_get_monitor_geometry

Retrieves the GdkRectangle representing the size and position of the individual monitor within the entire screen area. The returned geometry is in ”application pixels”, not in ”device pixels” (see gdk_screen_get_monitor_scale_factor()).

deprecated: 3.22 since: 2.2

gdk_screen_get_monitor_height_mm

Gets the height in millimeters of the specified monitor.

deprecated: 3.22 since: 2.14

gdk_screen_get_monitor_plug_name

Returns the output name of the specified monitor. Usually something like VGA, DVI, or TV, not the actual product name of the display device.

deprecated: 3.22 since: 2.14

gdk_screen_get_monitor_scale_factor

Returns 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).

deprecated: 3.22 since: 3.10

gdk_screen_get_monitor_width_mm

Gets the width in millimeters of the specified monitor, if available.

deprecated: 3.22 since: 2.14

gdk_screen_get_monitor_workarea

Retrieves the GdkRectangle representing the size and position of the “work area” on a monitor within the entire screen area. The returned geometry is in ”application pixels”, not in ”device pixels” (see gdk_screen_get_monitor_scale_factor()).

deprecated: 3.22 since: 3.4

gdk_screen_get_n_monitors

Returns the number of monitors which screen consists of.

deprecated: 3.22 since: 2.2

gdk_screen_get_number

Gets the index of screen among the screens in the display to which it belongs. (See gdk_screen_get_display())

deprecated: 3.22 since: 2.2

gdk_screen_get_primary_monitor

Gets the primary monitor for screen. The primary monitor is considered the monitor where the “main desktop” lives. While normal application windows typically allow the window manager to place the windows, specialized desktop applications such as panels should place themselves on the primary monitor.

deprecated: 3.22 since: 2.20

gdk_screen_get_resolution

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

since: 2.10

gdk_screen_get_rgba_visual

Gets a visual to use for creating windows with an alpha channel. The windowing system on which GTK+ is running may not support this capability, in which case NULL will be returned. Even if a non-NULL value is returned, its possible that the window’s alpha channel won’t be honored when displaying the window on the screen: in particular, for X an appropriate windowing manager and compositing manager must be running to provide appropriate display.

since: 2.8

gdk_screen_get_root_window

Gets the root window of screen.

since: 2.2

gdk_screen_get_setting

Retrieves a desktop-wide setting such as double-click time for the GdkScreen screen.

since: 2.2

gdk_screen_get_system_visual

Get the system’s default visual for screen. This is the visual for the root window of the display. The return value should not be freed.

since: 2.2

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: 2.2

gdk_screen_get_width

Gets the width of screen in pixels. The returned size is in ”application pixels”, not in ”device pixels” (see gdk_screen_get_monitor_scale_factor()).

deprecated: 3.22 since: 2.2

gdk_screen_get_width_mm

Gets the width of screen in millimeters.

deprecated: 3.22 since: 2.2

gdk_screen_get_window_stack

Returns a GList of GdkWindows representing the current window stack.

since: 2.10

gdk_screen_is_composited

Returns whether windows with an RGBA visual can reasonably be expected to have their alpha channel drawn correctly on the screen.

since: 2.10

gdk_screen_list_visuals

Lists the available visuals for the specified screen. A visual describes a hardware image data format. For example, a visual might support 24-bit color, or 8-bit color, and might expect pixels to be in a certain format.

since: 2.2

gdk_screen_make_display_name

Determines the name to pass to gdk_display_open() to get a GdkDisplay with this screen as the default screen.

deprecated: 3.22 since: 2.2

gdk_screen_set_font_options

Sets the default font options for the screen. These options will be set on any PangoContext’s newly created with gdk_pango_context_get_for_screen(). Changing the default set of font options does not affect contexts that have already been created.

since: 2.10

gdk_screen_set_resolution

Sets the resolution for font handling on the screen. This is a scale factor between points specified in a PangoFontDescription 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: 2.10

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Gdk.Screen:font-options
No description available.

Gdk.Screen:resolution
No description available.

Signals

Gdk.Screen::composited-changed

The ::composited-changed signal is emitted when the composited status of the screen changes.

since: 2.10

Gdk.Screen::monitors-changed

The ::monitors-changed signal is emitted when the number, size or position of the monitors attached to the screen change.

since: 2.14

Gdk.Screen::size-changed

The ::size-changed signal is emitted when the pixel width or height of a screen changes.

since: 2.2

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.