]> Pileus Git - ~andy/gtk/blobdiff - gdk/x11/gdkwindow-x11.h
x11: Move remaining APIs into gdkx11utils.h
[~andy/gtk] / gdk / x11 / gdkwindow-x11.h
index 608c0172c8cd7e0e758634e3e19a5d32df8336cb..5a50464f0c3f6f178d88cc853bda53ce5086e542 100644 (file)
 #ifndef __GDK_WINDOW_X11_H__
 #define __GDK_WINDOW_X11_H__
 
-#include <gdk/x11/gdkdrawable-x11.h>
+#include "gdk/x11/gdkprivate-x11.h"
+#include "gdk/gdkwindowimpl.h"
+
+#include <X11/Xlib.h>
+
+#ifdef HAVE_XDAMAGE
+#include <X11/extensions/Xdamage.h>
+#endif
 
 #ifdef HAVE_XSYNC
+#include <X11/Xlib.h>
 #include <X11/extensions/sync.h>
 #endif
 
@@ -40,22 +48,6 @@ typedef struct _GdkWindowImplX11 GdkWindowImplX11;
 typedef struct _GdkWindowImplX11Class GdkWindowImplX11Class;
 typedef struct _GdkXPositionInfo GdkXPositionInfo;
 
-struct _GdkXPositionInfo
-{
-  gint x;
-  gint y;
-  gint width;
-  gint height;
-  gint x_offset;               /* Offsets to add to X coordinates within window */
-  gint y_offset;               /*   to get GDK coodinates within window */
-  guint big : 1;
-  guint mapped : 1;
-  guint no_bg : 1;             /* Set when the window background is temporarily
-                                * unset during resizing and scaling */
-  GdkRectangle clip_rect;      /* visible rectangle of window */
-};
-
-
 /* Window implementation for X11
  */
 
@@ -68,21 +60,32 @@ struct _GdkXPositionInfo
 
 struct _GdkWindowImplX11
 {
-  GdkDrawableImplX11 parent_instance;
+  GdkWindowImpl parent_instance;
+
+  GdkWindow *wrapper;
+
+  Window xid;
 
-  gint width;
-  gint height;
-  
-  GdkXPositionInfo position_info;
   GdkToplevelX11 *toplevel;    /* Toplevel-specific information */
+  GdkCursor *cursor;
+  GHashTable *device_cursor;
+
   gint8 toplevel_window_type;
+  guint no_bg : 1;             /* Set when the window background is temporarily
+                                * unset during resizing and scaling */
   guint override_redirect : 1;
   guint use_synchronized_configure : 1;
+  
+  cairo_surface_t *cairo_surface;
+
+#if defined (HAVE_XCOMPOSITE) && defined(HAVE_XDAMAGE) && defined (HAVE_XFIXES)
+  Damage damage;
+#endif
 };
  
 struct _GdkWindowImplX11Class 
 {
-  GdkDrawableImplX11Class parent_class;
+  GdkWindowImplClass parent_class;
 };
 
 struct _GdkToplevelX11
@@ -96,15 +99,21 @@ struct _GdkToplevelX11
    */
   guint has_focus : 1;
 
-  /* Set if !window->has_focus_window, but events are being sent to the
-   * window because the pointer is in it. (Typically, no window
-   * manager is running.
+  /* Set if the pointer is inside this window. (This is needed for
+   * for focus tracking)
+   */
+  guint has_pointer : 1;
+  
+  /* Set if the window is a descendent of the focus window and the pointer is
+   * inside it. (This is the case where the window will receive keystroke
+   * events even window->has_focus_window is FALSE)
    */
   guint has_pointer_focus : 1;
 
   /* Set if we are requesting these hints */
   guint skip_taskbar_hint : 1;
   guint skip_pager_hint : 1;
+  guint urgency_hint : 1;
 
   guint on_all_desktops : 1;   /* _NET_WM_STICKY == 0xFFFFFFFF */
 
@@ -117,9 +126,8 @@ struct _GdkToplevelX11
   
   gulong map_serial;   /* Serial of last transition from unmapped */
   
-  GdkPixmap *icon_pixmap;
-  GdkPixmap *icon_mask;
-  GdkPixmap *icon_window;
+  cairo_surface_t *icon_pixmap;
+  cairo_surface_t *icon_mask;
   GdkWindow *group_leader;
 
   /* Time of most recent user interaction. */
@@ -143,15 +151,20 @@ struct _GdkToplevelX11
 
 GType gdk_window_impl_x11_get_type (void);
 
-void             gdk_x11_window_set_user_time (GdkWindow *window,
-                                               guint32    timestamp);
+void            gdk_x11_window_set_user_time        (GdkWindow *window,
+                                                    guint32    timestamp);
+
+GdkToplevelX11 *_gdk_x11_window_get_toplevel        (GdkWindow *window);
+void            _gdk_x11_window_tmp_unset_bg        (GdkWindow *window,
+                                                    gboolean   recurse);
+void            _gdk_x11_window_tmp_reset_bg        (GdkWindow *window,
+                                                    gboolean   recurse);
+void            _gdk_x11_window_tmp_unset_parent_bg (GdkWindow *window);
+void            _gdk_x11_window_tmp_reset_parent_bg (GdkWindow *window);
 
-GdkToplevelX11 *_gdk_x11_window_get_toplevel  (GdkWindow *window);
-void           _gdk_x11_window_tmp_unset_bg  (GdkWindow *window,
-                                              gboolean   recurse);
-void            _gdk_x11_window_tmp_reset_bg  (GdkWindow *window,
-                                              gboolean   recurse);
+GdkCursor      *_gdk_x11_window_get_cursor          (GdkWindow *window);
 
+void            _gdk_x11_window_update_size         (GdkWindowImplX11 *impl);
 
 G_END_DECLS