## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

## Index

Package: Screen

- Goto spec source

# Description

    package Gdk.Screen is

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 default colormap (Get_Default_Colormap), the screen width (Get_Width), etc.

Note that a screen may consist of multiple monitors which are merged to form a large screen area.

Binding from C File version 2.8.17

Binding from C File version 2.12

for some of the functions <see>Gdk_Display</see>

# Classes

### Gdk_Screen_Record

- Goto declaration in source

    type Gdk_Screen_Record is new Glib.Object.GObject_Record with null record;

#### Ancestors:

Glib.Object.GObject_Record

#### Primitive operations:

Get_Default_Colormap

- To API doc
- To spec

Get_Display

- To API doc
- To spec

Get_Height

- To API doc
- To spec

Get_Height_Mm

- To API doc
- To spec

Get_Monitor_At_Point

- To API doc
- To spec

Get_Monitor_At_Window

- To API doc
- To spec

Get_Monitor_Geometry

- To API doc
- To spec

Get_N_Monitors

- To API doc
- To spec

Get_Number

- To API doc
- To spec

Get_Rgb_Colormap

- To API doc
- To spec

Get_Rgb_Visual

- To API doc
- To spec

Get_Rgba_Colormap

- To API doc
- To spec

Get_Rgba_Visual

- To API doc
- To spec

Get_Root_Window

- To API doc
- To spec

Get_Setting

- To API doc
- To spec

Get_System_Colormap

- To API doc
- To spec

Get_System_Visual

- To API doc
- To spec

Get_Width

- To API doc
- To spec

Get_Width_Mm

- To API doc
- To spec

Glib.Object.Deallocate

- To API doc
- To spec

(Inherited)
Glib.Object.Get_Type

- To API doc
- To spec

(Inherited)
Glib.Object.Notify

- To API doc
- To spec

(Inherited)
Glib.Object.Ref

- To API doc
- To spec

(Inherited)
Glib.Object.Ref_Sink

- To API doc
- To spec

(Inherited)
Glib.Object.Unref

- To API doc
- To spec

(Inherited)
Is_Composited

- To API doc
- To spec

Make_Display_Name

- To API doc
- To spec

Set_Default_Colormap

- To API doc
- To spec

Warp_Pointer

- To API doc
- To spec

# Types

### Gdk_Screen

- Goto declaration in source

    type Gdk_Screen is access all Gdk_Screen_Record'Class;

# Constants & Global variables

### Signal_Size_Changed

- Goto declaration in source

(Glib.Signal_Name)

    Signal_Size_Changed : constant Glib.Signal_Name := "size_changed";

# Subprograms & Entries

### Get_Type

- Goto spec in source
- Goto body in source

    function Get_Type return Glib.GType;

Return the internal type used for screens

### Get_Screen

- Goto spec in source

    function Get_Screen (Display: access Gdk.Display.Gdk_Display_Record'Class;Screen_Num: Glib.Gint) return Gdk_Screen;

Returns a screen object for one of the screens of the display.

### Get_Default_Screen

- Goto spec in source

    function Get_Default_Screen (Display: access Gdk.Display.Gdk_Display_Record'Class) return Gdk_Screen;

Get the default Gdk_Screen for display.

### Get_Pointer

- Goto spec in source

    procedure Get_Pointer (Display: access Gdk.Display.Gdk_Display_Record'Class;Screen: out Gdk_Screen;X: out Glib.Gint;Y: out Glib.Gint;Mask: out Gdk.Types.Gdk_Modifier_Type);

Gets the current location of the pointer and the current modifier mask for a given display. (X, Y) are coordinates relative to the root window on the display

### Warp_Pointer

- Goto spec in source

    procedure Warp_Pointer (Display: access Gdk.Display.Gdk_Display_Record'Class;Screen: access Gdk_Screen_Record;X: Glib.Gint;Y: Glib.Gint);

Warps the pointer of display to the point x,y on the screen screen, unless the pointer is confined to a window by a grab, in which case it will be moved as far as allowed by the grab. Warping the pointer creates events as if the user had moved the mouse instantaneously to the destination. Note that the pointer should normally be under the control of the user. This function was added to cover some rare use cases like keyboard navigation support for the color picker in the GtkColorSelectionDialog.

### Get_Default

- Goto spec in source

    function Get_Default return Gdk_Screen;

Gets the default screen for the default display

### Get_Display

- Goto spec in source

    function Get_Display (Screen: access Gdk_Screen_Record) return Gdk.Display.Gdk_Display;

Gets the display to which the screen belongs.

### Set_Default_Colormap

- Goto spec in source

    procedure Set_Default_Colormap (Screen: access Gdk_Screen_Record;Colormap: Gdk.Gdk_Colormap);

### Get_Default_Colormap

- Goto spec in source

    function Get_Default_Colormap (Screen: access Gdk_Screen_Record) return Gdk.Gdk_Colormap;

Gets the default colormap for screen.

### Get_System_Colormap

- Goto spec in source

    function Get_System_Colormap (Screen: access Gdk_Screen_Record) return Gdk.Gdk_Colormap;

Gets the system's colormap for screen

### Get_System_Visual

- Goto spec in source

    function Get_System_Visual (Screen: access Gdk_Screen_Record) return Gdk.Gdk_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.

### Get_Rgb_Colormap

- Goto spec in source

    function Get_Rgb_Colormap (Screen: access Gdk_Screen_Record) return Gdk.Gdk_Colormap;

Gets the preferred colormap for rendering image data on screen. Not a very useful function; historically, GDK could only render RGB image data to one colormap and visual, but in the current version it can render to any colormap and visual. So there's no need to call this function.

### Get_Rgb_Visual

- Goto spec in source

    function Get_Rgb_Visual (Screen: access Gdk_Screen_Record) return Gdk.Gdk_Visual;

Gets a "preferred visual" chosen by GdkRGB for rendering image data on screen. In previous versions of GDK, this was the only visual GdkRGB could use for rendering. In current versions, it's simply the visual GdkRGB would have chosen as the optimal one in those previous versions. GdkRGB can now render to drawables with any visual.

### Get_Rgba_Colormap

- Goto spec in source

    function Get_Rgba_Colormap (Screen: access Gdk_Screen_Record) return Gdk.Gdk_Colormap;

Gets a colormap to use for creating windows or pixmaps 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.

### Get_Rgba_Visual

- Goto spec in source

    function Get_Rgba_Visual (Screen: access Gdk_Screen_Record) return Gdk.Gdk_Visual;

Gets a visual to use for creating windows or pixmaps with an alpha channel. See the docs for Get_Rgba_Colormap for caveats.

### Get_Root_Window

- Goto spec in source

    function Get_Root_Window (Screen: access Gdk_Screen_Record) return Gdk.Gdk_Window;

Gets the root window of screen.

### Get_Number

- Goto spec in source

    function Get_Number (Screen: access Gdk_Screen_Record) return Glib.Gint;

Gets the index of screen among the screens in the display to which it belongs.

### Get_Width

- Goto spec in source

    function Get_Width  (Screen: access Gdk_Screen_Record) return Glib.Gint;

### Get_Height

- Goto spec in source

    function Get_Height (Screen: access Gdk_Screen_Record) return Glib.Gint;

Gets the size of screen in pixels

### Get_Width_Mm

- Goto spec in source

    function Get_Width_Mm  (Screen: access Gdk_Screen_Record) return Glib.Gint;

### Get_Height_Mm

- Goto spec in source

    function Get_Height_Mm (Screen: access Gdk_Screen_Record) return Glib.Gint;

Gets the width of screen in millimeters. Note that on some X servers this value will not be correct.

### Make_Display_Name

- Goto spec in source

    function Make_Display_Name (Screen: access Gdk_Screen_Record) return String;

Determines the name to pass to Gdk.Display.Open to get a GdkDisplay with this screen as the default screen.

### Get_N_Monitors

- Goto spec in source

    function Get_N_Monitors (Screen: access Gdk_Screen_Record) return Glib.Gint;

Returns the number of monitors which screen consists of.

### Is_Composited

- Goto spec in source

    function Is_Composited (Screen: access Gdk_Screen_Record) return Boolean;

Returns whether windows with an RGBA visual can reasonably be expected to have their alpha channel drawn correctly on the screen. On X11 this function returns whether a compositing manager is compositing Screen. Since: 2.10

### Get_Monitor_Geometry

- Goto spec in source

    procedure Get_Monitor_Geometry (Screen: access Gdk_Screen_Record;Monitor_Num: Glib.Gint;Dest: out Gdk.Rectangle.Gdk_Rectangle);

Retrieves the Gdk_Rectangle representing the size and position of the individual monitor within the entire screen area. Note that the size of the entire screen area can be retrieved via Get_Width and Get_Height.

### Get_Monitor_At_Point

- Goto spec in source

    function Get_Monitor_At_Point (Screen: access Gdk_Screen_Record;X: Glib.Gint;Y: Glib.Gint) return Glib.Gint;

Returns the monitor number in which the point (X,Y) is located. These are coordinates within the virtual screen. The closest monitor is returned when (X, Y) is not in any monitor

### Get_Monitor_At_Window

- Goto spec in source

    function Get_Monitor_At_Window (Screen: access Gdk_Screen_Record;Window: Gdk.Gdk_Window) return Glib.Gint;

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

### Get_Setting

- Goto spec in source

    procedure Get_Setting (Screen: access Gdk_Screen_Record;Name: String;Value: out Glib.Values.GValue;Found: out Boolean);

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