Blame gdk/x11/gdkwindow-x11.h

Packit 98cdb6
/* GDK - The GIMP Drawing Kit
Packit 98cdb6
 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
Packit 98cdb6
 *
Packit 98cdb6
 * This library is free software; you can redistribute it and/or
Packit 98cdb6
 * modify it under the terms of the GNU Lesser General Public
Packit 98cdb6
 * License as published by the Free Software Foundation; either
Packit 98cdb6
 * version 2 of the License, or (at your option) any later version.
Packit 98cdb6
 *
Packit 98cdb6
 * This library is distributed in the hope that it will be useful,
Packit 98cdb6
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 98cdb6
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 98cdb6
 * Lesser General Public License for more details.
Packit 98cdb6
 *
Packit 98cdb6
 * You should have received a copy of the GNU Lesser General Public
Packit 98cdb6
 * License along with this library; if not, write to the
Packit 98cdb6
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Packit 98cdb6
 * Boston, MA 02111-1307, USA.
Packit 98cdb6
 */
Packit 98cdb6
Packit 98cdb6
/*
Packit 98cdb6
 * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
Packit 98cdb6
 * file for a list of people on the GTK+ Team.  See the ChangeLog
Packit 98cdb6
 * files for a list of changes.  These files are distributed with
Packit 98cdb6
 * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
Packit 98cdb6
 */
Packit 98cdb6
Packit 98cdb6
#ifndef __GDK_WINDOW_X11_H__
Packit 98cdb6
#define __GDK_WINDOW_X11_H__
Packit 98cdb6
Packit 98cdb6
#include <gdk/x11/gdkdrawable-x11.h>
Packit 98cdb6
Packit 98cdb6
#ifdef HAVE_XDAMAGE
Packit 98cdb6
#include <X11/extensions/Xdamage.h>
Packit 98cdb6
#endif
Packit 98cdb6
Packit 98cdb6
#ifdef HAVE_XSYNC
Packit 98cdb6
#include <X11/extensions/sync.h>
Packit 98cdb6
#endif
Packit 98cdb6
Packit 98cdb6
G_BEGIN_DECLS
Packit 98cdb6
Packit 98cdb6
typedef struct _GdkToplevelX11 GdkToplevelX11;
Packit 98cdb6
typedef struct _GdkWindowImplX11 GdkWindowImplX11;
Packit 98cdb6
typedef struct _GdkWindowImplX11Class GdkWindowImplX11Class;
Packit 98cdb6
typedef struct _GdkXPositionInfo GdkXPositionInfo;
Packit 98cdb6
Packit 98cdb6
/* Window implementation for X11
Packit 98cdb6
 */
Packit 98cdb6
Packit 98cdb6
#define GDK_TYPE_WINDOW_IMPL_X11              (gdk_window_impl_x11_get_type ())
Packit 98cdb6
#define GDK_WINDOW_IMPL_X11(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW_IMPL_X11, GdkWindowImplX11))
Packit 98cdb6
#define GDK_WINDOW_IMPL_X11_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WINDOW_IMPL_X11, GdkWindowImplX11Class))
Packit 98cdb6
#define GDK_IS_WINDOW_IMPL_X11(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW_IMPL_X11))
Packit 98cdb6
#define GDK_IS_WINDOW_IMPL_X11_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW_IMPL_X11))
Packit 98cdb6
#define GDK_WINDOW_IMPL_X11_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW_IMPL_X11, GdkWindowImplX11Class))
Packit 98cdb6
Packit 98cdb6
struct _GdkWindowImplX11
Packit 98cdb6
{
Packit 98cdb6
  GdkDrawableImplX11 parent_instance;
Packit 98cdb6
Packit 98cdb6
  GdkToplevelX11 *toplevel;	/* Toplevel-specific information */
Packit 98cdb6
  GdkCursor *cursor;
Packit 98cdb6
  gint8 toplevel_window_type;
Packit 98cdb6
  guint no_bg : 1;	        /* Set when the window background is temporarily
Packit 98cdb6
				 * unset during resizing and scaling */
Packit 98cdb6
  guint override_redirect : 1;
Packit 98cdb6
  guint use_synchronized_configure : 1;
Packit 98cdb6
Packit 98cdb6
#if defined (HAVE_XCOMPOSITE) && defined(HAVE_XDAMAGE) && defined (HAVE_XFIXES)
Packit 98cdb6
  Damage damage;
Packit 98cdb6
#endif
Packit 98cdb6
};
Packit 98cdb6
 
Packit 98cdb6
struct _GdkWindowImplX11Class 
Packit 98cdb6
{
Packit 98cdb6
  GdkDrawableImplX11Class parent_class;
Packit 98cdb6
};
Packit 98cdb6
Packit 98cdb6
struct _GdkToplevelX11
Packit 98cdb6
{
Packit 98cdb6
Packit 98cdb6
  /* Set if the window, or any descendent of it, is the server's focus window
Packit 98cdb6
   */
Packit 98cdb6
  guint has_focus_window : 1;
Packit 98cdb6
Packit 98cdb6
  /* Set if window->has_focus_window and the focus isn't grabbed elsewhere.
Packit 98cdb6
   */
Packit 98cdb6
  guint has_focus : 1;
Packit 98cdb6
Packit 98cdb6
  /* Set if the pointer is inside this window. (This is needed for
Packit 98cdb6
   * for focus tracking)
Packit 98cdb6
   */
Packit 98cdb6
  guint has_pointer : 1;
Packit 98cdb6
  
Packit 98cdb6
  /* Set if the window is a descendent of the focus window and the pointer is
Packit 98cdb6
   * inside it. (This is the case where the window will receive keystroke
Packit 98cdb6
   * events even window->has_focus_window is FALSE)
Packit 98cdb6
   */
Packit 98cdb6
  guint has_pointer_focus : 1;
Packit 98cdb6
Packit 98cdb6
  /* Set if we are requesting these hints */
Packit 98cdb6
  guint skip_taskbar_hint : 1;
Packit 98cdb6
  guint skip_pager_hint : 1;
Packit 98cdb6
  guint urgency_hint : 1;
Packit 98cdb6
Packit 98cdb6
  guint on_all_desktops : 1;   /* _NET_WM_STICKY == 0xFFFFFFFF */
Packit 98cdb6
Packit 98cdb6
  guint have_sticky : 1;	/* _NET_WM_STATE_STICKY */
Packit 98cdb6
  guint have_maxvert : 1;       /* _NET_WM_STATE_MAXIMIZED_VERT */
Packit 98cdb6
  guint have_maxhorz : 1;       /* _NET_WM_STATE_MAXIMIZED_HORZ */
Packit 98cdb6
  guint have_fullscreen : 1;    /* _NET_WM_STATE_FULLSCREEN */
Packit 98cdb6
  guint have_hidden : 1;	/* _NET_WM_STATE_HIDDEN */
Packit 98cdb6
Packit 98cdb6
  guint is_leader : 1;
Packit 98cdb6
  
Packit 98cdb6
  gulong map_serial;	/* Serial of last transition from unmapped */
Packit 98cdb6
  
Packit 98cdb6
  GdkPixmap *icon_pixmap;
Packit 98cdb6
  GdkPixmap *icon_mask;
Packit 98cdb6
  GdkPixmap *icon_window;
Packit 98cdb6
  GdkWindow *group_leader;
Packit 98cdb6
Packit 98cdb6
  /* Time of most recent user interaction. */
Packit 98cdb6
  gulong user_time;
Packit 98cdb6
Packit 98cdb6
  /* We use an extra X window for toplevel windows that we XSetInputFocus()
Packit 98cdb6
   * to in order to avoid getting keyboard events redirected to subwindows
Packit 98cdb6
   * that might not even be part of this app
Packit 98cdb6
   */
Packit 98cdb6
  Window focus_window;
Packit 98cdb6
 
Packit 98cdb6
#ifdef HAVE_XSYNC
Packit 98cdb6
  XID update_counter;
Packit 98cdb6
  XSyncValue pending_counter_value; /* latest _NET_WM_SYNC_REQUEST value received */
Packit 98cdb6
  XSyncValue current_counter_value; /* Latest _NET_WM_SYNC_REQUEST value received
Packit 98cdb6
				     * where we have also seen the corresponding
Packit 98cdb6
				     * ConfigureNotify
Packit 98cdb6
				     */
Packit 98cdb6
#endif
Packit 98cdb6
};
Packit 98cdb6
Packit 98cdb6
GType gdk_window_impl_x11_get_type (void);
Packit 98cdb6
Packit 98cdb6
void            gdk_x11_window_set_user_time        (GdkWindow *window,
Packit 98cdb6
						     guint32    timestamp);
Packit 98cdb6
Packit 98cdb6
GdkToplevelX11 *_gdk_x11_window_get_toplevel        (GdkWindow *window);
Packit 98cdb6
void            _gdk_x11_window_tmp_unset_bg        (GdkWindow *window,
Packit 98cdb6
						     gboolean   recurse);
Packit 98cdb6
void            _gdk_x11_window_tmp_reset_bg        (GdkWindow *window,
Packit 98cdb6
						     gboolean   recurse);
Packit 98cdb6
void            _gdk_x11_window_tmp_unset_parent_bg (GdkWindow *window);
Packit 98cdb6
void            _gdk_x11_window_tmp_reset_parent_bg (GdkWindow *window);
Packit 98cdb6
Packit 98cdb6
GdkCursor      *_gdk_x11_window_get_cursor    (GdkWindow *window);
Packit 98cdb6
void            _gdk_x11_window_get_offsets   (GdkWindow *window,
Packit 98cdb6
                                               gint      *x_offset,
Packit 98cdb6
                                               gint      *y_offset);
Packit 98cdb6
Packit 98cdb6
G_END_DECLS
Packit 98cdb6
Packit 98cdb6
#endif /* __GDK_WINDOW_X11_H__ */