## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --                Copyright (C) 2006-2007, 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_Display objects purpose are two fold:

31.     --     - To grab/ungrab keyboard focus and mouse pointer

32.     --     - To manage and provide information about the Gdk_Screen(s) available

33.     --       for this Gdk_Display

34.     --  Gdk_Display objects are the GDK representation of the X Display which can

35.     --  be described as a workstation consisting of a keyboard a pointing device

36.     --  (such as a mouse) and one or more screens. It is used to open and keep

37.     --  track of various Gdk_Screen objects currently instanciated by the

38.     --  application. It is also used to grab and release the keyboard and the mouse

39.     --  pointer.

40.     --  </description>

41.     --  <c_version>2.8.17</c_version>

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

43.     --  <see>Gdk_Screen</see>

45.     with Gdk.EventTo API docTo specTo body;

46.     with Gdk.TypesTo API docTo spec;

47.     with Glib.ObjectTo API docTo specTo body;

49.     package Gdk.DisplayTo API docTo specTo body is

51.        type Gdk_Display_Record is new Glib.Object.GObject_RecordTo API docTo specTo body with null record;

52.        type Gdk_Display is access all Gdk_Display_RecordTo API docTo spec'Class;

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

55.        --  Return the internal type associated with a Gdk_Display

57.        function OpenTo API docTo body (Display_Name : String) return Gdk_DisplayTo API docTo spec;

58.        --  Open a new display. Display_Name follows the unix convention, and should

59.        --  have the format host:screen, for instance "foo.com:0".

61.        function Get_DefaultTo API docTo body return Gdk_DisplayTo API docTo spec;

62.        --  Gets the default Gdk_Display

64.        function Get_NameTo API docTo body (Display : access Gdk_Display_RecordTo API docTo spec) return String;

65.        --  Return the name of the screen

67.        function Get_N_ScreensTo API docTo body

68.          (Display : access Gdk_Display_RecordTo API docTo spec) return Glib.GintTo API docTo spec;

69.        --  Return the number of screens managed by the display.

70.        --  See the function Gdk.Screen.Get_Screen or Gdk.Screen.Get_Default_Screen

72.        procedure Pointer_UngrabTo API docTo body

73.          (Display : access Gdk_Display_RecordTo API docTo spec;

74.           Time    : Glib.Guint32To API docTo spec := Gdk.Types.Current_TimeTo API docTo spec);

75.        --  Release any pointer grab.

77.        procedure Keyboard_UngrabTo API docTo body

78.          (Display : access Gdk_Display_RecordTo API docTo spec;

79.           Time    : Glib.Guint32To API docTo spec := Gdk.Types.Current_TimeTo API docTo spec);

80.        --  Release any keyboard grab

82.        function Pointer_Is_GrabbedTo API docTo body

83.          (Display : access Gdk_Display_RecordTo API docTo spec) return Boolean;

84.        --  Test if the pointer is grabbed.

86.        procedure BeepTo API docTo body (Display : access Gdk_Display_RecordTo API docTo spec);

87.        --  Emits a short beep on display

89.        procedure SyncTo API docTo body (Display : access Gdk_Display_RecordTo API docTo spec);

90.        --  Flushes any requests queued for the windowing system and waits until all

91.        --  requests have been handled. This is often used for making sure that the

92.        --  display is synchronized with the current state of the program. Calling

93.        --  Sync before Gdk.Error.Trap_Pop makes sure that any errors generated from

94.        --  earlier requests are handled before the error trap is removed.

95.        --

96.        --  This is most useful for X11. On windowing systems where requests are

97.        --  handled synchronously, this function will do nothing.

99.        procedure FlushTo API docTo body (Display : access Gdk_Display_RecordTo API docTo spec);

100.        --  Flushes any requests queued for the windowing system; this happens

101.        --  automatically when the main loop blocks waiting for new events, but if

102.        --  your application is drawing without returning control to the main loop,

103.        --  you may need to call this function explicitely. A common case where this

104.        --  function needs to be called is when an application is executing drawing

105.        --  commands from a thread other than the thread where the main loop is

106.        --  running.

107.        --

108.        --  This is most useful for X11. On windowing systems where requests are

109.        --  handled synchronously, this function will do nothing.

111.        procedure CloseTo API docTo body (Display : access Gdk_Display_RecordTo API docTo spec);

112.        --  Closes the connection to the windowing system for the given display,

113.        --  and cleans up associated resources.

115.        function Get_EventTo API docTo body

116.          (Display : access Gdk_Display_RecordTo API docTo spec) return Gdk.Event.Gdk_EventTo API docTo spec;

117.        --  Gets the next Gdk_Event to be processed for Display, fetching events

118.        --  from the windowing system if necessary.

119.        --  null is returned if no events are pending.

120.        --  The returned Gdk_Event must be freed with Gdk.Event.Free

122.        function Peek_EventTo API docTo body

123.          (Display : access Gdk_Display_RecordTo API docTo spec) return Gdk.Event.Gdk_EventTo API docTo spec;

124.        --  Gets a copy of the first Gdk_Event in the Display's event queue, without

125.        --  removing the event from the queue. (Note that this function will not get

126.        --  more events from the windowing system. It only checks the events that

127.        --  have already been moved to the GDK event queue.)

128.        --  null is returned if there are no events in the queue. The returned event

129.        --  should be freed with Gdk.Event.Free.

131.        procedure Put_EventTo API docTo body

132.          (Display : access Gdk_Display_RecordTo API docTo spec;

133.           Event   : Gdk.Event.Gdk_EventTo API docTo spec);

134.        --  Appends a copy of the given event onto the front of the event

135.        --  queue for Display.

137.        procedure Set_Double_Click_TimeTo API docTo body

138.          (Display : access Gdk_Display_RecordTo API docTo spec;

139.           Msec    : Glib.GuintTo API docTo spec);

140.        --  Sets the double click time (two clicks within this time interval count

141.        --  as a double click and result in a GDK_2BUTTON_PRESS event). Applications

142.        --  should not set this, it is a global user-configured setting.

144.        procedure Set_Double_Click_DistanceTo API docTo body

145.          (Display  : access Gdk_Display_RecordTo API docTo spec;

146.           Distance : Glib.GuintTo API docTo spec);

147.        --  Sets the double click distance (two clicks within this distance count as

148.        --  a double click and result in a GDK_2BUTTON_PRESS event). See also

149.        --  Set_Double_Click_Time. Applications should not set this, it is a global

150.        --  user-configured setting.

152.        procedure Get_Window_At_PointerTo API docTo body

153.          (Display : access Gdk_Display_RecordTo API docTo spec;

154.           Win_X   : out Glib.GintTo API docTo spec;

155.           Win_Y   : out Glib.GintTo API docTo spec;

156.           Win     : out Gdk.Gdk_WindowTo API docTo spec);

157.        --  Obtains the window underneath the mouse pointer, returning the location

158.        --  of that window in Win_X, Win_Y. Returns nullif the window

159.        --  under the mouse pointer is not known to GDK (for example, belongs to

160.        --  another application).

161.        --  (Win_X, Win_Y) are relative to the origin of the window under the

162.        --  pointer.

164.        function Supports_Cursor_ColorTo API docTo body

165.          (Display : access Gdk_Display_RecordTo API docTo spec) return Boolean;

166.        --  Returns TRUE if multicolored cursors are supported on display.

167.        --  Otherwise, cursors have only a forground and a background color.

169.        function Supports_Cursor_AlphaTo API docTo body

170.          (Display : access Gdk_Display_RecordTo API docTo spec) return Boolean;

171.        --  Returns TRUE if cursors can use an 8bit alpha channel on display.

172.        --  Otherwise, cursors are restricted to bilevel alpha (i.e. a mask).

174.        function Get_Default_Cursor_SizeTo API docTo body

175.          (Display : access Gdk_Display_RecordTo API docTo spec) return Glib.GuintTo API docTo spec;

176.        --  Returns the default size to use for cursors on display.

178.        procedure Get_Maximal_Cursor_SizeTo API docTo body

179.          (Display : access Gdk_Display_RecordTo API docTo spec;

180.           Width   : out Glib.GuintTo API docTo spec;

181.           Height  : out Glib.GuintTo API docTo spec);

182.        --  Gets the maximal size to use for cursors on display

184.        function Get_Default_GroupTo API docTo body

185.          (Display : access Gdk_Display_RecordTo API docTo spec) return Gdk.Gdk_WindowTo API docTo spec;

186.        --  Returns the default group leader window for all toplevel windows on

187.        --  display. This window is implicitly created by GDK. See

188.        --  Gdk.Window.Set_Group.

190.        function Supports_Selection_NotificationTo API docTo body

191.          (Display : access Gdk_Display_RecordTo API docTo spec) return Boolean;

192.        --  Returns whether Gdk.Event.Owner_Change events will be sent when the

193.        --  owner of a selection changes.

195.        function Request_Selection_NotificationTo API docTo body

196.          (Display   : access Gdk_Display_RecordTo API docTo spec;

197.           Selection : Gdk.Types.Gdk_AtomTo API docTo spec) return Boolean;

198.        --  Request Gdk.Event.Owner_Change events for ownership changes of the

199.        --  selection named by the given atom.

201.        function Supports_Clipboard_PersistenceTo API docTo body

202.          (Display : access Gdk_Display_RecordTo API docTo spec) return Boolean;

203.        --  Returns whether the specifed display supports clipboard persistance;

204.        --  i.e. if it's possible to store the clipboard data after an application

205.        --  has quit. On X11 this checks if a clipboard daemon is running.

207.        procedure Store_ClipboardTo API docTo body

208.          (Display          : access Gdk_Display_RecordTo API docTo spec;

209.           Clipboard_Window : Gdk.Gdk_WindowTo API docTo spec;

210.           Time             : Glib.Guint32To API docTo spec;

211.           Targets          : Gdk.Types.Gdk_Atom_ArrayTo API docTo spec);

212.        --  Issues a request to the clipboard manager to store the clipboard data.

213.        --  On X11, this is a special program that works according to the

214.        --  freedesktop clipboard specification, available at

215.        --  http://www.freedesktop.org/Standards/clipboard-manager-spec.

216.        --  See also Gtk.Clipboard.Store.

218.        -------------

219.        -- Signals --

220.        -------------

222.        --  <signals>

223.        --  The following new signals are defined for this object:

224.        --

225.        --  - "closed"

226.        --    procedure Handler

227.        --      (Display  : access Gdk_Display_Record'Class;

228.        --       Is_Error : Boolean);

229.        --    The ::closed signal is emitted when the connection to the windowing

230.        --    system for display is closed. Is_Error is set to true if the

231.        --    connection is closed due to an error.

232.        --  </signals>

234.        Signal_Closed : constant Glib.Signal_NameTo API docTo spec := "closed";

236.     private

237.        pragma Import (C, Get_TypeTo API docTo spec, "gdk_display_get_type");

238.     end Gdk.DisplayTo API docTo specTo body;

240.     --  Binding provided in gdk-screen.ads for circularity dependencies reasons:

241.     --  No binding: gdk_display_get_default_screen

242.     --  No binding: gdk_display_get_pointer

243.     --  No binding: gdk_display_get_screen

244.     --  No binding: gdk_display_warp_pointer

246.     --  Binding might be nice later:

247.     --  No binding: gdk_display_set_pointer_hooks

249.     --  No binding needed (too low-level):

250.     --  No binding: gdk_display_get_core_pointer

251.     --  No binding: gdk_display_list_devices

252.     --  No binding: gdk_display_add_client_message_filter

254.     --  Function has no implementation

255.     --  No binding: gdk_display_open_default_libgtk_only