1998-11-10 02:28:34 +00:00
|
|
|
/* Drag and Drop functionality for the Midnight Commander
|
|
|
|
*
|
|
|
|
* Copyright (C) 1998 The Free Software Foundation
|
|
|
|
*
|
|
|
|
* Authors: Federico Mena <federico@nuclecu.unam.mx>
|
|
|
|
* Miguel de Icaza <miguel@nuclecu.unam.mx>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GDND_H
|
|
|
|
#define GDND_H
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
1998-12-05 01:01:13 +00:00
|
|
|
|
|
|
|
/* Standard DnD types */
|
1999-01-21 09:46:01 +00:00
|
|
|
typedef enum {
|
1998-12-05 01:01:13 +00:00
|
|
|
TARGET_MC_DESKTOP_ICON,
|
|
|
|
TARGET_URI_LIST,
|
1998-12-11 18:12:21 +00:00
|
|
|
TARGET_TEXT_PLAIN,
|
1999-01-21 09:46:01 +00:00
|
|
|
TARGET_URL,
|
|
|
|
TARGET_NTARGETS
|
|
|
|
} TargetType;
|
1998-12-05 01:01:13 +00:00
|
|
|
|
1999-01-21 09:46:01 +00:00
|
|
|
/* DnD target names */
|
|
|
|
#define TARGET_MC_DESKTOP_ICON_TYPE "application/x-mc-desktop-icon"
|
|
|
|
#define TARGET_URI_LIST_TYPE "text/uri-list"
|
|
|
|
#define TARGET_TEXT_PLAIN_TYPE "text/plain"
|
|
|
|
#define TARGET_URL_TYPE "_NETSCAPE_URL"
|
|
|
|
|
|
|
|
/* Atoms for the DnD types, indexed per the enum above */
|
|
|
|
extern GdkAtom dnd_target_atoms[];
|
|
|
|
|
|
|
|
|
|
|
|
/* Initializes drag and drop by interning the target convenience atoms */
|
|
|
|
void gdnd_init (void);
|
1998-12-05 01:01:13 +00:00
|
|
|
|
1998-11-10 02:28:34 +00:00
|
|
|
/* Drop the list of URIs in the selection data to the specified directory */
|
|
|
|
int gdnd_drop_on_directory (GdkDragContext *context, GtkSelectionData *selection_data, char *dirname);
|
|
|
|
|
1999-01-21 09:46:01 +00:00
|
|
|
/* Test whether the specified context has a certain target type */
|
|
|
|
int gdnd_drag_context_has_target (GdkDragContext *context, TargetType type);
|
1998-12-05 01:01:13 +00:00
|
|
|
|
1998-11-10 02:28:34 +00:00
|
|
|
#endif
|