Screen
Object Hierarchy:
Gdk.Screen
Gdk.Screen
Gdk.Screen
GLib.Object
GLib.Object
GLib.Object->Gdk.Screen
Description:
[ CCode ( type_id = "gdk_screen_get_type ()" ) ]public class Screen : Object
Screen 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 Screen
which combines several physical monitors (see 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 (
get_system_visual ), the dimensions of the physical monitors (
get_monitor_geometry ), etc.
Content:
Properties:
Static methods:
public static unowned Screen ? get_default ()
Gets the default screen for the default display.
public static int height ()
Gets the height of the default screen in pixels.
public static int height_mm ()
Returns the height of the default screen in millimeters.
public static int width ()
Gets the width of the default screen in pixels.
public static int width_mm ()
Returns the width of the default screen in millimeters.
Creation methods:
Methods:
public Window ? get_active_window ()
Returns the screen’s currently active window.
public unowned Display get_display ()
Gets the display to which the this
belongs.
public unowned FontOptions ? get_font_options ()
public int get_height ()
Gets the height of this in pixels.
public int get_height_mm ()
Returns the height of this in
millimeters.
public int get_monitor_at_point (int x, int y)
Returns the monitor number in which the point (x
,y
) is located.
public int get_monitor_at_window (Window window)
Returns the number of the monitor in which the largest area of the
bounding rectangle of window
resides.
public void get_monitor_geometry (int monitor_num, out Rectangle dest)
Retrieves the Rectangle
representing the size and position of the individual monitor within the entire screen area.
public int get_monitor_height_mm (int monitor_num)
Gets the height in millimeters of the specified monitor.
public string ? get_monitor_plug_name (int monitor_num)
Returns the output name of the specified monitor.
public int get_monitor_scale_factor (int monitor_num)
Returns the internal scale factor that maps from monitor coordinates
to the actual device pixels.
public int get_monitor_width_mm (int monitor_num)
Gets the width in millimeters of the specified monitor, if available.
public Rectangle get_monitor_workarea (int monitor_num)
Retrieves the Rectangle
representing the size and position of the “work area” on a monitor within the entire screen area.
public int get_n_monitors ()
Returns the number of monitors which this
consists of.
public int get_number ()
Gets the index of this among the
screens in the display to which it belongs.
public int get_primary_monitor ()
Gets the primary monitor for this .
public double get_resolution ()
Gets the resolution for font handling on the screen; see
set_resolution for full details.
public unowned Visual ? get_rgba_visual ()
Gets a visual to use for creating windows with an alpha channel.
public unowned Window get_root_window ()
Gets the root window of this .
public bool get_setting (string name, Value value)
Retrieves a desktop-wide setting such as double-click time for the
Screen this .
public unowned Visual get_system_visual ()
Get the system’s default visual for this
.
public List <unowned Window > get_toplevel_windows ()
Obtains a list of all toplevel windows known to GDK on the screen
this .
public int get_width ()
Gets the width of this in pixels.
public int get_width_mm ()
Gets the width of this in
millimeters.
public List <Window >? get_window_stack ()
Returns a List of
Window s representing the current window stack.
public bool is_composited ()
Returns whether windows with an RGBA visual can reasonably be expected
to have their alpha channel drawn correctly on the screen.
public List <unowned Visual > list_visuals ()
Lists the available visuals for the specified
this .
public string make_display_name ()
Determines the name to pass to
open to get a Display with this
screen as the default screen.
public void set_font_options (FontOptions ? options)
Sets the default font options for the screen.
public void set_resolution (double dpi)
Sets the resolution for font handling on the screen.
Signals:
public signal void composited_changed ()
The composited_changed signal is emitted
when the composited status of the screen changes
public signal void monitors_changed ()
The monitors_changed signal is emitted
when the number, size or position of the monitors attached to the screen change.
public signal void size_changed ()
The size_changed signal is emitted when
the pixel width or height of a screen changes.
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref