diff options
author | Owen Taylor <otaylor@gtk.org> | 1998-10-18 22:51:24 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-10-18 22:51:24 +0000 |
commit | f7bcb456072dac59b1ce5bd5329282ba95a3b495 (patch) | |
tree | a9085af76de35b5c883776673b7a59521e52c043 /gtk/gtkdnd.h | |
parent | 7dbb5755a4cafc45108ec66ac89dfc1f11639494 (diff) | |
download | gdk-pixbuf-f7bcb456072dac59b1ce5bd5329282ba95a3b495.tar.gz |
Added a modular client-message-filter mechanism, that is used for the DND
Sun Oct 18 18:16:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c gdkprivate.h: Added a modular client-message-filter
mechanism, that is used for the DND messages.
Removed all the old DND code.
* gdk/gdkcolormap.c gdk/gdkcolormap.h: Add a function to
get the visual of a given colormap.
* gtk/gtkcolorsel.c: Conversion to new DND, drag
a color-swatch.
* gdk/gdk.h gdk/gdkdnd.c: The low-level
X oriented portions of drag and drop protocols.
Sending and receiving client messages, and navigating
window trees.
* gdk/gdkimage.c: added a gdk_flush() when destroying
SHM images to hopefully make it more likely that
X will gracefully handle the segment being destroyed.
* gdk/gdkprivate.h gtk/gtkdebug.h: Add new
DND debugging flags.
* gtk/gtkeditable.[ch]: Updates for the selection handling
changes.
* gtk/gtkselection.[ch]: Added GtkTargetList, a
refcounted data structure for keeping track of lists
of GdkAtom + information. Removed selection_handler_add
in favor of a "drag_data_get" signal.
* gtk/gtkdnd.[ch] gtk/gtk.h: New files - highlevel (event loop
dependent) parts of the DND protocols, display of drag icons,
drag-under highlighting, and the "default handlers".
* gtk/gtkinvisible.[ch]: New widget - InputOnly offscreen
windows that are used for reliable pointer grabs and
selection handling in the DND code.
* gtk/testdnd.c: New test program for new DND. (Old
DND tests in testgtk still need to be converted.)
* gtk/testselection.c: Use the new selection API.
* docs/dnd_internals: Start at describing how
all the new code works inside.
* docs/Changes-1.2.txt: New file describing source-incompatible
changes in GTK+-1.2.
Sat Oct 17 22:50:34 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkwindow.c (gdk_window_remove_filter): Free
the right list node.
* gdk/gdkwindow.c (gdk_window_init): Add gdk_root_parent
to the XID table so we can receive events on it.
Wed Oct 14 12:57:40 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c gdk/gdk.h (gdk_event_get_time): New function
to get the timestamp from a generic event.
Fri Oct 9 13:16:04 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_add_events): Added function
that safely adds additional events to a widget's event
mask, even if the widget has previously been realized.
(We can do this, but not remove events from the event
mask).
Fri Oct 2 17:35:35 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Allow type == 0,
for AnyPropertyType.
Fri Oct 2 10:32:21 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Add client-local
hashing.
Thu Sep 24 20:33:54 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_send_clientmessage_toall): serial
isn't a timestamp.
Thu Sep 17 14:23:03 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_translate): Removed printing
of unknown window lookup warnings. (Made it
a GDK_NOTE) - they happen in many circumstances.
Diffstat (limited to 'gtk/gtkdnd.h')
-rw-r--r-- | gtk/gtkdnd.h | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/gtk/gtkdnd.h b/gtk/gtkdnd.h new file mode 100644 index 000000000..8f313e70e --- /dev/null +++ b/gtk/gtkdnd.h @@ -0,0 +1,129 @@ +/* GTK - The GIMP Toolkit + * 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 Library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifndef __GTK_DND_H__ +#define __GTK_DND_H__ + +#include <gdk/gdk.h> +#include <gtk/gtkenums.h> +#include <gtk/gtkwidget.h> +#include <gtk/gtkselection.h> + +#ifdef __cplusplus +extern "C" { +#pragma } +#endif /* __cplusplus */ + +typedef enum { + GTK_DEST_DEFAULT_MOTION = 1 << 0, /* respond to "drag_motion" */ + GTK_DEST_DEFAULT_HIGHLIGHT = 1 << 1, /* auto-highlight */ + GTK_DEST_DEFAULT_DROP = 1 << 2, /* respond to "drag_drop" */ + GTK_DEST_DEFAULT_ALL = 0x07 +} GtkDestDefaults; + +/* Destination side */ + +void gtk_drag_get_data (GtkWidget *widget, + GdkDragContext *context, + GdkAtom target, + guint32 time); +void gtk_drag_finish (GdkDragContext *context, + gboolean success, + gboolean delete, + guint32 time); + +void gtk_drag_highlight (GtkWidget *widget); +void gtk_drag_unhighlight (GtkWidget *widget); + +void gtk_drag_dest_set (GtkWidget *widget, + GtkDestDefaults flags, + GtkTargetEntry *targets, + gint n_targets, + GdkDragAction actions); + +void gtk_drag_dest_set_proxy (GtkWidget *widget, + GdkWindow *proxy_window, + GdkDragProtocol protocol, + gboolean use_coordinates); + +/* There probably should be functions for setting the targets + * as a GtkTargetList + */ + +void gtk_drag_dest_unset (GtkWidget *widget); + +/* Source side */ + +void gtk_drag_source_set (GtkWidget *widget, + GdkModifierType start_button_mask, + GtkTargetEntry *targets, + gint n_targets, + GdkDragAction actions); + +void gtk_drag_source_set_icon (GtkWidget *widget, + GdkColormap *colormap, + GdkPixmap *pixmap, + GdkBitmap *mask); + +/* There probably should be functions for setting the targets + * as a GtkTargetList + */ + +GdkDragContext *gtk_drag_begin (GtkWidget *widget, + GtkTargetList *targets, + GdkDragAction actions, + gint button, + GdkEvent *event); + +/* Set the image being dragged around + */ +void gtk_drag_set_icon_widget (GdkDragContext *context, + GtkWidget *widget, + gint hot_x, + gint hot_y); + +void gtk_drag_set_icon_pixmap (GdkDragContext *context, + GdkColormap *colormap, + GdkPixmap *pixmap, + GdkBitmap *mask, + gint hot_x, + gint hot_y); + +void gtk_drag_set_icon_default (GdkDragContext *context); + +void gtk_drag_set_default_icon (GdkColormap *colormap, + GdkPixmap *pixmap, + GdkBitmap *mask, + gint hot_x, + gint hot_y); + + +/* Internal functions */ +void gtk_drag_source_handle_event (GtkWidget *widget, + GdkEvent *event); +void gtk_drag_dest_handle_event (GtkWidget *toplevel, + GdkEvent *event); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __GTK_DND_H__ */ + + + |