gdkwindow.h 39.7 KB
Newer Older
Cody Russell's avatar
Cody Russell committed
1
/* GDK - The GIMP Drawing Kit
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
 * 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 Lesser 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser 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.
 */

/*
 * Modified by the GTK+ Team and others 1997-2000.  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
24
 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
25 26
 */

27
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
28 29 30
#error "Only <gdk/gdk.h> can be included directly."
#endif

Owen Taylor's avatar
Owen Taylor committed
31 32 33 34 35
#ifndef __GDK_WINDOW_H__
#define __GDK_WINDOW_H__

#include <gdk/gdkdrawable.h>
#include <gdk/gdktypes.h>
36
#include <gdk/gdkevents.h>
Owen Taylor's avatar
Owen Taylor committed
37

38
G_BEGIN_DECLS
Owen Taylor's avatar
Owen Taylor committed
39

40 41 42 43
typedef struct _GdkGeometry          GdkGeometry;
typedef struct _GdkWindowAttr        GdkWindowAttr;
typedef struct _GdkPointerHooks      GdkPointerHooks;
typedef struct _GdkWindowRedirect    GdkWindowRedirect;
Owen Taylor's avatar
Owen Taylor committed
44

45 46 47 48 49 50 51 52 53 54
/**
 * GdkWindowClass:
 * @GDK_INPUT_OUTPUT: window for graphics and events
 * @GDK_INPUT_ONLY: window for events only
 *
 * @GDK_INPUT_OUTPUT windows are the standard kind of window you might expect.
 * Such windows receive events and are also displayed on screen.
 * @GDK_INPUT_ONLY windows are invisible; they are usually placed above other
 * windows in order to trap or filter the events. You can't draw on
 * @GDK_INPUT_ONLY windows.
Owen Taylor's avatar
Owen Taylor committed
55 56 57 58 59 60 61
 */
typedef enum
{
  GDK_INPUT_OUTPUT,
  GDK_INPUT_ONLY
} GdkWindowClass;

62 63 64 65 66 67 68 69 70 71 72 73 74 75
/**
 * GdkWindowType:
 * @GDK_WINDOW_ROOT: root window; this window has no parent, covers the entire
 *  screen, and is created by the window system
 * @GDK_WINDOW_TOPLEVEL: toplevel window (used to implement #GtkWindow)
 * @GDK_WINDOW_CHILD: child window (used to implement e.g. #GtkEntry)
 * @GDK_WINDOW_DIALOG: useless/deprecated compatibility type
 * @GDK_WINDOW_TEMP: override redirect temporary window (used to implement
 *  #GtkMenu)
 * @GDK_WINDOW_FOREIGN: foreign window (see gdk_window_foreign_new())
 * @GDK_WINDOW_OFFSCREEN: offscreen window (see
 *  <xref linkend="OFFSCREEN-WINDOWS"/>). Since 2.18
 *
 * Describes the kind of window.
76 77 78 79 80 81 82 83
 */
typedef enum
{
  GDK_WINDOW_ROOT,
  GDK_WINDOW_TOPLEVEL,
  GDK_WINDOW_CHILD,
  GDK_WINDOW_DIALOG,
  GDK_WINDOW_TEMP,
84 85
  GDK_WINDOW_FOREIGN,
  GDK_WINDOW_OFFSCREEN
86
} GdkWindowType;
Owen Taylor's avatar
Owen Taylor committed
87

88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
/**
 * GdkWindowAttributesType:
 * @GDK_WA_TITLE: Honor the title field
 * @GDK_WA_X: Honor the X coordinate field
 * @GDK_WA_Y: Honor the Y coordinate field
 * @GDK_WA_CURSOR: Honor the cursor field
 * @GDK_WA_COLORMAP: Honor the colormap field
 * @GDK_WA_VISUAL: Honor the visual field
 * @GDK_WA_WMCLASS: Honor the wmclass_class and wmclass_name fields
 * @GDK_WA_NOREDIR: Honor the override_redirect field
 * @GDK_WA_TYPE_HINT: Honor the type_hint field
 *
 * Used to indicate which fields in the #GdkWindowAttr struct should be honored.
 * For example, if you filled in the "cursor" and "x" fields of #GdkWindowAttr,
 * pass "@GDK_WA_X | @GDK_WA_CURSOR" to gdk_window_new(). Fields in
 * #GdkWindowAttr not covered by a bit in this enum are required; for example,
 * the @width/@height, @wclass, and @window_type fields are required, they have
 * no corresponding flag in #GdkWindowAttributesType.
Owen Taylor's avatar
Owen Taylor committed
106 107 108
 */
typedef enum
{
Cody Russell's avatar
Cody Russell committed
109 110 111 112 113 114 115 116 117
  GDK_WA_TITLE	   = 1 << 1,
  GDK_WA_X	   = 1 << 2,
  GDK_WA_Y	   = 1 << 3,
  GDK_WA_CURSOR	   = 1 << 4,
  GDK_WA_COLORMAP  = 1 << 5,
  GDK_WA_VISUAL	   = 1 << 6,
  GDK_WA_WMCLASS   = 1 << 7,
  GDK_WA_NOREDIR   = 1 << 8,
  GDK_WA_TYPE_HINT = 1 << 9
Owen Taylor's avatar
Owen Taylor committed
118 119 120 121
} GdkWindowAttributesType;

/* Size restriction enumeration.
 */
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
/**
 * GdkWindowHints:
 * @GDK_HINT_POS: indicates that the program has positioned the window
 * @GDK_HINT_MIN_SIZE: min size fields are set
 * @GDK_HINT_MAX_SIZE: max size fields are set
 * @GDK_HINT_BASE_SIZE: base size fields are set
 * @GDK_HINT_ASPECT: aspect ratio fields are set
 * @GDK_HINT_RESIZE_INC: resize increment fields are set
 * @GDK_HINT_WIN_GRAVITY: window gravity field is set
 * @GDK_HINT_USER_POS: indicates that the window's position was explicitly set
 *  by the user
 * @GDK_HINT_USER_SIZE: indicates that the window's size was explicitly set by
 *  the user
 *
 * Used to indicate which fields of a #GdkGeometry struct should be paid
 * attention to. Also, the presence/absence of @GDK_HINT_POS,
 * @GDK_HINT_USER_POS, and @GDK_HINT_USER_SIZE is significant, though they don't
 * directly refer to #GdkGeometry fields. @GDK_HINT_USER_POS will be set
 * automatically by #GtkWindow if you call gtk_window_move().
 * @GDK_HINT_USER_POS and @GDK_HINT_USER_SIZE should be set if the user
 * specified a size/position using a --geometry command-line argument;
 * gtk_window_parse_geometry() automatically sets these flags.
 */
Owen Taylor's avatar
Owen Taylor committed
145 146
typedef enum
{
Owen Taylor's avatar
Owen Taylor committed
147 148 149 150 151 152
  GDK_HINT_POS	       = 1 << 0,
  GDK_HINT_MIN_SIZE    = 1 << 1,
  GDK_HINT_MAX_SIZE    = 1 << 2,
  GDK_HINT_BASE_SIZE   = 1 << 3,
  GDK_HINT_ASPECT      = 1 << 4,
  GDK_HINT_RESIZE_INC  = 1 << 5,
Havoc Pennington's avatar
Havoc Pennington committed
153 154 155
  GDK_HINT_WIN_GRAVITY = 1 << 6,
  GDK_HINT_USER_POS    = 1 << 7,
  GDK_HINT_USER_SIZE   = 1 << 8
Owen Taylor's avatar
Owen Taylor committed
156 157
} GdkWindowHints;

158

159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
/**
 * GdkWindowTypeHint:
 * @GDK_WINDOW_TYPE_HINT_NORMAL: Normal toplevel window.
 * @GDK_WINDOW_TYPE_HINT_DIALOG: Dialog window.
 * @GDK_WINDOW_TYPE_HINT_MENU: Window used to implement a menu; GTK+ uses
 *  this hint only for torn-off menus, see #GtkTearoffMenuItem.
 * @GDK_WINDOW_TYPE_HINT_TOOLBAR: Window used to implement toolbars.
 * @GDK_WINDOW_TYPE_HINT_SPLASHSCREEN: Window used to display a splash
 *  screen during application startup.
 * @GDK_WINDOW_TYPE_HINT_UTILITY: Utility windows which are not detached
 *  toolbars or dialogs.
 * @GDK_WINDOW_TYPE_HINT_DOCK: Used for creating dock or panel windows.
 * @GDK_WINDOW_TYPE_HINT_DESKTOP: Used for creating the desktop background
 *  window.
 * @GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU: A menu that belongs to a menubar.
 * @GDK_WINDOW_TYPE_HINT_POPUP_MENU: A menu that does not belong to a menubar,
 *  e.g. a context menu.
 * @GDK_WINDOW_TYPE_HINT_TOOLTIP: A tooltip.
 * @GDK_WINDOW_TYPE_HINT_NOTIFICATION: A notification - typically a "bubble"
 *  that belongs to a status icon.
 * @GDK_WINDOW_TYPE_HINT_COMBO: A popup from a combo box.
 * @GDK_WINDOW_TYPE_HINT_DND: A window that is used to implement a DND cursor.
 *
 * These are hints for the window manager that indicate what type of function
 * the window has. The window manager can use this when determining decoration
 * and behaviour of the window. The hint must be set before mapping the window.
185
 *
186 187 188 189
 * See the
 * <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended
 * Window Manager Hints</ulink> specification for more details about
 * window types.
190 191 192 193 194
 */
typedef enum
{
  GDK_WINDOW_TYPE_HINT_NORMAL,
  GDK_WINDOW_TYPE_HINT_DIALOG,
Søren Sandmann's avatar
Søren Sandmann committed
195
  GDK_WINDOW_TYPE_HINT_MENU,		/* Torn off menu */
196 197 198 199
  GDK_WINDOW_TYPE_HINT_TOOLBAR,
  GDK_WINDOW_TYPE_HINT_SPLASHSCREEN,
  GDK_WINDOW_TYPE_HINT_UTILITY,
  GDK_WINDOW_TYPE_HINT_DOCK,
Søren Sandmann's avatar
Søren Sandmann committed
200 201 202 203 204 205 206
  GDK_WINDOW_TYPE_HINT_DESKTOP,
  GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU,	/* A drop down menu (from a menubar) */
  GDK_WINDOW_TYPE_HINT_POPUP_MENU,	/* A popup menu (from right-click) */
  GDK_WINDOW_TYPE_HINT_TOOLTIP,
  GDK_WINDOW_TYPE_HINT_NOTIFICATION,
  GDK_WINDOW_TYPE_HINT_COMBO,
  GDK_WINDOW_TYPE_HINT_DND
207 208
} GdkWindowTypeHint;

Owen Taylor's avatar
Owen Taylor committed
209 210 211 212 213
/* The next two enumeration values current match the
 * Motif constants. If this is changed, the implementation
 * of gdk_window_set_decorations/gdk_window_set_functions
 * will need to change as well.
 */
214 215 216 217 218 219 220 221 222 223 224 225 226 227
/**
 * GdkWMDecoration:
 * @GDK_DECOR_ALL: all decorations should be applied.
 * @GDK_DECOR_BORDER: a frame should be drawn around the window.
 * @GDK_DECOR_RESIZEH: the frame should have resize handles.
 * @GDK_DECOR_TITLE: a titlebar should be placed above the window.
 * @GDK_DECOR_MENU: a button for opening a menu should be included.
 * @GDK_DECOR_MINIMIZE: a minimize button should be included.
 * @GDK_DECOR_MAXIMIZE: a maximize button should be included.
 *
 * These are hints originally defined by the Motif toolkit.
 * The window manager can use them when determining how to decorate
 * the window. The hint must be set before mapping the window.
 */
Owen Taylor's avatar
Owen Taylor committed
228 229 230 231 232 233 234 235 236 237 238
typedef enum
{
  GDK_DECOR_ALL		= 1 << 0,
  GDK_DECOR_BORDER	= 1 << 1,
  GDK_DECOR_RESIZEH	= 1 << 2,
  GDK_DECOR_TITLE	= 1 << 3,
  GDK_DECOR_MENU	= 1 << 4,
  GDK_DECOR_MINIMIZE	= 1 << 5,
  GDK_DECOR_MAXIMIZE	= 1 << 6
} GdkWMDecoration;

239 240 241 242 243 244 245 246 247 248 249 250 251
/**
 * GdkWMFunction:
 * @GDK_FUNC_ALL: all functions should be offered.
 * @GDK_FUNC_RESIZE: the window should be resizable.
 * @GDK_FUNC_MOVE: the window should be movable.
 * @GDK_FUNC_MINIMIZE: the window should be minimizable.
 * @GDK_FUNC_MAXIMIZE: the window should be maximizable.
 * @GDK_FUNC_CLOSE: the window should be closable.
 *
 * These are hints originally defined by the Motif toolkit. The window manager
 * can use them when determining the functions to offer for the window. The
 * hint must be set before mapping the window.
 */
Owen Taylor's avatar
Owen Taylor committed
252 253 254 255 256 257 258 259 260 261
typedef enum
{
  GDK_FUNC_ALL		= 1 << 0,
  GDK_FUNC_RESIZE	= 1 << 1,
  GDK_FUNC_MOVE		= 1 << 2,
  GDK_FUNC_MINIMIZE	= 1 << 3,
  GDK_FUNC_MAXIMIZE	= 1 << 4,
  GDK_FUNC_CLOSE	= 1 << 5
} GdkWMFunction;

Owen Taylor's avatar
Owen Taylor committed
262 263 264 265
/* Currently, these are the same values numerically as in the
 * X protocol. If you change that, gdkwindow-x11.c/gdk_window_set_geometry_hints()
 * will need fixing.
 */
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
/**
 * GdkGravity:
 * @GDK_GRAVITY_NORTH_WEST: the reference point is at the top left corner.
 * @GDK_GRAVITY_NORTH: the reference point is in the middle of the top edge.
 * @GDK_GRAVITY_NORTH_EAST: the reference point is at the top right corner.
 * @GDK_GRAVITY_WEST: the reference point is at the middle of the left edge.
 * @GDK_GRAVITY_CENTER: the reference point is at the center of the window.
 * @GDK_GRAVITY_EAST: the reference point is at the middle of the right edge.
 * @GDK_GRAVITY_SOUTH_WEST: the reference point is at the lower left corner.
 * @GDK_GRAVITY_SOUTH: the reference point is at the middle of the lower edge.
 * @GDK_GRAVITY_SOUTH_EAST: the reference point is at the lower right corner.
 * @GDK_GRAVITY_STATIC: the reference point is at the top left corner of the
 *  window itself, ignoring window manager decorations.
 *
 * Defines the reference point of a window and the meaning of coordinates
 * passed to gtk_window_move(). See gtk_window_move() and the "implementation
 * notes" section of the
 * <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended
 * Window Manager Hints</ulink> specification for more details.
 */
Owen Taylor's avatar
Owen Taylor committed
286 287 288 289 290 291 292 293 294 295 296
typedef enum
{
  GDK_GRAVITY_NORTH_WEST = 1,
  GDK_GRAVITY_NORTH,
  GDK_GRAVITY_NORTH_EAST,
  GDK_GRAVITY_WEST,
  GDK_GRAVITY_CENTER,
  GDK_GRAVITY_EAST,
  GDK_GRAVITY_SOUTH_WEST,
  GDK_GRAVITY_SOUTH,
  GDK_GRAVITY_SOUTH_EAST,
297
  GDK_GRAVITY_STATIC
Owen Taylor's avatar
Owen Taylor committed
298 299
} GdkGravity;

Owen Taylor's avatar
Owen Taylor committed
300

301 302 303 304 305 306 307 308 309 310 311 312 313
/**
 * GdkWindowEdge:
 * @GDK_WINDOW_EDGE_NORTH_WEST: the top left corner.
 * @GDK_WINDOW_EDGE_NORTH: the top edge.
 * @GDK_WINDOW_EDGE_NORTH_EAST: the top right corner.
 * @GDK_WINDOW_EDGE_WEST: the left edge.
 * @GDK_WINDOW_EDGE_EAST: the right edge.
 * @GDK_WINDOW_EDGE_SOUTH_WEST: the lower left corner.
 * @GDK_WINDOW_EDGE_SOUTH: the lower edge.
 * @GDK_WINDOW_EDGE_SOUTH_EAST: the lower right corner.
 *
 * Determines a window edge or corner.
 */
Owen Taylor's avatar
Owen Taylor committed
314 315 316 317 318 319 320 321 322 323 324 325
typedef enum
{
  GDK_WINDOW_EDGE_NORTH_WEST,
  GDK_WINDOW_EDGE_NORTH,
  GDK_WINDOW_EDGE_NORTH_EAST,
  GDK_WINDOW_EDGE_WEST,
  GDK_WINDOW_EDGE_EAST,
  GDK_WINDOW_EDGE_SOUTH_WEST,
  GDK_WINDOW_EDGE_SOUTH,
  GDK_WINDOW_EDGE_SOUTH_EAST  
} GdkWindowEdge;

326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346
/**
 * GdkWindowAttr:
 * @title: title of the window (for toplevel windows)
 * @event_mask: event mask (see gdk_window_set_events())
 * @x: X coordinate relative to parent window (see gdk_window_move())
 * @y: Y coordinate relative to parent window (see gdk_window_move())
 * @width: width of window
 * @height: height of window
 * @wclass: #GDK_INPUT_OUTPUT (normal window) or #GDK_INPUT_ONLY (invisible
 *  window that receives events)
 * @visual: #GdkVisual for window
 * @colormap: #GdkColormap for window
 * @window_type: type of window
 * @cursor: cursor for the window (see gdk_window_set_cursor())
 * @wmclass_name: don't use (see gtk_window_set_wmclass())
 * @wmclass_class: don't use (see gtk_window_set_wmclass())
 * @override_redirect: %TRUE to bypass the window manager
 * @type_hint: a hint of the function of the window
 *
 * Attributes to use for a newly-created window.
 */
Owen Taylor's avatar
Owen Taylor committed
347 348 349 350
struct _GdkWindowAttr
{
  gchar *title;
  gint event_mask;
351 352 353
  gint x, y;
  gint width;
  gint height;
Owen Taylor's avatar
Owen Taylor committed
354 355 356
  GdkWindowClass wclass;
  GdkVisual *visual;
  GdkColormap *colormap;
357
  GdkWindowType window_type;
Owen Taylor's avatar
Owen Taylor committed
358 359 360 361
  GdkCursor *cursor;
  gchar *wmclass_name;
  gchar *wmclass_class;
  gboolean override_redirect;
Cody Russell's avatar
Cody Russell committed
362
  GdkWindowTypeHint type_hint;
Owen Taylor's avatar
Owen Taylor committed
363 364
};

365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440
/**
 * GdkGeometry:
 * @min_width: minimum width of window (or -1 to use requisition, with
 *  #GtkWindow only)
 * @min_height: minimum height of window (or -1 to use requisition, with
 *  #GtkWindow only)
 * @max_width: maximum width of window (or -1 to use requisition, with
 *  #GtkWindow only)
 * @max_height: maximum height of window (or -1 to use requisition, with
 *  #GtkWindow only)
 * @base_width: allowed window widths are @base_width + @width_inc * N where N
 *  is any integer (-1 allowed with #GtkWindow)
 * @base_height: allowed window widths are @base_height + @height_inc * N where
 *  N is any integer (-1 allowed with #GtkWindow)
 * @width_inc: width resize increment
 * @height_inc: height resize increment
 * @min_aspect: minimum width/height ratio
 * @max_aspect: maximum width/height ratio
 * @win_gravity: window gravity, see gtk_window_set_gravity()
 *
 * The #GdkGeometry struct gives the window manager information about
 * a window's geometry constraints. Normally you would set these on
 * the GTK+ level using gtk_window_set_geometry_hints(). #GtkWindow
 * then sets the hints on the #GdkWindow it creates.
 *
 * gdk_window_set_geometry_hints() expects the hints to be fully valid already
 * and simply passes them to the window manager; in contrast,
 * gtk_window_set_geometry_hints() performs some interpretation. For example,
 * #GtkWindow will apply the hints to the geometry widget instead of the
 * toplevel window, if you set a geometry widget. Also, the
 * @min_width/@min_height/@max_width/@max_height fields may be set to -1, and
 * #GtkWindow will substitute the size request of the window or geometry widget.
 * If the minimum size hint is not provided, #GtkWindow will use its requisition
 * as the minimum size. If the minimum size is provided and a geometry widget is
 * set, #GtkWindow will take the minimum size as the minimum size of the
 * geometry widget rather than the entire window. The base size is treated
 * similarly.
 *
 * The canonical use-case for gtk_window_set_geometry_hints() is to get a
 * terminal widget to resize properly. Here, the terminal text area should be
 * the geometry widget; #GtkWindow will then automatically set the base size to
 * the size of other widgets in the terminal window, such as the menubar and
 * scrollbar. Then, the @width_inc and @height_inc fields should be set to the
 * size of one character in the terminal. Finally, the base size should be set
 * to the size of one character. The net effect is that the minimum size of the
 * terminal will have a 1x1 character terminal area, and only terminal sizes on
 * the "character grid" will be allowed.
 *
 * Here's an example of how the terminal example would be implemented, assuming
 * a terminal area widget called "terminal" and a toplevel window "toplevel":
 *
 * <informalexample><programlisting><![CDATA[
 * 	GdkGeometry hints;
 *
 * 	hints.base_width = terminal->char_width;
 *         hints.base_height = terminal->char_height;
 *         hints.min_width = terminal->char_width;
 *         hints.min_height = terminal->char_height;
 *         hints.width_inc = terminal->char_width;
 *         hints.height_inc = terminal->char_height;
 *
 *  gtk_window_set_geometry_hints (GTK_WINDOW (toplevel),
 *                                 GTK_WIDGET (terminal),
 *                                 &hints,
 *                                 GDK_HINT_RESIZE_INC |
 *                                 GDK_HINT_MIN_SIZE |
 *                                 GDK_HINT_BASE_SIZE);
 * ]]></programlisting></informalexample>
 *
 * The other useful fields are the @min_aspect and @max_aspect fields; these
 * contain a width/height ratio as a floating point number. If a geometry widget
 * is set, the aspect applies to the geometry widget rather than the entire
 * window. The most common use of these hints is probably to set @min_aspect and
 * @max_aspect to the same value, thus forcing the window to keep a constant
 * aspect ratio.
 */
441 442
struct _GdkGeometry
{
Owen Taylor's avatar
Owen Taylor committed
443 444 445 446 447 448 449 450 451 452
  gint min_width;
  gint min_height;
  gint max_width;
  gint max_height;
  gint base_width;
  gint base_height;
  gint width_inc;
  gint height_inc;
  gdouble min_aspect;
  gdouble max_aspect;
Owen Taylor's avatar
Owen Taylor committed
453
  GdkGravity win_gravity;
Owen Taylor's avatar
Owen Taylor committed
454 455
};

456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472
/**
 * GdkPointerHooks:
 * @get_pointer: Obtains the current pointer position and modifier state.
 *  The position is given in coordinates relative to the window containing
 *  the pointer, which is returned in @window.
 * @window_at_pointer: Obtains the window underneath the mouse pointer,
 *  returning the location of that window in @win_x, @win_y. Returns %NULL
 *  if the window under the mouse pointer is not known to GDK (for example,
 *  belongs to another application).
 *
 * A table of pointers to functions for getting quantities related to
 * the current pointer position. GDK has one global table of this type,
 * which can be set using gdk_set_pointer_hooks().
 *
 * This is only useful for such low-level tools as an event recorder.
 * Applications should never have any reason to use this facility
 */
473 474 475 476 477 478
struct _GdkPointerHooks 
{
  GdkWindow* (*get_pointer)       (GdkWindow	   *window,
			           gint	           *x,
			           gint   	   *y,
			           GdkModifierType *mask);
479
  GdkWindow* (*window_at_pointer) (GdkScreen       *screen, /* unused */
480
                                   gint            *win_x,
481 482 483
                                   gint            *win_y);
};

484 485 486 487 488 489 490 491 492
typedef struct _GdkWindowObject GdkWindowObject;
typedef struct _GdkWindowObjectClass GdkWindowObjectClass;

#define GDK_TYPE_WINDOW              (gdk_window_object_get_type ())
#define GDK_WINDOW(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW, GdkWindow))
#define GDK_WINDOW_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WINDOW, GdkWindowObjectClass))
#define GDK_IS_WINDOW(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW))
#define GDK_IS_WINDOW_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW))
#define GDK_WINDOW_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW, GdkWindowObjectClass))
493 494

#ifndef GDK_DISABLE_DEPRECATED
495 496
#define GDK_WINDOW_OBJECT(object)    ((GdkWindowObject *) GDK_WINDOW (object))

497
#ifndef GDK_COMPILATION
498

499 500 501 502 503
/* 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 ****/
504 505 506 507
struct _GdkWindowObject
{
  GdkDrawable parent_instance;

Matthias Clasen's avatar
Matthias Clasen committed
508
  GdkDrawable *GSEAL (impl); /* window-system-specific delegate object */
509
  
Matthias Clasen's avatar
Matthias Clasen committed
510
  GdkWindowObject *GSEAL (parent);
511

Matthias Clasen's avatar
Matthias Clasen committed
512
  gpointer GSEAL (user_data);
513

Matthias Clasen's avatar
Matthias Clasen committed
514 515
  gint GSEAL (x);
  gint GSEAL (y);
516
  
Matthias Clasen's avatar
Matthias Clasen committed
517
  gint GSEAL (extension_events);
518

Matthias Clasen's avatar
Matthias Clasen committed
519 520
  GList *GSEAL (filters);
  GList *GSEAL (children);
521

Matthias Clasen's avatar
Matthias Clasen committed
522 523
  GdkColor GSEAL (bg_color);
  GdkPixmap *GSEAL (bg_pixmap);
524
  
Matthias Clasen's avatar
Matthias Clasen committed
525
  GSList *GSEAL (paint_stack);
526
  
Matthias Clasen's avatar
Matthias Clasen committed
527 528
  GdkRegion *GSEAL (update_area);
  guint GSEAL (update_freeze_count);
529
  
Matthias Clasen's avatar
Matthias Clasen committed
530 531 532
  guint8 GSEAL (window_type);
  guint8 GSEAL (depth);
  guint8 GSEAL (resize_count);
533

Matthias Clasen's avatar
Matthias Clasen committed
534
  GdkWindowState GSEAL (state);
535
  
Matthias Clasen's avatar
Matthias Clasen committed
536 537 538 539
  guint GSEAL (guffaw_gravity) : 1;
  guint GSEAL (input_only) : 1;
  guint GSEAL (modal_hint) : 1;
  guint GSEAL (composited) : 1;
540
  
Matthias Clasen's avatar
Matthias Clasen committed
541
  guint GSEAL (destroyed) : 2;
542

Matthias Clasen's avatar
Matthias Clasen committed
543 544 545
  guint GSEAL (accept_focus) : 1;
  guint GSEAL (focus_on_map) : 1;
  guint GSEAL (shaped) : 1;
546
  guint GSEAL (support_multidevice) : 1;
547
  
Matthias Clasen's avatar
Matthias Clasen committed
548
  GdkEventMask GSEAL (event_mask);
Kristian Rietveld's avatar
Kristian Rietveld committed
549

Matthias Clasen's avatar
Matthias Clasen committed
550
  guint GSEAL (update_and_descendants_freeze_count);
551

Matthias Clasen's avatar
Matthias Clasen committed
552
  GdkWindowRedirect *GSEAL (redirect);
553
};
554
#endif
555
#endif
556 557 558 559 560 561

struct _GdkWindowObjectClass
{
  GdkDrawableClass parent_class;
};

Owen Taylor's avatar
Owen Taylor committed
562 563
/* Windows
 */
Elliot Lee's avatar
Elliot Lee committed
564
GType         gdk_window_object_get_type       (void) G_GNUC_CONST;
565 566 567 568 569
GdkWindow*    gdk_window_new                   (GdkWindow     *parent,
                                                GdkWindowAttr *attributes,
                                                gint           attributes_mask);
void          gdk_window_destroy               (GdkWindow     *window);
GdkWindowType gdk_window_get_window_type       (GdkWindow     *window);
570
gboolean      gdk_window_is_destroyed          (GdkWindow     *window);
571 572

#ifndef GDK_MULTIDEVICE_SAFE
573 574
GdkWindow*    gdk_window_at_pointer            (gint          *win_x,
                                                gint          *win_y);
575
#endif /* GDK_MULTIDEVICE_SAFE */
576 577 578
void          gdk_window_show                  (GdkWindow     *window);
void          gdk_window_hide                  (GdkWindow     *window);
void          gdk_window_withdraw              (GdkWindow     *window);
579
void          gdk_window_show_unraised         (GdkWindow     *window);
580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607
void          gdk_window_move                  (GdkWindow     *window,
                                                gint           x,
                                                gint           y);
void          gdk_window_resize                (GdkWindow     *window,
                                                gint           width,
                                                gint           height);
void          gdk_window_move_resize           (GdkWindow     *window,
                                                gint           x,
                                                gint           y,
                                                gint           width,
                                                gint           height);
void          gdk_window_reparent              (GdkWindow     *window,
                                                GdkWindow     *new_parent,
                                                gint           x,
                                                gint           y);
void          gdk_window_clear                 (GdkWindow     *window);
void          gdk_window_clear_area            (GdkWindow     *window,
                                                gint           x,
                                                gint           y,
                                                gint           width,
                                                gint           height);
void          gdk_window_clear_area_e          (GdkWindow     *window,
                                                gint           x,
                                                gint           y,
                                                gint           width,
                                                gint           height);
void          gdk_window_raise                 (GdkWindow     *window);
void          gdk_window_lower                 (GdkWindow     *window);
Alexander Larsson's avatar
Alexander Larsson committed
608 609 610
void          gdk_window_restack               (GdkWindow     *window,
						GdkWindow     *sibling,
						gboolean       above);
611 612
void          gdk_window_focus                 (GdkWindow     *window,
                                                guint32        timestamp);
613 614 615 616
void          gdk_window_set_user_data         (GdkWindow     *window,
                                                gpointer       user_data);
void          gdk_window_set_override_redirect (GdkWindow     *window,
                                                gboolean       override_redirect);
Matthias Clasen's avatar
Matthias Clasen committed
617
gboolean      gdk_window_get_accept_focus      (GdkWindow     *window);
618 619
void          gdk_window_set_accept_focus      (GdkWindow     *window,
					        gboolean       accept_focus);
Matthias Clasen's avatar
Matthias Clasen committed
620
gboolean      gdk_window_get_focus_on_map      (GdkWindow     *window);
621 622
void          gdk_window_set_focus_on_map      (GdkWindow     *window,
					        gboolean       focus_on_map);
623 624 625 626 627 628
void          gdk_window_add_filter            (GdkWindow     *window,
                                                GdkFilterFunc  function,
                                                gpointer       data);
void          gdk_window_remove_filter         (GdkWindow     *window,
                                                GdkFilterFunc  function,
                                                gpointer       data);
629 630 631 632 633 634 635
void          gdk_window_scroll                (GdkWindow     *window,
                                                gint           dx,
                                                gint           dy);
void	      gdk_window_move_region           (GdkWindow       *window,
						const GdkRegion *region,
						gint             dx,
						gint             dy);
636
gboolean      gdk_window_ensure_native        (GdkWindow       *window);
Owen Taylor's avatar
Owen Taylor committed
637 638 639 640 641 642 643

/* 
 * This allows for making shaped (partially transparent) windows
 * - cool feature, needed for Drag and Drag for example.
 *  The shape_mask can be the mask
 *  from gdk_pixmap_create_from_xpm.   Stefan Wille
 */
644 645 646 647 648 649 650 651
void gdk_window_shape_combine_mask  (GdkWindow	      *window,
                                     GdkBitmap	      *mask,
                                     gint	       x,
                                     gint	       y);
void gdk_window_shape_combine_region (GdkWindow	      *window,
                                      const GdkRegion *shape_region,
                                      gint	       offset_x,
                                      gint	       offset_y);
652

Owen Taylor's avatar
Owen Taylor committed
653 654 655 656 657 658 659 660 661
/*
 * This routine allows you to quickly take the shapes of all the child windows
 * of a window and use their shapes as the shape mask for this window - useful
 * for container windows that dont want to look like a big box
 * 
 * - Raster
 */
void gdk_window_set_child_shapes (GdkWindow *window);

Matthias Clasen's avatar
Matthias Clasen committed
662
gboolean gdk_window_get_composited (GdkWindow *window);
663
void gdk_window_set_composited   (GdkWindow *window,
664
                                  gboolean   composited);
665

Owen Taylor's avatar
Owen Taylor committed
666 667 668 669 670 671 672
/*
 * This routine allows you to merge (ie ADD) child shapes to your
 * own window's shape keeping its current shape and ADDING the child
 * shapes to it.
 * 
 * - Raster
 */
673
void gdk_window_merge_child_shapes         (GdkWindow       *window);
Owen Taylor's avatar
Owen Taylor committed
674

675 676 677 678 679 680 681 682 683 684
void gdk_window_input_shape_combine_mask   (GdkWindow       *window,
					    GdkBitmap       *mask,
					    gint             x,
					    gint             y);
void gdk_window_input_shape_combine_region (GdkWindow       *window,
                                            const GdkRegion *shape_region,
                                            gint             offset_x,
                                            gint             offset_y);
void gdk_window_set_child_input_shapes     (GdkWindow       *window);
void gdk_window_merge_child_input_shapes   (GdkWindow       *window);
685 686


Owen Taylor's avatar
Owen Taylor committed
687
/*
688
 * Check if a window has been shown, and whether all its
Owen Taylor's avatar
Owen Taylor committed
689 690 691 692 693 694
 * parents up to a toplevel have been shown, respectively.
 * Note that a window that is_viewable below is not necessarily
 * viewable in the X sense.
 */
gboolean gdk_window_is_visible     (GdkWindow *window);
gboolean gdk_window_is_viewable    (GdkWindow *window);
Matthias Clasen's avatar
Matthias Clasen committed
695 696
gboolean gdk_window_is_input_only  (GdkWindow *window);
gboolean gdk_window_is_shaped      (GdkWindow *window);
Owen Taylor's avatar
Owen Taylor committed
697

698 699
GdkWindowState gdk_window_get_state (GdkWindow *window);

Owen Taylor's avatar
Owen Taylor committed
700 701 702 703 704 705
/* Set static bit gravity on the parent, and static
 * window gravity on all children.
 */
gboolean gdk_window_set_static_gravities (GdkWindow *window,
					  gboolean   use_static);   

706
/* Functions to create/lookup windows from their native equivalents */ 
707
#ifndef GDK_MULTIHEAD_SAFE
708 709
GdkWindow*    gdk_window_foreign_new (GdkNativeWindow anid);
GdkWindow*    gdk_window_lookup      (GdkNativeWindow anid);
710 711 712 713 714
#endif
GdkWindow    *gdk_window_foreign_new_for_display (GdkDisplay      *display,
						  GdkNativeWindow  anid);
GdkWindow*    gdk_window_lookup_for_display (GdkDisplay      *display,
					     GdkNativeWindow  anid);
715 716


Owen Taylor's avatar
Owen Taylor committed
717 718
/* GdkWindow */

719 720 721 722
void              gdk_window_set_type_hint (GdkWindow        *window,
                                            GdkWindowTypeHint hint);
GdkWindowTypeHint gdk_window_get_type_hint (GdkWindow        *window);

Matthias Clasen's avatar
Matthias Clasen committed
723
gboolean      gdk_window_get_modal_hint   (GdkWindow       *window);
724 725 726 727 728 729 730
void          gdk_window_set_modal_hint   (GdkWindow       *window,
                                           gboolean         modal);

void gdk_window_set_skip_taskbar_hint (GdkWindow *window,
                                       gboolean   skips_taskbar);
void gdk_window_set_skip_pager_hint   (GdkWindow *window,
                                       gboolean   skips_pager);
731 732
void gdk_window_set_urgency_hint      (GdkWindow *window,
				       gboolean   urgent);
733

734 735 736 737
void          gdk_window_set_geometry_hints (GdkWindow          *window,
					     const GdkGeometry  *geometry,
					     GdkWindowHints      geom_mask);
void          gdk_set_sm_client_id          (const gchar        *sm_client_id);
Owen Taylor's avatar
Owen Taylor committed
738

739 740 741 742 743
void	      gdk_window_begin_paint_rect   (GdkWindow          *window,
					     const GdkRectangle *rectangle);
void	      gdk_window_begin_paint_region (GdkWindow          *window,
					     const GdkRegion    *region);
void	      gdk_window_end_paint          (GdkWindow          *window);
744
void	      gdk_window_flush             (GdkWindow          *window);
Owen Taylor's avatar
Owen Taylor committed
745 746 747

void	      gdk_window_set_title	   (GdkWindow	  *window,
					    const gchar	  *title);
Matthias Clasen's avatar
Matthias Clasen committed
748 749 750 751 752 753 754 755
void          gdk_window_set_role          (GdkWindow     *window,
					    const gchar   *role);
void          gdk_window_set_startup_id    (GdkWindow     *window,
					    const gchar   *startup_id);
void          gdk_window_set_transient_for (GdkWindow     *window,
					    GdkWindow     *parent);
void          gdk_window_get_background  (GdkWindow       *window,
                                          GdkColor        *color);
Owen Taylor's avatar
Owen Taylor committed
756
void	      gdk_window_set_background	 (GdkWindow	  *window,
757
					  const GdkColor  *color);
Matthias Clasen's avatar
Matthias Clasen committed
758 759 760
void	      gdk_window_get_back_pixmap (GdkWindow       *window,
					  GdkPixmap	 **pixmap,
					  gboolean	  *parent_relative);
Owen Taylor's avatar
Owen Taylor committed
761 762
void	      gdk_window_set_back_pixmap (GdkWindow	  *window,
					  GdkPixmap	  *pixmap,
Owen Taylor's avatar
Owen Taylor committed
763
					  gboolean	   parent_relative);
Owen Taylor's avatar
Owen Taylor committed
764 765
void	      gdk_window_set_cursor	 (GdkWindow	  *window,
					  GdkCursor	  *cursor);
Cody Russell's avatar
Cody Russell committed
766
GdkCursor    *gdk_window_get_cursor      (GdkWindow       *window);
767 768 769 770 771
void	      gdk_window_set_device_cursor (GdkWindow	  *window,
                                            GdkDevice     *device,
                                            GdkCursor	  *cursor);
GdkCursor    *gdk_window_get_device_cursor (GdkWindow     *window,
                                            GdkDevice     *device);
Owen Taylor's avatar
Owen Taylor committed
772 773 774 775 776 777 778 779 780 781 782 783 784 785
void	      gdk_window_get_user_data	 (GdkWindow	  *window,
					  gpointer	  *data);
void	      gdk_window_get_geometry	 (GdkWindow	  *window,
					  gint		  *x,
					  gint		  *y,
					  gint		  *width,
					  gint		  *height,
					  gint		  *depth);
void	      gdk_window_get_position	 (GdkWindow	  *window,
					  gint		  *x,
					  gint		  *y);
gint	      gdk_window_get_origin	 (GdkWindow	  *window,
					  gint		  *x,
					  gint		  *y);
786
void	      gdk_window_get_root_coords (GdkWindow	  *window,
787 788 789 790
					  gint             x,
					  gint             y,
					  gint		  *root_x,
					  gint		  *root_y);
791 792 793 794 795 796 797 798 799 800
void       gdk_window_coords_to_parent   (GdkWindow       *window,
                                          gdouble          x,
                                          gdouble          y,
                                          gdouble         *parent_x,
                                          gdouble         *parent_y);
void       gdk_window_coords_from_parent (GdkWindow       *window,
                                          gdouble          parent_x,
                                          gdouble          parent_y,
                                          gdouble         *x,
                                          gdouble         *y);
Matthias Clasen's avatar
Matthias Clasen committed
801

802
#if !defined (GDK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION) || defined (GDK_COMPILATION)
Manish Singh's avatar
Manish Singh committed
803
/* Used by gtk_handle_box_button_changed () */
Owen Taylor's avatar
Owen Taylor committed
804 805 806
gboolean      gdk_window_get_deskrelative_origin (GdkWindow	  *window,
					  gint		  *x,
					  gint		  *y);
Matthias Clasen's avatar
Matthias Clasen committed
807 808
#endif

Owen Taylor's avatar
Owen Taylor committed
809 810 811
void	      gdk_window_get_root_origin (GdkWindow	  *window,
					  gint		  *x,
					  gint		  *y);
812 813
void          gdk_window_get_frame_extents (GdkWindow     *window,
                                            GdkRectangle  *rect);
814 815

#ifndef GDK_MULTIDEVICE_SAFE
Owen Taylor's avatar
Owen Taylor committed
816 817 818 819
GdkWindow*    gdk_window_get_pointer	 (GdkWindow	  *window,
					  gint		  *x,
					  gint		  *y,
					  GdkModifierType *mask);
820 821 822 823 824 825
#endif /* GDK_MULTIDEVICE_SAFE */
GdkWindow *   gdk_window_get_device_position (GdkWindow       *window,
                                              GdkDevice       *device,
                                              gint            *x,
                                              gint            *y,
                                              GdkModifierType *mask);
826 827 828
GdkWindow *   gdk_window_get_parent      (GdkWindow       *window);
GdkWindow *   gdk_window_get_toplevel    (GdkWindow       *window);

829 830 831
GdkWindow *   gdk_window_get_effective_parent   (GdkWindow *window);
GdkWindow *   gdk_window_get_effective_toplevel (GdkWindow *window);

832
GList *	      gdk_window_get_children	 (GdkWindow	  *window);
833
GList *       gdk_window_peek_children   (GdkWindow       *window);
Owen Taylor's avatar
Owen Taylor committed
834 835 836
GdkEventMask  gdk_window_get_events	 (GdkWindow	  *window);
void	      gdk_window_set_events	 (GdkWindow	  *window,
					  GdkEventMask	   event_mask);
837 838 839 840 841
void          gdk_window_set_device_events (GdkWindow    *window,
                                            GdkDevice    *device,
                                            GdkEventMask  event_mask);
GdkEventMask  gdk_window_get_device_events (GdkWindow    *window,
                                            GdkDevice    *device);
Owen Taylor's avatar
Owen Taylor committed
842

Havoc Pennington's avatar
Havoc Pennington committed
843
void          gdk_window_set_icon_list   (GdkWindow       *window,
844
					  GList           *pixbufs);
Owen Taylor's avatar
Owen Taylor committed
845 846 847 848 849
void	      gdk_window_set_icon	 (GdkWindow	  *window, 
					  GdkWindow	  *icon_window,
					  GdkPixmap	  *pixmap,
					  GdkBitmap	  *mask);
void	      gdk_window_set_icon_name	 (GdkWindow	  *window, 
Owen Taylor's avatar
Owen Taylor committed
850
					  const gchar	  *name);
Owen Taylor's avatar
Owen Taylor committed
851 852
void	      gdk_window_set_group	 (GdkWindow	  *window, 
					  GdkWindow	  *leader);
853
GdkWindow*    gdk_window_get_group	 (GdkWindow	  *window);
Owen Taylor's avatar
Owen Taylor committed
854 855
void	      gdk_window_set_decorations (GdkWindow	  *window,
					  GdkWMDecoration  decorations);
856 857
gboolean      gdk_window_get_decorations (GdkWindow       *window,
					  GdkWMDecoration *decorations);
Owen Taylor's avatar
Owen Taylor committed
858 859
void	      gdk_window_set_functions	 (GdkWindow	  *window,
					  GdkWMFunction	   functions);
860

861
void          gdk_window_beep            (GdkWindow       *window);
Owen Taylor's avatar
Owen Taylor committed
862
void          gdk_window_iconify         (GdkWindow       *window);
863 864 865 866 867
void          gdk_window_deiconify       (GdkWindow       *window);
void          gdk_window_stick           (GdkWindow       *window);
void          gdk_window_unstick         (GdkWindow       *window);
void          gdk_window_maximize        (GdkWindow       *window);
void          gdk_window_unmaximize      (GdkWindow       *window);
868 869
void          gdk_window_fullscreen      (GdkWindow       *window);
void          gdk_window_unfullscreen    (GdkWindow       *window);
870 871 872 873
void          gdk_window_set_keep_above  (GdkWindow       *window,
                                          gboolean         setting);
void          gdk_window_set_keep_below  (GdkWindow       *window,
                                          gboolean         setting);
874 875
void          gdk_window_set_opacity     (GdkWindow       *window,
                                          gdouble          opacity);
Owen Taylor's avatar
Owen Taylor committed
876 877
void          gdk_window_register_dnd    (GdkWindow       *window);

Owen Taylor's avatar
Owen Taylor committed
878 879 880 881 882 883 884 885 886 887 888 889
void gdk_window_begin_resize_drag (GdkWindow     *window,
                                   GdkWindowEdge  edge,
                                   gint           button,
                                   gint           root_x,
                                   gint           root_y,
                                   guint32        timestamp);
void gdk_window_begin_move_drag   (GdkWindow     *window,
                                   gint           button,
                                   gint           root_x,
                                   gint           root_y,
                                   guint32        timestamp);

890
/* Interface for dirty-region queueing */
891 892 893 894 895 896 897 898
void       gdk_window_invalidate_rect           (GdkWindow          *window,
					         const GdkRectangle *rect,
					         gboolean            invalidate_children);
void       gdk_window_invalidate_region         (GdkWindow          *window,
					         const GdkRegion    *region,
					         gboolean            invalidate_children);
void       gdk_window_invalidate_maybe_recurse  (GdkWindow          *window,
						 const GdkRegion    *region,
899 900
						 gboolean (*child_func) (GdkWindow *, gpointer),
						 gpointer   user_data);
901 902 903 904 905
GdkRegion *gdk_window_get_update_area     (GdkWindow    *window);

void       gdk_window_freeze_updates      (GdkWindow    *window);
void       gdk_window_thaw_updates        (GdkWindow    *window);

Kristian Rietveld's avatar
Kristian Rietveld committed
906 907 908
void       gdk_window_freeze_toplevel_updates_libgtk_only (GdkWindow *window);
void       gdk_window_thaw_toplevel_updates_libgtk_only   (GdkWindow *window);

909 910 911 912
void       gdk_window_process_all_updates (void);
void       gdk_window_process_updates     (GdkWindow    *window,
					   gboolean      update_children);

913 914
/* Enable/disable flicker, so you can tell if your code is inefficient. */
void       gdk_window_set_debug_updates   (gboolean      setting);
915

Owen Taylor's avatar
Owen Taylor committed
916 917 918 919 920 921 922
void       gdk_window_constrain_size      (GdkGeometry  *geometry,
                                           guint         flags,
                                           gint          width,
                                           gint          height,
                                           gint         *new_width,
                                           gint         *new_height);

923 924 925 926 927
void gdk_window_get_internal_paint_info (GdkWindow    *window,
					 GdkDrawable **real_drawable,
					 gint         *x_offset,
					 gint         *y_offset);

928 929 930
void gdk_window_enable_synchronized_configure (GdkWindow *window);
void gdk_window_configure_finished            (GdkWindow *window);

931 932 933
#if !defined (GDK_MULTIHEAD_SAFE) && !defined (GDK_MULTIDEVICE_SAFE)
GdkPointerHooks *gdk_set_pointer_hooks (const GdkPointerHooks *new_hooks);
#endif /* !GDK_MULTIHEAD_SAFE && !GDK_MULTIDEVICE_SAFE */
934

935
GdkWindow *gdk_get_default_root_window (void);
936

937
/* Offscreen redirection */
Alexander Larsson's avatar
Alexander Larsson committed
938 939 940 941 942
GdkPixmap *gdk_offscreen_window_get_pixmap     (GdkWindow     *window);
void       gdk_offscreen_window_set_embedder   (GdkWindow     *window,
						GdkWindow     *embedder);
GdkWindow *gdk_offscreen_window_get_embedder   (GdkWindow     *window);
void       gdk_window_geometry_changed         (GdkWindow     *window);
943 944 945 946 947 948 949 950 951 952 953

void       gdk_window_redirect_to_drawable   (GdkWindow     *window,
                                              GdkDrawable   *drawable,
                                              gint           src_x,
                                              gint           src_y,
                                              gint           dest_x,
                                              gint           dest_y,
                                              gint           width,
                                              gint           height);
void       gdk_window_remove_redirection     (GdkWindow     *window);

954 955 956 957
/* Multidevice support */
void       gdk_window_set_support_multidevice (GdkWindow *window,
                                               gboolean   support_multidevice);
gboolean   gdk_window_get_support_multidevice (GdkWindow *window);
958

959
G_END_DECLS
Owen Taylor's avatar
Owen Taylor committed
960 961

#endif /* __GDK_WINDOW_H__ */