Plug

Together with gtk.Socket, gtk.Plug provides the ability to embed widgets from one process into another process in a fashion that is transparent to the user. One process creates a gtk.Socket widget and passes the ID of that widget’s window to the other process, which then creates a gtk.Plug with that window ID. Any widgets contained in the gtk.Plug then will appear inside the first application’s window.

The communication between a gtk.Socket and a gtk.Plug follows the XEmbed Protocol. This protocol has also been implemented in other toolkits, e.g. Qt, allowing the same level of integration when embedding a Qt widget in GTK+ or vice versa.

The gtk.Plug and gtk.Socket widgets are only available when GTK+ is compiled for the X11 platform and GDK_WINDOWING_X11 is defined. They can only be used on a GdkX11Display To use gtk.Plug and gtk.Socket, you need to include the gtk/gtkx.h header.

Constructors

this
this(GtkPlug* gtkPlug, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(ulong socketId)

Creates a new plug widget inside the gtk.Socket identified by socket_id. If socket_id is 0, the plug is left “unplugged” and can later be plugged into a gtk.Socket by Socket.addId.

this
this(Display display, ulong socketId)

Create a new plug widget inside the gtk.Socket identified by socket_id.

Members

Functions

addOnEmbedded
gulong addOnEmbedded(void delegate(Plug) dlg, ConnectFlags connectFlags)

Gets emitted when the plug becomes embedded in a socket.

construct
void construct(ulong socketId)

Finish the initialization of plug for a given gtk.Socket identified by socket_id. This function will generally only be used by classes deriving from gtk.Plug

constructForDisplay
void constructForDisplay(Display display, ulong socketId)

Finish the initialization of plug for a given gtk.Socket identified by socket_id which is currently displayed on display. This function will generally only be used by classes deriving from gtk.Plug

getEmbedded
bool getEmbedded()

Determines whether the plug is embedded in a socket.

getId
ulong getId()

Gets the window ID of a gtk.Plug widget, which can then be used to embed this window inside another window, for instance with Socket.addId.

getPlugStruct
GtkPlug* getPlugStruct(bool transferOwnership)

Get the main Gtk struct

getSocketWindow
GdkWin getSocketWindow()

Retrieves the socket the plug is embedded in.

getStruct
void* getStruct()

the main Gtk struct as a void*

Static functions

getType
GType getType()

Variables

gtkPlug
GtkPlug* gtkPlug;

the main Gtk struct

Inherited Members

From Window

gdkWindow
GdkWindow* gdkWindow;

the main Gtk struct

getWindowStruct
GdkWindow* getWindowStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
atPointer
Window atPointer(int winX, int winY)

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 gdk.Window hasn’t been created for it with Window.foreignNew)

constrainSize
void constrainSize(GdkGeometry* geometry, GdkWindowHints flags, int width, int height, int newWidth, int newHeight)

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

processAllUpdates
void processAllUpdates()

Calls Window.processUpdates for all windows (see gdk.Window) in the application.

setDebugUpdates
void setDebugUpdates(bool setting)

With update debugging enabled, calls to Window.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 Window.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.

addFilter
void addFilter(GdkFilterFunc function_, void* data)

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.

beep
void beep()

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

beginDrawFrame
DrawingContext beginDrawFrame(Region region)

Indicates that you are beginning the process of redrawing region on window, and provides you with a gdk.DrawingContext

beginMoveDrag
void beginMoveDrag(int button, int rootX, int rootY, uint timestamp)

Begins a window move operation (for a toplevel window).

beginMoveDragForDevice
void beginMoveDragForDevice(Device device, int button, int rootX, int rootY, uint timestamp)

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.

beginPaintRect
void beginPaintRect(GdkRectangle* rectangle)

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

beginPaintRegion
void beginPaintRegion(Region region)

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 surface for window. Then, all drawing operations performed on window will be diverted to the backing store. When you call Window.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.

beginResizeDrag
void beginResizeDrag(GdkWindowEdge edge, int button, int rootX, int rootY, uint timestamp)

Begins a window resize operation (for a toplevel window).

beginResizeDragForDevice
void beginResizeDragForDevice(GdkWindowEdge edge, Device device, int button, int rootX, int rootY, uint timestamp)

Begins a window resize operation (for a toplevel window). You might use this function to implement a “window resize grip,” for example; in fact gtk.Statusbar 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.

configureFinished
void configureFinished()

Does nothing, present only for compatiblity.

coordsFromParent
void coordsFromParent(double parentX, double parentY, double x, double y)

Transforms window coordinates from a parent window to a child window, where the parent window is the normal parent as returned by Window.getParent for normal windows, and the window's embedder as returned by OffscreenWindow.getEmbedder for offscreen windows.

coordsToParent
void coordsToParent(double x, double y, double parentX, double parentY)

Transforms window coordinates from a child window to its parent window, where the parent window is the normal parent as returned by Window.getParent for normal windows, and the window's embedder as returned by OffscreenWindow.getEmbedder for offscreen windows.

createGlContext
GLContext createGlContext()

Creates a new gdk.GLContext matching the framebuffer format to the visual of the gdk.Window The context is disconnected from any particular window or surface.

createSimilarImageSurface
Surface createSimilarImageSurface(cairo_format_t format, int width, int height, int scale)

Create a new image surface that is efficient to draw on the given window.

createSimilarSurface
Surface createSimilarSurface(cairo_content_t content, int width, int height)

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 Surface.getType.

deiconify
void deiconify()

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

destroy
void destroy()

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.

destroyNotify
void destroyNotify()
enableSynchronizedConfigure
void enableSynchronizedConfigure()

Does nothing, present only for compatiblity.

endDrawFrame
void endDrawFrame(DrawingContext context)

Indicates that the drawing of the contents of window started with Window.beginFrame has been completed.

endPaint
void endPaint()

Indicates that the backing store created by the most recent call to Window.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 Window.beginPaintRegion for full details.

ensureNative
bool ensureNative()

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

flush
void flush()

This function does nothing.

focus
void focus(uint timestamp)

Sets keyboard focus to window. In most cases, Window.presentWithTime should be used on a gtk.Window, rather than calling this function.

freezeToplevelUpdatesLibgtkOnly
void freezeToplevelUpdatesLibgtkOnly()

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 Window.thawToplevelUpdatesLibgtkOnly is called. If Window.freezeToplevelUpdatesLibgtkOnly

has been called more than once, Window.thawToplevelUpdatesLibgtkOnly must be called an equal number of times to begin processing exposes.

freezeUpdates
void freezeUpdates()

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

fullscreen
void fullscreen()

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

fullscreenOnMonitor
void fullscreenOnMonitor(int monitor)

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

geometryChanged
void geometryChanged()

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.

getAcceptFocus
bool getAcceptFocus()

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

getBackgroundPattern
Pattern getBackgroundPattern()

Gets the pattern used to clear the background on window.

getChildren
ListG getChildren()

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.

getChildrenWithUserData
ListG getChildrenWithUserData(void* userData)

Gets the list of children of window known to GDK with a particular user_data set on it.

getClipRegion
Region getClipRegion()

Computes the region of a window that potentially can be written to by drawing primitives. This region may not take into account other factors such as if the window is obscured by other windows, but no area outside of this region will be affected by drawing primitives.

getComposited
bool getComposited()

Determines whether window is composited.

getCursor
Cursor getCursor()

Retrieves a gdk.Cursor pointer for the cursor currently set on the specified gdk.Window, 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.

getDecorations
bool getDecorations(GdkWMDecoration decorations)

Returns the decorations set on the GdkWindow with Window.setDecorations.

getDeviceCursor
Cursor getDeviceCursor(Device device)

Retrieves a gdk.Cursor pointer for the device currently set on the specified gdk.Window, 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.

getDeviceEvents
GdkEventMask getDeviceEvents(Device device)

Returns the event mask for window corresponding to an specific device.

getDevicePosition
Window getDevicePosition(Device device, int x, int y, GdkModifierType mask)

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

getDevicePositionDouble
Window getDevicePositionDouble(Device device, double x, double y, GdkModifierType mask)

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

getDisplay
Display getDisplay()

Gets the gdk.Display associated with a gdk.Window

getDragProtocol
GdkDragProtocol getDragProtocol(Window target)

Finds out the DND protocol supported by a window.

getEffectiveParent
Window getEffectiveParent()

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

getEffectiveToplevel
Window getEffectiveToplevel()

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

getEventCompression
bool getEventCompression()

Get the current event compression setting for this window.

getEvents
GdkEventMask getEvents()

Gets the event mask for window for all master input devices. See Window.setEvents.

getFocusOnMap
bool getFocusOnMap()

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

getFrameClock
FrameClock getFrameClock()

Gets the frame clock for the window. The frame clock for a window never changes unless the window is reparented to a new toplevel window.

getFrameExtents
void getFrameExtents(GdkRectangle rect)

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 Window.getOrigin.

getFullscreenMode
GdkFullscreenMode getFullscreenMode()

Obtains the GdkFullscreenMode of the window.

getGeometry
void getGeometry(int x, int y, int width, int height)

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

getGroup
Window getGroup()

Returns the group leader window for window. See Window.setGroup.

getHeight
int getHeight()

Returns the height of the given window.

getModalHint
bool getModalHint()

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

getOrigin
int getOrigin(int x, int y)

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

getParent
Window getParent()

Obtains the parent of window, as known to GDK. Does not query the X server; thus this returns the parent as passed to 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.

getPassThrough
bool getPassThrough()

Returns whether input to the window is passed through to the window below.

getPointer
Window getPointer(int x, int y, GdkModifierType mask)

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

getPosition
void getPosition(int x, int y)

Obtains the position of the window as reported in the most-recently-processed GdkEventConfigure Contrast with Window.getGeometry which queries the X server for the current window position, regardless of which events have been received or processed.

getRootCoords
void getRootCoords(int x, int y, int rootX, int rootY)

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

getRootOrigin
void getRootOrigin(int x, int y)

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

getScaleFactor
int getScaleFactor()

Returns the internal scale factor that maps from window coordiantes to the actual device pixels. On traditional systems this is 1, but on very high density outputs this can be a higher value (often 2).

getScreen
Screen getScreen()

Gets the gdk.Screen associated with a gdk.Window

getSourceEvents
GdkEventMask getSourceEvents(GdkInputSource source)

Returns the event mask for window corresponding to the device class specified by source.

getState
GdkWindowState getState()

Gets the bitwise OR of the currently active window state flags, from the GdkWindowState enumeration.

getSupportMultidevice
bool getSupportMultidevice()

Returns TRUE if the window is aware of the existence of multiple devices.

getToplevel
Window getToplevel()

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

getTypeHint
GdkWindowTypeHint getTypeHint()

This function returns the type hint set for a window.

getUpdateArea
Region getUpdateArea()

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, Window.getUpdateArea returns NULL. You are responsible for calling Region.destroy on the returned region if it’s non-NULL.

getUserData
void getUserData(void* data)

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

getVisibleRegion
Region getVisibleRegion()

Computes the region of the window that is potentially visible. This does not necessarily take into account if the window is obscured by other windows, but no area outside of this region is visible.

getVisual
Visual getVisual()

Gets the gdk.Visual describing the pixel format of window.

getWidth
int getWidth()

Returns the width of the given window.

getWindowType
GdkWindowType getWindowType()

Gets the type of the window. See GdkWindowType

hasNative
bool hasNative()

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

hide
void hide()

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 Widget.hide.

iconify
void iconify()

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

inputShapeCombineRegion
void inputShapeCombineRegion(Region shapeRegion, int offsetX, int offsetY)

Like Window.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.

invalidateMaybeRecurse
void invalidateMaybeRecurse(Region region, GdkWindowChildFunc childFunc, void* userData)

Adds region to the update area for window. The update area is the region that needs to be redrawn, or “dirty region.” The call Window.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.

invalidateRect
void invalidateRect(GdkRectangle* rect, bool invalidateChildren)

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

invalidateRegion
void invalidateRegion(Region region, bool invalidateChildren)

Adds region to the update area for window. The update area is the region that needs to be redrawn, or “dirty region.” The call Window.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.

isDestroyed
bool isDestroyed()

Check to see if a window is destroyed..

isInputOnly
bool isInputOnly()

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

isShaped
bool isShaped()

Determines whether or not the window is shaped.

isViewable
bool isViewable()

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

isVisible
bool isVisible()

Checks whether the window has been mapped (with Window.show or Window.showUnraised).

lower
void lower()

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.

markPaintFromClip
void markPaintFromClip(Context cr)

If you call this during a paint (e.g. between Window.beginPaintRegion and Window.endPaint then GDK will mark the current clip region of the window as being drawn. This is required when mixing GL rendering via Cairo.drawFromGl and cairo rendering, as otherwise GDK has no way of knowing when something paints over the GL-drawn regions.

maximize
void maximize()

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

mergeChildInputShapes
void mergeChildInputShapes()

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 Window.inputShapeCombineRegion.

mergeChildShapes
void mergeChildShapes()

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 Window.shapeCombineRegion.

move
void move(int x, int y)

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

moveRegion
void moveRegion(Region region, int dx, int dy)

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.

moveResize
void moveResize(int x, int y, int width, int height)

Equivalent to calling Window.move and 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 Window.moveResize.)

moveToRect
void moveToRect(GdkRectangle* rect, GdkGravity rectAnchor, GdkGravity windowAnchor, GdkAnchorHints anchorHints, int rectAnchorDx, int rectAnchorDy)

Moves window to rect, aligning their anchor points.

peekChildren
ListG peekChildren()

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

processUpdates
void processUpdates(bool updateChildren)

Sends one or more expose events to window. The areas in each expose event will cover the entire update area for the window (see Window.invalidateRegion for details). Normally GDK calls Window.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.

raise
void raise()

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.

registerDnd
void registerDnd()

Registers a window as a potential drop destination.

removeFilter
void removeFilter(GdkFilterFunc function_, void* data)

Remove a filter previously added with Window.addFilter.

reparent
void reparent(Window newParent, int x, int y)

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

resize
void resize(int width, int height)

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 Window.resize instead of this low-level GDK function.

restack
void restack(Window sibling, bool above)

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

scroll
void scroll(int dx, int dy)

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.

setAcceptFocus
void setAcceptFocus(bool acceptFocus)

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

setBackground
void setBackground(Color color)

Sets the background color of window.

setBackgroundPattern
void setBackgroundPattern(Pattern pattern)

Sets the background of window.

setBackgroundRgba
void setBackgroundRgba(RGBA rgba)

Sets the background color of window.

setChildInputShapes
void setChildInputShapes()

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 Window.mergeChildInputShapes which includes the input shape mask of window in the masks to be merged.

setChildShapes
void setChildShapes()

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 Window.mergeChildShapes which includes the shape mask of window in the masks to be merged.

setComposited
void setComposited(bool composited)

Sets a gdk.Window 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.

setCursor
void setCursor(Cursor cursor)

Sets the default mouse pointer for a gdk.Window

setDecorations
void setDecorations(GdkWMDecoration decorations)

“Decorations” are the features the window manager adds to a toplevel gdk.Window 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 Window.setDecorated on a gtk.Window instead of using the GDK function directly.

setDeviceCursor
void setDeviceCursor(Device device, Cursor cursor)

Sets a specific gdk.Cursor for a given device when it gets inside window. Use Cursor.newForDisplay or Cursor.newFromPixbuf to create the cursor. To make the cursor invisible, use GDK_BLANK_CURSOR. Passing NULL for the cursor argument to Window.setCursor means that window will use the cursor of its parent window. Most windows should use this default.

setDeviceEvents
void setDeviceEvents(Device device, GdkEventMask eventMask)

Sets the event mask for a given device (Normally a floating device, not attached to any visible pointer) to 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.

setEventCompression
void setEventCompression(bool eventCompression)

Determines whether or not extra unprocessed motion events in the event queue can be discarded. If TRUE only the most recent event will be delivered.

setEvents
void setEvents(GdkEventMask eventMask)

The event mask for a window determines which events will be reported for that window from all master input devices. 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.

setFocusOnMap
void setFocusOnMap(bool focusOnMap)

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

setFullscreenMode
void setFullscreenMode(GdkFullscreenMode mode)

Specifies whether the window should span over all monitors (in a multi-head setup) or only the current monitor when in fullscreen mode.

setFunctions
void setFunctions(GdkWMFunction functions)

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

setGeometryHints
void setGeometryHints(GdkGeometry* geometry, GdkWindowHints geomMask)

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.

setGroup
void setGroup(Window leader)

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.

setIconList
void setIconList(ListG pixbufs)

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.

setIconName
void setIconName(string name)

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.

setInvalidateHandler
void setInvalidateHandler(GdkWindowInvalidateHandlerFunc handler)

Registers an invalidate handler for a specific window. This will get called whenever a region in the window or its children is invalidated.

setKeepAbove
void setKeepAbove(bool setting)

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

setKeepBelow
void setKeepBelow(bool setting)

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

setModalHint
void setModalHint(bool modal)

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.

setOpacity
void setOpacity(double opacity)

Set window to render as partially transparent, with opacity 0 being fully transparent and 1 fully opaque. (Values of the opacity parameter are clamped to the [0,1] range.)

setOpaqueRegion
void setOpaqueRegion(Region region)

For optimisation purposes, compositing window managers may like to not draw obscured regions of windows, or turn off blending during for these regions. With RGB windows with no transparency, this is just the shape of the window, but with ARGB32 windows, the compositor does not know what regions of the window are transparent or not.

setOverrideRedirect
void setOverrideRedirect(bool overrideRedirect)

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.

setPassThrough
void setPassThrough(bool passThrough)

Sets whether input to the window is passed through to the window below.

setRole
void setRole(string role)

When using GTK+, typically you should use Window.setRole instead of this low-level function.

setShadowWidth
void setShadowWidth(int left, int right, int top, int bottom)

Newer GTK+ windows using client-side decorations use extra geometry around their frames for effects like shadows and invisible borders. Window managers that want to maximize windows or snap to edges need to know where the extents of the actual frame lie, so that users don’t feel like windows are snapping against random invisible edges.

setSkipPagerHint
void setSkipPagerHint(bool skipsPager)

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

setSkipTaskbarHint
void setSkipTaskbarHint(bool skipsTaskbar)

Toggles whether a window should appear in a task list or window list. If a window’s semantic type as specified with Window.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.

setSourceEvents
void setSourceEvents(GdkInputSource source, GdkEventMask eventMask)

Sets the event mask for any floating device (i.e. not attached to any visible pointer) that has the source defined as source. This event mask will be applied both to currently existing, newly added devices after this call, and devices being attached/detached.

setStartupId
void setStartupId(string startupId)

When using GTK+, typically you should use Window.setStartupId instead of this low-level function.

setStaticGravities
bool setStaticGravities(bool useStatic)

Used to 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.

setSupportMultidevice
void setSupportMultidevice(bool supportMultidevice)

This function will enable multidevice features in window.

setTitle
void setTitle(string title)

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

setTransientFor
void setTransientFor(Window parent)

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.

setTypeHint
void setTypeHint(GdkWindowTypeHint hint)

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.

setUrgencyHint
void setUrgencyHint(bool urgent)

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

setUserData
void setUserData(ObjectG userData)

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

shapeCombineRegion
void shapeCombineRegion(Region shapeRegion, int offsetX, int offsetY)

Makes pixels in window outside shape_region be transparent, so that the window may be nonrectangular.

show
void show()

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

showUnraised
void showUnraised()

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

showWindowMenu
bool showWindowMenu(Event event)

Asks the windowing system to show the window menu. The window menu is the menu shown when right-clicking the titlebar on traditional windows managed by the window manager. This is useful for windows using client-side decorations, activating it with a right-click on the window decorations.

stick
void stick()

“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 gtk.Window, Window.stick may be more useful.)

thawToplevelUpdatesLibgtkOnly
void thawToplevelUpdatesLibgtkOnly()

Thaws a window frozen with Window.freezeToplevelUpdatesLibgtkOnly.

thawUpdates
void thawUpdates()

Thaws a window frozen with Window.freezeUpdates.

unfullscreen
void unfullscreen()

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

unmaximize
void unmaximize()

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

unstick
void unstick()

Reverse operation for Window.stick; see Window.stick, and Window.unstick.

withdraw
void withdraw()

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

addOnCreateSurface
gulong addOnCreateSurface(Surface delegate(int, int, Window) dlg, ConnectFlags connectFlags)

The ::create-surface signal is emitted when an offscreen window needs its surface (re)created, which happens either when the window is first drawn to, or when the window is being resized. The first signal handler that returns a non-NULL surface will stop any further signal emission, and its surface will be used.

addOnFromEmbedder
gulong addOnFromEmbedder(void delegate(double, double, void*, void*, Window) dlg, ConnectFlags connectFlags)

The ::from-embedder signal is emitted to translate coordinates in the embedder of an offscreen window to the offscreen window.

addOnMovedToRect
gulong addOnMovedToRect(void delegate(void*, void*, bool, bool, Window) dlg, ConnectFlags connectFlags)

Emitted when the position of window is finalized after being moved to a destination rectangle.

addOnPickEmbeddedChild
gulong addOnPickEmbeddedChild(Window delegate(double, double, Window) dlg, ConnectFlags connectFlags)

The ::pick-embedded-child signal is emitted to find an embedded child at the given position.

addOnToEmbedder
gulong addOnToEmbedder(void delegate(double, double, void*, void*, Window) dlg, ConnectFlags connectFlags)

The ::to-embedder signal is emitted to translate coordinates in an offscreen window to its embedder.

getDefaultRootWindow
Window getDefaultRootWindow()

Obtains the root window (parent all other windows are inside) for the default display and screen.

offscreenWindowGetEmbedder
Window offscreenWindowGetEmbedder(Window window)

Gets the window that window is embedded in.

offscreenWindowGetSurface
Surface offscreenWindowGetSurface(Window window)

Gets the offscreen surface that an offscreen window renders into. If you need to keep this around over window resizes, you need to add a reference to it.

offscreenWindowSetEmbedder
void offscreenWindowSetEmbedder(Window window, Window embedder)

Sets window to be embedded in embedder.

synthesizeWindowState
void synthesizeWindowState(Window window, GdkWindowState unsetFlags, GdkWindowState setFlags)