W Wrapl, The Programming Language

Libraries:Gtk:Gdk:Window

Types

T

Inherits from:

Constants

Nil : T

Functions

AtPointer(win_x @ Std.Object.T, win_y @ Std.Object.T) : Gtk.Gdk.Window.T

Obtains the window underneath the mouse pointer, returning the location of that window in win_x, win_y. Returns NULL if the window under the mouse pointer is not known to GDK (if the window belongs to another application and a T hasn't been created for it with ForeignNew)

NOTE: For multihead-aware widgets or applications use Gtk.Gdk.Display.GetWindowAtPointer instead.

win_x return location for origin of the window under the pointer. [out][allow-none]
win_y return location for origin of the window under the pointer. [out][allow-none]
Returns window under the mouse pointer. [transfer none]


ConstrainSize(geometry @ Gtk.Gdk.Geometry.T, flags @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, new_width @ Std.Object.T, new_height @ Std.Object.T) : Std.Object.T

Constrains a desired width and height according to a set of geometry hints (such as minimum and maximum size).

geometry a Gtk.Gdk.Geometry.T structure
flags a mask indicating what portions of geometry are set
width desired width of window
height desired height of the window
new_width location to store resulting width. [out]
new_height location to store resulting height. [out]


ForeignNew(anid @ Std.Integer.SmallT) : Gtk.Gdk.Window.T

Warning

ForeignNew is deprecated and should not be used in newly-written code.



ForeignNewForDisplay(display @ Gtk.Gdk.Display.T, anid @ Std.Integer.SmallT) : Gtk.Gdk.Window.T

Warning

ForeignNewForDisplay has been deprecated since version 2.24 and should not be used in newly-written code. Use gdk_x11_window_foreign_new_for_display() or equivalent backend-specific API instead



GetToplevels() : Std.Object.T

Warning

GetToplevels has been deprecated since version 2.16 and should not be used in newly-written code. Use Gtk.Gdk.Screen.GetToplevelWindows instead.



Lookup(anid @ Std.Integer.SmallT) : Gtk.Gdk.Window.T

Warning

Lookup has been deprecated since version 2.24 and should not be used in newly-written code. Use gdk_x11_window_lookup_for_display() or equivalent backend-specific functionality instead



LookupForDisplay(display @ Gtk.Gdk.Display.T, anid @ Std.Integer.SmallT) : Gtk.Gdk.Window.T

Warning

LookupForDisplay has been deprecated since version 2.24 and should not be used in newly-written code. Use gdk_x11_window_lookup_for_display() instead



New(parent @ Gtk.Gdk.Window.T, attributes @ Gtk.Gdk.WindowAttr.T, attributes_mask @ Std.Integer.SmallT) : Gtk.Gdk.Window.T

Creates a new T using the attributes from attributes. See Gtk.Gdk.WindowAttr.T and Gtk.Gdk.WindowAttributesType.T for more details. Note: to use this on displays other than the default display, parent must be specified.

parent a T, or NULL to create the window as a child of the default root window for the default display. [allow-none]
attributes attributes of the new window
attributes_mask mask indicating which fields in attributes are valid
Returns the new T. [transfer none]


ProcessAllUpdates() : Std.Object.T

Calls ProcessUpdates for all windows (see T) in the application.



SetDebugUpdates(setting @ Std.Symbol.T) : Std.Object.T

With update debugging enabled, calls to InvalidateRegion clear the invalidated region of the screen to a noticeable color, and GDK pauses for a short time before sending exposes to windows during ProcessUpdates. The net effect is that you can see the invalid region for each window and watch redraws as they occur. This allows you to diagnose inefficiencies in your application.

In essence, because the GDK rendering model prevents all flicker, if you are redrawing the same region 400 times you may never notice, aside from noticing a speed problem. Enabling update debugging causes GTK to flicker slowly and noticeably, so you can see exactly what's being redrawn when, in what order.

The --gtk-debug=updates command line option passed to GTK+ programs enables this debug option at application startup time. That's usually more useful than calling SetDebugUpdates yourself, though you might want to use this function to enable updates sometime after application startup time.

setting TRUE to turn on update debugging


Methods

:AddFilter(self @ T, function @ Std.Function.T, data @ Std.Address.T) : Std.Object.T

Adds an event filter to window, allowing you to intercept events before they reach GDK. This is a low-level operation and makes it easy to break GDK and/or GTK+, so you have to know what you're doing. Pass NULL for window to get all events for all windows, instead of events for a specific window.

See Gtk.Gdk.Display.AddClientMessageFilter if you are interested in X ClientMessage events.

window a T
function filter callback
data data to pass to filter callback


:Beep(self @ T) : Std.Object.T

Emits a short beep associated to window in the appropriate display, if supported. Otherwise, emits a short beep on the display just as Gtk.Gdk.Display.Beep.

window a toplevel T


:BeginMoveDrag(self @ T, button @ Std.Integer.SmallT, root_x @ Std.Integer.SmallT, root_y @ Std.Integer.SmallT, timestamp @ Std.Integer.SmallT) : Std.Object.T

Begins a window move operation (for a toplevel window). You might use this function to implement a "window move grip," for example. The function works best with window managers that support the Extended Window Manager Hints, but has a fallback implementation for other window managers.

window a toplevel T
button the button being used to drag
root_x root window X coordinate of mouse click that began the drag
root_y root window Y coordinate of mouse click that began the drag
timestamp timestamp of mouse click that began the drag


:BeginPaintRect(self @ T, rectangle @ Gtk.Gdk.Rectangle.T) : Std.Object.T

A convenience wrapper around BeginPaintRegion which creates a rectangular region for you. See BeginPaintRegion for details.

window a T
rectangle rectangle you intend to draw to


:BeginPaintRegion(self @ T, region @ Gtk.Gdk.Region.T) : Std.Object.T

Indicates that you are beginning the process of redrawing region. A backing store (offscreen buffer) large enough to contain region will be created. The backing store will be initialized with the background color or background pixmap for window. Then, all drawing operations performed on window will be diverted to the backing store. When you call EndPaint, the backing store will be copied to window, making it visible onscreen. Only the part of window contained in region will be modified; that is, drawing operations are clipped to region.

The net result of all this is to remove flicker, because the user sees the finished product appear all at once when you call EndPaint. If you draw to window directly without calling BeginPaintRegion, the user may see flicker as individual drawing operations are performed in sequence. The clipping and background-initializing features of BeginPaintRegion are conveniences for the programmer, so you can avoid doing that work yourself.

When using GTK+, the widget system automatically places calls to BeginPaintRegion and EndPaint around emissions of the expose_event signal. That is, if you're writing an expose event handler, you can assume that the exposed area in Gtk.Gdk.EventExpose.T has already been cleared to the window background, is already set as the clip region, and already has a backing store. Therefore in most cases, application code need not call BeginPaintRegion. (You can disable the automatic calls around expose events on a widget-by-widget basis by calling gtk_widget_set_double_buffered().)

If you call this function multiple times before calling the matching EndPaint, the backing stores are pushed onto a stack. EndPaint copies the topmost backing store onscreen, subtracts the topmost region from all other regions in the stack, and pops the stack. All drawing operations affect only the topmost backing store in the stack. One matching call to EndPaint is required for each call to BeginPaintRegion.

window a T
region region you intend to draw to


:BeginResizeDrag(self @ T, edge @ Gtk.Gdk.WindowEdge.T, button @ Std.Integer.SmallT, root_x @ Std.Integer.SmallT, root_y @ Std.Integer.SmallT, timestamp @ Std.Integer.SmallT) : Std.Object.T

Begins a window resize operation (for a toplevel window). You might use this function to implement a "window resize grip," for example; in fact GtkStatusbar uses it. The function works best with window managers that support the Extended Window Manager Hints, but has a fallback implementation for other window managers.

window a toplevel T
edge the edge or corner from which the drag is started
button the button being used to drag
root_x root window X coordinate of mouse click that began the drag
root_y root window Y coordinate of mouse click that began the drag
timestamp timestamp of mouse click that began the drag (use Gtk.Gdk.Event.GetTime)


:Clear(self @ T) : Std.Object.T

Clears an entire window to the background color or background pixmap.

window a T


:ClearArea(self @ T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT) : Std.Object.T

Clears an area of window to the background color or background pixmap.

window a T
x x coordinate of rectangle to clear
y y coordinate of rectangle to clear
width width of rectangle to clear
height height of rectangle to clear


:ClearAreaE(self @ T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT) : Std.Object.T

Like ClearArea, but also generates an expose event for the cleared area.

This function has a stupid name because it dates back to the mists time, pre-GDK-1.0.

window a T
x x coordinate of rectangle to clear
y y coordinate of rectangle to clear
width width of rectangle to clear
height height of rectangle to clear


:ConfigureFinished(self @ T) : Std.Object.T

Signal to the window system that the application has finished handling Configure events it has received. Window Managers can use this to better synchronize the frame repaint with the application. GTK+ applications will automatically call this function when appropriate.

This function can only be called if EnableSynchronizedConfigure was called previously.

window a toplevel T


:CoordsFromParent(self @ T, parent_x @ Std.Real.T, parent_y @ Std.Real.T, x @ Std.Object.T, y @ Std.Object.T) : Std.Object.T

Transforms window coordinates from a parent window to a child window, where the parent window is the normal parent as returned by GetParent for normal windows, and the window's embedder as returned by Gtk.Gdk.Offscreen.WindowGetEmbedder for offscreen windows.

For normal windows, calling this function is equivalent to subtracting the return values of GetPosition from the parent coordinates. For offscreen windows however (which can be arbitrarily transformed), this function calls the GdkWindow::from-embedder: signal to translate the coordinates.

You should always use this function when writing generic code that walks down a window hierarchy.

See also: CoordsToParent

window a child window
parent_x X coordinate in parent's coordinate system
parent_y Y coordinate in parent's coordinate system
x return location for X coordinate in child's coordinate system. [out][allow-none]
y return location for Y coordinate in child's coordinate system. [out][allow-none]


:CoordsToParent(self @ T, x @ Std.Real.T, y @ Std.Real.T, parent_x @ Std.Object.T, parent_y @ Std.Object.T) : Std.Object.T

Transforms window coordinates from a child window to its parent window, where the parent window is the normal parent as returned by GetParent for normal windows, and the window's embedder as returned by Gtk.Gdk.Offscreen.WindowGetEmbedder for offscreen windows.

For normal windows, calling this function is equivalent to adding the return values of GetPosition to the child coordinates. For offscreen windows however (which can be arbitrarily transformed), this function calls the GdkWindow::to-embedder: signal to translate the coordinates.

You should always use this function when writing generic code that walks up a window hierarchy.

See also: CoordsFromParent

window a child window
x X coordinate in child's coordinate system
y Y coordinate in child's coordinate system
parent_x return location for X coordinate in parent's coordinate system, or NULL. [out][allow-none]
parent_y return location for Y coordinate in parent's coordinate system, or NULL. [out][allow-none]


:CreateSimilarSurface(self @ T, content @ Gtk.Cairo.Content.T, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT) : Gtk.Cairo.Surface.T

Create a new surface that is as compatible as possible with the given window. For example the new surface will have the same fallback resolution and font options as window. Generally, the new surface will also use the same backend as window, unless that is not possible for some reason. The type of the returned surface may be examined with cairo_surface_get_type().

Initially the surface contents are all 0 (transparent if contents have transparency, black otherwise.)

window window to make new surface similar to
content the content for the new surface
width width of the new surface
height height of the new surface
Returns a pointer to the newly allocated surface. The caller owns the surface and should call cairo_surface_destroy() when done with it. This function always returns a valid pointer, but it will return a pointer to a "nil" surface if other is already in an error state or any other error occurs.


:Deiconify(self @ T) : Std.Object.T

Attempt to deiconify (unminimize) window. On X11 the window manager may choose to ignore the request to deiconify. When using GTK+, use gtk_window_deiconify() instead of the T variant. Or better yet, you probably want to use gtk_window_present(), which raises the window, focuses it, unminimizes it, and puts it on the current desktop.

window a toplevel T


:Destroy(self @ T) : Std.Object.T

Destroys the window system resources associated with window and decrements window's reference count. The window system resources for all children of window are also destroyed, but the children's reference counts are not decremented.

Note that a window will not be destroyed automatically when its reference count reaches zero. You must call this function yourself before that happens.

window a T


:EnableSynchronizedConfigure(self @ T) : Std.Object.T

Indicates that the application will cooperate with the window system in synchronizing the window repaint with the window manager during resizing operations. After an application calls this function, it must call ConfigureFinished every time it has finished all processing associated with a set of Configure events. Toplevel GTK+ windows automatically use this protocol.

On X, calling this function makes window participate in the _NET_WM_SYNC_REQUEST window manager protocol.

window a toplevel T


:EndPaint(self @ T) : Std.Object.T

Indicates that the backing store created by the most recent call to BeginPaintRegion should be copied onscreen and deleted, leaving the next-most-recent backing store or no backing store at all as the active paint region. See BeginPaintRegion for full details. It is an error to call this function without a matching BeginPaintRegion first.

window a T


:EnsureNative(self @ T) : Std.Symbol.T

Tries to ensure that there is a window-system native window for this GdkWindow. This may fail in some situations, returning FALSE.

Offscreen window and children of them can never have native windows.

Some backends may not support native child windows.

window a T
Returns TRUE if the window has a native window, FALSE otherwise


:Flush(self @ T) : Std.Object.T

Flush all outstanding cached operations on a window, leaving the window in a state which reflects all that has been drawn before.

Gdk uses multiple kinds of caching to get better performance and nicer drawing. For instance, during exposes all paints to a window using double buffered rendering are keep on a pixmap until the last window has been exposed. It also delays window moves/scrolls until as long as possible until next update to avoid tearing when moving windows.

Normally this should be completely invisible to applications, as we automatically flush the windows when required, but this might be needed if you for instance mix direct native drawing with gdk drawing. For Gtk widgets that don't use double buffering this will be called automatically before sending the expose event.

window a T


:Focus(self @ T, timestamp @ Std.Integer.SmallT) : Std.Object.T

Sets keyboard focus to window. In most cases, gtk_window_present() should be used on a GtkWindow, rather than calling this function.

window a T
timestamp timestamp of the event triggering the window focus


:FreezeToplevelUpdatesLibgtkOnly(self @ T) : Std.Object.T



:FreezeUpdates(self @ T) : Std.Object.T

Temporarily freezes a window such that it won't receive expose events. The window will begin receiving expose events again when ThawUpdates is called. If FreezeUpdates has been called more than once, ThawUpdates must be called an equal number of times to begin processing exposes.

window a T


:Fullscreen(self @ T) : Std.Object.T

Moves the window into fullscreen mode. This means the window covers the entire screen and is above any panels or task bars.

If the window was already fullscreen, then this function does nothing.

On X11, asks the window manager to put window in a fullscreen state, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don't have a concept of "fullscreen"; so you can't rely on the fullscreenification actually happening. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.

window a toplevel T


:GeometryChanged(self @ T) : Std.Object.T

This function informs GDK that the geometry of an embedded offscreen window has changed. This is necessary for GDK to keep track of which offscreen window the pointer is in.

window an embedded offscreen T


:GetAcceptFocus(self @ T) : Std.Symbol.T

Determines whether or not the desktop environment shuld be hinted that the window does not want to receive input focus.

window a toplevel T.
Returns whether or not the window should receive input focus.


:GetBackgroundPattern(self @ T) : Gtk.Cairo.Pattern.T

Gets the pattern used to clear the background on window. If window does not have its own background and reuses the parent's, NULL is returned and you'll have to query it yourself.

window a window
Returns The pattern to use for the background or NULL to use the parent's background. [transfer none]


:GetChildren(self @ T) : Std.Object.T

Gets the list of children of window known to GDK. This function only returns children created via GDK, so for example it's useless when used with the root window; it only returns windows an application created itself.

The returned list must be freed, but the elements in the list need not be.

window a T
Returns list of child windows inside window. [transfer container][element-type GdkWindow]


:GetComposited(self @ T) : Std.Symbol.T

Determines whether window is composited.

See SetComposited.

window a T
Returns TRUE if the window is composited.


:GetCursor(self @ T) : Gtk.Gdk.Cursor.T

Retrieves a Gtk.Gdk.Cursor.T pointer for the cursor currently set on the specified T, or NULL. If the return value is NULL then there is no custom cursor set on the specified window, and it is using the cursor for its parent window.

window a T
Returns a Gtk.Gdk.Cursor.T, or NULL. The returned object is owned by the T and should not be unreferenced directly. Use SetCursor to unset the cursor of the window. [transfer none]


:GetDecorations(self @ T, decorations @ Std.Object.T) : Std.Symbol.T

Returns the decorations set on the GdkWindow with SetDecorations

window The toplevel T to get the decorations from
decorations The window decorations will be written here
Returns TRUE if the window has decorations set, FALSE otherwise.


:GetDeskrelativeOrigin(self @ T, x @ Std.Object.T, y @ Std.Object.T) : Std.Symbol.T

Warning

GetDeskrelativeOrigin is deprecated and should not be used in newly-written code.



:GetDisplay(self @ T) : Gtk.Gdk.Display.T

Gets the Gtk.Gdk.Display.T associated with a T.

window a T
Returns the Gtk.Gdk.Display.T associated with window


:GetEffectiveParent(self @ T) : Gtk.Gdk.Window.T

Obtains the parent of window, as known to GDK. Works like GetParent for normal windows, but returns the window's embedder for offscreen windows.

See also: Gtk.Gdk.Offscreen.WindowGetEmbedder

window a T
Returns effective parent of window


:GetEffectiveToplevel(self @ T) : Gtk.Gdk.Window.T

Gets the toplevel window that's an ancestor of window.

Works like GetToplevel, but treats an offscreen window's embedder as its parent, using GetEffectiveParent.

See also: Gtk.Gdk.Offscreen.WindowGetEmbedder

window a T
Returns the effective toplevel window containing window


:GetEvents(self @ T) : Std.Integer.SmallT

Gets the event mask for window. See SetEvents.

window a T
Returns event mask for window


:GetFocusOnMap(self @ T) : Std.Symbol.T

Determines whether or not the desktop environment should be hinted that the window does not want to receive input focus when it is mapped.

window a toplevel T.
Returns whether or not the window wants to receive input focus when it is mapped.


:GetFrameExtents(self @ T, rect @ Gtk.Gdk.Rectangle.T) : Std.Object.T

Obtains the bounding box of the window, including window manager titlebar/borders if any. The frame position is given in root window coordinates. To get the position of the window itself (rather than the frame) in root window coordinates, use GetOrigin.

window a T
rect rectangle to fill with bounding box of the window frame


:GetGeometry(self @ T, x @ Std.Object.T, y @ Std.Object.T, width @ Std.Object.T, height @ Std.Object.T, depth @ Std.Object.T) : Std.Object.T

Any of the return location arguments to this function may be NULL, if you aren't interested in getting the value of that field.

The X and Y coordinates returned are relative to the parent window of window, which for toplevels usually means relative to the window decorations (titlebar, etc.) rather than relative to the root window (screen-size background window).

On the X11 platform, the geometry is obtained from the X server, so reflects the latest position of window; this may be out-of-sync with the position of window delivered in the most-recently-processed Gtk.Gdk.EventConfigure.T. GetPosition in contrast gets the position from the most recent configure event.

Note

If window is not a toplevel, it is much better to call GetPosition and Gtk.Gdk.Drawable.GetSize instead, because it avoids the roundtrip to the X server and because Gtk.Gdk.Drawable.GetSize supports the full 32-bit coordinate space, whereas GetGeometry is restricted to the 16-bit coordinates of X11.


:GetGroup(self @ T) : Gtk.Gdk.Window.T

Returns the group leader window for window. See SetGroup.

window a toplevel T
Returns the group leader window for window


:GetHeight(self @ T) : Std.Integer.SmallT

Returns the height of the given window.

On the X11 platform the returned size is the size reported in the most-recently-processed configure event, rather than the current size on the X server.

window a T
Returns The height of window


:GetInternalPaintInfo(self @ T, real_drawable @ Std.Object.T, x_offset @ Std.Object.T, y_offset @ Std.Object.T) : Std.Object.T

If you bypass the GDK layer and use windowing system primitives to draw directly onto a T, then you need to deal with two details: there may be an offset between GDK coordinates and windowing system coordinates, and GDK may have redirected drawing to a offscreen pixmap as the result of a BeginPaintRegion calls. This function allows retrieving the information you need to compensate for these effects.

This function exposes details of the GDK implementation, and is thus likely to change in future releases of GDK.

window a T
real_drawable location to store the drawable to which drawing should be done. [out]
x_offset location to store the X offset between coordinates in window, and the underlying window system primitive coordinates for *real_drawable. [out]
y_offset location to store the Y offset between coordinates in window, and the underlying window system primitive coordinates for *real_drawable. [out]


:GetModalHint(self @ T) : Std.Symbol.T

Determines whether or not the window manager is hinted that window has modal behaviour.

window A toplevel T.
Returns whether or not the window has the modal hint set.


:GetOrigin(self @ T, x, y) : Std.Integer.SmallT

Obtains the position of a window in root window coordinates. (Compare with GetPosition and GetGeometry which return the position of a window relative to its parent window.)

window a T
x return location for X coordinate
y return location for Y coordinate
Returns not meaningful, ignore


:GetParent(self @ T) : Gtk.Gdk.Window.T

Obtains the parent of window, as known to GDK. Does not query the X server; thus this returns the parent as passed to gdk_window_new(), not the actual parent. This should never matter unless you're using Xlib calls mixed with GDK calls on the X11 platform. It may also matter for toplevel windows, because the window manager may choose to reparent them.

Note that you should use GetEffectiveParent when writing generic code that walks up a window hierarchy, because GetParent will most likely not do what you expect if there are offscreen windows in the hierarchy.

window a T
Returns parent of window


:GetPointer(self @ T, x @ Std.Object.T, y @ Std.Object.T, mask @ Std.Object.T) : Gtk.Gdk.Window.T

Obtains the current pointer position and modifier state. The position is given in coordinates relative to the upper left corner of window.

window a T
x return location for X coordinate of pointer or NULL to not return the X coordinate. [out][allow-none]
y return location for Y coordinate of pointer or NULL to not return the Y coordinate. [out][allow-none]
mask return location for modifier mask or NULL to not return the modifier mask. [out][allow-none]
Returns the window containing the pointer (as with AtPointer), or NULL if the window containing the pointer isn't known to GDK. [transfer none]


:GetPosition(self @ T, x, y) : Std.Object.T

Obtains the position of the window as reported in the most-recently-processed Gtk.Gdk.EventConfigure.T. Contrast with GetGeometry which queries the X server for the current window position, regardless of which events have been received or processed.

The position coordinates are relative to the window's parent window.

window a T
x X coordinate of window. [out][allow-none]
y Y coordinate of window. [out][allow-none]


:GetRootCoords(self @ T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, root_x @ Std.Object.T, root_y @ Std.Object.T) : Std.Object.T

Obtains the position of a window position in root window coordinates. This is similar to GetOrigin but allows you go pass in any position in the window, not just the origin.

window a T
x X coordinate in window
y Y coordinate in window
root_x return location for X coordinate. [out]
root_y return location for Y coordinate. [out]


:GetRootOrigin(self @ T, x, y) : Std.Object.T

Obtains the top-left corner of the window manager frame in root window coordinates.

window a toplevel T
x return location for X position of window frame
y return location for Y position of window frame


:GetScreen(self @ T) : Gtk.Gdk.Screen.T

Gets the Gtk.Gdk.Screen.T associated with a T.

window a T
Returns the Gtk.Gdk.Screen.T associated with window


:GetState(self @ T) : Std.Integer.SmallT

Gets the bitwise OR of the currently active window state flags, from the Gtk.Gdk.WindowState.T enumeration.

window a T
Returns window state bitfield


:GetToplevel(self @ T) : Gtk.Gdk.Window.T

Gets the toplevel window that's an ancestor of window.

Any window type but Gtk.Gdk.WindowType.Child is considered a toplevel window, as is a Gtk.Gdk.WindowType.Child window that has a root window as parent.

Note that you should use GetEffectiveToplevel when you want to get to a window's toplevel as seen on screen, because GetToplevel will most likely not do what you expect if there are offscreen windows in the hierarchy.

window a T
Returns the toplevel window containing window


:GetTypeHint(self @ T) : Gtk.Gdk.WindowTypeHint.T

This function returns the type hint set for a window.

window A toplevel T
Returns The type hint set for window


:GetUpdateArea(self @ T) : Gtk.Gdk.Region.T

Transfers ownership of the update area from window to the caller of the function. That is, after calling this function, window will no longer have an invalid/dirty region; the update area is removed from window and handed to you. If a window has no update area, GetUpdateArea returns NULL. You are responsible for calling Gtk.Gdk.Region.Destroy on the returned region if it's non-NULL.

window a T
Returns the update area for window


:GetUserData(self @ T, data @ Std.Object.T) : Std.Object.T

Retrieves the user data for window, which is normally the widget that window belongs to. See SetUserData.

window a T
data return location for user data. [out]


:GetVisual(self @ T) : Gtk.Gdk.Visual.T

Gets the Gtk.Gdk.Visual.T describing the pixel format of window.

window a T
Returns a Gtk.Gdk.Visual.T


:GetWidth(self @ T) : Std.Integer.SmallT

Returns the width of the given window.

On the X11 platform the returned size is the size reported in the most-recently-processed configure event, rather than the current size on the X server.

window a T
Returns The width of window


:GetWindowType(self @ T) : Gtk.Gdk.WindowType.T

Gets the type of the window. See Gtk.Gdk.WindowType.T.

window a T
Returns type of window


:HasNative(self @ T) : Std.Symbol.T

Checks whether the window has a native window or not. Note that you can use EnsureNative if a native window is needed.

window a T
Returns TRUE if the window has a native window, FALSE otherwise.


:Hide(self @ T) : Std.Object.T

For toplevel windows, withdraws them, so they will no longer be known to the window manager; for all windows, unmaps them, so they won't be displayed. Normally done automatically as part of gtk_widget_hide().

window a T


:Iconify(self @ T) : Std.Object.T

Asks to iconify (minimize) window. The window manager may choose to ignore the request, but normally will honor it. Using gtk_window_iconify() is preferred, if you have a GtkWindow widget.

This function only makes sense when window is a toplevel window.

window a toplevel T


:InputShapeCombineMask(self @ T, mask @ Gtk.Gdk.Bitmap.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT) : Std.Object.T

Like ShapeCombineMask, but the shape applies only to event handling. Mouse events which happen while the pointer position corresponds to an unset bit in the mask will be passed on the window below window.

An input shape is typically used with RGBA windows. The alpha channel of the window defines which pixels are invisible and allows for nicely antialiased borders, and the input shape controls where the window is "clickable".

On the X11 platform, this requires version 1.1 of the shape extension.

On the Win32 platform, this functionality is not present and the function does nothing.

window a T
mask shape mask, or NULL. [allow-none]
x X position of shape mask with respect to window
y Y position of shape mask with respect to window


:InputShapeCombineRegion(self @ T, shape_region @ Gtk.Gdk.Region.T, offset_x @ Std.Integer.SmallT, offset_y @ Std.Integer.SmallT) : Std.Object.T

Like ShapeCombineRegion, but the shape applies only to event handling. Mouse events which happen while the pointer position corresponds to an unset bit in the mask will be passed on the window below window.

An input shape is typically used with RGBA windows. The alpha channel of the window defines which pixels are invisible and allows for nicely antialiased borders, and the input shape controls where the window is "clickable".

On the X11 platform, this requires version 1.1 of the shape extension.

On the Win32 platform, this functionality is not present and the function does nothing.

window a T
shape_region region of window to be non-transparent
offset_x X position of shape_region in window coordinates
offset_y Y position of shape_region in window coordinates


:InvalidateRect(self @ T, rect @ Gtk.Gdk.Rectangle.T, invalidate_children @ Std.Symbol.T) : Std.Object.T

A convenience wrapper around InvalidateRegion which invalidates a rectangular region. See InvalidateRegion for details.

window a T
rect rectangle to invalidate or NULL to invalidate the whole window. [allow-none]
invalidate_children whether to also invalidate child windows


:InvalidateRegion(self @ T, region @ Gtk.Gdk.Region.T, invalidate_children @ Std.Symbol.T) : Std.Object.T

Adds region to the update area for window. The update area is the region that needs to be redrawn, or "dirty region." The call ProcessUpdates sends one or more expose events to the window, which together cover the entire update area. An application would normally redraw the contents of window in response to those expose events.

GDK will call ProcessAllUpdates on your behalf whenever your program returns to the main loop and becomes idle, so normally there's no need to do that manually, you just need to invalidate regions that you know should be redrawn.

The invalidate_children parameter controls whether the region of each child window that intersects region will also be invalidated. If FALSE, then the update area for child windows will remain unaffected. See gdk_window_invalidate_maybe_recurse if you need fine grained control over which children are invalidated.

window a T
region a Gtk.Gdk.Region.T
invalidate_children TRUE to also invalidate child windows


:IsDestroyed(self @ T) : Std.Symbol.T

Check to see if a window is destroyed..

window a T
Returns TRUE if the window is destroyed


:IsInputOnly(self @ T) : Std.Symbol.T

Determines whether or not the window is an input only window.

window a toplevel T
Returns TRUE if window is input only


:IsShaped(self @ T) : Std.Symbol.T

Determines whether or not the window is shaped.

window a toplevel T
Returns TRUE if window is shaped


:IsViewable(self @ T) : Std.Symbol.T

Check if the window and all ancestors of the window are mapped. (This is not necessarily "viewable" in the X sense, since we only check as far as we have GDK window parents, not to the root window.)

window a T
Returns TRUE if the window is viewable


:IsVisible(self @ T) : Std.Symbol.T

Checks whether the window has been mapped (with Show or ShowUnraised).

window a T
Returns TRUE if the window is mapped


:Lower(self @ T) : Std.Object.T

Lowers window to the bottom of the Z-order (stacking order), so that other windows with the same parent window appear above window. This is true whether or not the other windows are visible.

If window is a toplevel, the window manager may choose to deny the request to move the window in the Z-order, Lower only requests the restack, does not guarantee it.

Note that Show raises the window again, so don't call this function before Show. (Try ShowUnraised.)

window a T


:Maximize(self @ T) : Std.Object.T

Maximizes the window. If the window was already maximized, then this function does nothing.

On X11, asks the window manager to maximize window, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don't have a concept of "maximized"; so you can't rely on the maximization actually happening. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.

On Windows, reliably maximizes the window.

window a toplevel T


:MergeChildInputShapes(self @ T) : Std.Object.T

Merges the input shape masks for any child windows into the input shape mask for window. i.e. the union of all input masks for window and its children will become the new input mask for window. See InputShapeCombineMask.

This function is distinct from SetChildInputShapes because it includes window's input shape mask in the set of shapes to be merged.

window a T


:MergeChildShapes(self @ T) : Std.Object.T

Merges the shape masks for any child windows into the shape mask for window. i.e. the union of all masks for window and its children will become the new mask for window. See ShapeCombineMask.

This function is distinct from SetChildShapes because it includes window's shape mask in the set of shapes to be merged.

window a T


:Move(self @ T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT) : Std.Object.T

Repositions a window relative to its parent window. For toplevel windows, window managers may ignore or modify the move; you should probably use gtk_window_move() on a GtkWindow widget anyway, instead of using GDK functions. For child windows, the move will reliably succeed.

If you're also planning to resize the window, use MoveResize to both move and resize simultaneously, for a nicer visual effect.

window a T
x X coordinate relative to window's parent
y Y coordinate relative to window's parent


:MoveRegion(self @ T, region @ Gtk.Gdk.Region.T, dx @ Std.Integer.SmallT, dy @ Std.Integer.SmallT) : Std.Object.T

Move the part of window indicated by region by dy pixels in the Y direction and dx pixels in the X direction. The portions of region that not covered by the new position of region are invalidated.

Child windows are not moved.

window a T
region The Gtk.Gdk.Region.T to move
dx Amount to move in the X direction
dy Amount to move in the Y direction


:MoveResize(self @ T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT) : Std.Object.T

Equivalent to calling Move and Resize, except that both operations are performed at once, avoiding strange visual effects. (i.e. the user may be able to see the window first move, then resize, if you don't use MoveResize.)

window a T
x new X position relative to window's parent
y new Y position relative to window's parent
width new width
height new height


:PeekChildren(self @ T) : Std.Object.T

Like GetChildren, but does not copy the list of children, so the list does not need to be freed.

window a T
Returns a reference to the list of child windows in window. [transfer none][element-type GdkWindow]


:ProcessUpdates(self @ T, update_children @ Std.Symbol.T) : Std.Object.T

Sends one or more expose events to window. The areas in each expose event will cover the entire update area for the window (see InvalidateRegion for details). Normally GDK calls ProcessAllUpdates on your behalf, so there's no need to call this function unless you want to force expose events to be delivered immediately and synchronously (vs. the usual case, where GDK delivers them in an idle handler). Occasionally this is useful to produce nicer scrolling behavior, for example.

window a T
update_children whether to also process updates for child windows


:Raise(self @ T) : Std.Object.T

Raises window to the top of the Z-order (stacking order), so that other windows with the same parent window appear below window. This is true whether or not the windows are visible.

If window is a toplevel, the window manager may choose to deny the request to move the window in the Z-order, Raise only requests the restack, does not guarantee it.

window a T


:RegisterDnd(self @ T) : Std.Object.T

Registers a window as a potential drop destination.

window a T.


:RemoveFilter(self @ T, function @ Std.Function.T, data @ Std.Address.T) : Std.Object.T

Remove a filter previously added with AddFilter.

window a T
function previously-added filter function
data user data for previously-added filter function


:RemoveRedirection(self @ T) : Std.Object.T

Removes any active redirection started by Gtk.Gdk.WindowRedirect.ToDrawable.

window a T


:Reparent(self @ T, new_parent @ Gtk.Gdk.Window.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT) : Std.Object.T

Reparents window into the given new_parent. The window being reparented will be unmapped as a side effect.

window a T
new_parent new parent to move window into
x X location inside the new parent
y Y location inside the new parent


:Resize(self @ T, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT) : Std.Object.T

Resizes window; for toplevel windows, asks the window manager to resize the window. The window manager may not allow the resize. When using GTK+, use gtk_window_resize() instead of this low-level GDK function.

Windows may not be resized below 1x1.

If you're also planning to move the window, use MoveResize to both move and resize simultaneously, for a nicer visual effect.

window a T
width new width of the window
height new height of the window


:Restack(self @ T, sibling @ Gtk.Gdk.Window.T, above @ Std.Symbol.T) : Std.Object.T

Changes the position of window in the Z-order (stacking order), so that it is above sibling (if above is TRUE) or below sibling (if above is FALSE).

If sibling is NULL, then this either raises (if above is TRUE) or lowers the window.

If window is a toplevel, the window manager may choose to deny the request to move the window in the Z-order, Restack only requests the restack, does not guarantee it.

window a T
sibling a T that is a sibling of window, or NULL. [allow-none]
above a boolean


:Scroll(self @ T, dx @ Std.Integer.SmallT, dy @ Std.Integer.SmallT) : Std.Object.T

Scroll the contents of its window, both pixels and children, by the given amount. Portions of the window that the scroll operation brings in from offscreen areas are invalidated.

window a T
dx Amount to scroll in the X direction
dy Amount to scroll in the Y direction


:SetAcceptFocus(self @ T, accept_focus @ Std.Symbol.T) : Std.Object.T

Setting accept_focus to FALSE hints the desktop environment that the window doesn't want to receive input focus.

On X, it is the responsibility of the window manager to interpret this hint. ICCCM-compliant window manager usually respect it.

window a toplevel T
accept_focus TRUE if the window should receive input focus


:SetBackPixmap(self @ T, pixmap @ Gtk.Gdk.Pixmap.T, parent_relative @ Std.Symbol.T) : Std.Object.T

Sets the background pixmap of window. May also be used to set a background of "None" on window, by setting a background pixmap of NULL.

A background pixmap will be tiled, positioning the first tile at the origin of window, or if parent_relative is TRUE, the tiling will be done based on the origin of the parent window (useful to align tiles in a parent with tiles in a child).

A background pixmap of NULL means that the window will have no background. A window with no background will never have its background filled by the windowing system, instead the window will contain whatever pixels were already in the corresponding area of the display.

The windowing system will normally fill a window with its background when the window is obscured then exposed, and when you call Clear.

window a T
pixmap a Gtk.Gdk.Pixmap.T, or NULL. [allow-none]
parent_relative whether the tiling origin is at the origin of window's parent


:SetBackground(self @ T, color @ Gtk.Gdk.Color.T) : Std.Object.T

Sets the background color of window. (However, when using GTK+, set the background of a widget with gtk_widget_modify_bg() - if you're an application - or gtk_style_set_background() - if you're implementing a custom widget.)

The color must be allocated; Gtk.Gdk.Rgb.FindColor is the best way to allocate a color.

See also SetBackPixmap.

window a T
color an allocated Gtk.Gdk.Color.T


:SetChildInputShapes(self @ T) : Std.Object.T

Sets the input shape mask of window to the union of input shape masks for all children of window, ignoring the input shape mask of window itself. Contrast with MergeChildInputShapes which includes the input shape mask of window in the masks to be merged.

window a T


:SetChildShapes(self @ T) : Std.Object.T

Sets the shape mask of window to the union of shape masks for all children of window, ignoring the shape mask of window itself. Contrast with MergeChildShapes which includes the shape mask of window in the masks to be merged.

window a T


:SetComposited(self @ T, composited @ Std.Symbol.T) : Std.Object.T

Sets a T as composited, or unsets it. Composited windows do not automatically have their contents drawn to the screen. Drawing is redirected to an offscreen buffer and an expose event is emitted on the parent of the composited window. It is the responsibility of the parent's expose handler to manually merge the off-screen content onto the screen in whatever way it sees fit. See Example 7, "Composited windows" for an example.

It only makes sense for child windows to be composited; see SetOpacity if you need translucent toplevel windows.

An additional effect of this call is that the area of this window is no longer clipped from regions marked for invalidation on its parent. Draws done on the parent window are also no longer clipped by the child.

This call is only supported on some systems (currently, only X11 with new enough Xcomposite and Xdamage extensions). You must call Gtk.Gdk.Display.SupportsComposite to check if setting a window as composited is supported before attempting to do so.

window a T
composited TRUE to set the window as composited


:SetCursor(self @ T, cursor @ Gtk.Gdk.Cursor.T) : Std.Object.T

Sets the mouse pointer for a T. Use gdk_cursor_new_for_display() or gdk_cursor_new_from_pixmap() to create the cursor. To make the cursor invisible, use Gtk.Gdk.CursorType.BlankCursor. Passing NULL for the cursor argument to SetCursor means that window will use the cursor of its parent window. Most windows should use this default.

window a T
cursor a cursor. [allow-none]


:SetDecorations(self @ T, decorations @ Std.Integer.SmallT) : Std.Object.T

"Decorations" are the features the window manager adds to a toplevel T. This function sets the traditional Motif window manager hints that tell the window manager which decorations you would like your window to have. Usually you should use gtk_window_set_decorated() on a GtkWindow instead of using the GDK function directly.

The decorations argument is the logical OR of the fields in the Gtk.Gdk.WMDecoration.T enumeration. If Gtk.Gdk.WMDecoration.All is included in the mask, the other bits indicate which decorations should be turned off. If Gtk.Gdk.WMDecoration.All is not included, then the other bits indicate which decorations should be turned on.

Most window managers honor a decorations hint of 0 to disable all decorations, but very few honor all possible combinations of bits.

window a toplevel T
decorations decoration hint mask


:SetEvents(self @ T, event_mask @ Std.Integer.SmallT) : Std.Object.T

The event mask for a window determines which events will be reported for that window. For example, an event mask including Gtk.Gdk.EventMask.ButtonPressMask means the window should report button press events. The event mask is the bitwise OR of values from the Gtk.Gdk.EventMask.T enumeration.

window a T
event_mask event mask for window


:SetFocusOnMap(self @ T, focus_on_map @ Std.Symbol.T) : Std.Object.T

Setting focus_on_map to FALSE hints the desktop environment that the window doesn't want to receive input focus when it is mapped. focus_on_map should be turned off for windows that aren't triggered interactively (such as popups from network activity).

On X, it is the responsibility of the window manager to interpret this hint. Window managers following the freedesktop.org window manager extension specification should respect it.

window a toplevel T
focus_on_map TRUE if the window should receive input focus when mapped


:SetFunctions(self @ T, functions @ Std.Integer.SmallT) : Std.Object.T

Sets hints about the window management functions to make available via buttons on the window frame.

On the X backend, this function sets the traditional Motif window manager hint for this purpose. However, few window managers do anything reliable or interesting with this hint. Many ignore it entirely.

The functions argument is the logical OR of values from the Gtk.Gdk.WMFunction.T enumeration. If the bitmask includes Gtk.Gdk.WMFunction.All, then the other bits indicate which functions to disable; if it doesn't include Gtk.Gdk.WMFunction.All, it indicates which functions to enable.

window a toplevel T
functions bitmask of operations to allow on window


:SetGeometryHints(self @ T, geometry @ Gtk.Gdk.Geometry.T, geom_mask @ Std.Integer.SmallT) : Std.Object.T

Sets the geometry hints for window. Hints flagged in geom_mask are set, hints not flagged in geom_mask are unset. To unset all hints, use a geom_mask of 0 and a geometry of NULL.

This function provides hints to the windowing system about acceptable sizes for a toplevel window. The purpose of this is to constrain user resizing, but the windowing system will typically (but is not required to) also constrain the current size of the window to the provided values and constrain programatic resizing via Resize or MoveResize.

Note that on X11, this effect has no effect on windows of type Gtk.Gdk.WindowType.Temp or windows where override redirect has been turned on via SetOverrideRedirect since these windows are not resizable by the user.

Since you can't count on the windowing system doing the constraints for programmatic resizes, you should generally call ConstrainSize yourself to determine appropriate sizes.

window a toplevel T
geometry geometry hints
geom_mask bitmask indicating fields of geometry to pay attention to


:SetGroup(self @ T, leader @ Gtk.Gdk.Window.T) : Std.Object.T

Sets the group leader window for window. By default, GDK sets the group leader for all toplevel windows to a global window implicitly created by GDK. With this function you can override this default.

The group leader window allows the window manager to distinguish all windows that belong to a single application. It may for example allow users to minimize/unminimize all windows belonging to an application at once. You should only set a non-default group window if your application pretends to be multiple applications.

window a toplevel T
leader group leader window, or NULL to restore the default group leader window


:SetHints(self @ T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, min_width @ Std.Integer.SmallT, min_height @ Std.Integer.SmallT, max_width @ Std.Integer.SmallT, max_height @ Std.Integer.SmallT, flags @ Std.Integer.SmallT) : Std.Object.T

Warning

SetHints is deprecated and should not be used in newly-written code.



:SetIcon(self @ T, icon_window @ Gtk.Gdk.Window.T, pixmap @ Gtk.Gdk.Pixmap.T, mask @ Gtk.Gdk.Bitmap.T) : Std.Object.T

Sets the icon of window as a pixmap or window. If using GTK+, investigate gtk_window_set_default_icon_list() first, and then gtk_window_set_icon_list() and gtk_window_set_icon(). If those don't meet your needs, look at SetIconList. Only if all those are too high-level do you want to fall back to SetIcon.

window a toplevel T
icon_window a T to use for the icon, or NULL to unset
pixmap a Gtk.Gdk.Pixmap.T to use as the icon, or NULL to unset
mask a 1-bit pixmap (Gtk.Gdk.Bitmap.T) to use as mask for pixmap, or NULL to have none


:SetIconList(self @ T, pixbufs @ Std.Object.T) : Std.Object.T

Sets a list of icons for the window. One of these will be used to represent the window when it has been iconified. The icon is usually shown in an icon box or some sort of task bar. Which icon size is shown depends on the window manager. The window manager can scale the icon but setting several size icons can give better image quality since the window manager may only need to scale the icon by a small amount or not at all.

window The T toplevel window to set the icon of.
pixbufs A list of pixbufs, of different sizes. [transfer none][element-type GdkPixbuf]


:SetIconName(self @ T, name @ Std.String.T) : Std.Object.T

Windows may have a name used while minimized, distinct from the name they display in their titlebar. Most of the time this is a bad idea from a user interface standpoint. But you can set such a name with this function, if you like.

After calling this with a non-NULL name, calls to SetTitle will not update the icon title.

Using NULL for name unsets the icon title; further calls to SetTitle will again update the icon title as well.

window a toplevel T
name name of window while iconified (minimized)


:SetKeepAbove(self @ T, setting @ Std.Symbol.T) : Std.Object.T

Set if window must be kept above other windows. If the window was already above, then this function does nothing.

On X11, asks the window manager to keep window above, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don't have a concept of "keep above"; so you can't rely on the window being kept above. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.

window a toplevel T
setting whether to keep window above other windows


:SetKeepBelow(self @ T, setting @ Std.Symbol.T) : Std.Object.T

Set if window must be kept below other windows. If the window was already below, then this function does nothing.

On X11, asks the window manager to keep window below, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don't have a concept of "keep below"; so you can't rely on the window being kept below. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.

window a toplevel T
setting whether to keep window below other windows


:SetModalHint(self @ T, modal @ Std.Symbol.T) : Std.Object.T

The application can use this hint to tell the window manager that a certain window has modal behaviour. The window manager can use this information to handle modal windows in a special way.

You should only use this on windows for which you have previously called SetTransientFor

window A toplevel T
modal TRUE if the window is modal, FALSE otherwise.


:SetOpacity(self @ T, opacity @ Std.Real.T) : Std.Object.T

Request the windowing system to make window partially transparent, with opacity 0 being fully transparent and 1 fully opaque. (Values of the opacity parameter are clamped to the [0,1] range.)

On X11, this works only on X screens with a compositing manager running.

For setting up per-pixel alpha, see Gtk.Gdk.Screen.GetRgbaColormap. For making non-toplevel windows translucent, see SetComposited.

window a top-level T
opacity opacity


:SetOverrideRedirect(self @ T, override_redirect @ Std.Symbol.T) : Std.Object.T

An override redirect window is not under the control of the window manager. This means it won't have a titlebar, won't be minimizable, etc. - it will be entirely under the control of the application. The window manager can't see the override redirect window at all.

Override redirect should only be used for short-lived temporary windows, such as popup menus. GtkMenu uses an override redirect window in its implementation, for example.

window a toplevel T
override_redirect TRUE if window should be override redirect


:SetRole(self @ T, role @ Std.String.T) : Std.Object.T

When using GTK+, typically you should use gtk_window_set_role() instead of this low-level function.

The window manager and session manager use a window's role to distinguish it from other kinds of window in the same application. When an application is restarted after being saved in a previous session, all windows with the same title and role are treated as interchangeable. So if you have two windows with the same title that should be distinguished for session management purposes, you should set the role on those windows. It doesn't matter what string you use for the role, as long as you have a different role for each non-interchangeable kind of window.

window a toplevel T
role a string indicating its role


:SetSkipPagerHint(self @ T, skips_pager @ Std.Symbol.T) : Std.Object.T

Toggles whether a window should appear in a pager (workspace switcher, or other desktop utility program that displays a small thumbnail representation of the windows on the desktop). If a window's semantic type as specified with SetTypeHint already fully describes the window, this function should not be called in addition, instead you should allow the window to be treated according to standard policy for its semantic type.

window a toplevel T
skips_pager TRUE to skip the pager


:SetSkipTaskbarHint(self @ T, skips_taskbar @ Std.Symbol.T) : Std.Object.T

Toggles whether a window should appear in a task list or window list. If a window's semantic type as specified with SetTypeHint already fully describes the window, this function should not be called in addition, instead you should allow the window to be treated according to standard policy for its semantic type.

window a toplevel T
skips_taskbar TRUE to skip the taskbar


:SetStartupId(self @ T, startup_id @ Std.String.T) : Std.Object.T

When using GTK+, typically you should use gtk_window_set_startup_id() instead of this low-level function.

window a toplevel T
startup_id a string with startup-notification identifier


:SetStaticGravities(self @ T, use_static @ Std.Symbol.T) : Std.Symbol.T

Set the bit gravity of the given window to static, and flag it so all children get static subwindow gravity. This is used if you are implementing scary features that involve deep knowledge of the windowing system. Don't worry about it unless you have to.

window a T
use_static TRUE to turn on static gravity
Returns TRUE if the server supports static gravity


:SetTitle(self @ T, title @ Std.String.T) : Std.Object.T

Sets the title of a toplevel window, to be displayed in the titlebar. If you haven't explicitly set the icon name for the window (using SetIconName), the icon name will be set to title as well. title must be in UTF-8 encoding (as with all user-readable strings in GDK/GTK+). title may not be NULL.

window a toplevel T
title title of window


:SetTransientFor(self @ T, parent @ Gtk.Gdk.Window.T) : Std.Object.T

Indicates to the window manager that window is a transient dialog associated with the application window parent. This allows the window manager to do things like center window on parent and keep window above parent.

See gtk_window_set_transient_for() if you're using GtkWindow or GtkDialog.

window a toplevel T
parent another toplevel T


:SetTypeHint(self @ T, hint @ Gtk.Gdk.WindowTypeHint.T) : Std.Object.T

The application can use this call to provide a hint to the window manager about the functionality of a window. The window manager can use this information when determining the decoration and behaviour of the window.

The hint must be set before the window is mapped.

window A toplevel T
hint A hint of the function this window will have


:SetUrgencyHint(self @ T, urgent @ Std.Symbol.T) : Std.Object.T

Toggles whether a window needs the user's urgent attention.

window a toplevel T
urgent TRUE if the window is urgent


:SetUserData(self @ T, user_data) : Std.Object.T

For most purposes this function is deprecated in favor of g_object_set_data(). However, for historical reasons GTK+ stores the GtkWidget that owns a T as user data on the T. So, custom widget implementations should use this function for that. If GTK+ receives an event for a T, and the user data for the window is non-NULL, GTK+ will assume the user data is a GtkWidget, and forward the event to that widget.

window a T
user_data user data


:ShapeCombineMask(self @ T, mask @ Gtk.Gdk.Bitmap.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT) : Std.Object.T

Applies a shape mask to window. Pixels in window corresponding to set bits in the mask will be visible; pixels in window corresponding to unset bits in the mask will be transparent. This gives a non-rectangular window.

If mask is NULL, the shape mask will be unset, and the x/y parameters are not used.

On the X11 platform, this uses an X server extension which is widely available on most common platforms, but not available on very old X servers, and occasionally the implementation will be buggy. On servers without the shape extension, this function will do nothing.

This function works on both toplevel and child windows.

window a T
mask shape mask
x X position of shape mask with respect to window
y Y position of shape mask with respect to window


:ShapeCombineRegion(self @ T, shape_region @ Gtk.Gdk.Region.T, offset_x @ Std.Integer.SmallT, offset_y @ Std.Integer.SmallT) : Std.Object.T

Makes pixels in window outside shape_region be transparent, so that the window may be nonrectangular. See also ShapeCombineMask to use a bitmap as the mask.

If shape_region is NULL, the shape will be unset, so the whole window will be opaque again. offset_x and offset_y are ignored if shape_region is NULL.

On the X11 platform, this uses an X server extension which is widely available on most common platforms, but not available on very old X servers, and occasionally the implementation will be buggy. On servers without the shape extension, this function will do nothing.

This function works on both toplevel and child windows.

window a T
shape_region region of window to be non-transparent
offset_x X position of shape_region in window coordinates
offset_y Y position of shape_region in window coordinates


:Show(self @ T) : Std.Object.T

Like ShowUnraised, but also raises the window to the top of the window stack (moves the window to the front of the Z-order).

This function maps a window so it's visible onscreen. Its opposite is Hide.

When implementing a GtkWidget, you should call this function on the widget's T as part of the "map" method.

window a T


:ShowUnraised(self @ T) : Std.Object.T

Shows a T onscreen, but does not modify its stacking order. In contrast, Show will raise the window to the top of the window stack.

On the X11 platform, in Xlib terms, this function calls XMapWindow() (it also updates some internal GDK state, which means that you can't really use XMapWindow() directly on a GDK window).

window a T


:Stick(self @ T) : Std.Object.T

"Pins" a window such that it's on all workspaces and does not scroll with viewports, for window managers that have scrollable viewports. (When using GtkWindow, gtk_window_stick() may be more useful.)

On the X11 platform, this function depends on window manager support, so may have no effect with many window managers. However, GDK will do the best it can to convince the window manager to stick the window. For window managers that don't support this operation, there's nothing you can do to force it to happen.

window a toplevel T


:ThawToplevelUpdatesLibgtkOnly(self @ T) : Std.Object.T



:ThawUpdates(self @ T) : Std.Object.T

Thaws a window frozen with FreezeUpdates.

window a T


:Unfullscreen(self @ T) : Std.Object.T

Moves the window out of fullscreen mode. If the window was not fullscreen, does nothing.

On X11, asks the window manager to move window out of the fullscreen state, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don't have a concept of "fullscreen"; so you can't rely on the unfullscreenification actually happening. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.

window a toplevel T


:Unmaximize(self @ T) : Std.Object.T

Unmaximizes the window. If the window wasn't maximized, then this function does nothing.

On X11, asks the window manager to unmaximize window, if the window manager supports this operation. Not all window managers support this, and some deliberately ignore it or don't have a concept of "maximized"; so you can't rely on the unmaximization actually happening. But it will happen with most standard window managers, and GDK makes a best effort to get it to happen.

On Windows, reliably unmaximizes the window.

window a toplevel T


:Unstick(self @ T) : Std.Object.T

Reverse operation for Stick; see Stick, and gtk_window_unstick().

window a toplevel T


:Withdraw(self @ T) : Std.Object.T

Withdraws a window (unmaps it and asks the window manager to forget about it). This function is not really useful as Hide automatically withdraws toplevel windows before hiding them.

window a toplevel T