diff options
author | Alexander Larsson <alexl@redhat.com> | 2009-02-18 12:49:34 +0100 |
---|---|---|
committer | Alexander Larsson <alex@localhost.localdomain> | 2009-04-02 10:16:30 +0200 |
commit | 532818909c861bee6fa0f381894140f961ad4b81 (patch) | |
tree | 300084c61c61035b28f4c7859aa2891c96533ba2 /gdk | |
parent | 2c877d4c2d83c1736b48c8833f259cf50bcbac33 (diff) | |
download | gtk+-532818909c861bee6fa0f381894140f961ad4b81.tar.gz |
Move the new parts of GdkWindowObject to a private header
Unfortunately the old GdkWindowObject is public and accessed
from macros, etc. So, we publish a limited copy of GdkWindowObject
and use the full one internally when building gdk.
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/gdkinternals.h | 80 | ||||
-rw-r--r-- | gdk/gdkwindow.h | 37 |
2 files changed, 91 insertions, 26 deletions
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h index a331e940ac..a37f9e8937 100644 --- a/gdk/gdkinternals.h +++ b/gdk/gdkinternals.h @@ -187,6 +187,86 @@ typedef struct gboolean grab_one_pointer_release_event; } GdkPointerGrabInfo; + +/* Private version of GdkWindowObject. The initial part of this strucuture + is public for historical reasons. Don't change that part */ +typedef struct _GdkWindowPaint GdkWindowPaint; + +struct _GdkWindowObject +{ + /* vvvvvvv THIS PART IS PUBLIC. DON'T CHANGE vvvvvvvvvvvvvv */ + GdkDrawable parent_instance; + + GdkDrawable *impl; /* window-system-specific delegate object */ + + GdkWindowObject *parent; + + gpointer user_data; + + gint x; + gint y; + + gint extension_events; + + GList *filters; + GList *children; + + GdkColor bg_color; + GdkPixmap *bg_pixmap; + + GSList *paint_stack; + + GdkRegion *update_area; + guint update_freeze_count; + + guint8 window_type; + guint8 depth; + guint8 resize_count; + + GdkWindowState state; + + guint guffaw_gravity : 1; + guint input_only : 1; + guint modal_hint : 1; + guint composited : 1; + + guint destroyed : 2; + + guint accept_focus : 1; + guint focus_on_map : 1; + guint shaped : 1; + + GdkEventMask event_mask; + + guint update_and_descendants_freeze_count; + + GdkWindowRedirect *redirect; + + /* ^^^^^^^^^^ THIS PART IS PUBLIC. DON'T CHANGE ^^^^^^^^^^ */ + + /* The GdkWindowObject that has the impl, ref:ed if another window. + * This ref is required to keep the wrapper of the impl window alive + * for as long as any GdkWindow references the impl. */ + GdkWindowObject *impl_window; + int abs_x, abs_y; /* Absolute offset in impl */ + gint width, height; + guint32 clip_tag; + GdkRegion *clip_region; /* Clip region (wrt toplevel) in window coords */ + GdkRegion *clip_region_with_children; /* Clip region in window coords */ + GdkCursor *cursor; + gint8 toplevel_window_type; + + GdkWindowPaint *implicit_paint; + + GList *outstanding_moves; + + GdkRegion *shape; + GdkRegion *input_shape; + + cairo_surface_t *cairo_surface; +}; + + extern GdkEventFunc _gdk_event_func; /* Callback for events */ extern gpointer _gdk_event_data; extern GDestroyNotify _gdk_event_notify; diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h index 0aa20fd5f3..6a9985a4fa 100644 --- a/gdk/gdkwindow.h +++ b/gdk/gdkwindow.h @@ -37,11 +37,10 @@ G_BEGIN_DECLS -typedef struct _GdkGeometry GdkGeometry; -typedef struct _GdkWindowAttr GdkWindowAttr; -typedef struct _GdkPointerHooks GdkPointerHooks; -typedef struct _GdkWindowRedirect GdkWindowRedirect; -typedef struct _GdkWindowPaint GdkWindowPaint; +typedef struct _GdkGeometry GdkGeometry; +typedef struct _GdkWindowAttr GdkWindowAttr; +typedef struct _GdkPointerHooks GdkPointerHooks; +typedef struct _GdkWindowRedirect GdkWindowRedirect; /* Classes of windows. * InputOutput: Almost every window should be of this type. Such windows @@ -261,6 +260,12 @@ typedef struct _GdkWindowObjectClass GdkWindowObjectClass; #define GDK_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW, GdkWindowObjectClass)) #define GDK_WINDOW_OBJECT(object) ((GdkWindowObject *) GDK_WINDOW (object)) +#ifndef GDK_COMPILATION +/* We used to export all of GdkWindowObject, but we don't want to keep doing so. + However, there are various parts of it accessed by macros and other code, + so we keep the old exported version public, but in reality it is larger. */ + +/**** DON'T CHANGE THIS STRUCT, the real version is in gdkinternals.h ****/ struct _GdkWindowObject { GdkDrawable parent_instance; @@ -309,28 +314,8 @@ struct _GdkWindowObject guint update_and_descendants_freeze_count; GdkWindowRedirect *redirect; - - /* The GdkWindowObject that has the impl, ref:ed if another window. - * This ref is required to keep the wrapper of the impl window alive - * for as long as any GdkWindow references the impl. */ - GdkWindowObject *impl_window; - int abs_x, abs_y; /* Absolute offset in impl */ - gint width, height; - guint32 clip_tag; - GdkRegion *clip_region; /* Clip region (wrt toplevel) in window coords */ - GdkRegion *clip_region_with_children; /* Clip region in window coords */ - GdkCursor *cursor; - gint8 toplevel_window_type; - - GdkWindowPaint *implicit_paint; - - GList *outstanding_moves; - - GdkRegion *shape; - GdkRegion *input_shape; - - cairo_surface_t *cairo_surface; }; +#endif struct _GdkWindowObjectClass { |