| 1 | /* GDK - The GIMP Drawing Kit |
| 2 | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald |
| 3 | * |
| 4 | * This library is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU Lesser General Public |
| 6 | * License as published by the Free Software Foundation; either |
| 7 | * version 2 of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This library is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | * Lesser General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Lesser General Public |
| 15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ |
| 17 | |
| 18 | /* |
| 19 | * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS |
| 20 | * file for a list of people on the GTK+ Team. See the ChangeLog |
| 21 | * files for a list of changes. These files are distributed with |
| 22 | * GTK+ at ftp://ftp.gtk.org/pub/gtk/. |
| 23 | */ |
| 24 | |
| 25 | #ifndef __GDK_WINDOW_H__ |
| 26 | #define __GDK_WINDOW_H__ |
| 27 | |
| 28 | #if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION) |
| 29 | #error "Only <gdk/gdk.h> can be included directly." |
| 30 | #endif |
| 31 | |
| 32 | #include <gdk/gdkversionmacros.h> |
| 33 | #include <gdk/gdktypes.h> |
| 34 | #include <gdk/gdkdrawingcontext.h> |
| 35 | #include <gdk/gdkevents.h> |
| 36 | #include <gdk/gdkframeclock.h> |
| 37 | |
| 38 | G_BEGIN_DECLS |
| 39 | |
| 40 | typedef struct _GdkGeometry GdkGeometry; |
| 41 | typedef struct _GdkWindowAttr GdkWindowAttr; |
| 42 | typedef struct _GdkWindowRedirect GdkWindowRedirect; |
| 43 | |
| 44 | /** |
| 45 | * GdkWindowWindowClass: |
| 46 | * @GDK_INPUT_OUTPUT: window for graphics and events |
| 47 | * @GDK_INPUT_ONLY: window for events only |
| 48 | * |
| 49 | * @GDK_INPUT_OUTPUT windows are the standard kind of window you might expect. |
| 50 | * Such windows receive events and are also displayed on screen. |
| 51 | * @GDK_INPUT_ONLY windows are invisible; they are usually placed above other |
| 52 | * windows in order to trap or filter the events. You can’t draw on |
| 53 | * @GDK_INPUT_ONLY windows. |
| 54 | */ |
| 55 | typedef enum |
| 56 | { |
| 57 | GDK_INPUT_OUTPUT, /*< nick=input-output >*/ |
| 58 | GDK_INPUT_ONLY /*< nick=input-only >*/ |
| 59 | } GdkWindowWindowClass; |
| 60 | |
| 61 | /** |
| 62 | * GdkWindowType: |
| 63 | * @GDK_WINDOW_ROOT: root window; this window has no parent, covers the entire |
| 64 | * screen, and is created by the window system |
| 65 | * @GDK_WINDOW_TOPLEVEL: toplevel window (used to implement #GtkWindow) |
| 66 | * @GDK_WINDOW_CHILD: child window (used to implement e.g. #GtkEntry) |
| 67 | * @GDK_WINDOW_TEMP: override redirect temporary window (used to implement |
| 68 | * #GtkMenu) |
| 69 | * @GDK_WINDOW_FOREIGN: foreign window (see gdk_window_foreign_new()) |
| 70 | * @GDK_WINDOW_OFFSCREEN: offscreen window (see |
| 71 | * [Offscreen Windows][OFFSCREEN-WINDOWS]). Since 2.18 |
| 72 | * @GDK_WINDOW_SUBSURFACE: subsurface-based window; This window is visually |
| 73 | * tied to a toplevel, and is moved/stacked with it. Currently this window |
| 74 | * type is only implemented in Wayland. Since 3.14 |
| 75 | * |
| 76 | * Describes the kind of window. |
| 77 | */ |
| 78 | typedef enum |
| 79 | { |
| 80 | GDK_WINDOW_ROOT, |
| 81 | GDK_WINDOW_TOPLEVEL, |
| 82 | GDK_WINDOW_CHILD, |
| 83 | GDK_WINDOW_TEMP, |
| 84 | GDK_WINDOW_FOREIGN, |
| 85 | GDK_WINDOW_OFFSCREEN, |
| 86 | GDK_WINDOW_SUBSURFACE |
| 87 | } GdkWindowType; |
| 88 | |
| 89 | /** |
| 90 | * GdkWindowAttributesType: |
| 91 | * @GDK_WA_TITLE: Honor the title field |
| 92 | * @GDK_WA_X: Honor the X coordinate field |
| 93 | * @GDK_WA_Y: Honor the Y coordinate field |
| 94 | * @GDK_WA_CURSOR: Honor the cursor field |
| 95 | * @GDK_WA_VISUAL: Honor the visual field |
| 96 | * @GDK_WA_WMCLASS: Honor the wmclass_class and wmclass_name fields |
| 97 | * @GDK_WA_NOREDIR: Honor the override_redirect field |
| 98 | * @GDK_WA_TYPE_HINT: Honor the type_hint field |
| 99 | * |
| 100 | * Used to indicate which fields in the #GdkWindowAttr struct should be honored. |
| 101 | * For example, if you filled in the “cursor” and “x” fields of #GdkWindowAttr, |
| 102 | * pass @GDK_WA_X | @GDK_WA_CURSOR” to gdk_window_new(). Fields in |
| 103 | * #GdkWindowAttr not covered by a bit in this enum are required; for example, |
| 104 | * the @width/@height, @wclass, and @window_type fields are required, they have |
| 105 | * no corresponding flag in #GdkWindowAttributesType. |
| 106 | */ |
| 107 | typedef enum |
| 108 | { |
| 109 | GDK_WA_TITLE = 1 << 1, |
| 110 | GDK_WA_X = 1 << 2, |
| 111 | GDK_WA_Y = 1 << 3, |
| 112 | GDK_WA_CURSOR = 1 << 4, |
| 113 | GDK_WA_VISUAL = 1 << 5, |
| 114 | GDK_WA_WMCLASS = 1 << 6, |
| 115 | GDK_WA_NOREDIR = 1 << 7, |
| 116 | GDK_WA_TYPE_HINT = 1 << 8 |
| 117 | } GdkWindowAttributesType; |
| 118 | |
| 119 | /* Size restriction enumeration. |
| 120 | */ |
| 121 | /** |
| 122 | * GdkWindowHints: |
| 123 | * @GDK_HINT_POS: indicates that the program has positioned the window |
| 124 | * @GDK_HINT_MIN_SIZE: min size fields are set |
| 125 | * @GDK_HINT_MAX_SIZE: max size fields are set |
| 126 | * @GDK_HINT_BASE_SIZE: base size fields are set |
| 127 | * @GDK_HINT_ASPECT: aspect ratio fields are set |
| 128 | * @GDK_HINT_RESIZE_INC: resize increment fields are set |
| 129 | * @GDK_HINT_WIN_GRAVITY: window gravity field is set |
| 130 | * @GDK_HINT_USER_POS: indicates that the window’s position was explicitly set |
| 131 | * by the user |
| 132 | * @GDK_HINT_USER_SIZE: indicates that the window’s size was explicitly set by |
| 133 | * the user |
| 134 | * |
| 135 | * Used to indicate which fields of a #GdkGeometry struct should be paid |
| 136 | * attention to. Also, the presence/absence of @GDK_HINT_POS, |
| 137 | * @GDK_HINT_USER_POS, and @GDK_HINT_USER_SIZE is significant, though they don't |
| 138 | * directly refer to #GdkGeometry fields. @GDK_HINT_USER_POS will be set |
| 139 | * automatically by #GtkWindow if you call gtk_window_move(). |
| 140 | * @GDK_HINT_USER_POS and @GDK_HINT_USER_SIZE should be set if the user |
| 141 | * specified a size/position using a --geometry command-line argument; |
| 142 | * gtk_window_parse_geometry() automatically sets these flags. |
| 143 | */ |
| 144 | typedef enum |
| 145 | { |
| 146 | GDK_HINT_POS = 1 << 0, |
| 147 | GDK_HINT_MIN_SIZE = 1 << 1, |
| 148 | GDK_HINT_MAX_SIZE = 1 << 2, |
| 149 | GDK_HINT_BASE_SIZE = 1 << 3, |
| 150 | GDK_HINT_ASPECT = 1 << 4, |
| 151 | GDK_HINT_RESIZE_INC = 1 << 5, |
| 152 | GDK_HINT_WIN_GRAVITY = 1 << 6, |
| 153 | GDK_HINT_USER_POS = 1 << 7, |
| 154 | GDK_HINT_USER_SIZE = 1 << 8 |
| 155 | } GdkWindowHints; |
| 156 | |
| 157 | /* The next two enumeration values current match the |
| 158 | * Motif constants. If this is changed, the implementation |
| 159 | * of gdk_window_set_decorations/gdk_window_set_functions |
| 160 | * will need to change as well. |
| 161 | */ |
| 162 | /** |
| 163 | * GdkWMDecoration: |
| 164 | * @GDK_DECOR_ALL: all decorations should be applied. |
| 165 | * @GDK_DECOR_BORDER: a frame should be drawn around the window. |
| 166 | * @GDK_DECOR_RESIZEH: the frame should have resize handles. |
| 167 | * @GDK_DECOR_TITLE: a titlebar should be placed above the window. |
| 168 | * @GDK_DECOR_MENU: a button for opening a menu should be included. |
| 169 | * @GDK_DECOR_MINIMIZE: a minimize button should be included. |
| 170 | * @GDK_DECOR_MAXIMIZE: a maximize button should be included. |
| 171 | * |
| 172 | * These are hints originally defined by the Motif toolkit. |
| 173 | * The window manager can use them when determining how to decorate |
| 174 | * the window. The hint must be set before mapping the window. |
| 175 | */ |
| 176 | typedef enum |
| 177 | { |
| 178 | GDK_DECOR_ALL = 1 << 0, |
| 179 | GDK_DECOR_BORDER = 1 << 1, |
| 180 | GDK_DECOR_RESIZEH = 1 << 2, |
| 181 | GDK_DECOR_TITLE = 1 << 3, |
| 182 | = 1 << 4, |
| 183 | GDK_DECOR_MINIMIZE = 1 << 5, |
| 184 | GDK_DECOR_MAXIMIZE = 1 << 6 |
| 185 | } GdkWMDecoration; |
| 186 | |
| 187 | /** |
| 188 | * GdkWMFunction: |
| 189 | * @GDK_FUNC_ALL: all functions should be offered. |
| 190 | * @GDK_FUNC_RESIZE: the window should be resizable. |
| 191 | * @GDK_FUNC_MOVE: the window should be movable. |
| 192 | * @GDK_FUNC_MINIMIZE: the window should be minimizable. |
| 193 | * @GDK_FUNC_MAXIMIZE: the window should be maximizable. |
| 194 | * @GDK_FUNC_CLOSE: the window should be closable. |
| 195 | * |
| 196 | * These are hints originally defined by the Motif toolkit. The window manager |
| 197 | * can use them when determining the functions to offer for the window. The |
| 198 | * hint must be set before mapping the window. |
| 199 | */ |
| 200 | typedef enum |
| 201 | { |
| 202 | GDK_FUNC_ALL = 1 << 0, |
| 203 | GDK_FUNC_RESIZE = 1 << 1, |
| 204 | GDK_FUNC_MOVE = 1 << 2, |
| 205 | GDK_FUNC_MINIMIZE = 1 << 3, |
| 206 | GDK_FUNC_MAXIMIZE = 1 << 4, |
| 207 | GDK_FUNC_CLOSE = 1 << 5 |
| 208 | } GdkWMFunction; |
| 209 | |
| 210 | /* Currently, these are the same values numerically as in the |
| 211 | * X protocol. If you change that, gdkwindow-x11.c/gdk_window_set_geometry_hints() |
| 212 | * will need fixing. |
| 213 | */ |
| 214 | /** |
| 215 | * GdkGravity: |
| 216 | * @GDK_GRAVITY_NORTH_WEST: the reference point is at the top left corner. |
| 217 | * @GDK_GRAVITY_NORTH: the reference point is in the middle of the top edge. |
| 218 | * @GDK_GRAVITY_NORTH_EAST: the reference point is at the top right corner. |
| 219 | * @GDK_GRAVITY_WEST: the reference point is at the middle of the left edge. |
| 220 | * @GDK_GRAVITY_CENTER: the reference point is at the center of the window. |
| 221 | * @GDK_GRAVITY_EAST: the reference point is at the middle of the right edge. |
| 222 | * @GDK_GRAVITY_SOUTH_WEST: the reference point is at the lower left corner. |
| 223 | * @GDK_GRAVITY_SOUTH: the reference point is at the middle of the lower edge. |
| 224 | * @GDK_GRAVITY_SOUTH_EAST: the reference point is at the lower right corner. |
| 225 | * @GDK_GRAVITY_STATIC: the reference point is at the top left corner of the |
| 226 | * window itself, ignoring window manager decorations. |
| 227 | * |
| 228 | * Defines the reference point of a window and the meaning of coordinates |
| 229 | * passed to gtk_window_move(). See gtk_window_move() and the "implementation |
| 230 | * notes" section of the |
| 231 | * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec) |
| 232 | * specification for more details. |
| 233 | */ |
| 234 | typedef enum |
| 235 | { |
| 236 | GDK_GRAVITY_NORTH_WEST = 1, |
| 237 | GDK_GRAVITY_NORTH, |
| 238 | GDK_GRAVITY_NORTH_EAST, |
| 239 | GDK_GRAVITY_WEST, |
| 240 | GDK_GRAVITY_CENTER, |
| 241 | GDK_GRAVITY_EAST, |
| 242 | GDK_GRAVITY_SOUTH_WEST, |
| 243 | GDK_GRAVITY_SOUTH, |
| 244 | GDK_GRAVITY_SOUTH_EAST, |
| 245 | GDK_GRAVITY_STATIC |
| 246 | } GdkGravity; |
| 247 | |
| 248 | /** |
| 249 | * GdkAnchorHints: |
| 250 | * @GDK_ANCHOR_FLIP_X: allow flipping anchors horizontally |
| 251 | * @GDK_ANCHOR_FLIP_Y: allow flipping anchors vertically |
| 252 | * @GDK_ANCHOR_SLIDE_X: allow sliding window horizontally |
| 253 | * @GDK_ANCHOR_SLIDE_Y: allow sliding window vertically |
| 254 | * @GDK_ANCHOR_RESIZE_X: allow resizing window horizontally |
| 255 | * @GDK_ANCHOR_RESIZE_Y: allow resizing window vertically |
| 256 | * @GDK_ANCHOR_FLIP: allow flipping anchors on both axes |
| 257 | * @GDK_ANCHOR_SLIDE: allow sliding window on both axes |
| 258 | * @GDK_ANCHOR_RESIZE: allow resizing window on both axes |
| 259 | * |
| 260 | * Positioning hints for aligning a window relative to a rectangle. |
| 261 | * |
| 262 | * These hints determine how the window should be positioned in the case that |
| 263 | * the window would fall off-screen if placed in its ideal position. |
| 264 | * |
| 265 | * For example, %GDK_ANCHOR_FLIP_X will replace %GDK_GRAVITY_NORTH_WEST with |
| 266 | * %GDK_GRAVITY_NORTH_EAST and vice versa if the window extends beyond the left |
| 267 | * or right edges of the monitor. |
| 268 | * |
| 269 | * If %GDK_ANCHOR_SLIDE_X is set, the window can be shifted horizontally to fit |
| 270 | * on-screen. If %GDK_ANCHOR_RESIZE_X is set, the window can be shrunken |
| 271 | * horizontally to fit. |
| 272 | * |
| 273 | * In general, when multiple flags are set, flipping should take precedence over |
| 274 | * sliding, which should take precedence over resizing. |
| 275 | * |
| 276 | * Since: 3.22 |
| 277 | * Stability: Unstable |
| 278 | */ |
| 279 | typedef enum |
| 280 | { |
| 281 | GDK_ANCHOR_FLIP_X = 1 << 0, |
| 282 | GDK_ANCHOR_FLIP_Y = 1 << 1, |
| 283 | GDK_ANCHOR_SLIDE_X = 1 << 2, |
| 284 | GDK_ANCHOR_SLIDE_Y = 1 << 3, |
| 285 | GDK_ANCHOR_RESIZE_X = 1 << 4, |
| 286 | GDK_ANCHOR_RESIZE_Y = 1 << 5, |
| 287 | GDK_ANCHOR_FLIP = GDK_ANCHOR_FLIP_X | GDK_ANCHOR_FLIP_Y, |
| 288 | GDK_ANCHOR_SLIDE = GDK_ANCHOR_SLIDE_X | GDK_ANCHOR_SLIDE_Y, |
| 289 | GDK_ANCHOR_RESIZE = GDK_ANCHOR_RESIZE_X | GDK_ANCHOR_RESIZE_Y |
| 290 | } GdkAnchorHints; |
| 291 | |
| 292 | /** |
| 293 | * GdkWindowEdge: |
| 294 | * @GDK_WINDOW_EDGE_NORTH_WEST: the top left corner. |
| 295 | * @GDK_WINDOW_EDGE_NORTH: the top edge. |
| 296 | * @GDK_WINDOW_EDGE_NORTH_EAST: the top right corner. |
| 297 | * @GDK_WINDOW_EDGE_WEST: the left edge. |
| 298 | * @GDK_WINDOW_EDGE_EAST: the right edge. |
| 299 | * @GDK_WINDOW_EDGE_SOUTH_WEST: the lower left corner. |
| 300 | * @GDK_WINDOW_EDGE_SOUTH: the lower edge. |
| 301 | * @GDK_WINDOW_EDGE_SOUTH_EAST: the lower right corner. |
| 302 | * |
| 303 | * Determines a window edge or corner. |
| 304 | */ |
| 305 | typedef enum |
| 306 | { |
| 307 | GDK_WINDOW_EDGE_NORTH_WEST, |
| 308 | GDK_WINDOW_EDGE_NORTH, |
| 309 | GDK_WINDOW_EDGE_NORTH_EAST, |
| 310 | GDK_WINDOW_EDGE_WEST, |
| 311 | GDK_WINDOW_EDGE_EAST, |
| 312 | GDK_WINDOW_EDGE_SOUTH_WEST, |
| 313 | GDK_WINDOW_EDGE_SOUTH, |
| 314 | GDK_WINDOW_EDGE_SOUTH_EAST |
| 315 | } GdkWindowEdge; |
| 316 | |
| 317 | /** |
| 318 | * GdkFullscreenMode: |
| 319 | * @GDK_FULLSCREEN_ON_CURRENT_MONITOR: Fullscreen on current monitor only. |
| 320 | * @GDK_FULLSCREEN_ON_ALL_MONITORS: Span across all monitors when fullscreen. |
| 321 | * |
| 322 | * Indicates which monitor (in a multi-head setup) a window should span over |
| 323 | * when in fullscreen mode. |
| 324 | * |
| 325 | * Since: 3.8 |
| 326 | **/ |
| 327 | typedef enum |
| 328 | { |
| 329 | GDK_FULLSCREEN_ON_CURRENT_MONITOR, |
| 330 | GDK_FULLSCREEN_ON_ALL_MONITORS |
| 331 | } GdkFullscreenMode; |
| 332 | |
| 333 | /** |
| 334 | * GdkWindowAttr: |
| 335 | * @title: title of the window (for toplevel windows) |
| 336 | * @event_mask: event mask (see gdk_window_set_events()) |
| 337 | * @x: X coordinate relative to parent window (see gdk_window_move()) |
| 338 | * @y: Y coordinate relative to parent window (see gdk_window_move()) |
| 339 | * @width: width of window |
| 340 | * @height: height of window |
| 341 | * @wclass: #GDK_INPUT_OUTPUT (normal window) or #GDK_INPUT_ONLY (invisible |
| 342 | * window that receives events) |
| 343 | * @visual: #GdkVisual for window |
| 344 | * @window_type: type of window |
| 345 | * @cursor: cursor for the window (see gdk_window_set_cursor()) |
| 346 | * @wmclass_name: don’t use (see gtk_window_set_wmclass()) |
| 347 | * @wmclass_class: don’t use (see gtk_window_set_wmclass()) |
| 348 | * @override_redirect: %TRUE to bypass the window manager |
| 349 | * @type_hint: a hint of the function of the window |
| 350 | * |
| 351 | * Attributes to use for a newly-created window. |
| 352 | */ |
| 353 | struct _GdkWindowAttr |
| 354 | { |
| 355 | gchar *title; |
| 356 | gint event_mask; |
| 357 | gint x, y; |
| 358 | gint width; |
| 359 | gint height; |
| 360 | GdkWindowWindowClass wclass; |
| 361 | GdkVisual *visual; |
| 362 | GdkWindowType window_type; |
| 363 | GdkCursor *cursor; |
| 364 | gchar *wmclass_name; |
| 365 | gchar *wmclass_class; |
| 366 | gboolean override_redirect; |
| 367 | GdkWindowTypeHint type_hint; |
| 368 | }; |
| 369 | |
| 370 | /** |
| 371 | * GdkGeometry: |
| 372 | * @min_width: minimum width of window (or -1 to use requisition, with |
| 373 | * #GtkWindow only) |
| 374 | * @min_height: minimum height of window (or -1 to use requisition, with |
| 375 | * #GtkWindow only) |
| 376 | * @max_width: maximum width of window (or -1 to use requisition, with |
| 377 | * #GtkWindow only) |
| 378 | * @max_height: maximum height of window (or -1 to use requisition, with |
| 379 | * #GtkWindow only) |
| 380 | * @base_width: allowed window widths are @base_width + @width_inc * N where N |
| 381 | * is any integer (-1 allowed with #GtkWindow) |
| 382 | * @base_height: allowed window widths are @base_height + @height_inc * N where |
| 383 | * N is any integer (-1 allowed with #GtkWindow) |
| 384 | * @width_inc: width resize increment |
| 385 | * @height_inc: height resize increment |
| 386 | * @min_aspect: minimum width/height ratio |
| 387 | * @max_aspect: maximum width/height ratio |
| 388 | * @win_gravity: window gravity, see gtk_window_set_gravity() |
| 389 | * |
| 390 | * The #GdkGeometry struct gives the window manager information about |
| 391 | * a window’s geometry constraints. Normally you would set these on |
| 392 | * the GTK+ level using gtk_window_set_geometry_hints(). #GtkWindow |
| 393 | * then sets the hints on the #GdkWindow it creates. |
| 394 | * |
| 395 | * gdk_window_set_geometry_hints() expects the hints to be fully valid already |
| 396 | * and simply passes them to the window manager; in contrast, |
| 397 | * gtk_window_set_geometry_hints() performs some interpretation. For example, |
| 398 | * #GtkWindow will apply the hints to the geometry widget instead of the |
| 399 | * toplevel window, if you set a geometry widget. Also, the |
| 400 | * @min_width/@min_height/@max_width/@max_height fields may be set to -1, and |
| 401 | * #GtkWindow will substitute the size request of the window or geometry widget. |
| 402 | * If the minimum size hint is not provided, #GtkWindow will use its requisition |
| 403 | * as the minimum size. If the minimum size is provided and a geometry widget is |
| 404 | * set, #GtkWindow will take the minimum size as the minimum size of the |
| 405 | * geometry widget rather than the entire window. The base size is treated |
| 406 | * similarly. |
| 407 | * |
| 408 | * The canonical use-case for gtk_window_set_geometry_hints() is to get a |
| 409 | * terminal widget to resize properly. Here, the terminal text area should be |
| 410 | * the geometry widget; #GtkWindow will then automatically set the base size to |
| 411 | * the size of other widgets in the terminal window, such as the menubar and |
| 412 | * scrollbar. Then, the @width_inc and @height_inc fields should be set to the |
| 413 | * size of one character in the terminal. Finally, the base size should be set |
| 414 | * to the size of one character. The net effect is that the minimum size of the |
| 415 | * terminal will have a 1x1 character terminal area, and only terminal sizes on |
| 416 | * the “character grid” will be allowed. |
| 417 | * |
| 418 | * Here’s an example of how the terminal example would be implemented, assuming |
| 419 | * a terminal area widget called “terminal” and a toplevel window “toplevel”: |
| 420 | * |
| 421 | * |[<!-- language="C" --> |
| 422 | * GdkGeometry hints; |
| 423 | * |
| 424 | * hints.base_width = terminal->char_width; |
| 425 | * hints.base_height = terminal->char_height; |
| 426 | * hints.min_width = terminal->char_width; |
| 427 | * hints.min_height = terminal->char_height; |
| 428 | * hints.width_inc = terminal->char_width; |
| 429 | * hints.height_inc = terminal->char_height; |
| 430 | * |
| 431 | * gtk_window_set_geometry_hints (GTK_WINDOW (toplevel), |
| 432 | * GTK_WIDGET (terminal), |
| 433 | * &hints, |
| 434 | * GDK_HINT_RESIZE_INC | |
| 435 | * GDK_HINT_MIN_SIZE | |
| 436 | * GDK_HINT_BASE_SIZE); |
| 437 | * ]| |
| 438 | * |
| 439 | * The other useful fields are the @min_aspect and @max_aspect fields; these |
| 440 | * contain a width/height ratio as a floating point number. If a geometry widget |
| 441 | * is set, the aspect applies to the geometry widget rather than the entire |
| 442 | * window. The most common use of these hints is probably to set @min_aspect and |
| 443 | * @max_aspect to the same value, thus forcing the window to keep a constant |
| 444 | * aspect ratio. |
| 445 | */ |
| 446 | struct _GdkGeometry |
| 447 | { |
| 448 | gint min_width; |
| 449 | gint min_height; |
| 450 | gint max_width; |
| 451 | gint max_height; |
| 452 | gint base_width; |
| 453 | gint base_height; |
| 454 | gint width_inc; |
| 455 | gint height_inc; |
| 456 | gdouble min_aspect; |
| 457 | gdouble max_aspect; |
| 458 | GdkGravity win_gravity; |
| 459 | }; |
| 460 | |
| 461 | typedef struct _GdkWindowClass GdkWindowClass; |
| 462 | |
| 463 | #define GDK_TYPE_WINDOW (gdk_window_get_type ()) |
| 464 | #define GDK_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW, GdkWindow)) |
| 465 | #define GDK_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WINDOW, GdkWindowClass)) |
| 466 | #define GDK_IS_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW)) |
| 467 | #define GDK_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW)) |
| 468 | #define GDK_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW, GdkWindowClass)) |
| 469 | |
| 470 | |
| 471 | struct _GdkWindowClass |
| 472 | { |
| 473 | GObjectClass parent_class; |
| 474 | |
| 475 | GdkWindow * (* pick_embedded_child) (GdkWindow *window, |
| 476 | gdouble x, |
| 477 | gdouble y); |
| 478 | |
| 479 | /* the following 3 signals will only be emitted by offscreen windows */ |
| 480 | void (* to_embedder) (GdkWindow *window, |
| 481 | gdouble offscreen_x, |
| 482 | gdouble offscreen_y, |
| 483 | gdouble *embedder_x, |
| 484 | gdouble *embedder_y); |
| 485 | void (* from_embedder) (GdkWindow *window, |
| 486 | gdouble embedder_x, |
| 487 | gdouble embedder_y, |
| 488 | gdouble *offscreen_x, |
| 489 | gdouble *offscreen_y); |
| 490 | cairo_surface_t * (* create_surface) (GdkWindow *window, |
| 491 | gint width, |
| 492 | gint height); |
| 493 | |
| 494 | /* Padding for future expansion */ |
| 495 | void (*_gdk_reserved1) (void); |
| 496 | void (*_gdk_reserved2) (void); |
| 497 | void (*_gdk_reserved3) (void); |
| 498 | void (*_gdk_reserved4) (void); |
| 499 | void (*_gdk_reserved5) (void); |
| 500 | void (*_gdk_reserved6) (void); |
| 501 | void (*_gdk_reserved7) (void); |
| 502 | void (*_gdk_reserved8) (void); |
| 503 | }; |
| 504 | |
| 505 | /* Windows |
| 506 | */ |
| 507 | GDK_AVAILABLE_IN_ALL |
| 508 | GType gdk_window_get_type (void) G_GNUC_CONST; |
| 509 | GDK_AVAILABLE_IN_ALL |
| 510 | GdkWindow* gdk_window_new (GdkWindow *parent, |
| 511 | GdkWindowAttr *attributes, |
| 512 | gint attributes_mask); |
| 513 | GDK_AVAILABLE_IN_ALL |
| 514 | void gdk_window_destroy (GdkWindow *window); |
| 515 | GDK_AVAILABLE_IN_ALL |
| 516 | GdkWindowType gdk_window_get_window_type (GdkWindow *window); |
| 517 | GDK_AVAILABLE_IN_ALL |
| 518 | gboolean gdk_window_is_destroyed (GdkWindow *window); |
| 519 | |
| 520 | GDK_AVAILABLE_IN_ALL |
| 521 | GdkVisual * gdk_window_get_visual (GdkWindow *window); |
| 522 | GDK_AVAILABLE_IN_ALL |
| 523 | GdkScreen * gdk_window_get_screen (GdkWindow *window); |
| 524 | GDK_AVAILABLE_IN_ALL |
| 525 | GdkDisplay * gdk_window_get_display (GdkWindow *window); |
| 526 | #ifndef GDK_MULTIDEVICE_SAFE |
| 527 | GDK_DEPRECATED_IN_3_0_FOR(gdk_device_get_window_at_position) |
| 528 | GdkWindow* gdk_window_at_pointer (gint *win_x, |
| 529 | gint *win_y); |
| 530 | #endif /* GDK_MULTIDEVICE_SAFE */ |
| 531 | GDK_AVAILABLE_IN_ALL |
| 532 | void gdk_window_show (GdkWindow *window); |
| 533 | GDK_AVAILABLE_IN_ALL |
| 534 | void gdk_window_hide (GdkWindow *window); |
| 535 | GDK_AVAILABLE_IN_ALL |
| 536 | void gdk_window_withdraw (GdkWindow *window); |
| 537 | GDK_AVAILABLE_IN_ALL |
| 538 | void gdk_window_show_unraised (GdkWindow *window); |
| 539 | GDK_AVAILABLE_IN_ALL |
| 540 | void gdk_window_move (GdkWindow *window, |
| 541 | gint x, |
| 542 | gint y); |
| 543 | GDK_AVAILABLE_IN_ALL |
| 544 | void gdk_window_resize (GdkWindow *window, |
| 545 | gint width, |
| 546 | gint height); |
| 547 | GDK_AVAILABLE_IN_ALL |
| 548 | void gdk_window_move_resize (GdkWindow *window, |
| 549 | gint x, |
| 550 | gint y, |
| 551 | gint width, |
| 552 | gint height); |
| 553 | |
| 554 | GDK_AVAILABLE_IN_3_24 |
| 555 | void gdk_window_move_to_rect (GdkWindow *window, |
| 556 | const GdkRectangle *rect, |
| 557 | GdkGravity rect_anchor, |
| 558 | GdkGravity window_anchor, |
| 559 | GdkAnchorHints anchor_hints, |
| 560 | gint rect_anchor_dx, |
| 561 | gint rect_anchor_dy); |
| 562 | GDK_AVAILABLE_IN_ALL |
| 563 | void gdk_window_reparent (GdkWindow *window, |
| 564 | GdkWindow *new_parent, |
| 565 | gint x, |
| 566 | gint y); |
| 567 | GDK_AVAILABLE_IN_ALL |
| 568 | void gdk_window_raise (GdkWindow *window); |
| 569 | GDK_AVAILABLE_IN_ALL |
| 570 | void gdk_window_lower (GdkWindow *window); |
| 571 | GDK_AVAILABLE_IN_ALL |
| 572 | void gdk_window_restack (GdkWindow *window, |
| 573 | GdkWindow *sibling, |
| 574 | gboolean above); |
| 575 | GDK_AVAILABLE_IN_ALL |
| 576 | void gdk_window_focus (GdkWindow *window, |
| 577 | guint32 timestamp); |
| 578 | GDK_AVAILABLE_IN_ALL |
| 579 | void gdk_window_set_user_data (GdkWindow *window, |
| 580 | gpointer user_data); |
| 581 | GDK_AVAILABLE_IN_ALL |
| 582 | void gdk_window_set_override_redirect (GdkWindow *window, |
| 583 | gboolean override_redirect); |
| 584 | GDK_AVAILABLE_IN_ALL |
| 585 | gboolean gdk_window_get_accept_focus (GdkWindow *window); |
| 586 | GDK_AVAILABLE_IN_ALL |
| 587 | void gdk_window_set_accept_focus (GdkWindow *window, |
| 588 | gboolean accept_focus); |
| 589 | GDK_AVAILABLE_IN_ALL |
| 590 | gboolean gdk_window_get_focus_on_map (GdkWindow *window); |
| 591 | GDK_AVAILABLE_IN_ALL |
| 592 | void gdk_window_set_focus_on_map (GdkWindow *window, |
| 593 | gboolean focus_on_map); |
| 594 | GDK_AVAILABLE_IN_ALL |
| 595 | void gdk_window_add_filter (GdkWindow *window, |
| 596 | GdkFilterFunc function, |
| 597 | gpointer data); |
| 598 | GDK_AVAILABLE_IN_ALL |
| 599 | void gdk_window_remove_filter (GdkWindow *window, |
| 600 | GdkFilterFunc function, |
| 601 | gpointer data); |
| 602 | GDK_AVAILABLE_IN_ALL |
| 603 | void gdk_window_scroll (GdkWindow *window, |
| 604 | gint dx, |
| 605 | gint dy); |
| 606 | GDK_AVAILABLE_IN_ALL |
| 607 | void gdk_window_move_region (GdkWindow *window, |
| 608 | const cairo_region_t *region, |
| 609 | gint dx, |
| 610 | gint dy); |
| 611 | GDK_AVAILABLE_IN_ALL |
| 612 | gboolean gdk_window_ensure_native (GdkWindow *window); |
| 613 | |
| 614 | /* |
| 615 | * This allows for making shaped (partially transparent) windows |
| 616 | * - cool feature, needed for Drag and Drag for example. |
| 617 | */ |
| 618 | GDK_AVAILABLE_IN_ALL |
| 619 | void gdk_window_shape_combine_region (GdkWindow *window, |
| 620 | const cairo_region_t *shape_region, |
| 621 | gint offset_x, |
| 622 | gint offset_y); |
| 623 | |
| 624 | /* |
| 625 | * This routine allows you to quickly take the shapes of all the child windows |
| 626 | * of a window and use their shapes as the shape mask for this window - useful |
| 627 | * for container windows that dont want to look like a big box |
| 628 | * |
| 629 | * - Raster |
| 630 | */ |
| 631 | GDK_AVAILABLE_IN_ALL |
| 632 | void gdk_window_set_child_shapes (GdkWindow *window); |
| 633 | |
| 634 | GDK_DEPRECATED_IN_3_16 |
| 635 | gboolean gdk_window_get_composited (GdkWindow *window); |
| 636 | GDK_DEPRECATED_IN_3_16 |
| 637 | void gdk_window_set_composited (GdkWindow *window, |
| 638 | gboolean composited); |
| 639 | |
| 640 | /* |
| 641 | * This routine allows you to merge (ie ADD) child shapes to your |
| 642 | * own window’s shape keeping its current shape and ADDING the child |
| 643 | * shapes to it. |
| 644 | * |
| 645 | * - Raster |
| 646 | */ |
| 647 | GDK_AVAILABLE_IN_ALL |
| 648 | void gdk_window_merge_child_shapes (GdkWindow *window); |
| 649 | |
| 650 | GDK_AVAILABLE_IN_ALL |
| 651 | void gdk_window_input_shape_combine_region (GdkWindow *window, |
| 652 | const cairo_region_t *shape_region, |
| 653 | gint offset_x, |
| 654 | gint offset_y); |
| 655 | GDK_AVAILABLE_IN_ALL |
| 656 | void gdk_window_set_child_input_shapes (GdkWindow *window); |
| 657 | GDK_AVAILABLE_IN_ALL |
| 658 | void gdk_window_merge_child_input_shapes (GdkWindow *window); |
| 659 | |
| 660 | |
| 661 | GDK_AVAILABLE_IN_3_18 |
| 662 | void gdk_window_set_pass_through (GdkWindow *window, |
| 663 | gboolean pass_through); |
| 664 | GDK_AVAILABLE_IN_3_18 |
| 665 | gboolean gdk_window_get_pass_through (GdkWindow *window); |
| 666 | |
| 667 | /* |
| 668 | * Check if a window has been shown, and whether all its |
| 669 | * parents up to a toplevel have been shown, respectively. |
| 670 | * Note that a window that is_viewable below is not necessarily |
| 671 | * viewable in the X sense. |
| 672 | */ |
| 673 | GDK_AVAILABLE_IN_ALL |
| 674 | gboolean gdk_window_is_visible (GdkWindow *window); |
| 675 | GDK_AVAILABLE_IN_ALL |
| 676 | gboolean gdk_window_is_viewable (GdkWindow *window); |
| 677 | GDK_AVAILABLE_IN_ALL |
| 678 | gboolean gdk_window_is_input_only (GdkWindow *window); |
| 679 | GDK_AVAILABLE_IN_ALL |
| 680 | gboolean gdk_window_is_shaped (GdkWindow *window); |
| 681 | |
| 682 | GDK_AVAILABLE_IN_ALL |
| 683 | GdkWindowState gdk_window_get_state (GdkWindow *window); |
| 684 | |
| 685 | /* Set static bit gravity on the parent, and static |
| 686 | * window gravity on all children. |
| 687 | */ |
| 688 | GDK_DEPRECATED_IN_3_16 |
| 689 | gboolean gdk_window_set_static_gravities (GdkWindow *window, |
| 690 | gboolean use_static); |
| 691 | |
| 692 | /* GdkWindow */ |
| 693 | |
| 694 | /** |
| 695 | * GdkWindowInvalidateHandlerFunc: |
| 696 | * @window: a #GdkWindow |
| 697 | * @region: a #cairo_region_t |
| 698 | * |
| 699 | * Whenever some area of the window is invalidated (directly in the |
| 700 | * window or in a child window) this gets called with @region in |
| 701 | * the coordinate space of @window. You can use @region to just |
| 702 | * keep track of the dirty region, or you can actually change |
| 703 | * @region in case you are doing display tricks like showing |
| 704 | * a child in multiple places. |
| 705 | * |
| 706 | * Since: 3.10 |
| 707 | */ |
| 708 | typedef void (*GdkWindowInvalidateHandlerFunc) (GdkWindow *window, |
| 709 | cairo_region_t *region); |
| 710 | GDK_AVAILABLE_IN_3_10 |
| 711 | void gdk_window_set_invalidate_handler (GdkWindow *window, |
| 712 | GdkWindowInvalidateHandlerFunc handler); |
| 713 | |
| 714 | GDK_AVAILABLE_IN_ALL |
| 715 | gboolean gdk_window_has_native (GdkWindow *window); |
| 716 | GDK_AVAILABLE_IN_ALL |
| 717 | void gdk_window_set_type_hint (GdkWindow *window, |
| 718 | GdkWindowTypeHint hint); |
| 719 | GDK_AVAILABLE_IN_ALL |
| 720 | GdkWindowTypeHint gdk_window_get_type_hint (GdkWindow *window); |
| 721 | |
| 722 | GDK_AVAILABLE_IN_ALL |
| 723 | gboolean gdk_window_get_modal_hint (GdkWindow *window); |
| 724 | GDK_AVAILABLE_IN_ALL |
| 725 | void gdk_window_set_modal_hint (GdkWindow *window, |
| 726 | gboolean modal); |
| 727 | |
| 728 | GDK_AVAILABLE_IN_ALL |
| 729 | void gdk_window_set_skip_taskbar_hint (GdkWindow *window, |
| 730 | gboolean skips_taskbar); |
| 731 | GDK_AVAILABLE_IN_ALL |
| 732 | void (GdkWindow *window, |
| 733 | gboolean ); |
| 734 | GDK_AVAILABLE_IN_ALL |
| 735 | void gdk_window_set_urgency_hint (GdkWindow *window, |
| 736 | gboolean urgent); |
| 737 | |
| 738 | GDK_AVAILABLE_IN_ALL |
| 739 | void gdk_window_set_geometry_hints (GdkWindow *window, |
| 740 | const GdkGeometry *geometry, |
| 741 | GdkWindowHints geom_mask); |
| 742 | |
| 743 | GDK_AVAILABLE_IN_ALL |
| 744 | cairo_region_t *gdk_window_get_clip_region (GdkWindow *window); |
| 745 | GDK_AVAILABLE_IN_ALL |
| 746 | cairo_region_t *gdk_window_get_visible_region(GdkWindow *window); |
| 747 | |
| 748 | |
| 749 | GDK_DEPRECATED_IN_3_22_FOR(gdk_window_begin_draw_frame) |
| 750 | void gdk_window_begin_paint_rect (GdkWindow *window, |
| 751 | const GdkRectangle *rectangle); |
| 752 | GDK_AVAILABLE_IN_3_16 |
| 753 | void gdk_window_mark_paint_from_clip (GdkWindow *window, |
| 754 | cairo_t *cr); |
| 755 | GDK_DEPRECATED_IN_3_22_FOR(gdk_window_begin_draw_frame) |
| 756 | void gdk_window_begin_paint_region (GdkWindow *window, |
| 757 | const cairo_region_t *region); |
| 758 | GDK_DEPRECATED_IN_3_22_FOR(gdk_window_end_draw_frame) |
| 759 | void gdk_window_end_paint (GdkWindow *window); |
| 760 | |
| 761 | GDK_AVAILABLE_IN_3_22 |
| 762 | GdkDrawingContext *gdk_window_begin_draw_frame (GdkWindow *window, |
| 763 | const cairo_region_t *region); |
| 764 | GDK_AVAILABLE_IN_3_22 |
| 765 | void gdk_window_end_draw_frame (GdkWindow *window, |
| 766 | GdkDrawingContext *context); |
| 767 | |
| 768 | GDK_DEPRECATED_IN_3_14 |
| 769 | void gdk_window_flush (GdkWindow *window); |
| 770 | |
| 771 | GDK_AVAILABLE_IN_ALL |
| 772 | void gdk_window_set_title (GdkWindow *window, |
| 773 | const gchar *title); |
| 774 | GDK_AVAILABLE_IN_ALL |
| 775 | void gdk_window_set_role (GdkWindow *window, |
| 776 | const gchar *role); |
| 777 | GDK_AVAILABLE_IN_ALL |
| 778 | void gdk_window_set_startup_id (GdkWindow *window, |
| 779 | const gchar *startup_id); |
| 780 | GDK_AVAILABLE_IN_ALL |
| 781 | void gdk_window_set_transient_for (GdkWindow *window, |
| 782 | GdkWindow *parent); |
| 783 | GDK_DEPRECATED_IN_3_4 |
| 784 | void gdk_window_set_background (GdkWindow *window, |
| 785 | const GdkColor *color); |
| 786 | GDK_DEPRECATED_IN_3_22 |
| 787 | void gdk_window_set_background_rgba (GdkWindow *window, |
| 788 | const GdkRGBA *rgba); |
| 789 | GDK_DEPRECATED_IN_3_22 |
| 790 | void gdk_window_set_background_pattern (GdkWindow *window, |
| 791 | cairo_pattern_t *pattern); |
| 792 | GDK_DEPRECATED_IN_3_22 |
| 793 | cairo_pattern_t *gdk_window_get_background_pattern (GdkWindow *window); |
| 794 | |
| 795 | GDK_AVAILABLE_IN_ALL |
| 796 | void gdk_window_set_cursor (GdkWindow *window, |
| 797 | GdkCursor *cursor); |
| 798 | GDK_AVAILABLE_IN_ALL |
| 799 | GdkCursor *gdk_window_get_cursor (GdkWindow *window); |
| 800 | GDK_AVAILABLE_IN_ALL |
| 801 | void gdk_window_set_device_cursor (GdkWindow *window, |
| 802 | GdkDevice *device, |
| 803 | GdkCursor *cursor); |
| 804 | GDK_AVAILABLE_IN_ALL |
| 805 | GdkCursor *gdk_window_get_device_cursor (GdkWindow *window, |
| 806 | GdkDevice *device); |
| 807 | GDK_AVAILABLE_IN_ALL |
| 808 | void gdk_window_get_user_data (GdkWindow *window, |
| 809 | gpointer *data); |
| 810 | GDK_AVAILABLE_IN_ALL |
| 811 | void gdk_window_get_geometry (GdkWindow *window, |
| 812 | gint *x, |
| 813 | gint *y, |
| 814 | gint *width, |
| 815 | gint *height); |
| 816 | GDK_AVAILABLE_IN_ALL |
| 817 | int gdk_window_get_width (GdkWindow *window); |
| 818 | GDK_AVAILABLE_IN_ALL |
| 819 | int gdk_window_get_height (GdkWindow *window); |
| 820 | GDK_AVAILABLE_IN_ALL |
| 821 | void gdk_window_get_position (GdkWindow *window, |
| 822 | gint *x, |
| 823 | gint *y); |
| 824 | GDK_AVAILABLE_IN_ALL |
| 825 | gint gdk_window_get_origin (GdkWindow *window, |
| 826 | gint *x, |
| 827 | gint *y); |
| 828 | GDK_AVAILABLE_IN_ALL |
| 829 | void gdk_window_get_root_coords (GdkWindow *window, |
| 830 | gint x, |
| 831 | gint y, |
| 832 | gint *root_x, |
| 833 | gint *root_y); |
| 834 | GDK_AVAILABLE_IN_ALL |
| 835 | void gdk_window_coords_to_parent (GdkWindow *window, |
| 836 | gdouble x, |
| 837 | gdouble y, |
| 838 | gdouble *parent_x, |
| 839 | gdouble *parent_y); |
| 840 | GDK_AVAILABLE_IN_ALL |
| 841 | void gdk_window_coords_from_parent (GdkWindow *window, |
| 842 | gdouble parent_x, |
| 843 | gdouble parent_y, |
| 844 | gdouble *x, |
| 845 | gdouble *y); |
| 846 | |
| 847 | GDK_AVAILABLE_IN_ALL |
| 848 | void gdk_window_get_root_origin (GdkWindow *window, |
| 849 | gint *x, |
| 850 | gint *y); |
| 851 | GDK_AVAILABLE_IN_ALL |
| 852 | void gdk_window_get_frame_extents (GdkWindow *window, |
| 853 | GdkRectangle *rect); |
| 854 | |
| 855 | GDK_AVAILABLE_IN_3_10 |
| 856 | gint gdk_window_get_scale_factor (GdkWindow *window); |
| 857 | |
| 858 | #ifndef GDK_MULTIDEVICE_SAFE |
| 859 | GDK_DEPRECATED_IN_3_0_FOR(gdk_window_get_device_position) |
| 860 | GdkWindow * gdk_window_get_pointer (GdkWindow *window, |
| 861 | gint *x, |
| 862 | gint *y, |
| 863 | GdkModifierType *mask); |
| 864 | #endif /* GDK_MULTIDEVICE_SAFE */ |
| 865 | GDK_AVAILABLE_IN_ALL |
| 866 | GdkWindow * gdk_window_get_device_position (GdkWindow *window, |
| 867 | GdkDevice *device, |
| 868 | gint *x, |
| 869 | gint *y, |
| 870 | GdkModifierType *mask); |
| 871 | GDK_AVAILABLE_IN_3_10 |
| 872 | GdkWindow * gdk_window_get_device_position_double (GdkWindow *window, |
| 873 | GdkDevice *device, |
| 874 | gdouble *x, |
| 875 | gdouble *y, |
| 876 | GdkModifierType *mask); |
| 877 | GDK_AVAILABLE_IN_ALL |
| 878 | GdkWindow * gdk_window_get_parent (GdkWindow *window); |
| 879 | GDK_AVAILABLE_IN_ALL |
| 880 | GdkWindow * gdk_window_get_toplevel (GdkWindow *window); |
| 881 | |
| 882 | GDK_AVAILABLE_IN_ALL |
| 883 | GdkWindow * gdk_window_get_effective_parent (GdkWindow *window); |
| 884 | GDK_AVAILABLE_IN_ALL |
| 885 | GdkWindow * gdk_window_get_effective_toplevel (GdkWindow *window); |
| 886 | |
| 887 | GDK_AVAILABLE_IN_ALL |
| 888 | GList * gdk_window_get_children (GdkWindow *window); |
| 889 | GDK_AVAILABLE_IN_ALL |
| 890 | GList * gdk_window_peek_children (GdkWindow *window); |
| 891 | GDK_AVAILABLE_IN_3_10 |
| 892 | GList * gdk_window_get_children_with_user_data (GdkWindow *window, |
| 893 | gpointer user_data); |
| 894 | |
| 895 | GDK_AVAILABLE_IN_ALL |
| 896 | GdkEventMask gdk_window_get_events (GdkWindow *window); |
| 897 | GDK_AVAILABLE_IN_ALL |
| 898 | void gdk_window_set_events (GdkWindow *window, |
| 899 | GdkEventMask event_mask); |
| 900 | GDK_AVAILABLE_IN_ALL |
| 901 | void gdk_window_set_device_events (GdkWindow *window, |
| 902 | GdkDevice *device, |
| 903 | GdkEventMask event_mask); |
| 904 | GDK_AVAILABLE_IN_ALL |
| 905 | GdkEventMask gdk_window_get_device_events (GdkWindow *window, |
| 906 | GdkDevice *device); |
| 907 | |
| 908 | GDK_AVAILABLE_IN_ALL |
| 909 | void gdk_window_set_source_events (GdkWindow *window, |
| 910 | GdkInputSource source, |
| 911 | GdkEventMask event_mask); |
| 912 | GDK_AVAILABLE_IN_ALL |
| 913 | GdkEventMask gdk_window_get_source_events (GdkWindow *window, |
| 914 | GdkInputSource source); |
| 915 | |
| 916 | GDK_AVAILABLE_IN_ALL |
| 917 | void gdk_window_set_icon_list (GdkWindow *window, |
| 918 | GList *pixbufs); |
| 919 | GDK_AVAILABLE_IN_ALL |
| 920 | void gdk_window_set_icon_name (GdkWindow *window, |
| 921 | const gchar *name); |
| 922 | GDK_AVAILABLE_IN_ALL |
| 923 | void gdk_window_set_group (GdkWindow *window, |
| 924 | GdkWindow *leader); |
| 925 | GDK_AVAILABLE_IN_ALL |
| 926 | GdkWindow* gdk_window_get_group (GdkWindow *window); |
| 927 | GDK_AVAILABLE_IN_ALL |
| 928 | void gdk_window_set_decorations (GdkWindow *window, |
| 929 | GdkWMDecoration decorations); |
| 930 | GDK_AVAILABLE_IN_ALL |
| 931 | gboolean gdk_window_get_decorations (GdkWindow *window, |
| 932 | GdkWMDecoration *decorations); |
| 933 | GDK_AVAILABLE_IN_ALL |
| 934 | void gdk_window_set_functions (GdkWindow *window, |
| 935 | GdkWMFunction functions); |
| 936 | |
| 937 | GDK_AVAILABLE_IN_ALL |
| 938 | cairo_surface_t * |
| 939 | gdk_window_create_similar_surface (GdkWindow *window, |
| 940 | cairo_content_t content, |
| 941 | int width, |
| 942 | int height); |
| 943 | GDK_AVAILABLE_IN_3_10 |
| 944 | cairo_surface_t * |
| 945 | gdk_window_create_similar_image_surface (GdkWindow *window, |
| 946 | cairo_format_t format, |
| 947 | int width, |
| 948 | int height, |
| 949 | int scale); |
| 950 | |
| 951 | GDK_AVAILABLE_IN_ALL |
| 952 | void gdk_window_beep (GdkWindow *window); |
| 953 | GDK_AVAILABLE_IN_ALL |
| 954 | void gdk_window_iconify (GdkWindow *window); |
| 955 | GDK_AVAILABLE_IN_ALL |
| 956 | void gdk_window_deiconify (GdkWindow *window); |
| 957 | GDK_AVAILABLE_IN_ALL |
| 958 | void gdk_window_stick (GdkWindow *window); |
| 959 | GDK_AVAILABLE_IN_ALL |
| 960 | void gdk_window_unstick (GdkWindow *window); |
| 961 | GDK_AVAILABLE_IN_ALL |
| 962 | void gdk_window_maximize (GdkWindow *window); |
| 963 | GDK_AVAILABLE_IN_ALL |
| 964 | void gdk_window_unmaximize (GdkWindow *window); |
| 965 | GDK_AVAILABLE_IN_ALL |
| 966 | void gdk_window_fullscreen (GdkWindow *window); |
| 967 | GDK_AVAILABLE_IN_3_18 |
| 968 | void gdk_window_fullscreen_on_monitor (GdkWindow *window, |
| 969 | gint monitor); |
| 970 | GDK_AVAILABLE_IN_3_8 |
| 971 | void gdk_window_set_fullscreen_mode (GdkWindow *window, |
| 972 | GdkFullscreenMode mode); |
| 973 | GDK_AVAILABLE_IN_3_8 |
| 974 | GdkFullscreenMode |
| 975 | gdk_window_get_fullscreen_mode (GdkWindow *window); |
| 976 | GDK_AVAILABLE_IN_ALL |
| 977 | void gdk_window_unfullscreen (GdkWindow *window); |
| 978 | GDK_AVAILABLE_IN_ALL |
| 979 | void gdk_window_set_keep_above (GdkWindow *window, |
| 980 | gboolean setting); |
| 981 | GDK_AVAILABLE_IN_ALL |
| 982 | void gdk_window_set_keep_below (GdkWindow *window, |
| 983 | gboolean setting); |
| 984 | GDK_AVAILABLE_IN_ALL |
| 985 | void gdk_window_set_opacity (GdkWindow *window, |
| 986 | gdouble opacity); |
| 987 | GDK_AVAILABLE_IN_ALL |
| 988 | void gdk_window_register_dnd (GdkWindow *window); |
| 989 | |
| 990 | GDK_AVAILABLE_IN_ALL |
| 991 | GdkDragProtocol |
| 992 | gdk_window_get_drag_protocol(GdkWindow *window, |
| 993 | GdkWindow **target); |
| 994 | |
| 995 | GDK_AVAILABLE_IN_ALL |
| 996 | void gdk_window_begin_resize_drag (GdkWindow *window, |
| 997 | GdkWindowEdge edge, |
| 998 | gint button, |
| 999 | gint root_x, |
| 1000 | gint root_y, |
| 1001 | guint32 timestamp); |
| 1002 | GDK_AVAILABLE_IN_3_4 |
| 1003 | void gdk_window_begin_resize_drag_for_device (GdkWindow *window, |
| 1004 | GdkWindowEdge edge, |
| 1005 | GdkDevice *device, |
| 1006 | gint button, |
| 1007 | gint root_x, |
| 1008 | gint root_y, |
| 1009 | guint32 timestamp); |
| 1010 | GDK_AVAILABLE_IN_ALL |
| 1011 | void gdk_window_begin_move_drag (GdkWindow *window, |
| 1012 | gint button, |
| 1013 | gint root_x, |
| 1014 | gint root_y, |
| 1015 | guint32 timestamp); |
| 1016 | GDK_AVAILABLE_IN_3_4 |
| 1017 | void gdk_window_begin_move_drag_for_device (GdkWindow *window, |
| 1018 | GdkDevice *device, |
| 1019 | gint button, |
| 1020 | gint root_x, |
| 1021 | gint root_y, |
| 1022 | guint32 timestamp); |
| 1023 | |
| 1024 | /* Interface for dirty-region queueing */ |
| 1025 | GDK_AVAILABLE_IN_ALL |
| 1026 | void gdk_window_invalidate_rect (GdkWindow *window, |
| 1027 | const GdkRectangle *rect, |
| 1028 | gboolean invalidate_children); |
| 1029 | GDK_AVAILABLE_IN_ALL |
| 1030 | void gdk_window_invalidate_region (GdkWindow *window, |
| 1031 | const cairo_region_t *region, |
| 1032 | gboolean invalidate_children); |
| 1033 | |
| 1034 | /** |
| 1035 | * GdkWindowChildFunc: |
| 1036 | * @window: a #GdkWindow |
| 1037 | * @user_data: user data |
| 1038 | * |
| 1039 | * A function of this type is passed to gdk_window_invalidate_maybe_recurse(). |
| 1040 | * It gets called for each child of the window to determine whether to |
| 1041 | * recursively invalidate it or now. |
| 1042 | * |
| 1043 | * Returns: %TRUE to invalidate @window recursively |
| 1044 | */ |
| 1045 | typedef gboolean (*GdkWindowChildFunc) (GdkWindow *window, |
| 1046 | gpointer user_data); |
| 1047 | |
| 1048 | GDK_AVAILABLE_IN_ALL |
| 1049 | void gdk_window_invalidate_maybe_recurse (GdkWindow *window, |
| 1050 | const cairo_region_t *region, |
| 1051 | GdkWindowChildFunc child_func, |
| 1052 | gpointer user_data); |
| 1053 | GDK_AVAILABLE_IN_ALL |
| 1054 | cairo_region_t *gdk_window_get_update_area (GdkWindow *window); |
| 1055 | |
| 1056 | GDK_AVAILABLE_IN_ALL |
| 1057 | void gdk_window_freeze_updates (GdkWindow *window); |
| 1058 | GDK_AVAILABLE_IN_ALL |
| 1059 | void gdk_window_thaw_updates (GdkWindow *window); |
| 1060 | |
| 1061 | GDK_DEPRECATED_IN_3_16 |
| 1062 | void gdk_window_freeze_toplevel_updates_libgtk_only (GdkWindow *window); |
| 1063 | GDK_DEPRECATED_IN_3_16 |
| 1064 | void gdk_window_thaw_toplevel_updates_libgtk_only (GdkWindow *window); |
| 1065 | |
| 1066 | GDK_DEPRECATED_IN_3_22 |
| 1067 | void gdk_window_process_all_updates (void); |
| 1068 | GDK_DEPRECATED_IN_3_22 |
| 1069 | void gdk_window_process_updates (GdkWindow *window, |
| 1070 | gboolean update_children); |
| 1071 | |
| 1072 | /* Enable/disable flicker, so you can tell if your code is inefficient. */ |
| 1073 | GDK_DEPRECATED_IN_3_22 |
| 1074 | void gdk_window_set_debug_updates (gboolean setting); |
| 1075 | |
| 1076 | GDK_AVAILABLE_IN_ALL |
| 1077 | void gdk_window_constrain_size (GdkGeometry *geometry, |
| 1078 | GdkWindowHints flags, |
| 1079 | gint width, |
| 1080 | gint height, |
| 1081 | gint *new_width, |
| 1082 | gint *new_height); |
| 1083 | |
| 1084 | GDK_DEPRECATED_IN_3_8 |
| 1085 | void gdk_window_enable_synchronized_configure (GdkWindow *window); |
| 1086 | GDK_DEPRECATED_IN_3_8 |
| 1087 | void gdk_window_configure_finished (GdkWindow *window); |
| 1088 | |
| 1089 | GDK_AVAILABLE_IN_ALL |
| 1090 | GdkWindow *gdk_get_default_root_window (void); |
| 1091 | |
| 1092 | /* Offscreen redirection */ |
| 1093 | GDK_AVAILABLE_IN_ALL |
| 1094 | cairo_surface_t * |
| 1095 | gdk_offscreen_window_get_surface (GdkWindow *window); |
| 1096 | GDK_AVAILABLE_IN_ALL |
| 1097 | void gdk_offscreen_window_set_embedder (GdkWindow *window, |
| 1098 | GdkWindow *embedder); |
| 1099 | GDK_AVAILABLE_IN_ALL |
| 1100 | GdkWindow *gdk_offscreen_window_get_embedder (GdkWindow *window); |
| 1101 | GDK_AVAILABLE_IN_ALL |
| 1102 | void gdk_window_geometry_changed (GdkWindow *window); |
| 1103 | |
| 1104 | /* Multidevice support */ |
| 1105 | GDK_AVAILABLE_IN_ALL |
| 1106 | void gdk_window_set_support_multidevice (GdkWindow *window, |
| 1107 | gboolean support_multidevice); |
| 1108 | GDK_AVAILABLE_IN_ALL |
| 1109 | gboolean gdk_window_get_support_multidevice (GdkWindow *window); |
| 1110 | |
| 1111 | /* Frame clock */ |
| 1112 | GDK_AVAILABLE_IN_3_8 |
| 1113 | GdkFrameClock* gdk_window_get_frame_clock (GdkWindow *window); |
| 1114 | |
| 1115 | GDK_AVAILABLE_IN_3_10 |
| 1116 | void gdk_window_set_opaque_region (GdkWindow *window, |
| 1117 | cairo_region_t *region); |
| 1118 | |
| 1119 | GDK_AVAILABLE_IN_3_12 |
| 1120 | void gdk_window_set_event_compression (GdkWindow *window, |
| 1121 | gboolean event_compression); |
| 1122 | GDK_AVAILABLE_IN_3_12 |
| 1123 | gboolean gdk_window_get_event_compression (GdkWindow *window); |
| 1124 | |
| 1125 | GDK_AVAILABLE_IN_3_12 |
| 1126 | void gdk_window_set_shadow_width (GdkWindow *window, |
| 1127 | gint left, |
| 1128 | gint right, |
| 1129 | gint top, |
| 1130 | gint bottom); |
| 1131 | GDK_AVAILABLE_IN_3_14 |
| 1132 | gboolean (GdkWindow *window, |
| 1133 | GdkEvent *event); |
| 1134 | |
| 1135 | GDK_AVAILABLE_IN_3_16 |
| 1136 | GdkGLContext * gdk_window_create_gl_context (GdkWindow *window, |
| 1137 | GError **error); |
| 1138 | |
| 1139 | G_END_DECLS |
| 1140 | |
| 1141 | #endif /* __GDK_WINDOW_H__ */ |
| 1142 | |