]> Pileus Git - ~andy/gtk/blob - gdk/gdkdnd.c
Fix doc comment.
[~andy/gtk] / gdk / gdkdnd.c
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 1995-1999 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 /*
21  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
22  * file for a list of people on the GTK+ Team.  See the ChangeLog
23  * files for a list of changes.  These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
25  */
26
27 #include <gdkdnd.h>
28 #include <gdkdrawable.h>
29 #include <gdkdisplay.h>
30
31 /**
32  * gdk_drag_find_window:
33  * @context: a #GdkDragContext.
34  * @drag_window: a window which may be at the pointer position, but
35  *      should be ignored, since it is put up by the drag source as an icon.
36  * @x_root: the x position of the pointer in root coordinates.
37  * @y_root: the y position of the pointer in root coordinates.
38  * @dest_window: location to store the destination window in.
39  * @protocol: location to store the DND protocol in.
40  * 
41  * Finds the destination window and DND protocol to use at the
42  * given pointer position. 
43  *
44  * This function is called by the drag source to obtain the 
45  * @dest_window and @protocol parameters for gdk_drag_motion().
46  **/
47 void
48 gdk_drag_find_window (GdkDragContext  *context,
49                       GdkWindow       *drag_window,
50                       gint             x_root,
51                       gint             y_root,
52                       GdkWindow      **dest_window,
53                       GdkDragProtocol *protocol)
54 {
55   gdk_drag_find_window_for_screen (context, drag_window,
56                                    gdk_drawable_get_screen (context->source_window),
57                                    x_root, y_root, dest_window, protocol);
58 }
59
60 /**
61  * gdk_drag_get_protocol:
62  * @xid: the X id of the destination window.
63  * @protocol: location where the supported DND protocol is returned.
64  * 
65  * Finds out the DND protocol supported by a window.
66  * 
67  * Return value: the X id of the window where the drop should happen. This 
68  *    may be @xid or the X id of a proxy window, or None if @xid doesn't
69  *    support Drag and Drop.
70  **/
71 guint32
72 gdk_drag_get_protocol (guint32          xid,
73                        GdkDragProtocol *protocol)
74 {
75   return gdk_drag_get_protocol_for_display (gdk_display_get_default (), xid, protocol);
76 }
77
78
79
80