## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --                  Copyright (C) 2001-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.     --  <group>Gdk, the low-level API</group>

30.     with GlibTo API docTo specTo body; use GlibTo API docTo specTo body;

31.     with Gdk.TypesTo API docTo spec; use Gdk.TypesTo API docTo spec;

32.     with Gdk.WindowTo API docTo specTo body;

33.     with GtkTo API docTo spec;

34.     with Gtk.SelectionTo API docTo specTo body; use Gtk.SelectionTo API docTo specTo body;

36.     package Gdk.DndTo API docTo specTo body is

38.        -----------------

39.        -- Drag_Action --

40.        -----------------

42.        type Drag_Action is mod 2 ** 32;

43.        --  Possible actions for a drop onto a widget, during a drag-and-drop.

44.        --  The drag widgets (ie the ones from which the user can start a

45.        --  drag-and-drop operation) should set a mask, indicating which actions

46.        --  it wants to do. The first action in the list below has the highest

47.        --  priority, the last one the lowest. The actual action chosen for the

48.        --  drag-and-drop will be the highest-priority one that is also accepted

49.        --  by the drop site.

50.        --

51.        --  Note that in the case where the drag source supports multiple actions,

52.        --  the user can select the one he wants. As explained above, the default

53.        --  one is the highest priority one. But if the user pressed Shift at the

54.        --  same time, Action_Move will be used if present. Ctrl-Shift selects

55.        --  an Action_Link, and Ctrl selects an Action_Copy.

57.        Action_Any : constant Drag_ActionTo API docTo spec;

58.        --  Any of the default action is accepted.

60.        Action_Default : constant Drag_ActionTo API docTo spec;

61.        --  ???

63.        Action_Copy    : constant Drag_ActionTo API docTo spec;

64.        --  Copy the data to the drop site.

66.        Action_Move    : constant Drag_ActionTo API docTo spec;

67.        --  Copy the data to the drop site, and delete it from the drag source.

68.        --  The delete command is invoked automatically by GtkAda.

70.        Action_Link    : constant Drag_ActionTo API docTo spec;

71.        --  Allow the drop site to access the data, without copying it.

73.        Action_Private : constant Drag_ActionTo API docTo spec;

74.        --  Any action you want to implement. No automatic behavior is provided

75.        --  by GtkAda.

77.        Action_Ask     : constant Drag_ActionTo API docTo spec;

78.        --  ???

80.        -------------------

81.        -- Drag_Protocol --

82.        -------------------

84.        type Drag_Protocol is

85.          (Drag_Proto_Motif,

86.           Drag_Proto_Xdnd,

87.           Drag_Proto_Rootwin,

88.           Drag_Proto_None,

89.           Drag_Proto_Win32_Dropfiles,

90.           Drag_Proto_Ole2,

91.           Drag_Proto_Local);

92.        --  The various dnd protocols recognized by a window.

93.        --  Note that not every window recognizes every protocol, and you should

94.        --  be careful as to which one you use. The function Gdk.Drag_Get_Protocol

95.        --  returns which one is recognized by a window.

97.        ------------------

98.        -- Drag_Context --

99.        ------------------

101.        type Drag_Context is new Gdk.C_ProxyTo API docTo spec;

102.        --  Structure that holds information about a drag in progress.

103.        --  This is used on both source and destination sides.

105.        ------------------

106.        -- Drag_Context --

107.        ------------------

109.        function Get_ActionsTo API docTo body (Context : Drag_ContextTo API docTo spec) return Drag_ActionTo API docTo spec;

110.        --  Return the possible actions associated with the context.

111.        --  This is the list of actions defined by the source of the drag-and-drop

112.        --  operation, in Source_Set.

113.        --  (for instance, if Source_Set was used with Action_Copy + Action_Move,

114.        --  the result will be exactly this sum, whatever was used for Dest_Set).

116.        function Get_Suggested_ActionTo API docTo body (Context : Drag_ContextTo API docTo spec) return Drag_ActionTo API docTo spec;

117.        --  Return the suggested action for that context.

118.        --  This is the highest priority action that was set by the source of the

119.        --  drag-and-drop, ie the one it would rather use. The action that is

120.        --  actually used is the one returned by Get_Action, and depends on the

121.        --  mask set by the target.

123.        function Get_Selected_ActionTo API docTo body (Context : Drag_ContextTo API docTo spec) return Drag_ActionTo API docTo spec;

124.        --  Return the action selected for the drag-and-drop operation.

125.        --  This is the highest priority action common between the drag site and the

126.        --  drop widget (for instance, if Source_Set was used with Action_Copy +

127.        --  Action_Move and Dest_Set was used with only Action_Move, this will

128.        --  be Action_Move).

130.        function Get_Action (Context : Drag_ContextTo API docTo spec) return Drag_ActionTo API docTo spec

131.                             renames Get_Selected_ActionTo API docTo specTo body;

132.        --  For backwards compatibility.

134.        type Gdk_Atom_Array is array (Natural range <>) of Gdk.Types.Gdk_AtomTo API docTo spec;

135.        function Get_TargetsTo API docTo body (Context : Drag_ContextTo API docTo spec) return Gdk_Atom_ArrayTo API docTo spec;

136.        --  Return the list of targets supported by this context.

138.        procedure Drag_Context_RefTo API docTo body (Context : Drag_ContextTo API docTo spec);

140.        procedure Drag_Context_UnrefTo API docTo body (Context : Drag_ContextTo API docTo spec);

142.        procedure Drag_StatusTo API docTo body

143.          (Context : Drag_ContextTo API docTo spec;

144.           Action  : Drag_ActionTo API docTo spec;

145.           Time    : Guint32To API docTo spec);

147.        procedure Drop_ReplyTo API docTo body

148.          (Context : Drag_ContextTo API docTo spec;

149.           Ok      : Boolean;

150.           Time    : Guint32To API docTo spec);

152.        procedure Drop_FinishTo API docTo body

153.          (Context : Drag_ContextTo API docTo spec;

154.           Success : Boolean;

155.           Time    : Guint32To API docTo spec);

156.        --  Clean up from the drag, and display snapback, if necessary.

158.        function Drag_Get_SelectionTo API docTo body (Context : Drag_ContextTo API docTo spec) return Gdk_AtomTo API docTo spec;

160.        function Drag_BeginTo API docTo body

161.          (Window  : Gdk.Window.Gdk_WindowTo API docTo spec;

162.           Targets : Target_ListTo API docTo spec) return Drag_ContextTo API docTo spec;

164.        function Drag_Get_ProtocolTo API docTo body

165.          (Xid      : Guint32To API docTo spec;

166.           ProtocolTo API docTo body : Drag_ProtocolTo API docTo spec) return Guint32To API docTo spec;

167.        --  Return which drag protocol is recognized by a given low level window.

169.        procedure Drag_Find_WindowTo API docTo body

170.          (Context     : Drag_ContextTo API docTo spec;

171.           Drag_Window : Gdk.Window.Gdk_WindowTo API docTo spec;

172.           X_Root      : GintTo API docTo spec;

173.           Y_Root      : GintTo API docTo spec;

174.           Dest_Window : Gdk.Window.Gdk_WindowTo API docTo spec;

175.           ProtocolTo API docTo body    : Drag_ProtocolTo API docTo spec);

177.        function Drag_MotionTo API docTo body

178.          (Context          : Drag_ContextTo API docTo spec;

179.           Dest_Window      : Gdk.Window.Gdk_WindowTo API docTo spec;

180.           ProtocolTo API docTo body         : Drag_ProtocolTo API docTo spec;

181.           X_Root           : GintTo API docTo spec;

182.           Y_Root           : GintTo API docTo spec;

183.           Suggested_Action : Drag_ActionTo API docTo spec;

184.           Possible_Actions : Drag_ActionTo API docTo spec;

185.           Time             : Guint32To API docTo spec) return Boolean;

187.        procedure Drag_DropTo API docTo body (Context : Drag_ContextTo API docTo spec; Time : Guint32To API docTo spec);

189.        procedure Drag_AbortTo API docTo body (Context : Drag_ContextTo API docTo spec; Time : Guint32To API docTo spec);

191.     private

193.        pragma Import (C, Get_ActionsTo API docTo spec, "gdk_drag_context_get_actions");

194.        pragma Import

195.          (C, Get_Suggested_ActionTo API docTo spec,

196.          "gdk_drag_context_get_suggested_action");

197.        pragma Import (C, Get_ActionTo API docTo spec, "gdk_drag_context_get_selected_action");

199.        Action_DefaultTo API docTo spec : constant Drag_ActionTo API docTo spec := 2 ** 0;

200.        Action_CopyTo API docTo spec    : constant Drag_ActionTo API docTo spec := 2 ** 1;

201.        Action_MoveTo API docTo spec    : constant Drag_ActionTo API docTo spec := 2 ** 2;

202.        Action_LinkTo API docTo spec    : constant Drag_ActionTo API docTo spec := 2 ** 3;

203.        Action_PrivateTo API docTo spec : constant Drag_ActionTo API docTo spec := 2 ** 4;

204.        Action_AskTo API docTo spec     : constant Drag_ActionTo API docTo spec := 2 ** 5;

205.        Action_AnyTo API docTo spec     : constant Drag_ActionTo API docTo spec := 2 ** 8 - 1;

207.     end Gdk.DndTo API docTo specTo body;