2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit 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
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = gdk-Windows.html
42 * - gdk_window_invalidate_maybe_recurse
56 * - GdkBitmap* -> Bitmap
57 * - GdkColor* -> Color
58 * - GdkCursor* -> Cursor
59 * - GdkPixmap* -> Pixmap
60 * - GdkRectangle* -> Rectangle
61 * - GdkRegion* -> Region
62 * - GdkWindow* -> Window
68 private import gdk
.gdktypes
;
70 private import lib
.gdk
;
72 private import glib
.Str
;
73 private import gdk
.Window
;
74 private import gdk
.Region
;
75 private import gdk
.Rectangle
;
76 private import gdk
.Bitmap
;
77 private import gdk
.Color
;
78 private import gdk
.Pixmap
;
79 private import gdk
.Cursor
;
80 private import glib
.ListG
;
84 * A GdkWindow is a rectangular region on the screen. It's a low-level object,
85 * used to implement high-level objects such as GtkWidget and GtkWindow on the
86 * GTK+ level. A GtkWindow is a toplevel window, the thing a user might think of
87 * as a "window" with a titlebar and so on; a GtkWindow may contain many GdkWindow.
88 * For example, each GtkButton has a GdkWindow associated with it.
90 private import gdk
.Drawable
;
91 public class Window
: Drawable
94 /** the main Gtk struct */
95 protected GdkWindow
* gdkWindow
;
98 public GdkWindow
* getWindowStruct()
104 /** the main Gtk struct as a void* */
105 protected void* getStruct()
107 return cast(void*)gdkWindow
;
111 * Sets our main struct and passes it to the parent class
113 public this (GdkWindow
* gdkWindow
)
115 super(cast(GdkDrawable
*)gdkWindow
);
116 this.gdkWindow
= gdkWindow
;
133 * Creates a new GdkWindow using the attributes from
134 * attributes. See GdkWindowAttr and GdkWindowAttributesType for
135 * more details. Note: to use this on displays other than the default
136 * display, parent must be specified.
138 * a GdkWindow, or NULL to create the window as a child of
139 * the default root window for the default display.
141 * attributes of the new window
143 * mask indicating which fields in attributes are valid
147 public this (GdkWindowAttr
* attributes
, int attributesMask
)
149 // GdkWindow* gdk_window_new (GdkWindow *parent, GdkWindowAttr *attributes, gint attributes_mask);
150 this(cast(GdkWindow
*)gdk_window_new(gdkWindow
, attributes
, attributesMask
) );
154 * Destroys the window system resources associated with window and decrements window's
155 * reference count. The window system resources for all children of window are also
156 * destroyed, but the children's reference counts are not decremented.
157 * Note that a window will not be destroyed automatically when its reference count
158 * reaches zero. You must call this function yourself before that happens.
162 public void destroy()
164 // void gdk_window_destroy (GdkWindow *window);
165 gdk_window_destroy(gdkWindow
);
171 * Gets the type of the window. See GdkWindowType.
177 public GdkWindowType
getWindowType()
179 // GdkWindowType gdk_window_get_window_type (GdkWindow *window);
180 return gdk_window_get_window_type(gdkWindow
);
184 * Obtains the window underneath the mouse pointer, returning the
185 * location of that window in win_x, win_y. Returns NULL if the
186 * window under the mouse pointer is not known to GDK (if the window
187 * belongs to another application and a GdkWindow hasn't been created
188 * for it with gdk_window_foreign_new())
189 * NOTE: For multihead-aware widgets or applications use
190 * gdk_display_get_window_at_pointer() instead.
192 * return location for origin of the window under the pointer
194 * return location for origin of the window under the pointer
196 * window under the mouse pointer
198 public static Window
atPointer(int* winX
, int* winY
)
200 // GdkWindow* gdk_window_at_pointer (gint *win_x, gint *win_y);
201 return new Window( gdk_window_at_pointer(winX
, winY
) );
205 * Like gdk_window_show_unraised(), but also raises the window to the
206 * top of the window stack (moves the window to the front of the
208 * This function maps a window so it's visible onscreen. Its opposite
209 * is gdk_window_hide().
210 * When implementing a GtkWidget, you should call this function on the widget's
211 * GdkWindow as part of the "map" method.
217 // void gdk_window_show (GdkWindow *window);
218 gdk_window_show(gdkWindow
);
222 * Shows a GdkWindow onscreen, but does not modify its stacking
223 * order. In contrast, gdk_window_show() will raise the window
224 * to the top of the window stack.
225 * On the X11 platform, in Xlib terms, this function calls
226 * XMapWindow() (it also updates some internal GDK state, which means
227 * that you can't really use XMapWindow() directly on a GDK window).
231 public void showUnraised()
233 // void gdk_window_show_unraised (GdkWindow *window);
234 gdk_window_show_unraised(gdkWindow
);
238 * For toplevel windows, withdraws them, so they will no longer be
239 * known to the window manager; for all windows, unmaps them, so
240 * they won't be displayed. Normally done automatically as
241 * part of gtk_widget_hide().
247 // void gdk_window_hide (GdkWindow *window);
248 gdk_window_hide(gdkWindow
);
252 * Checks whether the window has been mapped (with gdk_window_show() or
253 * gdk_window_show_unraised()).
257 * TRUE if the window is mapped
259 public int isVisible()
261 // gboolean gdk_window_is_visible (GdkWindow *window);
262 return gdk_window_is_visible(gdkWindow
);
266 * Check if the window and all ancestors of the window are
267 * mapped. (This is not necessarily "viewable" in the X sense, since
268 * we only check as far as we have GDK window parents, not to the root
273 * TRUE if the window is viewable
275 public int isViewable()
277 // gboolean gdk_window_is_viewable (GdkWindow *window);
278 return gdk_window_is_viewable(gdkWindow
);
282 * Gets the bitwise OR of the currently active window state flags,
283 * from the GdkWindowState enumeration.
287 * window state bitfield
289 public GdkWindowState
getState()
291 // GdkWindowState gdk_window_get_state (GdkWindow *window);
292 return gdk_window_get_state(gdkWindow
);
296 * Withdraws a window (unmaps it and asks the window manager to forget about it).
297 * This function is not really useful as gdk_window_hide() automatically
298 * withdraws toplevel windows before hiding them.
300 * a toplevel GdkWindow
302 public void withdraw()
304 // void gdk_window_withdraw (GdkWindow *window);
305 gdk_window_withdraw(gdkWindow
);
309 * Asks to iconify (minimize) window. The window manager may choose
310 * to ignore the request, but normally will honor it. Using
311 * gtk_window_iconify() is preferred, if you have a GtkWindow widget.
312 * This function only makes sense when window is a toplevel window.
314 * a toplevel GdkWindow
316 public void iconify()
318 // void gdk_window_iconify (GdkWindow *window);
319 gdk_window_iconify(gdkWindow
);
323 * Attempt to deiconify (unminimize) window. On X11 the window manager may
324 * choose to ignore the request to deiconify. When using GTK+,
325 * use gtk_window_deiconify() instead of the GdkWindow variant. Or better yet,
326 * you probably want to use gtk_window_present(), which raises the window, focuses it,
327 * unminimizes it, and puts it on the current desktop.
329 * a toplevel GdkWindow
331 public void deiconify()
333 // void gdk_window_deiconify (GdkWindow *window);
334 gdk_window_deiconify(gdkWindow
);
338 * "Pins" a window such that it's on all workspaces and does not scroll
339 * with viewports, for window managers that have scrollable viewports.
340 * (When using GtkWindow, gtk_window_stick() may be more useful.)
341 * On the X11 platform, this function depends on window manager
342 * support, so may have no effect with many window managers. However,
343 * GDK will do the best it can to convince the window manager to stick
344 * the window. For window managers that don't support this operation,
345 * there's nothing you can do to force it to happen.
347 * a toplevel GdkWindow
351 // void gdk_window_stick (GdkWindow *window);
352 gdk_window_stick(gdkWindow
);
356 * Reverse operation for gdk_window_stick(); see gdk_window_stick(),
357 * and gtk_window_unstick().
359 * a toplevel GdkWindow
361 public void unstick()
363 // void gdk_window_unstick (GdkWindow *window);
364 gdk_window_unstick(gdkWindow
);
368 * Maximizes the window. If the window was already maximized, then
369 * this function does nothing.
370 * On X11, asks the window manager to maximize window, if the window
371 * manager supports this operation. Not all window managers support
372 * this, and some deliberately ignore it or don't have a concept of
373 * "maximized"; so you can't rely on the maximization actually
374 * happening. But it will happen with most standard window managers,
375 * and GDK makes a best effort to get it to happen.
376 * On Windows, reliably maximizes the window.
378 * a toplevel GdkWindow
380 public void maximize()
382 // void gdk_window_maximize (GdkWindow *window);
383 gdk_window_maximize(gdkWindow
);
387 * Unmaximizes the window. If the window wasn't maximized, then this
388 * function does nothing.
389 * On X11, asks the window manager to unmaximize window, if the
390 * window manager supports this operation. Not all window managers
391 * support this, and some deliberately ignore it or don't have a
392 * concept of "maximized"; so you can't rely on the unmaximization
393 * actually happening. But it will happen with most standard window
394 * managers, and GDK makes a best effort to get it to happen.
395 * On Windows, reliably unmaximizes the window.
397 * a toplevel GdkWindow
399 public void unmaximize()
401 // void gdk_window_unmaximize (GdkWindow *window);
402 gdk_window_unmaximize(gdkWindow
);
406 * Moves the window into fullscreen mode. This means the
407 * window covers the entire screen and is above any panels
409 * If the window was already fullscreen, then this function does nothing.
410 * On X11, asks the window manager to put window in a fullscreen
411 * state, if the window manager supports this operation. Not all
412 * window managers support this, and some deliberately ignore it or
413 * don't have a concept of "fullscreen"; so you can't rely on the
414 * fullscreenification actually happening. But it will happen with
415 * most standard window managers, and GDK makes a best effort to get
418 * a toplevel GdkWindow
421 public void fullscreen()
423 // void gdk_window_fullscreen (GdkWindow *window);
424 gdk_window_fullscreen(gdkWindow
);
428 * Moves the window out of fullscreen mode. If the window was not
429 * fullscreen, does nothing.
430 * On X11, asks the window manager to move window out of the fullscreen
431 * state, if the window manager supports this operation. Not all
432 * window managers support this, and some deliberately ignore it or
433 * don't have a concept of "fullscreen"; so you can't rely on the
434 * unfullscreenification actually happening. But it will happen with
435 * most standard window managers, and GDK makes a best effort to get
438 * a toplevel GdkWindow
441 public void unfullscreen()
443 // void gdk_window_unfullscreen (GdkWindow *window);
444 gdk_window_unfullscreen(gdkWindow
);
448 * Set if window must be kept above other windows. If the
449 * window was already above, then this function does nothing.
450 * On X11, asks the window manager to keep window above, if the window
451 * manager supports this operation. Not all window managers support
452 * this, and some deliberately ignore it or don't have a concept of
453 * "keep above"; so you can't rely on the window being kept above.
454 * But it will happen with most standard window managers,
455 * and GDK makes a best effort to get it to happen.
457 * a toplevel GdkWindow
459 * whether to keep window above other windows
462 public void setKeepAbove(int setting
)
464 // void gdk_window_set_keep_above (GdkWindow *window, gboolean setting);
465 gdk_window_set_keep_above(gdkWindow
, setting
);
469 * Set if window must be kept below other windows. If the
470 * window was already below, then this function does nothing.
471 * On X11, asks the window manager to keep window below, if the window
472 * manager supports this operation. Not all window managers support
473 * this, and some deliberately ignore it or don't have a concept of
474 * "keep below"; so you can't rely on the window being kept below.
475 * But it will happen with most standard window managers,
476 * and GDK makes a best effort to get it to happen.
478 * a toplevel GdkWindow
480 * whether to keep window below other windows
483 public void setKeepBelow(int setting
)
485 // void gdk_window_set_keep_below (GdkWindow *window, gboolean setting);
486 gdk_window_set_keep_below(gdkWindow
, setting
);
490 * Repositions a window relative to its parent window.
491 * For toplevel windows, window managers may ignore or modify the move;
492 * you should probably use gtk_window_move() on a GtkWindow widget
493 * anyway, instead of using GDK functions. For child windows,
494 * the move will reliably succeed.
495 * If you're also planning to resize the window, use gdk_window_move_resize()
496 * to both move and resize simultaneously, for a nicer visual effect.
500 * X coordinate relative to window's parent
502 * Y coordinate relative to window's parent
504 public void move(int x
, int y
)
506 // void gdk_window_move (GdkWindow *window, gint x, gint y);
507 gdk_window_move(gdkWindow
, x
, y
);
511 * Resizes window; for toplevel windows, asks the window manager to resize
512 * the window. The window manager may not allow the resize. When using GTK+,
513 * use gtk_window_resize() instead of this low-level GDK function.
514 * Windows may not be resized below 1x1.
515 * If you're also planning to move the window, use gdk_window_move_resize()
516 * to both move and resize simultaneously, for a nicer visual effect.
520 * new width of the window
522 * new height of the window
524 public void resize(int width
, int height
)
526 // void gdk_window_resize (GdkWindow *window, gint width, gint height);
527 gdk_window_resize(gdkWindow
, width
, height
);
531 * Equivalent to calling gdk_window_move() and gdk_window_resize(),
532 * except that both operations are performed at once, avoiding strange
533 * visual effects. (i.e. the user may be able to see the window first
534 * move, then resize, if you don't use gdk_window_move_resize().)
538 * new X position relative to window's parent
540 * new Y position relative to window's parent
546 public void moveResize(int x
, int y
, int width
, int height
)
548 // void gdk_window_move_resize (GdkWindow *window, gint x, gint y, gint width, gint height);
549 gdk_window_move_resize(gdkWindow
, x
, y
, width
, height
);
553 * Scroll the contents of window, both pixels and children, by the given
554 * amount. window itself does not move. Portions of the window that the scroll
555 * operation brings in from offscreen areas are invalidated. The invalidated
556 * region may be bigger than what would strictly be necessary. (For X11, a
557 * minimum area will be invalidated if the window has no subwindows, or if the
558 * edges of the window's parent do not extend beyond the edges of the window. In
559 * other cases, a multi-step process is used to scroll the window which may
560 * produce temporary visual artifacts and unnecessary invalidations.)
564 * Amount to scroll in the X direction
566 * Amount to scroll in the Y direction
568 public void scroll(int dx
, int dy
)
570 // void gdk_window_scroll (GdkWindow *window, gint dx, gint dy);
571 gdk_window_scroll(gdkWindow
, dx
, dy
);
575 * Move the part of window indicated by region by dy pixels in the Y
576 * direction and dx pixels in the X direction. The portions of region
577 * that not covered by the new position of region are invalidated.
578 * Child windows are not moved.
582 * The GdkRegion to move
584 * Amount to move in the X direction
586 * Amount to move in the Y direction
589 public void moveRegion(Region region
, int dx
, int dy
)
591 // void gdk_window_move_region (GdkWindow *window, GdkRegion *region, gint dx, gint dy);
592 gdk_window_move_region(gdkWindow
, (region
is null) ?
null : region
.getRegionStruct(), dx
, dy
);
596 * Reparents window into the given new_parent. The window being
597 * reparented will be unmapped as a side effect.
601 * new parent to move window into
603 * X location inside the new parent
605 * Y location inside the new parent
607 public void reparent(Window newParent
, int x
, int y
)
609 // void gdk_window_reparent (GdkWindow *window, GdkWindow *new_parent, gint x, gint y);
610 gdk_window_reparent(gdkWindow
, (newParent
is null) ?
null : newParent
.getWindowStruct(), x
, y
);
614 * Clears an entire window to the background color or background pixmap.
620 // void gdk_window_clear (GdkWindow *window);
621 gdk_window_clear(gdkWindow
);
625 * Clears an area of window to the background color or background pixmap.
629 * x coordinate of rectangle to clear
631 * y coordinate of rectangle to clear
633 * width of rectangle to clear
635 * height of rectangle to clear
637 public void clearArea(int x
, int y
, int width
, int height
)
639 // void gdk_window_clear_area (GdkWindow *window, gint x, gint y, gint width, gint height);
640 gdk_window_clear_area(gdkWindow
, x
, y
, width
, height
);
644 * Like gdk_window_clear_area(), but also generates an expose event for
646 * This function has a stupid name because it dates back to the mists
651 * x coordinate of rectangle to clear
653 * y coordinate of rectangle to clear
655 * width of rectangle to clear
657 * height of rectangle to clear
659 public void clearAreaE(int x
, int y
, int width
, int height
)
661 // void gdk_window_clear_area_e (GdkWindow *window, gint x, gint y, gint width, gint height);
662 gdk_window_clear_area_e(gdkWindow
, x
, y
, width
, height
);
667 * Raises window to the top of the Z-order (stacking order), so that
668 * other windows with the same parent window appear below window.
669 * This is true whether or not the windows are visible.
670 * If window is a toplevel, the window manager may choose to deny the
671 * request to move the window in the Z-order, gdk_window_raise() only
672 * requests the restack, does not guarantee it.
678 // void gdk_window_raise (GdkWindow *window);
679 gdk_window_raise(gdkWindow
);
683 * Lowers window to the bottom of the Z-order (stacking order), so that
684 * other windows with the same parent window appear above window.
685 * This is true whether or not the other windows are visible.
686 * If window is a toplevel, the window manager may choose to deny the
687 * request to move the window in the Z-order, gdk_window_lower() only
688 * requests the restack, does not guarantee it.
689 * Note that gdk_window_show() raises the window again, so don't call this
690 * function before gdk_window_show(). (Try gdk_window_show_unraised().)
696 // void gdk_window_lower (GdkWindow *window);
697 gdk_window_lower(gdkWindow
);
701 * Sets keyboard focus to window. In most cases, gtk_window_present()
702 * should be used on a GtkWindow, rather than calling this function.
706 * timestamp of the event triggering the window focus
708 public void focus(uint timestamp
)
710 // void gdk_window_focus (GdkWindow *window, guint32 timestamp);
711 gdk_window_focus(gdkWindow
, timestamp
);
715 * Registers a window as a potential drop destination.
719 public void registerDnd()
721 // void gdk_window_register_dnd (GdkWindow *window);
722 gdk_window_register_dnd(gdkWindow
);
726 * Begins a window resize operation (for a toplevel window).
727 * You might use this function to implement a "window resize grip," for
728 * example; in fact GtkStatusbar uses it. The function works best
729 * with window managers that support the Extended Window Manager Hints, but has a
730 * fallback implementation for other window managers.
732 * a toplevel GdkWindow
734 * the edge or corner from which the drag is started
736 * the button being used to drag
738 * root window X coordinate of mouse click that began the drag
740 * root window Y coordinate of mouse click that began the drag
742 * timestamp of mouse click that began the drag (use gdk_event_get_time())
744 public void beginResizeDrag(GdkWindowEdge edge
, int button
, int rootX
, int rootY
, uint timestamp
)
746 // void gdk_window_begin_resize_drag (GdkWindow *window, GdkWindowEdge edge, gint button, gint root_x, gint root_y, guint32 timestamp);
747 gdk_window_begin_resize_drag(gdkWindow
, edge
, button
, rootX
, rootY
, timestamp
);
751 * Begins a window move operation (for a toplevel window). You might
752 * use this function to implement a "window move grip," for
753 * example. The function works best with window managers that support
755 * Window Manager Hints, but has a fallback implementation for
756 * other window managers.
758 * a toplevel GdkWindow
760 * the button being used to drag
762 * root window X coordinate of mouse click that began the drag
764 * root window Y coordinate of mouse click that began the drag
766 * timestamp of mouse click that began the drag
768 public void beginMoveDrag(int button
, int rootX
, int rootY
, uint timestamp
)
770 // void gdk_window_begin_move_drag (GdkWindow *window, gint button, gint root_x, gint root_y, guint32 timestamp);
771 gdk_window_begin_move_drag(gdkWindow
, button
, rootX
, rootY
, timestamp
);
775 * Constrains a desired width and height according to a
776 * set of geometry hints (such as minimum and maximum size).
778 * a GdkGeometry structure
780 * a mask indicating what portions of geometry are set
782 * desired width of window
784 * desired height of the window
786 * location to store resulting width
788 * location to store resulting height
790 public static void constrainSize(GdkGeometry
* geometry
, uint flags
, int width
, int height
, int* newWidth
, int* newHeight
)
792 // void gdk_window_constrain_size (GdkGeometry *geometry, guint flags, gint width, gint height, gint *new_width, gint *new_height);
793 gdk_window_constrain_size(geometry
, flags
, width
, height
, newWidth
, newHeight
);
797 * Emits a short beep associated to window in the appropriate
798 * display, if supported. Otherwise, emits a short beep on
799 * the display just as gdk_display_beep().
801 * a toplevel GdkWindow
806 // void gdk_window_beep (GdkWindow *window);
807 gdk_window_beep(gdkWindow
);
811 * A convenience wrapper around gdk_window_begin_paint_region() which
812 * creates a rectangular region for you. See
813 * gdk_window_begin_paint_region() for details.
817 * rectangle you intend to draw to
819 public void beginPaintRect(Rectangle rectangle
)
821 // void gdk_window_begin_paint_rect (GdkWindow *window, GdkRectangle *rectangle);
822 gdk_window_begin_paint_rect(gdkWindow
, (rectangle
is null) ?
null : rectangle
.getRectangleStruct());
826 * Indicates that you are beginning the process of redrawing region.
827 * A backing store (offscreen buffer) large enough to contain region
828 * will be created. The backing store will be initialized with the
829 * background color or background pixmap for window. Then, all
830 * drawing operations performed on window will be diverted to the
831 * backing store. When you call gdk_window_end_paint(), the backing
832 * store will be copied to window, making it visible onscreen. Only
833 * the part of window contained in region will be modified; that is,
834 * drawing operations are clipped to region.
835 * The net result of all this is to remove flicker, because the user
836 * sees the finished product appear all at once when you call
837 * gdk_window_end_paint(). If you draw to window directly without
838 * calling gdk_window_begin_paint_region(), the user may see flicker
839 * as individual drawing operations are performed in sequence. The
840 * clipping and background-initializing features of
841 * gdk_window_begin_paint_region() are conveniences for the
842 * programmer, so you can avoid doing that work yourself.
843 * When using GTK+, the widget system automatically places calls to
844 * gdk_window_begin_paint_region() and gdk_window_end_paint() around
845 * emissions of the expose_event signal. That is, if you're writing an
846 * expose event handler, you can assume that the exposed area in
847 * GdkEventExpose has already been cleared to the window background,
848 * is already set as the clip region, and already has a backing store.
849 * Therefore in most cases, application code need not call
850 * gdk_window_begin_paint_region(). (You can disable the automatic
851 * calls around expose events on a widget-by-widget basis by calling
852 * gtk_widget_set_double_buffered().)
853 * If you call this function multiple times before calling the
854 * matching gdk_window_end_paint(), the backing stores are pushed onto
855 * a stack. gdk_window_end_paint() copies the topmost backing store
856 * onscreen, subtracts the topmost region from all other regions in
857 * the stack, and pops the stack. All drawing operations affect only
858 * the topmost backing store in the stack. One matching call to
859 * gdk_window_end_paint() is required for each call to
860 * gdk_window_begin_paint_region().
864 * region you intend to draw to
866 public void beginPaintRegion(Region region
)
868 // void gdk_window_begin_paint_region (GdkWindow *window, GdkRegion *region);
869 gdk_window_begin_paint_region(gdkWindow
, (region
is null) ?
null : region
.getRegionStruct());
873 * Indicates that the backing store created by the most recent call to
874 * gdk_window_begin_paint_region() should be copied onscreen and
875 * deleted, leaving the next-most-recent backing store or no backing
876 * store at all as the active paint region. See
877 * gdk_window_begin_paint_region() for full details. It is an error to
878 * call this function without a matching
879 * gdk_window_begin_paint_region() first.
883 public void endPaint()
885 // void gdk_window_end_paint (GdkWindow *window);
886 gdk_window_end_paint(gdkWindow
);
890 * A convenience wrapper around gdk_window_invalidate_region() which
891 * invalidates a rectangular region. See
892 * gdk_window_invalidate_region() for details.
896 * rectangle to invalidate
897 * invalidate_children:
898 * whether to also invalidate child windows
900 public void invalidateRect(Rectangle rect
, int invalidateChildren
)
902 // void gdk_window_invalidate_rect (GdkWindow *window, GdkRectangle *rect, gboolean invalidate_children);
903 gdk_window_invalidate_rect(gdkWindow
, (rect
is null) ?
null : rect
.getRectangleStruct(), invalidateChildren
);
907 * Adds region to the update area for window. The update area is the
908 * region that needs to be redrawn, or "dirty region." The call
909 * gdk_window_process_updates() sends one or more expose events to the
910 * window, which together cover the entire update area. An
911 * application would normally redraw the contents of window in
912 * response to those expose events.
913 * GDK will call gdk_window_process_all_updates() on your behalf
914 * whenever your program returns to the main loop and becomes idle, so
915 * normally there's no need to do that manually, you just need to
916 * invalidate regions that you know should be redrawn.
917 * The invalidate_children parameter controls whether the region of
918 * each child window that intersects region will also be invalidated.
919 * If FALSE, then the update area for child windows will remain
920 * unaffected. See gdk_window_invalidate_maybe_recurse if you need
921 * fine grained control over which children are invalidated.
926 * invalidate_children:
927 * TRUE to also invalidate child windows
929 public void invalidateRegion(Region region
, int invalidateChildren
)
931 // void gdk_window_invalidate_region (GdkWindow *window, GdkRegion *region, gboolean invalidate_children);
932 gdk_window_invalidate_region(gdkWindow
, (region
is null) ?
null : region
.getRegionStruct(), invalidateChildren
);
937 * Transfers ownership of the update area from window to the caller
938 * of the function. That is, after calling this function, window will
939 * no longer have an invalid/dirty region; the update area is removed
940 * from window and handed to you. If a window has no update area,
941 * gdk_window_get_update_area() returns NULL. You are responsible for
942 * calling gdk_region_destroy() on the returned region if it's non-NULL.
946 * the update area for window
948 public Region
getUpdateArea()
950 // GdkRegion* gdk_window_get_update_area (GdkWindow *window);
951 return new Region( gdk_window_get_update_area(gdkWindow
) );
955 * Temporarily freezes a window such that it won't receive expose
956 * events. The window will begin receiving expose events again when
957 * gdk_window_thaw_updates() is called. If gdk_window_freeze_updates()
958 * has been called more than once, gdk_window_thaw_updates() must be called
959 * an equal number of times to begin processing exposes.
963 public void freezeUpdates()
965 // void gdk_window_freeze_updates (GdkWindow *window);
966 gdk_window_freeze_updates(gdkWindow
);
970 * Thaws a window frozen with gdk_window_freeze_updates().
974 public void thawUpdates()
976 // void gdk_window_thaw_updates (GdkWindow *window);
977 gdk_window_thaw_updates(gdkWindow
);
981 * Calls gdk_window_process_updates() for all windows (see GdkWindow)
982 * in the application.
984 public static void processAllUpdates()
986 // void gdk_window_process_all_updates (void);
987 gdk_window_process_all_updates();
991 * Sends one or more expose events to window. The areas in each
992 * expose event will cover the entire update area for the window (see
993 * gdk_window_invalidate_region() for details). Normally GDK calls
994 * gdk_window_process_all_updates() on your behalf, so there's no
995 * need to call this function unless you want to force expose events
996 * to be delivered immediately and synchronously (vs. the usual
997 * case, where GDK delivers them in an idle handler). Occasionally
998 * this is useful to produce nicer scrolling behavior, for example.
1002 * whether to also process updates for child windows
1004 public void processUpdates(int updateChildren
)
1006 // void gdk_window_process_updates (GdkWindow *window, gboolean update_children);
1007 gdk_window_process_updates(gdkWindow
, updateChildren
);
1011 * With update debugging enabled, calls to
1012 * gdk_window_invalidate_region() clear the invalidated region of the
1013 * screen to a noticeable color, and GDK pauses for a short time
1014 * before sending exposes to windows during
1015 * gdk_window_process_updates(). The net effect is that you can see
1016 * the invalid region for each window and watch redraws as they
1017 * occur. This allows you to diagnose inefficiencies in your application.
1018 * In essence, because the GDK rendering model prevents all flicker,
1019 * if you are redrawing the same region 400 times you may never
1020 * notice, aside from noticing a speed problem. Enabling update
1021 * debugging causes GTK to flicker slowly and noticeably, so you can
1022 * see exactly what's being redrawn when, in what order.
1023 * The --gtk-debug=updates command line option passed to GTK+ programs
1024 * enables this debug option at application startup time. That's
1025 * usually more useful than calling gdk_window_set_debug_updates()
1026 * yourself, though you might want to use this function to enable
1027 * updates sometime after application startup time.
1029 * TRUE to turn on update debugging
1031 public static void setDebugUpdates(int setting
)
1033 // void gdk_window_set_debug_updates (gboolean setting);
1034 gdk_window_set_debug_updates(setting
);
1038 * If you bypass the GDK layer and use windowing system primitives to
1039 * draw directly onto a GdkWindow, then you need to deal with two
1040 * details: there may be an offset between GDK coordinates and windowing
1041 * system coordinates, and GDK may have redirected drawing to a offscreen
1042 * pixmap as the result of a gdk_window_begin_paint_region() calls.
1043 * This function allows retrieving the information you need to compensate
1044 * for these effects.
1045 * This function exposes details of the GDK implementation, and is thus
1046 * likely to change in future releases of GDK.
1050 * location to store the drawable to which drawing should be
1053 * location to store the X offset between coordinates in window,
1054 * and the underlying window system primitive coordinates for
1057 * location to store the Y offset between coordinates in window,
1058 * and the underlying window system primitive coordinates for
1061 public void getInternalPaintInfo(GdkDrawable
** realDrawable
, int* xOffset
, int* yOffset
)
1063 // void gdk_window_get_internal_paint_info (GdkWindow *window, GdkDrawable **real_drawable, gint *x_offset, gint *y_offset);
1064 gdk_window_get_internal_paint_info(gdkWindow
, realDrawable
, xOffset
, yOffset
);
1068 * Indicates that the application will cooperate with the window
1069 * system in synchronizing the window repaint with the window
1070 * manager during resizing operations. After an application calls
1071 * this function, it must call gdk_window_configure_finished() every
1072 * time it has finished all processing associated with a set of
1073 * Configure events. Toplevel GTK+ windows automatically use this
1075 * On X, calling this function makes window participate in the
1076 * _NET_WM_SYNC_REQUEST window manager protocol.
1078 * a toplevel GdkWindow
1081 public void enableSynchronizedConfigure()
1083 // void gdk_window_enable_synchronized_configure (GdkWindow *window);
1084 gdk_window_enable_synchronized_configure(gdkWindow
);
1088 * Signal to the window system that the application has finished
1089 * handling Configure events it has received. Window Managers can
1090 * use this to better synchronize the frame repaint with the
1091 * application. GTK+ applications will automatically call this
1092 * function when appropriate.
1093 * This function can only be called if gdk_window_enable_synchronized_configure()
1094 * was called previously.
1096 * a toplevel GdkWindow
1099 public void configureFinished()
1101 // void gdk_window_configure_finished (GdkWindow *window);
1102 gdk_window_configure_finished(gdkWindow
);
1106 * For most purposes this function is deprecated in favor of
1107 * g_object_set_data(). However, for historical reasons GTK+ stores
1108 * the GtkWidget that owns a GdkWindow as user data on the
1109 * GdkWindow. So, custom widget implementations should use
1110 * this function for that. If GTK+ receives an event for a GdkWindow,
1111 * and the user data for the window is non-NULL, GTK+ will assume the
1112 * user data is a GtkWidget, and forward the event to that widget.
1118 public void setUserData(void* userData
)
1120 // void gdk_window_set_user_data (GdkWindow *window, gpointer user_data);
1121 gdk_window_set_user_data(gdkWindow
, userData
);
1125 * An override redirect window is not under the control of the window manager.
1126 * This means it won't have a titlebar, won't be minimizable, etc. - it will
1127 * be entirely under the control of the application. The window manager
1128 * can't see the override redirect window at all.
1129 * Override redirect should only be used for short-lived temporary
1130 * windows, such as popup menus. GtkMenu uses an override redirect
1131 * window in its implementation, for example.
1133 * a toplevel GdkWindow
1134 * override_redirect:
1135 * TRUE if window should be override redirect
1137 public void setOverrideRedirect(int overrideRedirect
)
1139 // void gdk_window_set_override_redirect (GdkWindow *window, gboolean override_redirect);
1140 gdk_window_set_override_redirect(gdkWindow
, overrideRedirect
);
1144 * Setting accept_focus to FALSE hints the desktop environment that the
1145 * window doesn't want to receive input focus.
1146 * On X, it is the responsibility of the window manager to interpret this
1147 * hint. ICCCM-compliant window manager usually respect it.
1149 * a toplevel GdkWindow
1151 * TRUE if the window should receive input focus
1154 public void setAcceptFocus(int acceptFocus
)
1156 // void gdk_window_set_accept_focus (GdkWindow *window, gboolean accept_focus);
1157 gdk_window_set_accept_focus(gdkWindow
, acceptFocus
);
1161 * Setting focus_on_map to FALSE hints the desktop environment that the
1162 * window doesn't want to receive input focus when it is mapped.
1163 * focus_on_map should be turned off for windows that aren't triggered
1164 * interactively (such as popups from network activity).
1165 * On X, it is the responsibility of the window manager to interpret
1166 * this hint. Window managers following the freedesktop.org window
1167 * manager extension specification should respect it.
1169 * a toplevel GdkWindow
1171 * TRUE if the window should receive input focus when mapped
1174 public void setFocusOnMap(int focusOnMap
)
1176 // void gdk_window_set_focus_on_map (GdkWindow *window, gboolean focus_on_map);
1177 gdk_window_set_focus_on_map(gdkWindow
, focusOnMap
);
1181 * Adds an event filter to window, allowing you to intercept events
1182 * before they reach GDK. This is a low-level operation and makes it
1183 * easy to break GDK and/or GTK+, so you have to know what you're
1184 * doing. Pass NULL for window to get all events for all windows,
1185 * instead of events for a specific window.
1191 * data to pass to filter callback
1193 public void addFilter(GdkFilterFunc funct
, void* data
)
1195 // void gdk_window_add_filter (GdkWindow *window, GdkFilterFunc function, gpointer data);
1196 gdk_window_add_filter(gdkWindow
, funct
, data
);
1200 * Remove a filter previously added with gdk_window_add_filter().
1204 * previously-added filter function
1206 * user data for previously-added filter function
1208 public void removeFilter(GdkFilterFunc funct
, void* data
)
1210 // void gdk_window_remove_filter (GdkWindow *window, GdkFilterFunc function, gpointer data);
1211 gdk_window_remove_filter(gdkWindow
, funct
, data
);
1218 * Applies a shape mask to window. Pixels in window corresponding to
1219 * set bits in the mask will be visible; pixels in window
1220 * corresponding to unset bits in the mask will be transparent. This
1221 * gives a non-rectangular window.
1222 * If mask is NULL, the shape mask will be unset, and the x/y
1223 * parameters are not used.
1224 * On the X11 platform, this uses an X server extension which is
1225 * widely available on most common platforms, but not available on
1226 * very old X servers, and occasionally the implementation will be
1227 * buggy. On servers without the shape extension, this function
1229 * On the Win32 platform the functionality is always present.
1230 * This function works on both toplevel and child windows.
1236 * X position of shape mask with respect to window
1238 * Y position of shape mask with respect to window
1240 public void shapeCombineMask(Bitmap mask
, int x
, int y
)
1242 // void gdk_window_shape_combine_mask (GdkWindow *window, GdkBitmap *mask, gint x, gint y);
1243 gdk_window_shape_combine_mask(gdkWindow
, (mask
is null) ?
null : mask
.getBitmapStruct(), x
, y
);
1247 * Makes pixels in window outside shape_region be transparent,
1248 * so that the window may be nonrectangular. See also
1249 * gdk_window_shape_combine_mask() to use a bitmap as the mask.
1250 * If shape_region is NULL, the shape will be unset, so the whole
1251 * window will be opaque again. offset_x and offset_y are ignored
1252 * if shape_region is NULL.
1253 * On the X11 platform, this uses an X server extension which is
1254 * widely available on most common platforms, but not available on
1255 * very old X servers, and occasionally the implementation will be
1256 * buggy. On servers without the shape extension, this function
1258 * On the Win32 platform, this functionality is always present.
1259 * This function works on both toplevel and child windows.
1263 * region of window to be non-transparent
1265 * X position of shape_region in window coordinates
1267 * Y position of shape_region in window coordinates
1269 public void shapeCombineRegion(Region shapeRegion
, int offsetX
, int offsetY
)
1271 // void gdk_window_shape_combine_region (GdkWindow *window, GdkRegion *shape_region, gint offset_x, gint offset_y);
1272 gdk_window_shape_combine_region(gdkWindow
, (shapeRegion
is null) ?
null : shapeRegion
.getRegionStruct(), offsetX
, offsetY
);
1276 * Sets the shape mask of window to the union of shape masks
1277 * for all children of window, ignoring the shape mask of window
1278 * itself. Contrast with gdk_window_merge_child_shapes() which includes
1279 * the shape mask of window in the masks to be merged.
1283 public void setChildShapes()
1285 // void gdk_window_set_child_shapes (GdkWindow *window);
1286 gdk_window_set_child_shapes(gdkWindow
);
1290 * Merges the shape masks for any child windows into the
1291 * shape mask for window. i.e. the union of all masks
1292 * for window and its children will become the new mask
1293 * for window. See gdk_window_shape_combine_mask().
1294 * This function is distinct from gdk_window_set_child_shapes()
1295 * because it includes window's shape mask in the set of shapes to
1300 public void mergeChildShapes()
1302 // void gdk_window_merge_child_shapes (GdkWindow *window);
1303 gdk_window_merge_child_shapes(gdkWindow
);
1307 * Like gdk_window_shape_combine_mask(), but the shape applies
1308 * only to event handling. Mouse events which happen while
1309 * the pointer position corresponds to an unset bit in the
1310 * mask will be passed on the window below window.
1311 * An input shape is typically used with RGBA windows.
1312 * The alpha channel of the window defines which pixels are
1313 * invisible and allows for nicely antialiased borders,
1314 * and the input shape controls where the window is
1316 * On the X11 platform, this requires version 1.1 of the
1318 * On the Win32 platform, this functionality is not present and the
1319 * function does nothing.
1325 * X position of shape mask with respect to window
1327 * Y position of shape mask with respect to window
1330 public void inputShapeCombineMask(Bitmap mask
, int x
, int y
)
1332 // void gdk_window_input_shape_combine_mask (GdkWindow *window, GdkBitmap *mask, gint x, gint y);
1333 gdk_window_input_shape_combine_mask(gdkWindow
, (mask
is null) ?
null : mask
.getBitmapStruct(), x
, y
);
1337 * Like gdk_window_shape_combine_region(), but the shape applies
1338 * only to event handling. Mouse events which happen while
1339 * the pointer position corresponds to an unset bit in the
1340 * mask will be passed on the window below window.
1341 * An input shape is typically used with RGBA windows.
1342 * The alpha channel of the window defines which pixels are
1343 * invisible and allows for nicely antialiased borders,
1344 * and the input shape controls where the window is
1346 * On the X11 platform, this requires version 1.1 of the
1348 * On the Win32 platform, this functionality is not present and the
1349 * function does nothing.
1353 * region of window to be non-transparent
1355 * X position of shape_region in window coordinates
1357 * Y position of shape_region in window coordinates
1360 public void inputShapeCombineRegion(Region shapeRegion
, int offsetX
, int offsetY
)
1362 // void gdk_window_input_shape_combine_region (GdkWindow *window, GdkRegion *shape_region, gint offset_x, gint offset_y);
1363 gdk_window_input_shape_combine_region(gdkWindow
, (shapeRegion
is null) ?
null : shapeRegion
.getRegionStruct(), offsetX
, offsetY
);
1367 * Sets the input shape mask of window to the union of input shape masks
1368 * for all children of window, ignoring the input shape mask of window
1369 * itself. Contrast with gdk_window_merge_child_input_shapes() which includes
1370 * the input shape mask of window in the masks to be merged.
1375 public void setChildInputShapes()
1377 // void gdk_window_set_child_input_shapes (GdkWindow *window);
1378 gdk_window_set_child_input_shapes(gdkWindow
);
1382 * Merges the input shape masks for any child windows into the
1383 * input shape mask for window. i.e. the union of all input masks
1384 * for window and its children will become the new input mask
1385 * for window. See gdk_window_input_shape_combine_mask().
1386 * This function is distinct from gdk_window_set_child_input_shapes()
1387 * because it includes window's input shape mask in the set of
1388 * shapes to be merged.
1393 public void mergeChildInputShapes()
1395 // void gdk_window_merge_child_input_shapes (GdkWindow *window);
1396 gdk_window_merge_child_input_shapes(gdkWindow
);
1400 * Set the bit gravity of the given window to static, and flag it so
1401 * all children get static subwindow gravity. This is used if you are
1402 * implementing scary features that involve deep knowledge of the
1403 * windowing system. Don't worry about it unless you have to.
1407 * TRUE to turn on static gravity
1409 * TRUE if the server supports static gravity
1411 public int setStaticGravities(int useStatic
)
1413 // gboolean gdk_window_set_static_gravities (GdkWindow *window, gboolean use_static);
1414 return gdk_window_set_static_gravities(gdkWindow
, useStatic
);
1419 * gdk_window_set_hints is deprecated and should not be used in newly-written code.
1420 * This function is broken and useless and you should ignore it.
1421 * If using GTK+, use functions such as gtk_window_resize(), gtk_window_set_size_request(),
1422 * gtk_window_move(), gtk_window_parse_geometry(), and gtk_window_set_geometry_hints(),
1423 * depending on what you're trying to do.
1424 * If using GDK directly, use gdk_window_set_geometry_hints().
1428 * ignored field, does not matter
1430 * ignored field, does not matter
1432 * minimum width hint
1434 * minimum height hint
1440 * logical OR of GDK_HINT_POS, GDK_HINT_MIN_SIZE, and/or GDK_HINT_MAX_SIZE
1442 public void setHints(int x
, int y
, int minWidth
, int minHeight
, int maxWidth
, int maxHeight
, int flags
)
1444 // void gdk_window_set_hints (GdkWindow *window, gint x, gint y, gint min_width, gint min_height, gint max_width, gint max_height, gint flags);
1445 gdk_window_set_hints(gdkWindow
, x
, y
, minWidth
, minHeight
, maxWidth
, maxHeight
, flags
);
1449 * Sets the title of a toplevel window, to be displayed in the titlebar.
1450 * If you haven't explicitly set the icon name for the window
1451 * (using gdk_window_set_icon_name()), the icon name will be set to
1452 * title as well. title must be in UTF-8 encoding (as with all
1453 * user-readable strings in GDK/GTK+). title may not be NULL.
1455 * a toplevel GdkWindow
1459 public void setTitle(char[] title
)
1461 // void gdk_window_set_title (GdkWindow *window, const gchar *title);
1462 gdk_window_set_title(gdkWindow
, Str
.toStringz(title
));
1466 * Sets the background color of window. (However, when using GTK+,
1467 * set the background of a widget with gtk_widget_modify_bg() - if
1468 * you're an application - or gtk_style_set_background() - if you're
1469 * implementing a custom widget.)
1470 * The color must be allocated; gdk_rgb_find_color() is the best way
1471 * to allocate a color.
1472 * See also gdk_window_set_back_pixmap().
1476 * an allocated GdkColor
1478 public void setBackground(Color color
)
1480 // void gdk_window_set_background (GdkWindow *window, const GdkColor *color);
1481 gdk_window_set_background(gdkWindow
, (color
is null) ?
null : color
.getColorStruct());
1485 * Sets the background pixmap of window. May also be used to set a background of
1486 * "None" on window, by setting a background pixmap of NULL.
1487 * A background pixmap will be tiled, positioning the first tile at the origin of
1488 * window, or if parent_relative is TRUE, the tiling will be done based on the
1489 * origin of the parent window (useful to align tiles in a parent with tiles
1491 * A background pixmap of NULL means that the window will have no
1492 * background. A window with no background will never have its
1493 * background filled by the windowing system, instead the window will
1494 * contain whatever pixels were already in the corresponding area of
1496 * The windowing system will normally fill a window with its background
1497 * when the window is obscured then exposed, and when you call
1498 * gdk_window_clear().
1502 * a GdkPixmap, or NULL
1504 * whether the tiling origin is at the origin of window's parent
1506 public void setBackPixmap(Pixmap pixmap
, int parentRelative
)
1508 // void gdk_window_set_back_pixmap (GdkWindow *window, GdkPixmap *pixmap, gboolean parent_relative);
1509 gdk_window_set_back_pixmap(gdkWindow
, (pixmap
is null) ?
null : pixmap
.getPixmapStruct(), parentRelative
);
1514 * Sets the mouse pointer for a GdkWindow. Use gdk_cursor_new() or
1515 * gdk_cursor_new_from_pixmap() to create the cursor.
1516 * To make the cursor invisible, use gdk_cursor_new_from_pixmap() to create
1517 * a cursor with no pixels in it. Passing NULL for the cursor argument
1518 * to gdk_window_set_cursor() means that window will use the cursor of
1519 * its parent window. Most windows should use this default.
1525 public void setCursor(Cursor cursor
)
1527 // void gdk_window_set_cursor (GdkWindow *window, GdkCursor *cursor);
1528 gdk_window_set_cursor(gdkWindow
, (cursor
is null) ?
null : cursor
.getCursorStruct());
1533 * Retrieves the user data for window, which is normally the widget
1534 * that window belongs to. See gdk_window_set_user_data().
1538 * return location for user data
1540 public void getUserData(void** data
)
1542 // void gdk_window_get_user_data (GdkWindow *window, gpointer *data);
1543 gdk_window_get_user_data(gdkWindow
, data
);
1547 * Any of the return location arguments to this function may be NULL,
1548 * if you aren't interested in getting the value of that field.
1549 * The X and Y coordinates returned are relative to the parent window
1550 * of window, which for toplevels usually means relative to the
1551 * window decorations (titlebar, etc.) rather than relative to the
1552 * root window (screen-size background window).
1553 * On the X11 platform, the geometry is obtained from the X server,
1554 * so reflects the latest position of window; this may be out-of-sync
1555 * with the position of window delivered in the most-recently-processed
1556 * GdkEventConfigure. gdk_window_get_position() in contrast gets the
1557 * position from the most recent configure event.
1559 * If window is not a toplevel, it is much better
1560 * to call gdk_window_get_position() and gdk_drawable_get_size() instead,
1561 * because it avoids the roundtrip to the X server and because
1562 * gdk_drawable_get_size() supports the full 32-bit coordinate space,
1563 * whereas gdk_window_get_geometry() is restricted to the 16-bit
1564 * coordinates of X11.
1568 * return location for X coordinate of window (relative to its parent)
1570 * return location for Y coordinate of window (relative to its parent)
1572 * return location for width of window
1574 * return location for height of window
1576 * return location for bit depth of window
1578 public void getGeometry(int* x
, int* y
, int* width
, int* height
, int* depth
)
1580 // void gdk_window_get_geometry (GdkWindow *window, gint *x, gint *y, gint *width, gint *height, gint *depth);
1581 gdk_window_get_geometry(gdkWindow
, x
, y
, width
, height
, depth
);
1585 * Sets the geometry hints for window. Hints flagged in geom_mask
1586 * are set, hints not flagged in geom_mask are unset.
1587 * To unset all hints, use a geom_mask of 0 and a geometry of NULL.
1588 * This function provides hints to the windowing system about
1589 * acceptable sizes for a toplevel window. The purpose of
1590 * this is to constrain user resizing, but the windowing system
1591 * will typically (but is not required to) also constrain the
1592 * current size of the window to the provided values and
1593 * constrain programatic resizing via gdk_window_resize() or
1594 * gdk_window_move_resize().
1595 * Note that on X11, this effect has no effect on windows
1596 * of type GDK_WINDOW_TEMP or windows where override redirect
1597 * has been turned on via gdk_window_set_override_redirect()
1598 * since these windows are not resizable by the user.
1599 * Since you can't count on the windowing system doing the
1600 * constraints for programmatic resizes, you should generally
1601 * call gdk_window_constrain_size() yourself to determine
1602 * appropriate sizes.
1604 * a toplevel GdkWindow
1608 * bitmask indicating fields of geometry to pay attention to
1610 public void setGeometryHints(GdkGeometry
* geometry
, GdkWindowHints geomMask
)
1612 // void gdk_window_set_geometry_hints (GdkWindow *window, GdkGeometry *geometry, GdkWindowHints geom_mask);
1613 gdk_window_set_geometry_hints(gdkWindow
, geometry
, geomMask
);
1617 * Sets a list of icons for the window. One of these will be used
1618 * to represent the window when it has been iconified. The icon is
1619 * usually shown in an icon box or some sort of task bar. Which icon
1620 * size is shown depends on the window manager. The window manager
1621 * can scale the icon but setting several size icons can give better
1622 * image quality since the window manager may only need to scale the
1623 * icon by a small amount or not at all.
1625 * The GdkWindow toplevel window to set the icon of.
1627 * A list of pixbufs, of different sizes.
1629 public void setIconList(ListG pixbufs
)
1631 // void gdk_window_set_icon_list (GdkWindow *window, GList *pixbufs);
1632 gdk_window_set_icon_list(gdkWindow
, (pixbufs
is null) ?
null : pixbufs
.getListGStruct());
1636 * The application can use this hint to tell the window manager
1637 * that a certain window has modal behaviour. The window manager
1638 * can use this information to handle modal windows in a special
1640 * You should only use this on windows for which you have
1641 * previously called gdk_window_set_transient_for()
1643 * A toplevel GdkWindow
1645 * TRUE if the window is modal, FALSE otherwise.
1647 public void setModalHint(int modal
)
1649 // void gdk_window_set_modal_hint (GdkWindow *window, gboolean modal);
1650 gdk_window_set_modal_hint(gdkWindow
, modal
);
1654 * The application can use this call to provide a hint to the window
1655 * manager about the functionality of a window. The window manager
1656 * can use this information when determining the decoration and behaviour
1658 * The hint must be set before the window is mapped.
1660 * A toplevel GdkWindow
1662 * A hint of the function this window will have
1664 public void setTypeHint(GdkWindowTypeHint hint
)
1666 // void gdk_window_set_type_hint (GdkWindow *window, GdkWindowTypeHint hint);
1667 gdk_window_set_type_hint(gdkWindow
, hint
);
1671 * This function returns the type hint set for a window.
1673 * A toplevel GdkWindow
1675 * The type hint set for window
1678 public GdkWindowTypeHint
getTypeHint()
1680 // GdkWindowTypeHint gdk_window_get_type_hint (GdkWindow *window);
1681 return gdk_window_get_type_hint(gdkWindow
);
1685 * Toggles whether a window should appear in a task list or window
1686 * list. If a window's semantic type as specified with
1687 * gdk_window_set_type_hint() already fully describes the window, this
1688 * function should not be called in addition,
1689 * instead you should allow the window to be treated according to
1690 * standard policy for its semantic type.
1692 * a toplevel GdkWindow
1694 * TRUE to skip the taskbar
1697 public void setSkipTaskbarHint(int skipsTaskbar
)
1699 // void gdk_window_set_skip_taskbar_hint (GdkWindow *window, gboolean skips_taskbar);
1700 gdk_window_set_skip_taskbar_hint(gdkWindow
, skipsTaskbar
);
1704 * Toggles whether a window should appear in a pager (workspace
1705 * switcher, or other desktop utility program that displays a small
1706 * thumbnail representation of the windows on the desktop). If a
1707 * window's semantic type as specified with gdk_window_set_type_hint()
1708 * already fully describes the window, this function should
1709 * not be called in addition, instead you should
1710 * allow the window to be treated according to standard policy for
1711 * its semantic type.
1713 * a toplevel GdkWindow
1715 * TRUE to skip the pager
1718 public void setSkipPagerHint(int skipsPager
)
1720 // void gdk_window_set_skip_pager_hint (GdkWindow *window, gboolean skips_pager);
1721 gdk_window_set_skip_pager_hint(gdkWindow
, skipsPager
);
1725 * Toggles whether a window needs the user's
1728 * a toplevel GdkWindow
1730 * TRUE if the window is urgent
1733 public void setUrgencyHint(int urgent
)
1735 // void gdk_window_set_urgency_hint (GdkWindow *window, gboolean urgent);
1736 gdk_window_set_urgency_hint(gdkWindow
, urgent
);
1740 * Obtains the position of the window as reported in the
1741 * most-recently-processed GdkEventConfigure. Contrast with
1742 * gdk_window_get_geometry() which queries the X server for the
1743 * current window position, regardless of which events have been
1744 * received or processed.
1745 * The position coordinates are relative to the window's parent window.
1749 * X coordinate of window
1751 * Y coordinate of window
1753 public void getPosition(int* x
, int* y
)
1755 // void gdk_window_get_position (GdkWindow *window, gint *x, gint *y);
1756 gdk_window_get_position(gdkWindow
, x
, y
);
1760 * Obtains the top-left corner of the window manager frame in root
1761 * window coordinates.
1763 * a toplevel GdkWindow
1765 * return location for X position of window frame
1767 * return location for Y position of window frame
1769 public void getRootOrigin(int* x
, int* y
)
1771 // void gdk_window_get_root_origin (GdkWindow *window, gint *x, gint *y);
1772 gdk_window_get_root_origin(gdkWindow
, x
, y
);
1776 * Obtains the bounding box of the window, including window manager
1777 * titlebar/borders if any. The frame position is given in root window
1778 * coordinates. To get the position of the window itself (rather than
1779 * the frame) in root window coordinates, use gdk_window_get_origin().
1781 * a toplevel GdkWindow
1783 * rectangle to fill with bounding box of the window frame
1785 public void getFrameExtents(Rectangle rect
)
1787 // void gdk_window_get_frame_extents (GdkWindow *window, GdkRectangle *rect);
1788 gdk_window_get_frame_extents(gdkWindow
, (rect
is null) ?
null : rect
.getRectangleStruct());
1796 * Obtains the position of a window in root window coordinates.
1797 * (Compare with gdk_window_get_position() and
1798 * gdk_window_get_geometry() which return the position of a window
1799 * relative to its parent window.)
1803 * return location for X coordinate
1805 * return location for Y coordinate
1807 * not meaningful, ignore
1809 public int getOrigin(int* x
, int* y
)
1811 // gint gdk_window_get_origin (GdkWindow *window, gint *x, gint *y);
1812 return gdk_window_get_origin(gdkWindow
, x
, y
);
1817 * gdk_window_get_deskrelative_origin is deprecated and should not be used in newly-written code.
1818 * This gets the origin of a GdkWindow relative to
1819 * an Enlightenment-window-manager desktop. As long as you don't
1820 * assume that the user's desktop/workspace covers the entire
1821 * root window (i.e. you don't assume that the desktop begins
1822 * at root window coordinate 0,0) this function is not necessary.
1823 * It's deprecated for that reason.
1825 * a toplevel GdkWindow
1827 * return location for X coordinate
1829 * return location for Y coordinate
1833 public int getDeskrelativeOrigin(int* x
, int* y
)
1835 // gboolean gdk_window_get_deskrelative_origin (GdkWindow *window, gint *x, gint *y);
1836 return gdk_window_get_deskrelative_origin(gdkWindow
, x
, y
);
1840 * Obtains the current pointer position and modifier state.
1841 * The position is given in coordinates relative to the upper left
1846 * return location for X coordinate of pointer
1848 * return location for Y coordinate of pointer
1850 * return location for modifier mask
1852 * the window containing the pointer (as with
1853 * gdk_window_at_pointer()), or NULL if the window containing the
1854 * pointer isn't known to GDK
1856 public Window
getPointer(int* x
, int* y
, GdkModifierType
* mask
)
1858 // GdkWindow* gdk_window_get_pointer (GdkWindow *window, gint *x, gint *y, GdkModifierType *mask);
1859 return new Window( gdk_window_get_pointer(gdkWindow
, x
, y
, mask
) );
1864 * Obtains the parent of window, as known to GDK. Does not query the
1865 * X server; thus this returns the parent as passed to gdk_window_new(),
1866 * not the actual parent. This should never matter unless you're using
1867 * Xlib calls mixed with GDK calls on the X11 platform. It may also
1868 * matter for toplevel windows, because the window manager may choose
1875 public Window
getParent()
1877 // GdkWindow* gdk_window_get_parent (GdkWindow *window);
1878 return new Window( gdk_window_get_parent(gdkWindow
) );
1882 * Gets the toplevel window that's an ancestor of window.
1886 * the toplevel window containing window
1888 public Window
getToplevel()
1890 // GdkWindow* gdk_window_get_toplevel (GdkWindow *window);
1891 return new Window( gdk_window_get_toplevel(gdkWindow
) );
1895 * Gets the list of children of window known to GDK.
1896 * This function only returns children created via GDK,
1897 * so for example it's useless when used with the root window;
1898 * it only returns windows an application created itself.
1899 * The returned list must be freed, but the elements in the
1904 * list of child windows inside window
1906 public ListG
getChildren()
1908 // GList* gdk_window_get_children (GdkWindow *window);
1909 return new ListG( gdk_window_get_children(gdkWindow
) );
1913 * Like gdk_window_get_children(), but does not copy the list of
1914 * children, so the list does not need to be freed.
1918 * a reference to the list of child windows in window
1920 public ListG
peekChildren()
1922 // GList* gdk_window_peek_children (GdkWindow *window);
1923 return new ListG( gdk_window_peek_children(gdkWindow
) );
1927 * Gets the event mask for window. See gdk_window_set_events().
1931 * event mask for window
1933 public GdkEventMask
getEvents()
1935 // GdkEventMask gdk_window_get_events (GdkWindow *window);
1936 return gdk_window_get_events(gdkWindow
);
1940 * The event mask for a window determines which events will be reported
1941 * for that window. For example, an event mask including GDK_BUTTON_PRESS_MASK
1942 * means the window should report button press events. The event mask
1943 * is the bitwise OR of values from the GdkEventMask enumeration.
1947 * event mask for window
1949 public void setEvents(GdkEventMask eventMask
)
1951 // void gdk_window_set_events (GdkWindow *window, GdkEventMask event_mask);
1952 gdk_window_set_events(gdkWindow
, eventMask
);
1956 * Sets the icon of window as a pixmap or window. If using GTK+, investigate
1957 * gtk_window_set_default_icon_list() first, and then gtk_window_set_icon_list()
1958 * and gtk_window_set_icon(). If those don't meet your needs, look at
1959 * gdk_window_set_icon_list(). Only if all those are too high-level do you
1960 * want to fall back to gdk_window_set_icon().
1962 * a toplevel GdkWindow
1964 * a GdkWindow to use for the icon, or NULL to unset
1966 * a GdkPixmap to use as the icon, or NULL to unset
1968 * a 1-bit pixmap (GdkBitmap) to use as mask for pixmap, or NULL to have none
1970 public void setIcon(Window iconWindow
, Pixmap pixmap
, Bitmap mask
)
1972 // void gdk_window_set_icon (GdkWindow *window, GdkWindow *icon_window, GdkPixmap *pixmap, GdkBitmap *mask);
1973 gdk_window_set_icon(gdkWindow
, (iconWindow
is null) ?
null : iconWindow
.getWindowStruct(), (pixmap
is null) ?
null : pixmap
.getPixmapStruct(), (mask
is null) ?
null : mask
.getBitmapStruct());
1977 * Windows may have a name used while minimized, distinct from the
1978 * name they display in their titlebar. Most of the time this is a bad
1979 * idea from a user interface standpoint. But you can set such a name
1980 * with this function, if you like.
1982 * a toplevel GdkWindow
1984 * name of window while iconified (minimized)
1986 public void setIconName(char[] name
)
1988 // void gdk_window_set_icon_name (GdkWindow *window, const gchar *name);
1989 gdk_window_set_icon_name(gdkWindow
, Str
.toStringz(name
));
1993 * Indicates to the window manager that window is a transient dialog
1994 * associated with the application window parent. This allows the
1995 * window manager to do things like center window on parent and
1996 * keep window above parent.
1997 * See gtk_window_set_transient_for() if you're using GtkWindow or
2000 * a toplevel GdkWindow
2002 * another toplevel GdkWindow
2004 public void setTransientFor(Window parent
)
2006 // void gdk_window_set_transient_for (GdkWindow *window, GdkWindow *parent);
2007 gdk_window_set_transient_for(gdkWindow
, (parent
is null) ?
null : parent
.getWindowStruct());
2011 * When using GTK+, typically you should use gtk_window_set_role() instead
2012 * of this low-level function.
2013 * The window manager and session manager use a window's role to
2014 * distinguish it from other kinds of window in the same application.
2015 * When an application is restarted after being saved in a previous
2016 * session, all windows with the same title and role are treated as
2017 * interchangeable. So if you have two windows with the same title
2018 * that should be distinguished for session management purposes, you
2019 * should set the role on those windows. It doesn't matter what string
2020 * you use for the role, as long as you have a different role for each
2021 * non-interchangeable kind of window.
2023 * a toplevel GdkWindow
2025 * a string indicating its role
2027 public void setRole(char[] role
)
2029 // void gdk_window_set_role (GdkWindow *window, const gchar *role);
2030 gdk_window_set_role(gdkWindow
, Str
.toStringz(role
));
2034 * Sets the group leader window for window. By default,
2035 * GDK sets the group leader for all toplevel windows
2036 * to a global window implicitly created by GDK. With this function
2037 * you can override this default.
2038 * The group leader window allows the window manager to distinguish
2039 * all windows that belong to a single application. It may for example
2040 * allow users to minimize/unminimize all windows belonging to an
2041 * application at once. You should only set a non-default group window
2042 * if your application pretends to be multiple applications.
2044 * a toplevel GdkWindow
2046 * group leader window, or NULL to restore the default group leader window
2048 public void setGroup(Window leader
)
2050 // void gdk_window_set_group (GdkWindow *window, GdkWindow *leader);
2051 gdk_window_set_group(gdkWindow
, (leader
is null) ?
null : leader
.getWindowStruct());
2055 * Returns the group leader window for window. See gdk_window_set_group().
2057 * a toplevel GdkWindow
2059 * the group leader window for window
2062 public Window
getGroup()
2064 // GdkWindow* gdk_window_get_group (GdkWindow *window);
2065 return new Window( gdk_window_get_group(gdkWindow
) );
2069 * "Decorations" are the features the window manager adds to a toplevel GdkWindow.
2070 * This function sets the traditional Motif window manager hints that tell the
2071 * window manager which decorations you would like your window to have.
2072 * Usually you should use gtk_window_set_decorated() on a GtkWindow instead of
2073 * using the GDK function directly.
2074 * The decorations argument is the logical OR of the fields in
2075 * the GdkWMDecoration enumeration. If GDK_DECOR_ALL is included in the
2076 * mask, the other bits indicate which decorations should be turned off.
2077 * If GDK_DECOR_ALL is not included, then the other bits indicate
2078 * which decorations should be turned on.
2079 * Most window managers honor a decorations hint of 0 to disable all decorations,
2080 * but very few honor all possible combinations of bits.
2082 * a toplevel GdkWindow
2084 * decoration hint mask
2086 public void setDecorations(GdkWMDecoration decorations
)
2088 // void gdk_window_set_decorations (GdkWindow *window, GdkWMDecoration decorations);
2089 gdk_window_set_decorations(gdkWindow
, decorations
);
2093 * Returns the decorations set on the GdkWindow with gdk_window_set_decorations
2095 * The toplevel GdkWindow to get the decorations from
2097 * The window decorations will be written here
2099 * TRUE if the window has decorations set, FALSE otherwise.
2101 public int getDecorations(GdkWMDecoration
* decorations
)
2103 // gboolean gdk_window_get_decorations (GdkWindow *window, GdkWMDecoration *decorations);
2104 return gdk_window_get_decorations(gdkWindow
, decorations
);
2109 * Sets hints about the window management functions to make available
2110 * via buttons on the window frame.
2111 * On the X backend, this function sets the traditional Motif window
2112 * manager hint for this purpose. However, few window managers do
2113 * anything reliable or interesting with this hint. Many ignore it
2115 * The functions argument is the logical OR of values from the
2116 * GdkWMFunction enumeration. If the bitmask includes GDK_FUNC_ALL,
2117 * then the other bits indicate which functions to disable; if
2118 * it doesn't include GDK_FUNC_ALL, it indicates which functions to
2121 * a toplevel GdkWindow
2123 * bitmask of operations to allow on window
2125 public void setFunctions(GdkWMFunction functions
)
2127 // void gdk_window_set_functions (GdkWindow *window, GdkWMFunction functions);
2128 gdk_window_set_functions(gdkWindow
, functions
);
2133 * Obtains a list of all toplevel windows known to GDK on the default
2134 * screen (see gdk_screen_get_toplevel_windows()).
2135 * A toplevel window is a child of the root window (see
2136 * gdk_get_default_root_window()).
2137 * The returned list should be freed with g_list_free(), but
2138 * its elements need not be freed.
2140 * list of toplevel windows, free with g_list_free()
2142 public static ListG
getToplevels()
2144 // GList* gdk_window_get_toplevels (void);
2145 return new ListG( gdk_window_get_toplevels() );
2149 * Obtains the root window (parent all other windows are inside)
2150 * for the default display and screen.
2152 * the default root window
2154 public static Window
gdkGetDefaultRootWindow()
2156 // GdkWindow* gdk_get_default_root_window (void);
2157 return new Window( gdk_get_default_root_window() );
2162 * This function allows for hooking into the operation
2163 * of getting the current location of the pointer. This
2164 * is only useful for such low-level tools as an
2165 * event recorder. Applications should never have any
2166 * reason to use this facility.
2167 * This function is not multihead safe. For multihead operation,
2168 * see gdk_display_set_pointer_hooks().
2170 * a table of pointers to functions for getting
2171 * quantities related to the current pointer position,
2172 * or NULL to restore the default table.
2174 * the previous pointer hook table
2176 public static GdkPointerHooks
* gdkSetPointerHooks(GdkPointerHooks
* newHooks
)
2178 // GdkPointerHooks* gdk_set_pointer_hooks (const GdkPointerHooks *new_hooks);
2179 return gdk_set_pointer_hooks(newHooks
);