Index

Package: Screen

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

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

Ancestors:

Primitive operations:

Get_Default_Colormap
Get_Height_Mm
Get_Monitor_At_Point
Get_Monitor_At_Window
Get_Monitor_Geometry
Get_N_Monitors
Get_Rgb_Colormap
Get_Rgb_Visual
Get_Rgba_Colormap
Get_Rgba_Visual
Get_Root_Window
Get_System_Colormap
Get_System_Visual
Get_Width_Mm
Glib.Object.Deallocate (Inherited)
Glib.Object.Get_Type (Inherited)
Glib.Object.Notify (Inherited)
Glib.Object.Ref (Inherited)
Glib.Object.Ref_Sink (Inherited)
Glib.Object.Unref (Inherited)
Is_Composited
Make_Display_Name
Set_Default_Colormap
Warp_Pointer

Types

Gdk_Screen

type Gdk_Screen is access all Gdk_Screen_Record'Class;

Constants & Global variables

Signal_Size_Changed (Glib.Signal_Name)

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

Subprograms & Entries

Get_Type

function Get_Type return Glib.GType;
Return the internal type used for screens

Get_Screen

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

function Get_Default_Screen 
(Display: access Gdk.Display.Gdk_Display_Record'Class) return Gdk_Screen;
Get the default Gdk_Screen for display.

Get_Pointer

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

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

function Get_Default return Gdk_Screen;
Gets the default screen for the default display

Get_Display

function Get_Display 
(Screen: access Gdk_Screen_Record) return Gdk.Display.Gdk_Display;
Gets the display to which the screen belongs.

Set_Default_Colormap

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

Get_Default_Colormap

function Get_Default_Colormap 
(Screen: access Gdk_Screen_Record) return Gdk.Gdk_Colormap;
Gets the default colormap for screen.

Get_System_Colormap

function Get_System_Colormap 
(Screen: access Gdk_Screen_Record) return Gdk.Gdk_Colormap;
Gets the system's colormap for screen

Get_System_Visual

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

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

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

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

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

function Get_Root_Window 
(Screen: access Gdk_Screen_Record) return Gdk.Gdk_Window;
Gets the root window of screen.

Get_Number

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

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

Get_Height

function Get_Height 
(Screen: access Gdk_Screen_Record) return Glib.Gint;
Gets the size of screen in pixels

Get_Width_Mm

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

Get_Height_Mm

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

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

function Get_N_Monitors 
(Screen: access Gdk_Screen_Record) return Glib.Gint;
Returns the number of monitors which screen consists of.

Is_Composited

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

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

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

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

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.