## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

1.     -----------------------------------------------------------------------

2.     --              GtkAda - Ada95 binding for Gtk+/Gnome                --

3.     --                                                                   --

4.     --                Copyright (C) 2006-2013, AdaCore                   --

5.     --                                                                   --

6.     -- This library is free software; you can redistribute it and/or     --

7.     -- modify it under the terms of the GNU General Public               --

8.     -- License as published by the Free Software Foundation; either      --

9.     -- version 2 of the License, or (at your option) any later version.  --

10.     --                                                                   --

11.     -- This library is distributed in the hope that it will be useful,   --

12.     -- but WITHOUT ANY WARRANTY; without even the implied warranty of    --

13.     -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --

14.     -- General Public License for more details.                          --

15.     --                                                                   --

16.     -- You should have received a copy of the GNU General Public         --

17.     -- License along with this library; if not, write to the             --

18.     -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --

19.     -- Boston, MA 02111-1307, USA.                                       --

20.     --                                                                   --

21.     -- As a special exception, if other files instantiate generics from  --

22.     -- this unit, or you link this unit with other files to produce an   --

23.     -- executable, this  unit  does not  by itself cause  the resulting  --

24.     -- executable to be covered by the GNU General Public License. This  --

25.     -- exception does not however invalidate any other reasons why the   --

26.     -- executable file  might be covered by the  GNU Public License.     --

27.     -----------------------------------------------------------------------

29.     --  <description>

30.     --  Gdk_Screen objects are the GDK representation of a physical screen. It is

31.     --  used throughout GDK and GTK+ to specify which screen the top level windows

32.     --  are to be displayed on. It is also used to query the screen specification

33.     --  and default settings such as the default colormap (Get_Default_Colormap),

34.     --  the screen width (Get_Width), etc.

35.     --

36.     --  Note that a screen may consist of multiple monitors which are merged to

37.     --  form a large screen area.

38.     --  </description>

39.     --  <c_version>2.8.17</c_version>

40.     --  <c_version>2.12</c_version> for some of the functions

41.     --  <group>Gdk, the low-level API</group>

42.     --  <see>Gdk_Display</see>

44.     with Gdk.DisplayTo API docTo specTo body;

45.     with Gdk.RectangleTo API docTo specTo body;

46.     with Gdk.TypesTo API docTo spec;

47.     with Glib.ObjectTo API docTo specTo body;

48.     with Glib.ValuesTo API docTo specTo body;

50.     package Gdk.ScreenTo API docTo specTo body is

52.        type Gdk_Screen_Record is new Glib.Object.GObject_RecordTo API docTo specTo body with null record;

53.        type Gdk_Screen is access all Gdk_Screen_RecordTo API docTo spec'Class;

55.        function Get_TypeTo API docTo body return Glib.GTypeTo API docTo spec;

56.        --  Return the internal type used for screens

58.        -------------

59.        -- Display --

60.        -------------

61.        --  These subprograms should really be in gdk-display.ads to match what is

62.        --  done for gtk+ itself, but that would create dependency circularities.

63.        --  Ada 2005 has support for these, but we want GtkAda to build with Ada95

64.        --  compilers.

66.        function Get_ScreenTo API docTo body

67.          (Display    : access Gdk.Display.Gdk_Display_RecordTo API docTo spec'Class;

68.           Screen_Num : Glib.GintTo API docTo spec)

69.           return Gdk_ScreenTo API docTo spec;

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

72.        function Get_Default_ScreenTo API docTo body

73.          (Display : access Gdk.Display.Gdk_Display_RecordTo API docTo spec'Class) return Gdk_ScreenTo API docTo spec;

74.        --  Get the default Gdk_Screen for display.

76.        procedure Get_PointerTo API docTo body

77.          (Display : access Gdk.Display.Gdk_Display_RecordTo API docTo spec'Class;

78.           Screen  : out Gdk_ScreenTo API docTo spec;

79.           X       : out Glib.GintTo API docTo spec;

80.           Y       : out Glib.GintTo API docTo spec;

81.           Mask    : out Gdk.Types.Gdk_Modifier_TypeTo API docTo spec);

82.        --  Gets the current location of the pointer and the current modifier

83.        --  mask for a given display.

84.        --  (X, Y) are coordinates relative to the root window on the display

86.        procedure Warp_PointerTo API docTo body

87.          (Display : access Gdk.Display.Gdk_Display_RecordTo API docTo spec'Class;

88.           Screen  : access Gdk_Screen_RecordTo API docTo spec;

89.           X       : Glib.GintTo API docTo spec;

90.           Y       : Glib.GintTo API docTo spec);

91.        --  Warps the pointer of display to the point x,y on the screen screen,

92.        --  unless the pointer is confined to a window by a grab, in which case it

93.        --  will be moved as far as allowed by the grab. Warping the pointer creates

94.        --  events as if the user had moved the mouse instantaneously to the

95.        --  destination.

96.        --

97.        --  Note that the pointer should normally be under the control of the user.

98.        --  This function was added to cover some rare use cases like keyboard

99.        --  navigation support for the color picker in the GtkColorSelectionDialog.

101.        -------------

102.        -- Screens --

103.        -------------

105.        function Get_DefaultTo API docTo body return Gdk_ScreenTo API docTo spec;

106.        --  Gets the default screen for the default display

108.        function Get_DisplayTo API docTo body

109.          (Screen : access Gdk_Screen_RecordTo API docTo spec) return Gdk.Display.Gdk_DisplayTo API docTo spec;

110.        --  Gets the display to which the screen belongs.

112.        procedure Set_Default_ColormapTo API docTo body

113.          (Screen   : access Gdk_Screen_RecordTo API docTo spec;

114.           Colormap : Gdk.Gdk_ColormapTo API docTo spec);

115.        function Get_Default_ColormapTo API docTo body

116.          (Screen : access Gdk_Screen_RecordTo API docTo spec) return Gdk.Gdk_ColormapTo API docTo spec;

117.        --  Gets the default colormap for screen.

119.        function Get_System_ColormapTo API docTo body

120.          (Screen : access Gdk_Screen_RecordTo API docTo spec) return Gdk.Gdk_ColormapTo API docTo spec;

121.        --  Gets the system's colormap for screen

123.        function Get_System_VisualTo API docTo body

124.          (Screen : access Gdk_Screen_RecordTo API docTo spec) return Gdk.Gdk_VisualTo API docTo spec;

125.        --  Get the system's default visual for screen. This is the visual for the

126.        --  root window of the display. The return value should not be freed.

128.        function Get_Rgb_ColormapTo API docTo body

129.          (Screen : access Gdk_Screen_RecordTo API docTo spec) return Gdk.Gdk_ColormapTo API docTo spec;

130.        --  Gets the preferred colormap for rendering image data on screen. Not a

131.        --  very useful function; historically, GDK could only render RGB image data

132.        --  to one colormap and visual, but in the current version it can render to

133.        --  any colormap and visual. So there's no need to call this function.

135.        function Get_Rgb_VisualTo API docTo body

136.          (Screen : access Gdk_Screen_RecordTo API docTo spec) return Gdk.Gdk_VisualTo API docTo spec;

137.        --  Gets a "preferred visual" chosen by GdkRGB for rendering image data on

138.        --  screen. In previous versions of GDK, this was the only visual GdkRGB

139.        --  could use for rendering. In current versions, it's simply the visual

140.        --  GdkRGB would have chosen as the optimal one in those previous versions.

141.        --  GdkRGB can now render to drawables with any visual.

143.        function Get_Rgba_ColormapTo API docTo body

144.          (Screen : access Gdk_Screen_RecordTo API docTo spec) return Gdk.Gdk_ColormapTo API docTo spec;

145.        --  Gets a colormap to use for creating windows or pixmaps with an alpha

146.        --  channel. The windowing system on which GTK+ is running may not support

147.        --  this capability, in which case NULL will be returned. Even if a non-NULL

148.        --  value is returned, its possible that the window's alpha channel won't be

149.        --  honored when displaying the window on the screen: in particular, for X

150.        --  an appropriate windowing manager and compositing manager must be running

151.        --  to provide appropriate display.

153.        function Get_Rgba_VisualTo API docTo body

154.          (Screen : access Gdk_Screen_RecordTo API docTo spec) return Gdk.Gdk_VisualTo API docTo spec;

155.        --  Gets a visual to use for creating windows or pixmaps with an alpha

156.        --  channel. See the docs for Get_Rgba_Colormap for caveats.

158.        function Get_Root_WindowTo API docTo body

159.          (Screen : access Gdk_Screen_RecordTo API docTo spec) return Gdk.Gdk_WindowTo API docTo spec;

160.        --  Gets the root window of screen.

162.        function Get_NumberTo API docTo body (Screen : access Gdk_Screen_RecordTo API docTo spec) return Glib.GintTo API docTo spec;

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

164.        --  belongs.

166.        function Get_WidthTo API docTo body  (Screen : access Gdk_Screen_RecordTo API docTo spec) return Glib.GintTo API docTo spec;

167.        function Get_HeightTo API docTo body (Screen : access Gdk_Screen_RecordTo API docTo spec) return Glib.GintTo API docTo spec;

168.        --  Gets the size of screen in pixels

170.        function Get_Width_MmTo API docTo body  (Screen : access Gdk_Screen_RecordTo API docTo spec) return Glib.GintTo API docTo spec;

171.        function Get_Height_MmTo API docTo body (Screen : access Gdk_Screen_RecordTo API docTo spec) return Glib.GintTo API docTo spec;

172.        --  Gets the width of screen in millimeters. Note that on some X servers

173.        --  this value will not be correct.

175.        function Make_Display_NameTo API docTo body

176.          (Screen : access Gdk_Screen_RecordTo API docTo spec) return String;

177.        --  Determines the name to pass to Gdk.Display.Open to get a GdkDisplay with

178.        --  this screen as the default screen.

180.        function Get_N_MonitorsTo API docTo body

181.          (Screen : access Gdk_Screen_RecordTo API docTo spec) return Glib.GintTo API docTo spec;

182.        --  Returns the number of monitors which screen consists of.

184.        function Is_CompositedTo API docTo body (Screen : access Gdk_Screen_RecordTo API docTo spec) return Boolean;

185.        --  Returns whether windows with an RGBA visual can reasonably be expected

186.        --  to have their alpha channel drawn correctly on the screen.

187.        --

188.        --  On X11 this function returns whether a compositing manager is

189.        --  compositing Screen.

190.        --

191.        --  Since: 2.10

193.        --------------

194.        -- Monitors --

195.        --------------

197.        procedure Get_Monitor_GeometryTo API docTo body

198.          (Screen      : access Gdk_Screen_RecordTo API docTo spec;

199.           Monitor_Num : Glib.GintTo API docTo spec;

200.           DestTo API docTo body        : out Gdk.Rectangle.Gdk_RectangleTo API docTo spec);

201.        --  Retrieves the Gdk_Rectangle representing the size and position of the

202.        --  individual monitor within the entire screen area.

203.        --  Note that the size of the entire screen area can be retrieved via

204.        --  Get_Width and Get_Height.

206.        function Get_Monitor_At_PointTo API docTo body

207.          (Screen : access Gdk_Screen_RecordTo API docTo spec;

208.           X      : Glib.GintTo API docTo spec;

209.           Y      : Glib.GintTo API docTo spec)

210.           return Glib.GintTo API docTo spec;

211.        --  Returns the monitor number in which the point (X,Y) is located.

212.        --  These are coordinates within the virtual screen. The closest monitor is

213.        --  returned when (X, Y) is not in any monitor

215.        function Get_Monitor_At_WindowTo API docTo body

216.          (Screen : access Gdk_Screen_RecordTo API docTo spec;

217.           Window : Gdk.Gdk_WindowTo API docTo spec) return Glib.GintTo API docTo spec;

218.        --  Returns the number of the monitor in which the largest area of the

219.        --  bounding rectangle of Window resides.

221.        procedure Get_SettingTo API docTo body

222.          (Screen : access Gdk_Screen_RecordTo API docTo spec;

223.           Name   : String;

224.           ValueTo API docTo body  : out Glib.Values.GValueTo API docTo specTo body;

225.           Found  : out Boolean);

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

227.        --  Gdk_Screen screen.

229.        -------------

230.        -- Signals --

231.        -------------

233.        --  <signals>

234.        --

235.        --  - "size_changed"

236.        --    procedure Handler (Screen : access Gdk_Screen_Record'Class);

237.        --    Emitted when the pixel width or height of a screen changes.

238.        --  </signals>

240.        Signal_Size_Changed : constant Glib.Signal_NameTo API docTo spec := "size_changed";

242.     private

243.        pragma Import (C, Get_TypeTo API docTo spec, "gdk_screen_get_type");

244.     end Gdk.ScreenTo API docTo specTo body;

246.     --  Reserved for internal use by gtk+:

247.     --  No binding: gdk_screen_set_font_options_libgtk_only

248.     --  No binding: gdk_screen_set_resolution_libgtk_only

249.     --  No binding: gdk_screen_get_resolution_libgtk_only

250.     --  No binding: gdk_screen_get_font_options_libgtk_only

252.     --  Low-level:

253.     --  No binding: gdk_screen_broadcast_client_message

255.     --  Binding would be nice, requires a list of C_Proxy:

256.     --  No binding: gdk_screen_get_toplevel_windows

257.     --  No binding: gdk_screen_list_visuals