1997-11-24 22:37:52 +00:00
|
|
|
/* GDK - The GIMP Drawing Kit
|
|
|
|
* 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
|
1998-02-28 14:35:55 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
1997-11-24 22:37:52 +00:00
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
1998-04-13 02:02:47 +00:00
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
1997-11-24 22:37:52 +00:00
|
|
|
*/
|
1999-02-24 07:37:18 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Modified by the GTK+ Team and others 1997-1999. 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
|
|
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
|
|
|
*/
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
#ifndef __GDK_PRIVATE_H__
|
|
|
|
#define __GDK_PRIVATE_H__
|
|
|
|
|
|
|
|
#include <gdk/gdktypes.h>
|
1999-10-01 23:18:30 +00:00
|
|
|
#include <gdk/gdkevents.h>
|
|
|
|
#include <gdk/gdkfont.h>
|
|
|
|
#include <gdk/gdkgc.h>
|
|
|
|
#include <gdk/gdkim.h>
|
|
|
|
#include <gdk/gdkimage.h>
|
|
|
|
#include <gdk/gdkregion.h>
|
|
|
|
#include <gdk/gdkvisual.h>
|
|
|
|
#include <gdk/gdkwindow.h>
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2000-03-28 01:24:44 +00:00
|
|
|
#define GDK_PARENT_RELATIVE_BG ((GdkPixmap *)1L)
|
|
|
|
#define GDK_NO_BG ((GdkPixmap *)2L)
|
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
#define GDK_DRAWABLE_TYPE(d) (((GdkDrawablePrivate *)d)->window_type)
|
|
|
|
#define GDK_IS_WINDOW(d) (GDK_DRAWABLE_TYPE(d) <= GDK_WINDOW_TEMP || \
|
|
|
|
GDK_DRAWABLE_TYPE(d) == GDK_WINDOW_FOREIGN)
|
|
|
|
#define GDK_IS_PIXMAP(d) (GDK_DRAWABLE_TYPE(d) == GDK_DRAWABLE_PIXMAP)
|
|
|
|
#define GDK_DRAWABLE_DESTROYED(d) (((GdkDrawablePrivate *)d)->destroyed)
|
2000-06-20 20:20:38 +00:00
|
|
|
#define GDK_DRAWABLE_P(d) ((GdkDrawablePrivate*)d)
|
|
|
|
#define GDK_WINDOW_P(d) ((GdkWindowPrivate*)d)
|
|
|
|
#define GDK_GC_P(d) ((GdkGCPrivate*)d)
|
1999-10-03 22:12:41 +00:00
|
|
|
|
|
|
|
typedef struct _GdkDrawablePrivate GdkDrawablePrivate;
|
1997-12-17 00:14:36 +00:00
|
|
|
typedef struct _GdkWindowPrivate GdkWindowPrivate;
|
1999-11-08 20:14:59 +00:00
|
|
|
typedef struct _GdkImageClass GdkImageClass;
|
1998-02-28 14:35:55 +00:00
|
|
|
typedef struct _GdkImagePrivate GdkImagePrivate;
|
|
|
|
typedef struct _GdkGCPrivate GdkGCPrivate;
|
1997-12-17 00:14:36 +00:00
|
|
|
typedef struct _GdkColormapPrivate GdkColormapPrivate;
|
1998-08-25 00:06:38 +00:00
|
|
|
typedef struct _GdkColorInfo GdkColorInfo;
|
1998-02-28 14:35:55 +00:00
|
|
|
typedef struct _GdkFontPrivate GdkFontPrivate;
|
|
|
|
typedef struct _GdkEventFilter GdkEventFilter;
|
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.
1998-10-18 22:51:24 +00:00
|
|
|
typedef struct _GdkClientFilter GdkClientFilter;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
struct _GdkDrawablePrivate
|
|
|
|
{
|
|
|
|
GdkDrawable drawable;
|
1999-11-08 20:14:59 +00:00
|
|
|
GdkDrawableClass *klass;
|
|
|
|
gpointer klass_data;
|
1999-10-03 22:12:41 +00:00
|
|
|
|
|
|
|
guint ref_count;
|
|
|
|
|
2000-03-28 01:24:44 +00:00
|
|
|
gint width;
|
|
|
|
gint height;
|
1999-10-03 22:12:41 +00:00
|
|
|
|
|
|
|
GdkColormap *colormap;
|
|
|
|
|
2000-03-28 01:24:44 +00:00
|
|
|
guint8 window_type;
|
|
|
|
guint8 depth;
|
|
|
|
|
1999-10-03 22:12:41 +00:00
|
|
|
guint destroyed : 2;
|
|
|
|
};
|
1997-11-24 22:37:52 +00:00
|
|
|
|
|
|
|
struct _GdkWindowPrivate
|
|
|
|
{
|
1999-10-03 22:12:41 +00:00
|
|
|
GdkDrawablePrivate drawable;
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
GdkWindow *parent;
|
2000-03-28 01:24:44 +00:00
|
|
|
gint x;
|
|
|
|
gint y;
|
1997-11-24 22:37:52 +00:00
|
|
|
guint8 resize_count;
|
1999-01-15 16:00:39 +00:00
|
|
|
guint mapped : 1;
|
1999-01-27 18:21:20 +00:00
|
|
|
guint guffaw_gravity : 1;
|
2000-03-28 01:24:44 +00:00
|
|
|
guint input_only : 1;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
|
|
|
gint extension_events;
|
1997-12-18 02:17:14 +00:00
|
|
|
|
|
|
|
GList *filters;
|
1998-04-30 23:57:15 +00:00
|
|
|
GList *children;
|
2000-03-28 01:24:44 +00:00
|
|
|
|
|
|
|
GdkColor bg_color;
|
|
|
|
GdkPixmap *bg_pixmap;
|
|
|
|
|
|
|
|
GSList *paint_stack;
|
|
|
|
|
|
|
|
GdkRegion *update_area;
|
|
|
|
guint update_freeze_count;
|
1997-11-24 22:37:52 +00:00
|
|
|
};
|
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
struct _GdkImageClass
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1999-11-08 20:14:59 +00:00
|
|
|
void (*destroy) (GdkImage *image);
|
|
|
|
void (*image_put) (GdkImage *image,
|
|
|
|
GdkDrawable *window,
|
1998-02-28 14:35:55 +00:00
|
|
|
GdkGC *gc,
|
|
|
|
gint xsrc,
|
|
|
|
gint ysrc,
|
|
|
|
gint xdest,
|
|
|
|
gint ydest,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
1997-11-24 22:37:52 +00:00
|
|
|
};
|
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
struct _GdkImagePrivate
|
|
|
|
{
|
|
|
|
GdkImage image;
|
|
|
|
|
|
|
|
guint ref_count;
|
|
|
|
GdkImageClass *klass;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GdkFontPrivate
|
|
|
|
{
|
|
|
|
GdkFont font;
|
|
|
|
guint ref_count;
|
|
|
|
};
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
struct _GdkGCPrivate
|
|
|
|
{
|
1998-01-30 23:47:09 +00:00
|
|
|
guint ref_count;
|
1999-11-08 20:14:59 +00:00
|
|
|
GdkGCClass *klass;
|
|
|
|
gpointer klass_data;
|
2000-03-28 01:24:44 +00:00
|
|
|
|
|
|
|
gint clip_x_origin;
|
|
|
|
gint clip_y_origin;
|
|
|
|
gint ts_x_origin;
|
|
|
|
gint ts_y_origin;
|
1997-11-24 22:37:52 +00:00
|
|
|
};
|
|
|
|
|
1998-08-25 00:06:38 +00:00
|
|
|
typedef enum {
|
|
|
|
GDK_COLOR_WRITEABLE = 1 << 0
|
|
|
|
} GdkColorInfoFlags;
|
|
|
|
|
|
|
|
struct _GdkColorInfo
|
|
|
|
{
|
|
|
|
GdkColorInfoFlags flags;
|
|
|
|
guint ref_count;
|
|
|
|
};
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
struct _GdkColormapPrivate
|
|
|
|
{
|
|
|
|
GdkColormap colormap;
|
|
|
|
GdkVisual *visual;
|
1998-08-25 00:06:38 +00:00
|
|
|
|
1998-01-30 23:47:09 +00:00
|
|
|
guint ref_count;
|
1997-11-24 22:37:52 +00:00
|
|
|
};
|
|
|
|
|
1997-12-18 02:17:14 +00:00
|
|
|
struct _GdkEventFilter {
|
|
|
|
GdkFilterFunc function;
|
|
|
|
gpointer data;
|
|
|
|
};
|
1997-11-27 04:16:39 +00:00
|
|
|
|
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.
1998-10-18 22:51:24 +00:00
|
|
|
struct _GdkClientFilter {
|
|
|
|
GdkAtom type;
|
|
|
|
GdkFilterFunc function;
|
|
|
|
gpointer data;
|
|
|
|
};
|
|
|
|
|
1998-02-28 14:35:55 +00:00
|
|
|
void gdk_window_destroy_notify (GdkWindow *window);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1999-11-21 22:56:37 +00:00
|
|
|
GDKVAR GdkWindow *gdk_parent_root;
|
1999-12-11 23:04:55 +00:00
|
|
|
GDKVAR gint gdk_error_code;
|
|
|
|
GDKVAR gint gdk_error_warnings;
|
1999-11-08 20:14:59 +00:00
|
|
|
|
2000-03-28 01:24:44 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
1998-02-19 06:21:27 +00:00
|
|
|
|
|
|
|
|
2000-03-28 01:24:44 +00:00
|
|
|
#endif /* __GDK_PRIVATE_H__ */
|
1998-02-19 06:21:27 +00:00
|
|
|
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
|