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;
|
|
|
|
|
|
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
|
|
|
|
|
2017-12-05 16:30:58 +00:00
|
|
|
|
GDK_AVAILABLE_IN_3_94
|
|
|
|
|
GdkDisplay * gdk_drag_context_get_display (GdkDragContext *context);
|
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);
|
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_);
|
1999-10-01 23:18:30 +00:00
|
|
|
|
|
2017-12-10 00:05:37 +00:00
|
|
|
|
GDK_AVAILABLE_IN_3_94
|
|
|
|
|
void gdk_drop_read_async (GdkDragContext *context,
|
|
|
|
|
const char **mime_types,
|
|
|
|
|
int io_priority,
|
|
|
|
|
GCancellable *cancellable,
|
|
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
|
gpointer user_data);
|
|
|
|
|
GDK_AVAILABLE_IN_3_94
|
|
|
|
|
GInputStream * gdk_drop_read_finish (GdkDragContext *context,
|
|
|
|
|
const char **out_mime_type,
|
|
|
|
|
GAsyncResult *result,
|
|
|
|
|
GError **error);
|
|
|
|
|
|
1999-10-01 23:18:30 +00:00
|
|
|
|
/* 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,
|
|
|
|
|
GdkDevice *device,
|
2017-12-13 14:03:53 +00:00
|
|
|
|
GdkContentProvider *content,
|
2017-12-11 00:45:31 +00:00
|
|
|
|
GdkDragAction actions,
|
2017-12-10 23:55:56 +00:00
|
|
|
|
gint dx,
|
|
|
|
|
gint dy);
|
2002-04-25 22:29:14 +00:00
|
|
|
|
|
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);
|
|
|
|
|
|
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__ */
|