2008-07-01 22:57:50 +00:00
|
|
|
|
/* GDK - The GIMP Drawing Kit
|
2005-07-12 05:09:13 +00:00
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
|
|
|
*
|
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2012-02-27 13:01:10 +00:00
|
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
2005-07-12 05:09:13 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
|
|
|
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
|
|
|
|
* files for a list of changes. These files are distributed with
|
2008-05-28 14:01:57 +00:00
|
|
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
2005-07-12 05:09:13 +00:00
|
|
|
|
*/
|
2008-05-28 14:01:57 +00:00
|
|
|
|
|
2012-12-28 14:57:34 +00:00
|
|
|
|
#ifndef __GDK_DND_H__
|
|
|
|
|
#define __GDK_DND_H__
|
|
|
|
|
|
2009-10-21 18:30:04 +00:00
|
|
|
|
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
|
2008-05-28 14:01:57 +00:00
|
|
|
|
#error "Only <gdk/gdk.h> can be included directly."
|
|
|
|
|
#endif
|
|
|
|
|
|
1999-10-01 23:18:30 +00:00
|
|
|
|
#include <gdk/gdktypes.h>
|
2010-05-25 22:38:44 +00:00
|
|
|
|
#include <gdk/gdkdevice.h>
|
2015-12-07 18:47:45 +00:00
|
|
|
|
#include <gdk/gdkevents.h>
|
1999-10-01 23:18:30 +00:00
|
|
|
|
|
2005-06-12 05:32:25 +00:00
|
|
|
|
G_BEGIN_DECLS
|
1999-10-01 23:18:30 +00:00
|
|
|
|
|
2010-12-24 20:54:12 +00:00
|
|
|
|
#define GDK_TYPE_DRAG_CONTEXT (gdk_drag_context_get_type ())
|
|
|
|
|
#define GDK_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DRAG_CONTEXT, GdkDragContext))
|
|
|
|
|
#define GDK_IS_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DRAG_CONTEXT))
|
1999-10-01 23:18:30 +00:00
|
|
|
|
|
2010-06-09 04:33:10 +00:00
|
|
|
|
/**
|
|
|
|
|
* GdkDragAction:
|
|
|
|
|
* @GDK_ACTION_DEFAULT: Means nothing, and should not be used.
|
|
|
|
|
* @GDK_ACTION_COPY: Copy the data.
|
|
|
|
|
* @GDK_ACTION_MOVE: Move the data, i.e. first copy it, then delete
|
|
|
|
|
* it from the source using the DELETE target of the X selection protocol.
|
|
|
|
|
* @GDK_ACTION_LINK: Add a link to the data. Note that this is only
|
|
|
|
|
* useful if source and destination agree on what it means.
|
|
|
|
|
* @GDK_ACTION_PRIVATE: Special action which tells the source that the
|
2014-02-07 18:32:47 +00:00
|
|
|
|
* destination will do something that the source doesn’t understand.
|
2010-06-09 04:33:10 +00:00
|
|
|
|
* @GDK_ACTION_ASK: Ask the user what to do with the data.
|
|
|
|
|
*
|
|
|
|
|
* Used in #GdkDragContext to indicate what the destination
|
|
|
|
|
* should do with the dropped data.
|
|
|
|
|
*/
|
2000-04-15 16:22:52 +00:00
|
|
|
|
typedef enum
|
|
|
|
|
{
|
1999-10-01 23:18:30 +00:00
|
|
|
|
GDK_ACTION_DEFAULT = 1 << 0,
|
|
|
|
|
GDK_ACTION_COPY = 1 << 1,
|
|
|
|
|
GDK_ACTION_MOVE = 1 << 2,
|
|
|
|
|
GDK_ACTION_LINK = 1 << 3,
|
|
|
|
|
GDK_ACTION_PRIVATE = 1 << 4,
|
|
|
|
|
GDK_ACTION_ASK = 1 << 5
|
|
|
|
|
} GdkDragAction;
|
|
|
|
|
|
2016-02-15 16:02:14 +00:00
|
|
|
|
/**
|
|
|
|
|
* GdkDragCancelReason:
|
|
|
|
|
* @GDK_DRAG_CANCEL_NO_TARGET: There is no suitable drop target.
|
|
|
|
|
* @GDK_DRAG_CANCEL_USER_CANCELLED: Drag cancelled by the user
|
|
|
|
|
* @GDK_DRAG_CANCEL_ERROR: Unspecified error.
|
|
|
|
|
*
|
|
|
|
|
* Used in #GdkDragContext to the reason of a cancelled DND operation.
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.20
|
|
|
|
|
*/
|
|
|
|
|
typedef enum {
|
|
|
|
|
GDK_DRAG_CANCEL_NO_TARGET,
|
|
|
|
|
GDK_DRAG_CANCEL_USER_CANCELLED,
|
|
|
|
|
GDK_DRAG_CANCEL_ERROR
|
|
|
|
|
} GdkDragCancelReason;
|
|
|
|
|
|
2010-06-09 04:33:10 +00:00
|
|
|
|
/**
|
|
|
|
|
* GdkDragProtocol:
|
2011-02-01 16:29:33 +00:00
|
|
|
|
* @GDK_DRAG_PROTO_NONE: no protocol.
|
2013-03-09 00:30:02 +00:00
|
|
|
|
* @GDK_DRAG_PROTO_MOTIF: The Motif DND protocol. No longer supported
|
2010-06-09 04:33:10 +00:00
|
|
|
|
* @GDK_DRAG_PROTO_XDND: The Xdnd protocol.
|
|
|
|
|
* @GDK_DRAG_PROTO_ROOTWIN: An extension to the Xdnd protocol for
|
|
|
|
|
* unclaimed root window drops.
|
|
|
|
|
* @GDK_DRAG_PROTO_WIN32_DROPFILES: The simple WM_DROPFILES protocol.
|
|
|
|
|
* @GDK_DRAG_PROTO_OLE2: The complex OLE2 DND protocol (not implemented).
|
|
|
|
|
* @GDK_DRAG_PROTO_LOCAL: Intra-application DND.
|
2014-08-20 19:03:38 +00:00
|
|
|
|
* @GDK_DRAG_PROTO_WAYLAND: Wayland DND protocol.
|
2010-06-09 04:33:10 +00:00
|
|
|
|
*
|
|
|
|
|
* Used in #GdkDragContext to indicate the protocol according to
|
|
|
|
|
* which DND is done.
|
|
|
|
|
*/
|
2000-04-15 16:22:52 +00:00
|
|
|
|
typedef enum
|
|
|
|
|
{
|
2011-02-01 16:29:33 +00:00
|
|
|
|
GDK_DRAG_PROTO_NONE = 0,
|
1999-10-01 23:18:30 +00:00
|
|
|
|
GDK_DRAG_PROTO_MOTIF,
|
|
|
|
|
GDK_DRAG_PROTO_XDND,
|
2010-12-10 06:27:10 +00:00
|
|
|
|
GDK_DRAG_PROTO_ROOTWIN,
|
|
|
|
|
GDK_DRAG_PROTO_WIN32_DROPFILES,
|
|
|
|
|
GDK_DRAG_PROTO_OLE2,
|
2014-08-20 19:03:38 +00:00
|
|
|
|
GDK_DRAG_PROTO_LOCAL,
|
|
|
|
|
GDK_DRAG_PROTO_WAYLAND
|
1999-10-01 23:18:30 +00:00
|
|
|
|
} GdkDragProtocol;
|
|
|
|
|
|
Make this compile without framebuffer enabled
2000-06-20 Havoc Pennington <hp@redhat.com>
* modules/linux-fb/Makefile.am: Make this compile
without framebuffer enabled
* gdk/linux-fb/Makefile.am: Add conditional to not build
framebuffer unless specified in configure
* gdk/gdkdraw.c (gdk_draw_drawable): Fix bug where I was getting
the size of the target instead of source if -1 was passed for
width/height
* gdk/x11/gdkgeometry-x11.c (gdk_window_compute_position): Fix
width/height confusion.
2000-06-19 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkx.h (GDK_WINDOW_XWINDOW): change this to be
GDK_DRAWABLE_XID. In the future, we probably want to make it
faster with G_DISABLE_CHECKS turned on.
2000-06-14 Havoc Pennington <hp@redhat.com>
* gdk/Makefile.am: add gdkpixmap.c
* gdk/gdk.c: s/gdk_window_init/_gdk_windowing_window_init/
s/gdk_image_init/_gdk_windowing_image_init
* gdk/gdkcolor.c: make ref/unref compat wrappers for GObject
ref/unref
* gdk/gdkcolor.h: make GdkColormap a GObject subclass
* gdk/gdkcompat.h: remove GdkWindowType compat, since
GdkWindowType is now non-deprecated;
change gdk_window_get_type() compat to be
gdk_window_get_window_type().
* gdk/gdkdnd.h: make GdkDragContext a GObject.
* gdk/gdkdraw.c, gdk/gdkdraw.h: Convert GdkDrawable to a pure
virtual GObject. Make all functions call into the vtable.
Move gdk_image_put() guts in here. Remove GdkDrawableType
and gdk_drawable_get_type(), these are now GdkWindow-specific.
draw_image, get_depth, get_size, set_colormap, get_colormap,
get_visual added to the vtable.
* gdk/gdkgc.h, gdk/gdkgc.c: Convert GdkGC to a pure virtual
GObject. Virtualize everything.
(gdk_gc_new_with_values): remove check for destroyed window,
because now GdkWindow::create_gc will check this.
(gdk_gc_set_values): New function to set GC values, this
was already implemented but wasn't in the header
* gdk/gdkimage.h, gdk/gdkimage.c: Convert GdkImage to a GObject.
* gdk/gdkinternals.h: Remove _gdk_window_alloc(), remove
_gdk_window_draw_image(), remove _gdk_windowing_window_class,
remove _gdk_window_class; add _gdk_window_impl_get_type() and
_gdk_pixmap_impl_get_type(). Rename gdk_window_init to
_gdk_windowing_window_init, rename gdk_image_init to
_gdk_windowing_image_init.
* gdk/gdkpango.c: Reflect GObject-ification of PangoContext.
(gdk_draw_layout): Remove check for destroyed window,
because all the drawable methods already check it.
* gdk/gdkpixmap.h, gdk/gdkpixmap.c: Convert GdkPixmap to GObject.
Add gdkpixmap.c which contains implementation of GdkDrawable
virtual table (by chaining to a platform-specific implementation
object).
* gdk/gdkprivate.h: Remove GDK_IS_WINDOW, GDK_IS_PIXMAP,
GDK_DRAWABLE_DESTROYED. Add GDK_WINDOW_DESTROYED. Replace
GDK_DRAWABLE_TYPE with GDK_WINDOW_TYPE. Remove GdkDrawablePrivate,
GdkWindowPrivate, GdkImageClass, GdkImagePrivate, GdkGCPrivate,
GdkColormapPrivate.
* gdk/gdktypes.h: #include <glib-object.h>
* gdk/gdkwindow.h, gdk/gdkwindow.c: Convert GdkWindow to GObject.
Move most functionality to platform-specific implementation
object. GdkWindow itself now handles the backing store, then
chains to the platform-specific implementation.
(gdk_window_get_window_type): return GdkWindowType of the window.
(gdk_window_peek_children): New routine, returns the children of
a GdkWindow
(gdk_window_get_children): Was in X11-specific code and did
XQueryTree. Changed to simply return a copy of window->children;
so it can go in cross-platform code.
* gdk/x11/Makefile.am: fix broken MKINSTALLDIRS path
* gdk/x11/gdkcolor-x11.c: implement X-specific parts of
GdkColormap; just changed to use the new private data instead
of casting to GdkColormapPrivate.
* gdk/x11/gdkcursor-x11.c: added a couple typechecks to
gdk_cursor_new().
* gdk/x11/gdkdnd-x11.c: Change the way we access private fields
(private data member in the GObject).
(xdnd_manager_source_filter): Function had broken
error handling, fix it (use gdk_error_trap_push).
* gdk/x11/gdkdrawable-x11.c: This file now implements
a base class for GdkWindowImplX11/GdkPixmapImplX11. This
base class is purely for the convenience of the X port,
and not part of the interface to cross-platform GDK.
* gdk/x11/gdkevents-x11.c: Reflect various renamings.
* gdk/x11/gdkgc-x11.c: Implement a subclass of GdkGC that's
specific to X, and returned by the create_gc virtual method
of GdkDrawableImplX11.
(gdk_x11_gc_set_dashes): Change this to take an array of gint8
rather than gchar, this was also changed in the GdkGC vtable.
(gdk_x11_gc_values_to_xvalues): If GdkGCValues is NULL, or the
mask is 0, return immediately, instead of checking every flag.
This is faster, and keeps us from segfaulting if values is NULL
and the mask contains some nonzero flags.
* gdk/x11/gdkgeometry-x11.c: deal with all the rearranging of
GdkWindow.
* gdk/x11/gdkglobals-x11.c: change type of grab window, since
GdkWindowPrivate is gone.
* gdk/x11/gdkim-x11.c: rename things that got renamed.
* gdk/x11/gdkimage-x11.c: implement in terms of GObject, and
remove the image_put stuff that got transferred to GdkDrawable.
* gdk/x11/gdkinput.c: renamings
* gdk/x11/gdkmain-x11.c: #include <pango/pangox.h>
* gdk/x11/gdkpixmap-x11.c: GObject conversion
* gdk/x11/gdkprivate-x11.h: indentation fixes
* gdk/x11/gdkproperty-x11.c: renamings
* gdk/x11/gdkselection-x11.c: renamings
* gdk/x11/gdkwindow-x11.c: Restructuring and renaming; this now
implements the platform-specific "impl" object.
Moved gdk_window_get_children to gdk/gdkwindow.c
* gdk/x11/gdkx.h: Remove all the private structs and private datas
that no longer exist. Add declaration of GdkGCX11 object here.
Fix all the macros to still work.
* gtk/gtk-boxed.defs: Remove GtkStyle, GdkColormap, GdkWindow,
GdkDragContext from the boxed types since they are now GObjects.
* gtk/gtkstyle.h, gtk/gtkstyle.c: Converted GtkStyle to a GObject,
moved xthickness/ythickness into the instance. GtkStyleClass
functions are now in the standard vtable for GtkStyle, so you have
to create a GObject subclass to write a theme engine.
(gtk_style_copy): fixed a leaked PangoFontDescription
(gtk_style_init): renamed gtk_style_realize, so gtk_style_init
can be the standard GObject function.
* Throughout GTK:
s/style->klass->[xy]thickness/style->[xy]thickness
s/pango_layout_unref/g_object_unref/
* gtk/gtkrc.h, gtk/gtkrc.c: Converted GtkRcStyle to a GObject.
* gtk/gtksocket.c: Use gdk_window_get_user_data() instead of
accessing GDK internals.
* gtk/gtkwidget.c: Use gdk_window_peek_children() instead of
accessing GDK internals.
2000-06-20 21:04:44 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-10 06:27:10 +00:00
|
|
|
|
GType gdk_drag_context_get_type (void) G_GNUC_CONST;
|
Deprecate.
* gdk/gdkdrawable.h (gdk_drawable_ref, gdk_drawable_unref),
gdk/gdkcolor.h (gdk_colormap_ref, gdk_colormap_unref),
gdk/gdkdnd.h (gdk_drag_context_ref, gdk_drag_context_unref),
gdk/gdkgc.h (gdk_gc_ref, gdk_gc_unref): Deprecate.
* gdk/gdkvisual.h: Use GDK_DISABLE_DEPRECATED, not
GTK_DISABLE_DEPRECATED.
* gdk/gdkcolor.c (gdk_colormap_ref, gdk_colormap_unref),
gdk/gdkgc.c (gdk_gc_ref, gdk_gc_unref): Document.
* gdk/tmpl/colors.sgml, gdk/tmpl/pixmaps.sgml, gdk/tmpl/dnd.sgml,
gdk/tmpl/gcs.sgml: Document ref and unref functions as deprecated.
2001-11-30 22:55:28 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-05-25 22:38:44 +00:00
|
|
|
|
void gdk_drag_context_set_device (GdkDragContext *context,
|
|
|
|
|
GdkDevice *device);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-05-25 22:38:44 +00:00
|
|
|
|
GdkDevice * gdk_drag_context_get_device (GdkDragContext *context);
|
|
|
|
|
|
2017-11-18 04:53:25 +00:00
|
|
|
|
GDK_AVAILABLE_IN_3_94
|
|
|
|
|
GdkContentFormats *gdk_drag_context_get_formats (GdkDragContext *context);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-05-25 15:54:16 +00:00
|
|
|
|
GdkDragAction gdk_drag_context_get_actions (GdkDragContext *context);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-05-25 15:54:16 +00:00
|
|
|
|
GdkDragAction gdk_drag_context_get_suggested_action (GdkDragContext *context);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-06-02 18:42:11 +00:00
|
|
|
|
GdkDragAction gdk_drag_context_get_selected_action (GdkDragContext *context);
|
2010-05-25 15:54:16 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-06-10 13:52:45 +00:00
|
|
|
|
GdkWindow *gdk_drag_context_get_source_window (GdkDragContext *context);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-10 05:58:33 +00:00
|
|
|
|
GdkWindow *gdk_drag_context_get_dest_window (GdkDragContext *context);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2010-12-10 05:58:33 +00:00
|
|
|
|
GdkDragProtocol gdk_drag_context_get_protocol (GdkDragContext *context);
|
2010-06-10 13:52:45 +00:00
|
|
|
|
|
1999-10-01 23:18:30 +00:00
|
|
|
|
/* Destination side */
|
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
1999-10-01 23:18:30 +00:00
|
|
|
|
void gdk_drag_status (GdkDragContext *context,
|
2010-12-24 20:54:12 +00:00
|
|
|
|
GdkDragAction action,
|
|
|
|
|
guint32 time_);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
1999-10-01 23:18:30 +00:00
|
|
|
|
void gdk_drop_reply (GdkDragContext *context,
|
2010-12-24 20:54:12 +00:00
|
|
|
|
gboolean accepted,
|
|
|
|
|
guint32 time_);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
1999-10-01 23:18:30 +00:00
|
|
|
|
void gdk_drop_finish (GdkDragContext *context,
|
2010-12-24 20:54:12 +00:00
|
|
|
|
gboolean success,
|
|
|
|
|
guint32 time_);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
1999-10-01 23:18:30 +00:00
|
|
|
|
GdkAtom gdk_drag_get_selection (GdkDragContext *context);
|
|
|
|
|
|
|
|
|
|
/* Source side */
|
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2017-11-18 04:53:25 +00:00
|
|
|
|
GdkDragContext * gdk_drag_begin (GdkWindow *window,
|
|
|
|
|
GdkContentFormats *formats);
|
2010-12-10 06:27:10 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2017-11-18 04:53:25 +00:00
|
|
|
|
GdkDragContext * gdk_drag_begin_for_device (GdkWindow *window,
|
|
|
|
|
GdkDevice *device,
|
|
|
|
|
GdkContentFormats *formats);
|
2015-12-07 18:47:45 +00:00
|
|
|
|
GDK_AVAILABLE_IN_3_20
|
2017-11-18 04:53:25 +00:00
|
|
|
|
GdkDragContext * gdk_drag_begin_from_point (GdkWindow *window,
|
|
|
|
|
GdkDevice *device,
|
|
|
|
|
GdkContentFormats *formats,
|
|
|
|
|
gint x_root,
|
|
|
|
|
gint y_root);
|
2002-04-25 22:29:14 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2017-10-31 14:16:18 +00:00
|
|
|
|
void gdk_drag_find_window (GdkDragContext *context,
|
|
|
|
|
GdkWindow *drag_window,
|
|
|
|
|
gint x_root,
|
|
|
|
|
gint y_root,
|
|
|
|
|
GdkWindow **dest_window,
|
|
|
|
|
GdkDragProtocol *protocol);
|
2002-10-07 20:03:15 +00:00
|
|
|
|
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
1999-10-01 23:18:30 +00:00
|
|
|
|
gboolean gdk_drag_motion (GdkDragContext *context,
|
2010-12-24 20:54:12 +00:00
|
|
|
|
GdkWindow *dest_window,
|
|
|
|
|
GdkDragProtocol protocol,
|
|
|
|
|
gint x_root,
|
|
|
|
|
gint y_root,
|
|
|
|
|
GdkDragAction suggested_action,
|
|
|
|
|
GdkDragAction possible_actions,
|
|
|
|
|
guint32 time_);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
1999-10-01 23:18:30 +00:00
|
|
|
|
void gdk_drag_drop (GdkDragContext *context,
|
2010-12-24 20:54:12 +00:00
|
|
|
|
guint32 time_);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
1999-10-01 23:18:30 +00:00
|
|
|
|
void gdk_drag_abort (GdkDragContext *context,
|
2010-12-24 20:54:12 +00:00
|
|
|
|
guint32 time_);
|
2013-03-15 09:58:39 +00:00
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2004-08-06 17:03:52 +00:00
|
|
|
|
gboolean gdk_drag_drop_succeeded (GdkDragContext *context);
|
1999-10-01 23:18:30 +00:00
|
|
|
|
|
2015-12-07 20:07:13 +00:00
|
|
|
|
GDK_AVAILABLE_IN_3_20
|
|
|
|
|
void gdk_drag_drop_done (GdkDragContext *context,
|
|
|
|
|
gboolean success);
|
|
|
|
|
|
2015-12-02 04:33:53 +00:00
|
|
|
|
GDK_AVAILABLE_IN_3_20
|
|
|
|
|
GdkWindow *gdk_drag_context_get_drag_window (GdkDragContext *context);
|
|
|
|
|
|
2015-12-08 02:52:03 +00:00
|
|
|
|
GDK_AVAILABLE_IN_3_20
|
|
|
|
|
void gdk_drag_context_set_hotspot (GdkDragContext *context,
|
|
|
|
|
gint hot_x,
|
|
|
|
|
gint hot_y);
|
|
|
|
|
|
gdk: Allow internal management of source-side DnD
We've traditionally left GTK+ to handle the input side of things,
letting GDK only manage the windowing-specific messaging. This
way of splitting responsibilities is not compatible however with
some backends, we must fold then input management at the DnD stage
into GDK (and backends) domain.
The gdk_drag_context_manage_dnd() call is meant to be the entry
point for this mode of operation, if the drag and drop operation
becomes managed, the caller (i.e. gtkdnd.c) doesn't need to perform
grabs, nor manage input events itself.
As a consequence of this, different aspects now belong to the
backend GdkDragContext implementation:
- Because the caller doesn't see keyboard events anymore,
keyboard navigation must be managed in GDK, so is the decision
of the current action based on modifiers/button pressed.
- Because the caller won't see input events in general, the lifetime
of the drag and drop operation is now communicated through the
::drop-performed, ::dnd-finished and ::cancel events
- Because the caller doesn't participate anymore on the action
being chosen, the pointer cursor must be set by the backend.
The caller is rather notified of the final action through the
::action signal.
The caller is still responsible of dealing with the corresponding
GdkSelection, ensuring its ownership and communicating the supported
mimetypes.
2016-01-08 20:03:01 +00:00
|
|
|
|
GDK_AVAILABLE_IN_3_20
|
|
|
|
|
gboolean gdk_drag_context_manage_dnd (GdkDragContext *context,
|
|
|
|
|
GdkWindow *ipc_window,
|
|
|
|
|
GdkDragAction actions);
|
2005-06-12 05:32:25 +00:00
|
|
|
|
G_END_DECLS
|
1999-10-01 23:18:30 +00:00
|
|
|
|
|
2000-06-19 03:00:56 +00:00
|
|
|
|
#endif /* __GDK_DND_H__ */
|