Gjsify LogoGjsify Logo

Hierarchy

Index

Constructors

Properties

Methods

Constructors

  • Creates a new #GdkWindow using the attributes from attributes. See #GdkWindowAttr and #GdkWindowAttributesType for more details. Note: to use this on displays other than the default display, parent must be specified.

    Parameters

    • attributes: Gdk.WindowAttr

      attributes of the new window

    • attributesMask: number

      mask indicating which fields in attributes are valid

    Returns Gdk.Window

Properties

cursor: Gdk.Cursor

The mouse pointer for a #GdkWindow. See gdk_window_set_cursor() and gdk_window_get_cursor() for details.

gTypeInstance: TypeInstance
parentInstance: GObject.Object
$gtype: GType<Gdk.Window>
name: string

Methods

  • beep(): void
  • Emits a short beep associated to window in the appropriate display, if supported. Otherwise, emits a short beep on the display just as gdk_display_beep().

    Returns void

  • beginMoveDrag(button: number, rootX: number, rootY: number, timestamp: number): void
  • 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.

    Parameters

    • button: number

      the button being used to drag

    • rootX: number

      root window X coordinate of mouse click that began the drag

    • rootY: number

      root window Y coordinate of mouse click that began the drag

    • timestamp: number

      timestamp of mouse click that began the drag

    Returns void

  • A convenience wrapper around gdk_window_begin_paint_region() which creates a rectangular region for you. See gdk_window_begin_paint_region() for details.

    Parameters

    Returns void

  • 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 gdk_window_end_paint(), 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 gdk_window_end_paint(). If you draw to window directly without calling gdk_window_begin_paint_region(), the user may see flicker as individual drawing operations are performed in sequence. The clipping and background-initializing features of gdk_window_begin_paint_region() are conveniences for the programmer, so you can avoid doing that work yourself.

    When using GTK+, the widget system automatically places calls to gdk_window_begin_paint_region() and gdk_window_end_paint() 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 #GdkEventExpose 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 gdk_window_begin_paint_region(). (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 gdk_window_end_paint(), the backing stores are pushed onto a stack. gdk_window_end_paint() 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 gdk_window_end_paint() is required for each call to gdk_window_begin_paint_region().

    Parameters

    • region: Gdk.Region

      region you intend to draw to

    Returns void

  • beginResizeDrag(edge: Gdk.WindowEdge, button: number, rootX: number, rootY: number, timestamp: number): void
  • 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.

    Parameters

    • edge: Gdk.WindowEdge

      the edge or corner from which the drag is started

    • button: number

      the button being used to drag

    • rootX: number

      root window X coordinate of mouse click that began the drag

    • rootY: number

      root window Y coordinate of mouse click that began the drag

    • timestamp: number

      timestamp of mouse click that began the drag (use gdk_event_get_time())

    Returns void

  • Creates a binding between source_property on source and target_property on target.

    Whenever the source_property is changed the target_property is updated using the same value. For instance:

      g_object_bind_property (action, "active", widget, "sensitive", 0);
    

    Will result in the "sensitive" property of the widget #GObject instance to be updated with the same value of the "active" property of the action #GObject instance.

    If flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: if target_property on target changes then the source_property on source will be updated as well.

    The binding will automatically be removed when either the source or the target instances are finalized. To remove the binding without affecting the source and the target you can just call g_object_unref() on the returned #GBinding instance.

    Removing the binding by calling g_object_unref() on it must only be done if the binding, source and target are only used from a single thread and it is clear that both source and target outlive the binding. Especially it is not safe to rely on this if the binding, source or target can be finalized from different threads. Keep another reference to the binding and use g_binding_unbind() instead to be on the safe side.

    A #GObject can have multiple bindings.

    Parameters

    • sourceProperty: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • targetProperty: string

      the property on target to bind

    • flags: BindingFlags

      flags to pass to #GBinding

    Returns Binding

  • Creates a binding between source_property on source and target_property on target, allowing you to set the transformation functions to be used by the binding.

    This function is the language bindings friendly version of g_object_bind_property_full(), using #GClosures instead of function pointers.

    Parameters

    • sourceProperty: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • targetProperty: string

      the property on target to bind

    • flags: BindingFlags

      flags to pass to #GBinding

    • transformTo: TClosure<any, any>

      a #GClosure wrapping the transformation function from the source to the target, or %NULL to use the default

    • transformFrom: TClosure<any, any>

      a #GClosure wrapping the transformation function from the target to the source, or %NULL to use the default

    Returns Binding

  • clear(): void
  • Clears an entire window to the background color or background pixmap.

    Returns void

  • clearArea(x: number, y: number, width: number, height: number): void
  • Clears an area of window to the background color or background pixmap.

    Parameters

    • x: number

      x coordinate of rectangle to clear

    • y: number

      y coordinate of rectangle to clear

    • width: number

      width of rectangle to clear

    • height: number

      height of rectangle to clear

    Returns void

  • clearAreaE(x: number, y: number, width: number, height: number): void
  • Like gdk_window_clear_area(), 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.

    Parameters

    • x: number

      x coordinate of rectangle to clear

    • y: number

      y coordinate of rectangle to clear

    • width: number

      width of rectangle to clear

    • height: number

      height of rectangle to clear

    Returns void

  • configureFinished(): void
  • 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 gdk_window_enable_synchronized_configure() was called previously.

    Returns void

  • coordsFromParent(parentX: number, parentY: number): [number, number]
  • Transforms window coordinates from a parent window to a child window, where the parent window is the normal parent as returned by gdk_window_get_parent() for normal windows, and the window's embedder as returned by gdk_offscreen_window_get_embedder() for offscreen windows.

    For normal windows, calling this function is equivalent to subtracting the return values of gdk_window_get_position() 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: gdk_window_coords_to_parent()

    Parameters

    • parentX: number

      X coordinate in parent's coordinate system

    • parentY: number

      Y coordinate in parent's coordinate system

    Returns [number, number]

  • coordsToParent(x: number, y: number): [number, number]
  • Transforms window coordinates from a child window to its parent window, where the parent window is the normal parent as returned by gdk_window_get_parent() for normal windows, and the window's embedder as returned by gdk_offscreen_window_get_embedder() for offscreen windows.

    For normal windows, calling this function is equivalent to adding the return values of gdk_window_get_position() 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: gdk_window_coords_from_parent()

    Parameters

    • x: number

      X coordinate in child's coordinate system

    • y: number

      Y coordinate in child's coordinate system

    Returns [number, number]

  • 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.)

    Parameters

    • content: cairo.Content

      the content for the new surface

    • width: number

      width of the new surface

    • height: number

      height of the new surface

    Returns cairo.Surface

  • deiconify(): void
  • 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 #GdkWindow 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.

    Returns void

  • destroy(): void
  • 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.

    Returns void

  • destroyNotify(): void
  • emit(sigName: "from-embedder", embedderY: number, ...args: any[]): void
  • emit(sigName: "pick-embedded-child", y: number, ...args: any[]): void
  • emit(sigName: "to-embedder", offscreenY: number, ...args: any[]): void
  • emit(sigName: "notify::cursor", ...args: any[]): void
  • emit(sigName: string, ...args: any[]): void
  • Parameters

    • sigName: "from-embedder"
    • embedderY: number
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "pick-embedded-child"
    • y: number
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "to-embedder"
    • offscreenY: number
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: "notify::cursor"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • sigName: string
    • Rest ...args: any[]

    Returns void

  • enableSynchronizedConfigure(): void
  • 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 gdk_window_configure_finished() 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.

    Returns void

  • endPaint(): void
  • Indicates that the backing store created by the most recent call to gdk_window_begin_paint_region() 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 gdk_window_begin_paint_region() for full details. It is an error to call this function without a matching gdk_window_begin_paint_region() first.

    Returns void

  • ensureNative(): boolean
  • 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.

    Returns boolean

  • flush(): void
  • 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.

    Returns void

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

    Parameters

    • timestamp: number

      timestamp of the event triggering the window focus

    Returns void

  • forceFloating(): void
  • This function is intended for #GObject implementations to re-enforce a [floating][floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling g_object_ref_sink().

    Returns void

  • freezeNotify(): void
  • Increases the freeze count on object. If the freeze count is non-zero, the emission of "notify" signals on object is stopped. The signals are queued until the freeze count is decreased to zero. Duplicate notifications are squashed so that at most one #GObject::notify signal is emitted for each property modified while the object is frozen.

    This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.

    Returns void

  • freezeToplevelUpdatesLibgtkOnly(): void
  • Temporarily freezes a window and all its descendants such that it won't receive expose events. The window will begin receiving expose events again when gdk_window_thaw_toplevel_updates_libgtk_only() is called. If gdk_window_freeze_toplevel_updates_libgtk_only() has been called more than once, gdk_window_thaw_toplevel_updates_libgtk_only() must be called an equal number of times to begin processing exposes.

    This function is not part of the GDK public API and is only for use by GTK+.

    Returns void

  • freezeUpdates(): void
  • Temporarily freezes a window such that it won't receive expose events. The window will begin receiving expose events again when gdk_window_thaw_updates() is called. If gdk_window_freeze_updates() has been called more than once, gdk_window_thaw_updates() must be called an equal number of times to begin processing exposes.

    Returns void

  • fullscreen(): void
  • 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.

    Returns void

  • geometryChanged(): void
  • 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.

    Returns void

  • getAcceptFocus(): boolean
  • Determines whether or not the desktop environment shuld be hinted that the window does not want to receive input focus.

    Returns boolean

  • 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.

    Returns cairo.Pattern

  • 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.

    Returns Gdk.Window[]

  • getComposited(): boolean
  • Determines whether window is composited.

    See gdk_window_set_composited().

    Returns boolean

  • Retrieves a #GdkCursor pointer for the cursor currently set on the specified #GdkWindow, 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.

    Returns Gdk.Cursor

  • getData(key?: string): object
  • getData(key?: string): object
  • getData(...args: any[]): any
  • getData(args_or_key?: string | any[]): any
  • Equivalent to g_object_get_data(); the #GObject variant should be used instead.

    Parameters

    • Optional key: string

      name the data was stored under

    Returns object

  • Gets a named field from the objects table of associations (see g_object_set_data()).

    Parameters

    • Optional key: string

      name of the key for that association

    Returns object

  • Parameters

    • Rest ...args: any[]

    Returns any

  • Parameters

    • Optional args_or_key: string | any[]

    Returns any

  • Returns the decorations set on the GdkWindow with #gdk_window_set_decorations

    Parameters

    Returns boolean

  • getDepth(): number
  • Obtains the bit depth of the drawable, that is, the number of bits that make up a pixel in the drawable's visual. Examples are 8 bits per pixel, 24 bits per pixel, etc.

    Returns number

  • getDeskrelativeOrigin(x: number, y: number): boolean
  • This gets the origin of a #GdkWindow relative to an Enlightenment-window-manager desktop. As long as you don't assume that the user's desktop/workspace covers the entire root window (i.e. you don't assume that the desktop begins at root window coordinate 0,0) this function is not necessary. It's deprecated for that reason.

    Parameters

    • x: number

      return location for X coordinate

    • y: number

      return location for Y coordinate

    Returns boolean

  • getFocusOnMap(): boolean
  • Determines whether or not the desktop environment should be hinted that the window does not want to receive input focus when it is mapped.

    Returns boolean

  • 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 gdk_window_get_origin().

    Parameters

    • rect: Gdk.Rectangle

      rectangle to fill with bounding box of the window frame

    Returns void

  • getGeometry(x: number, y: number, width: number, height: number, depth: number): void
  • 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 #GdkEventConfigure. gdk_window_get_position() in contrast gets the position from the most recent configure event.

    If `window` is not a toplevel, it is much better to call gdk_window_get_position() and gdk_drawable_get_size() instead, because it avoids the roundtrip to the X server and because gdk_drawable_get_size() supports the full 32-bit coordinate space, whereas gdk_window_get_geometry() is restricted to the 16-bit coordinates of X11.

    Parameters

    • x: number

      return location for X coordinate of window (relative to its parent)

    • y: number

      return location for Y coordinate of window (relative to its parent)

    • width: number

      return location for width of window

    • height: number

      return location for height of window

    • depth: number

      return location for bit depth of window

    Returns void

  • getHeight(): number
  • 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.

    Returns number

  • If you bypass the GDK layer and use windowing system primitives to draw directly onto a #GdkWindow, 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 gdk_window_begin_paint_region() 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.

    Returns [Gdk.Drawable, number, number]

  • getModalHint(): boolean
  • Determines whether or not the window manager is hinted that window has modal behaviour.

    Returns boolean

  • getOrigin(x: number, y: number): number
  • Obtains the position of a window in root window coordinates. (Compare with gdk_window_get_position() and gdk_window_get_geometry() which return the position of a window relative to its parent window.)

    Parameters

    • x: number

      return location for X coordinate

    • y: number

      return location for Y coordinate

    Returns number

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

    Returns [Gdk.Window, number, number, Gdk.ModifierType]

  • getPosition(): [number, number]
  • Obtains the position of the window as reported in the most-recently-processed #GdkEventConfigure. Contrast with gdk_window_get_geometry() 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.

    Returns [number, number]

  • getProperty(propertyName?: string, value?: any): void
  • Gets a property of an object.

    The value can be:

    • an empty #GValue initialized by %G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
    • a #GValue initialized with the expected type of the property
    • a #GValue initialized with a type to which the expected type of the property can be transformed

    In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling g_value_unset().

    Note that g_object_get_property() is really intended for language bindings, g_object_get() is much more convenient for C programming.

    Parameters

    • Optional propertyName: string

      the name of the property to get

    • Optional value: any

      return location for the property value

    Returns void

  • getQdata(quark: number): object
  • This function gets back user data pointers stored via g_object_set_qdata().

    Parameters

    • quark: number

      A #GQuark, naming the user data pointer

    Returns object

  • getRootCoords(x: number, y: number): [number, number]
  • Obtains the position of a window position in root window coordinates. This is similar to gdk_window_get_origin() but allows you go pass in any position in the window, not just the origin.

    Parameters

    • x: number

      X coordinate in window

    • y: number

      Y coordinate in window

    Returns [number, number]

  • getRootOrigin(x: number, y: number): void
  • Obtains the top-left corner of the window manager frame in root window coordinates.

    Parameters

    • x: number

      return location for X position of window frame

    • y: number

      return location for Y position of window frame

    Returns void

  • getSize(): [number, number]
  • Fills *width and *height with the size of drawable. width or height can be %NULL if you only want the other one.

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

    Returns [number, number]

  • getUserData(): object
  • Retrieves the user data for window, which is normally the widget that window belongs to. See gdk_window_set_user_data().

    Returns object

  • getWidth(): number
  • 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.

    Returns number

  • getv(names: string[], values: any[]): void
  • Gets n_properties properties for an object. Obtained properties will be set to values. All properties must be valid. Warnings will be emitted and undefined behaviour may result if invalid properties are passed in.

    Parameters

    • names: string[]

      the names of each property to get

    • values: any[]

      the values of each property to get

    Returns void

  • hasNative(): boolean
  • Checks whether the window has a native window or not. Note that you can use gdk_window_ensure_native() if a native window is needed.

    Returns boolean

  • hide(): void
  • 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().

    Returns void

  • iconify(): void
  • 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.

    Returns void

  • inputShapeCombineMask(mask: Gdk.Bitmap, x: number, y: number): void
  • Like gdk_window_shape_combine_mask(), 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.

    Parameters

    • mask: Gdk.Bitmap

      shape mask, or %NULL

    • x: number

      X position of shape mask with respect to window

    • y: number

      Y position of shape mask with respect to window

    Returns void

  • inputShapeCombineRegion(shapeRegion: Gdk.Region, offsetX: number, offsetY: number): void
  • Like gdk_window_shape_combine_region(), 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.

    Parameters

    • shapeRegion: Gdk.Region

      region of window to be non-transparent

    • offsetX: number

      X position of shape_region in window coordinates

    • offsetY: number

      Y position of shape_region in window coordinates

    Returns void

  • invalidateMaybeRecurse(region: Gdk.Region, childFunc: object, userData: object): void
  • Adds region to the update area for window. The update area is the region that needs to be redrawn, or "dirty region." The call gdk_window_process_updates() 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 gdk_window_process_all_updates() 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 child_func parameter controls whether the region of each child window that intersects region will also be invalidated. Only children for which child_func returns TRUE will have the area invalidated.

    Parameters

    • region: Gdk.Region

      a #GdkRegion

    • childFunc: object

      function to use to decide if to recurse to a child, %NULL means never recurse.

    • userData: object

      data passed to child_func

    Returns void

  • invalidateRect(rect: Gdk.Rectangle, invalidateChildren: boolean): void
  • A convenience wrapper around gdk_window_invalidate_region() which invalidates a rectangular region. See gdk_window_invalidate_region() for details.

    Parameters

    • rect: Gdk.Rectangle

      rectangle to invalidate or %NULL to invalidate the whole window

    • invalidateChildren: boolean

      whether to also invalidate child windows

    Returns void

  • invalidateRegion(region: Gdk.Region, invalidateChildren: boolean): void
  • Adds region to the update area for window. The update area is the region that needs to be redrawn, or "dirty region." The call gdk_window_process_updates() 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 gdk_window_process_all_updates() 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.

    Parameters

    • region: Gdk.Region

      a #GdkRegion

    • invalidateChildren: boolean

      %TRUE to also invalidate child windows

    Returns void

  • isDestroyed(): boolean
  • isFloating(): boolean
  • isInputOnly(): boolean
  • Determines whether or not the window is an input only window.

    Returns boolean

  • isShaped(): boolean
  • Determines whether or not the window is shaped.

    Returns boolean

  • isViewable(): boolean
  • 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.)

    Returns boolean

  • isVisible(): boolean
  • Checks whether the window has been mapped (with gdk_window_show() or gdk_window_show_unraised()).

    Returns boolean

  • lower(): void
  • 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, gdk_window_lower() only requests the restack, does not guarantee it.

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

    Returns void

  • maximize(): void
  • 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.

    Returns void

  • mergeChildInputShapes(): void
  • 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 gdk_window_input_shape_combine_mask().

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

    Returns void

  • mergeChildShapes(): void
  • 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 gdk_window_shape_combine_mask().

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

    Returns void

  • move(x: number, y: number): void
  • 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 gdk_window_move_resize() to both move and resize simultaneously, for a nicer visual effect.

    Parameters

    • x: number

      X coordinate relative to window's parent

    • y: number

      Y coordinate relative to window's parent

    Returns void

  • moveRegion(region: Gdk.Region, dx: number, dy: number): void
  • 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.

    Parameters

    • region: Gdk.Region

      The #GdkRegion to move

    • dx: number

      Amount to move in the X direction

    • dy: number

      Amount to move in the Y direction

    Returns void

  • moveResize(x: number, y: number, width: number, height: number): void
  • Equivalent to calling gdk_window_move() and gdk_window_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 gdk_window_move_resize().)

    Parameters

    • x: number

      new X position relative to window's parent

    • y: number

      new Y position relative to window's parent

    • width: number

      new width

    • height: number

      new height

    Returns void

  • notify(propertyName: string): void
  • Emits a "notify" signal for the property property_name on object.

    When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.

    Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.

    Parameters

    • propertyName: string

      the name of a property installed on the class of object.

    Returns void

  • Emits a "notify" signal for the property specified by pspec on object.

    This function omits the property name lookup, hence it is faster than g_object_notify().

    One way to avoid using g_object_notify() from within the class that registered the properties, and using g_object_notify_by_pspec() instead, is to store the GParamSpec used with g_object_class_install_property() inside a static array, e.g.:

      enum
    {
    PROP_0,
    PROP_FOO,
    PROP_LAST
    };

    static GParamSpec *properties[PROP_LAST];

    static void
    my_object_class_init (MyObjectClass *klass)
    {
    properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
    0, 100,
    50,
    G_PARAM_READWRITE);
    g_object_class_install_property (gobject_class,
    PROP_FOO,
    properties[PROP_FOO]);
    }

    and then notify a change on the "foo" property with:

      g_object_notify_by_pspec (self, properties[PROP_FOO]);
    

    Parameters

    • pspec: ParamSpec

      the #GParamSpec of a property installed on the class of object.

    Returns void

  • Like gdk_window_get_children(), but does not copy the list of children, so the list does not need to be freed.

    Returns Gdk.Window[]

  • processUpdates(updateChildren: boolean): void
  • Sends one or more expose events to window. The areas in each expose event will cover the entire update area for the window (see gdk_window_invalidate_region() for details). Normally GDK calls gdk_window_process_all_updates() 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.

    Parameters

    • updateChildren: boolean

      whether to also process updates for child windows

    Returns void

  • raise(): void
  • 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, gdk_window_raise() only requests the restack, does not guarantee it.

    Returns void

  • redirectToDrawable(drawable: Gdk.Drawable, srcX: number, srcY: number, destX: number, destY: number, width: number, height: number): void
  • Redirects drawing into window so that drawing to the window in the rectangle specified by src_x, src_y, width and height is also drawn into drawable at dest_x, dest_y.

    Only drawing between gdk_window_begin_paint_region() or gdk_window_begin_paint_rect() and gdk_window_end_paint() is redirected.

    Redirection is active until gdk_window_remove_redirection() is called.

    Parameters

    • drawable: Gdk.Drawable

      a #GdkDrawable

    • srcX: number

      x position in window

    • srcY: number

      y position in window

    • destX: number

      x position in drawable

    • destY: number

      y position in drawable

    • width: number

      width of redirection, or -1 to use the width of window

    • height: number

      height of redirection or -1 to use the height of window

    Returns void

  • Increases the reference count of object.

    Since GLib 2.56, if GLIB_VERSION_MAX_ALLOWED is 2.56 or greater, the type of object will be propagated to the return type (using the GCC typeof() extension), so any casting the caller needs to do on the return type must be explicit.

    Returns GObject.Object

  • Increase the reference count of object, and possibly remove the [floating][floating-ref] reference, if object has a floating reference.

    In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one.

    Since GLib 2.56, the type of object will be propagated to the return type under the same conditions as for g_object_ref().

    Returns GObject.Object

  • registerDnd(): void
  • removeRedirection(): void
  • Removes any active redirection started by gdk_window_redirect_to_drawable().

    Returns void

  • reparent(newParent: Gdk.Window, x: number, y: number): void
  • Reparents window into the given new_parent. The window being reparented will be unmapped as a side effect.

    Parameters

    • newParent: Gdk.Window

      new parent to move window into

    • x: number

      X location inside the new parent

    • y: number

      Y location inside the new parent

    Returns void

  • resize(width: number, height: number): void
  • 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 gdk_window_move_resize() to both move and resize simultaneously, for a nicer visual effect.

    Parameters

    • width: number

      new width of the window

    • height: number

      new height of the window

    Returns void

  • restack(sibling: Gdk.Window, above: boolean): void
  • 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, gdk_window_restack() only requests the restack, does not guarantee it.

    Parameters

    • sibling: Gdk.Window

      a #GdkWindow that is a sibling of window, or %NULL

    • above: boolean

      a boolean

    Returns void

  • runDispose(): void
  • Releases all references to other objects. This can be used to break reference cycles.

    This function should only be called from object system implementations.

    Returns void

  • scroll(dx: number, dy: number): void
  • Scroll the contents of window, both pixels and children, by the given amount. window itself does not move. Portions of the window that the scroll operation brings in from offscreen areas are invalidated. The invalidated region may be bigger than what would strictly be necessary.

    For X11, a minimum area will be invalidated if the window has no subwindows, or if the edges of the window's parent do not extend beyond the edges of the window. In other cases, a multi-step process is used to scroll the window which may produce temporary visual artifacts and unnecessary invalidations.

    Parameters

    • dx: number

      Amount to scroll in the X direction

    • dy: number

      Amount to scroll in the Y direction

    Returns void

  • setAcceptFocus(acceptFocus: boolean): void
  • 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.

    Parameters

    • acceptFocus: boolean

      %TRUE if the window should receive input focus

    Returns void

  • setBackPixmap(pixmap: Gdk.Pixmap, parentRelative: boolean): void
  • 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 gdk_window_clear().

    Parameters

    • pixmap: Gdk.Pixmap

      a #GdkPixmap, or %NULL

    • parentRelative: boolean

      whether the tiling origin is at the origin of window's parent

    Returns void

  • 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; gdk_rgb_find_color() is the best way to allocate a color.

    See also gdk_window_set_back_pixmap().

    Parameters

    • color: Gdk.Color

      an allocated #GdkColor

    Returns void

  • setChildInputShapes(): void
  • 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 gdk_window_merge_child_input_shapes() which includes the input shape mask of window in the masks to be merged.

    Returns void

  • setChildShapes(): void
  • 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 gdk_window_merge_child_shapes() which includes the shape mask of window in the masks to be merged.

    Returns void

  • Sets the colormap associated with drawable. Normally this will happen automatically when the drawable is created; you only need to use this function if the drawable-creating function did not have a way to determine the colormap, and you then use drawable operations that require a colormap. The colormap for all drawables and graphics contexts you intend to use together should match. i.e. when using a #GdkGC to draw to a drawable, or copying one drawable to another, the colormaps should match.

    Parameters

    Returns void

  • setComposited(composited: boolean): void
  • Sets a #GdkWindow 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 for an example.

    It only makes sense for child windows to be composited; see gdk_window_set_opacity() 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 gdk_display_supports_composite() to check if setting a window as composited is supported before attempting to do so.

    Parameters

    • composited: boolean

      %TRUE to set the window as composited

    Returns void

  • Sets the mouse pointer for a #GdkWindow. Use gdk_cursor_new_for_display() or gdk_cursor_new_from_pixmap() to create the cursor. To make the cursor invisible, use %GDK_BLANK_CURSOR. Passing %NULL for the cursor argument to gdk_window_set_cursor() means that window will use the cursor of its parent window. Most windows should use this default.

    Parameters

    Returns void

  • setData(...args: any[]): any
  • This function is equivalent to g_object_set_data(), the #GObject variant should be used instead.

    Parameters

    • Rest ...args: any[]

    Returns any

  • "Decorations" are the features the window manager adds to a toplevel #GdkWindow. 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 #GdkWMDecoration enumeration. If #GDK_DECOR_ALL is included in the mask, the other bits indicate which decorations should be turned off. If #GDK_DECOR_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.

    Parameters

    Returns void

  • The event mask for a window determines which events will be reported for that window. For example, an event mask including #GDK_BUTTON_PRESS_MASK means the window should report button press events. The event mask is the bitwise OR of values from the #GdkEventMask enumeration.

    Parameters

    Returns void

  • setFocusOnMap(focusOnMap: boolean): void
  • 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.

    Parameters

    • focusOnMap: boolean

      %TRUE if the window should receive input focus when mapped

    Returns void

  • 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 #GdkWMFunction enumeration. If the bitmask includes #GDK_FUNC_ALL, then the other bits indicate which functions to disable; if it doesn't include #GDK_FUNC_ALL, it indicates which functions to enable.

    Parameters

    • functions: Gdk.WMFunction

      bitmask of operations to allow on window

    Returns void

  • 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 gdk_window_resize() or gdk_window_move_resize().

    Note that on X11, this effect has no effect on windows of type %GDK_WINDOW_TEMP or windows where override redirect has been turned on via gdk_window_set_override_redirect() 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 gdk_window_constrain_size() yourself to determine appropriate sizes.

    Parameters

    Returns void

  • 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.

    Parameters

    • leader: Gdk.Window

      group leader window, or %NULL to restore the default group leader window

    Returns void

  • setHints(x: number, y: number, minWidth: number, minHeight: number, maxWidth: number, maxHeight: number, flags: number): void
  • This function is broken and useless and you should ignore it. If using GTK+, use functions such as gtk_window_resize(), gtk_window_set_size_request(), gtk_window_move(), gtk_window_parse_geometry(), and gtk_window_set_geometry_hints(), depending on what you're trying to do.

    If using GDK directly, use gdk_window_set_geometry_hints().

    Parameters

    • x: number

      ignored field, does not matter

    • y: number

      ignored field, does not matter

    • minWidth: number

      minimum width hint

    • minHeight: number

      minimum height hint

    • maxWidth: number

      max width hint

    • maxHeight: number

      max height hint

    • flags: number

      logical OR of GDK_HINT_POS, GDK_HINT_MIN_SIZE, and/or GDK_HINT_MAX_SIZE

    Returns void

  • 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 gdk_window_set_icon_list(). Only if all those are too high-level do you want to fall back to gdk_window_set_icon().

    Parameters

    • iconWindow: Gdk.Window

      a #GdkWindow to use for the icon, or %NULL to unset

    • pixmap: Gdk.Pixmap

      a #GdkPixmap to use as the icon, or %NULL to unset

    • mask: Gdk.Bitmap

      a 1-bit pixmap (#GdkBitmap) to use as mask for pixmap, or %NULL to have none

    Returns void

  • setIconList(pixbufs: Pixbuf[]): void
  • 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.

    Parameters

    • pixbufs: Pixbuf[]

      A list of pixbufs, of different sizes.

    Returns void

  • setIconName(name: string): void
  • 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 gdk_window_set_title() will not update the icon title.

    Using %NULL for name unsets the icon title; further calls to gdk_window_set_title() will again update the icon title as well.

    Parameters

    • name: string

      name of window while iconified (minimized)

    Returns void

  • setKeepAbove(setting: boolean): void
  • 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.

    Parameters

    • setting: boolean

      whether to keep window above other windows

    Returns void

  • setKeepBelow(setting: boolean): void
  • 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.

    Parameters

    • setting: boolean

      whether to keep window below other windows

    Returns void

  • setModalHint(modal: boolean): void
  • 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 gdk_window_set_transient_for()

    Parameters

    • modal: boolean

      %TRUE if the window is modal, %FALSE otherwise.

    Returns void

  • setOpacity(opacity: number): void
  • 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 gdk_screen_get_rgba_colormap(). For making non-toplevel windows translucent, see gdk_window_set_composited().

    Parameters

    • opacity: number

      opacity

    Returns void

  • setOverrideRedirect(overrideRedirect: boolean): void
  • 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.

    Parameters

    • overrideRedirect: boolean

      %TRUE if window should be override redirect

    Returns void

  • setProperty(propertyName: string, value?: any): void
  • Sets a property on an object.

    Parameters

    • propertyName: string

      the name of the property to set

    • Optional value: any

      the value

    Returns void

  • setRole(role: string): void
  • 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.

    Parameters

    • role: string

      a string indicating its role

    Returns void

  • setSkipPagerHint(skipsPager: boolean): void
  • 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 gdk_window_set_type_hint() 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.

    Parameters

    • skipsPager: boolean

      %TRUE to skip the pager

    Returns void

  • setSkipTaskbarHint(skipsTaskbar: boolean): void
  • Toggles whether a window should appear in a task list or window list. If a window's semantic type as specified with gdk_window_set_type_hint() 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.

    Parameters

    • skipsTaskbar: boolean

      %TRUE to skip the taskbar

    Returns void

  • setStartupId(startupId: string): void
  • When using GTK+, typically you should use gtk_window_set_startup_id() instead of this low-level function.

    Parameters

    • startupId: string

      a string with startup-notification identifier

    Returns void

  • setStaticGravities(useStatic: boolean): boolean
  • 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.

    Parameters

    • useStatic: boolean

      %TRUE to turn on static gravity

    Returns boolean

  • setTitle(title: string): void
  • 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 gdk_window_set_icon_name()), 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.

    Parameters

    • title: string

      title of window

    Returns void

  • 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.

    Parameters

    • parent: Gdk.Window

      another toplevel #GdkWindow

    Returns void

  • 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.

    Parameters

    Returns void

  • setUrgencyHint(urgent: boolean): void
  • Toggles whether a window needs the user's urgent attention.

    Parameters

    • urgent: boolean

      %TRUE if the window is urgent

    Returns void

  • setUserData(userData: object): void
  • 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 #GdkWindow as user data on the #GdkWindow. So, custom widget implementations should use this function for that. If GTK+ receives an event for a #GdkWindow, 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.

    Parameters

    • userData: object

      user data

    Returns void

  • shapeCombineMask(mask: Gdk.Bitmap, x: number, y: number): void
  • 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.

    Parameters

    • mask: Gdk.Bitmap

      shape mask

    • x: number

      X position of shape mask with respect to window

    • y: number

      Y position of shape mask with respect to window

    Returns void

  • shapeCombineRegion(shapeRegion: Gdk.Region, offsetX: number, offsetY: number): void
  • Makes pixels in window outside shape_region be transparent, so that the window may be nonrectangular. See also gdk_window_shape_combine_mask() 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.

    Parameters

    • shapeRegion: Gdk.Region

      region of window to be non-transparent

    • offsetX: number

      X position of shape_region in window coordinates

    • offsetY: number

      Y position of shape_region in window coordinates

    Returns void

  • show(): void
  • Like gdk_window_show_unraised(), 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 gdk_window_hide().

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

    Returns void

  • showUnraised(): void
  • Shows a #GdkWindow onscreen, but does not modify its stacking order. In contrast, gdk_window_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).

    Returns void

  • stealData(key?: string): object
  • Remove a specified datum from the object's data associations, without invoking the association's destroy handler.

    Parameters

    • Optional key: string

      name of the key

    Returns object

  • stealQdata(quark: number): object
  • This function gets back user data pointers stored via g_object_set_qdata() and removes the data from object without invoking its destroy() function (if any was set). Usually, calling this function is only required to update user data pointers with a destroy notifier, for example:

    void
    object_add_to_user_list (GObject *object,
    const gchar *new_string)
    {
    // the quark, naming the object data
    GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
    // retrieve the old string list
    GList *list = g_object_steal_qdata (object, quark_string_list);

    // prepend new string
    list = g_list_prepend (list, g_strdup (new_string));
    // this changed 'list', so we need to set it again
    g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
    }
    static void
    free_string_list (gpointer data)
    {
    GList *node, *list = data;

    for (node = list; node; node = node->next)
    g_free (node->data);
    g_list_free (list);
    }

    Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata() would have left the destroy function set, and thus the partial string list would have been freed upon g_object_set_qdata_full().

    Parameters

    • quark: number

      A #GQuark, naming the user data pointer

    Returns object

  • stick(): void
  • "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.

    Returns void

  • thawNotify(): void
  • Reverts the effect of a previous call to g_object_freeze_notify(). The freeze count is decreased on object and when it reaches zero, queued "notify" signals are emitted.

    Duplicate notifications for each property are squashed so that at most one #GObject::notify signal is emitted for each property, in the reverse order in which they have been queued.

    It is an error to call this function when the freeze count is zero.

    Returns void

  • thawToplevelUpdatesLibgtkOnly(): void
  • Thaws a window frozen with gdk_window_freeze_toplevel_updates_libgtk_only().

    This function is not part of the GDK public API and is only for use by GTK+.

    Returns void

  • thawUpdates(): void
  • Thaws a window frozen with gdk_window_freeze_updates().

    Returns void

  • unfullscreen(): void
  • 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.

    Returns void

  • unmaximize(): void
  • 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.

    Returns void

  • unref(): void
  • unstick(): void
  • Reverse operation for gdk_window_stick(); see gdk_window_stick(), and gtk_window_unstick().

    Returns void

  • watchClosure(closure: TClosure<any, any>): void
  • This function essentially limits the life time of the closure to the life time of the object. That is, when the object is finalized, the closure is invalidated by calling g_closure_invalidate() on it, in order to prevent invocations of the closure with a finalized (nonexisting) object. Also, g_object_ref() and g_object_unref() are added as marshal guards to the closure, to ensure that an extra reference count is held on object during invocation of the closure. Usually, this function will be called on closures that use this object as closure data.

    Parameters

    • closure: TClosure<any, any>

      #GClosure to watch

    Returns void

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

    Returns void

  • compatControl(what: number, data: object): number
  • Find the #GParamSpec with the given name for an interface. Generally, the interface vtable passed in as g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek().

    Parameters

    • gIface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface

    • propertyName: string

      name of a property to look up.

    Returns ParamSpec

  • Add a property to an interface; this is only useful for interfaces that are added to GObject-derived types. Adding a property to an interface forces all objects classes with that interface to have a compatible property. The compatible property could be a newly created #GParamSpec, but normally g_object_class_override_property() will be used so that the object class only needs to provide an implementation and inherits the property description, default value, bounds, and so forth from the interface property.

    This function is meant to be called from the interface's default vtable initialization function (the class_init member of #GTypeInfo.) It must not be called after after class_init has been called for any object types implementing this interface.

    If pspec is a floating reference, it will be consumed.

    Parameters

    • gIface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface.

    • pspec: ParamSpec

      the #GParamSpec for the new property

    Returns void

  • Lists the properties of an interface.Generally, the interface vtable passed in as g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek().

    Parameters

    • gIface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface

    Returns ParamSpec[]

  • Creates a new instance of a #GObject subtype and sets its properties.

    Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY) which are not explicitly specified are set to their default values.

    Parameters

    • objectType: GType<unknown>

      the type id of the #GObject subtype to instantiate

    • parameters: GObject.Parameter[]

      an array of #GParameter

    Returns GObject.Object

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method