Container

A GTK+ user interface is constructed by nesting widgets inside widgets. Container widgets are the inner nodes in the resulting tree of widgets: they contain other widgets. So, for example, you might have a gtk.Window containing a gtk.Frame containing a gtk.Label If you wanted an image instead of a textual label inside the frame, you might replace the gtk.Label widget with a gtk.Image widget.

There are two major kinds of container widgets in GTK+. Both are subclasses of the abstract GtkContainer base class.

The first type of container widget has a single child widget and derives from gtk.Bin These containers are decorators, which add some kind of functionality to the child. For example, a gtk.Button makes its child into a clickable button; a gtk.Frame draws a frame around its child and a gtk.Window places its child widget inside a top-level window.

The second type of container can have more than one child; its purpose is to manage layout. This means that these containers assign sizes and positions to their children. For example, a gtk.HBox arranges its children in a horizontal row, and a gtk.Grid arranges the widgets it contains in a two-dimensional grid.

For implementations of gtk.Container the virtual method gtk.ContainerClass.ContainerClass.forall|gtk.ContainerClass.forall is always required, since it's used for drawing and other internal operations on the children. If the gtk.Container implementation expect to have non internal children it's needed to implement both gtk.ContainerClass.ContainerClass.add|gtk.ContainerClass.add and gtk.ContainerClass.ContainerClass.remove|gtk.ContainerClass.remove. If the GtkContainer implementation has internal children, they should be added with Widget.setParent on init() and removed with Widget.unparent in the gtk.WidgetClass.WidgetClass.destroy|gtk.WidgetClass.destroy implementation. See more about implementing custom widgets at https://wiki.gnome.org/HowDoI/CustomWidgets

Height for width geometry management

GTK+ uses a height-for-width (and width-for-height) geometry management system. Height-for-width means that a widget can change how much vertical space it needs, depending on the amount of horizontal space that it is given (and similar for width-for-height).

There are some things to keep in mind when implementing container widgets that make use of GTK+’s height for width geometry management system. First, it’s important to note that a container must prioritize one of its dimensions, that is to say that a widget or container can only have a GtkSizeRequestMode that is GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH or GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT. However, every widget and container must be able to respond to the APIs for both dimensions, i.e. even if a widget has a request mode that is height-for-width, it is possible that its parent will request its sizes using the width-for-height APIs.

To ensure that everything works properly, here are some guidelines to follow when implementing height-for-width (or width-for-height) containers.

Each request mode involves 2 virtual methods. Height-for-width apis run through Widget.getPreferredWidth and then through Widget.getPreferredHeightForWidth. When handling requests in the opposite GtkSizeRequestMode it is important that every widget request at least enough space to display all of its content at all times.

When Widget.getPreferredHeight is called on a container that is height-for-width, the container must return the height for its minimum width. This is easily achieved by simply calling the reverse apis implemented for itself as follows:

static void
foo_container_get_preferred_height (GtkWidget *widget,
gint *min_height,
gint *nat_height)
{
if (i_am_in_height_for_width_mode)
{
gint min_width;

GTK_WIDGET_GET_CLASS (widget)->get_preferred_width (widget,
&min_width,
NULL);
GTK_WIDGET_GET_CLASS (widget)->get_preferred_height_for_width
(widget,
min_width,
min_height,
nat_height);
}
else
{
... many containers support both request modes, execute the
real width-for-height request here by returning the
collective heights of all widgets that are stacked
vertically (or whatever is appropriate for this container)
...
}
}

Similarly, when Widget.getPreferredWidthForHeight is called for a container or widget that is height-for-width, it then only needs to return the base minimum width like so:

static void
foo_container_get_preferred_width_for_height (GtkWidget *widget,
gint for_height,
gint *min_width,
gint *nat_width)
{
if (i_am_in_height_for_width_mode)
{
GTK_WIDGET_GET_CLASS (widget)->get_preferred_width (widget,
min_width,
nat_width);
}
else
{
... execute the real width-for-height request here based on
the required width of the children collectively if the
container were to be allocated the said height ...
}
}

Height for width requests are generally implemented in terms of a virtual allocation of widgets in the input orientation. Assuming an height-for-width request mode, a container would implement the get_preferred_height_for_width() virtual function by first calling Widget.getPreferredWidth for each of its children.

For each potential group of children that are lined up horizontally, the values returned by Widget.getPreferredWidth should be collected in an array of GtkRequestedSize structures. Any child spacing should be removed from the input for_width and then the collective size should be allocated using the gtk_distribute_natural_allocation() convenience function.

The container will then move on to request the preferred height for each child by using Widget.getPreferredHeightForWidth and using the sizes stored in the GtkRequestedSize array.

To allocate a height-for-width container, it’s again important to consider that a container must prioritize one dimension over the other. So if a container is a height-for-width container it must first allocate all widgets horizontally using a GtkRequestedSize array and gtk_distribute_natural_allocation() and then add any extra space (if and where appropriate) for the widget to expand.

After adding all the expand space, the container assumes it was allocated sufficient height to fit all of its content. At this time, the container must use the total horizontal sizes of each widget to request the height-for-width of each of its children and store the requests in a GtkRequestedSize array for any widgets that stack vertically (for tabular containers this can be generalized into the heights and widths of rows and columns). The vertical space must then again be distributed using gtk_distribute_natural_allocation() while this time considering the allocated height of the widget minus any vertical spacing that the container adds. Then vertical expand space should be added where appropriate and available and the container should go on to actually allocating the child widgets.

See [GtkWidget’s geometry management section][geometry-management] to learn more about implementing height-for-width geometry management for widgets.

Child properties

GtkContainer introduces child properties. These are object properties that are not specific to either the container or the contained widget, but rather to their relation. Typical examples of child properties are the position or pack-type of a widget which is contained in a gtk.Box

Use Container.classInstallChildProperty to install child properties for a container class and Container.classFindChildProperty or Container.classListChildProperties to get information about existing child properties.

To set the value of a child property, use Container.childSetProperty, Container.childSet or Container.childSetValist. To obtain the value of a child property, use Container.childGetProperty, Container.childGet or Container.childGetValist. To emit notification about child property changes, use Widget.childNotify.

GtkContainer as GtkBuildable

The GtkContainer implementation of the GtkBuildable interface supports a <packing> element for children, which can contain multiple <property> elements that specify child properties for the child.

Since 2.16, child properties can also be marked as translatable using the same “translatable”, “comments” and “context” attributes that are used for regular properties.

Since 3.16, containers can have a <focus-chain> element containing multiple <widget> elements, one for each child that should be added to the focus chain. The ”name” attribute gives the id of the widget.

An example of these properties in UI definitions: |[ <object class="GtkBox"> <child> <object class="GtkEntry" id="entry1"/> <packing> <property name="pack-type">start</property> </packing> </child> <child> <object class="GtkEntry" id="entry2"/> </child> <focus-chain> <widget name="entry1"/> <widget name="entry2"/> </focus-chain> </object>

class Container : Widget {}

Constructors

this
this(GtkContainer* gtkContainer, bool ownedRef)

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

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

add
void add(Widget widget)

Adds widget to container. Typically used for simple containers such as gtk.Window, gtk.Frame, or gtk.Button; for more complicated layout containers such as gtk.Box or gtk.Grid, this function will pick default packing parameters that may not be correct. So consider functions such as Box.packStart and Grid.attach as an alternative to Container.add in those cases. A widget may be added to only one container at a time; you can’t place the same widget inside two different containers.

addOnAdd
gulong addOnAdd(void delegate(Widget, Container) dlg, ConnectFlags connectFlags)
addOnCheckResize
gulong addOnCheckResize(void delegate(Container) dlg, ConnectFlags connectFlags)
addOnRemove
gulong addOnRemove(void delegate(Widget, Container) dlg, ConnectFlags connectFlags)
addOnSetFocusChild
gulong addOnSetFocusChild(void delegate(Widget, Container) dlg, ConnectFlags connectFlags)
checkResize
void checkResize()
childGetProperty
void childGetProperty(Widget child, string propertyName, Value value)

Gets the value of a child property for child and container.

childGetValist
void childGetValist(Widget child, string firstPropertyName, void* varArgs)

Gets the values of one or more child properties for child and container.

childNotify
void childNotify(Widget child, string childProperty)

Emits a child-notify signal for the [child property][child-properties] child_property on the child.

childNotifyByPspec
void childNotifyByPspec(Widget child, ParamSpec pspec)

Emits a child-notify signal for the [child property][child-properties] specified by pspec on the child.

childSetProperty
void childSetProperty(Widget child, string propertyName, Value value)

Sets a child property for child and container.

childSetValist
void childSetValist(Widget child, string firstPropertyName, void* varArgs)

Sets one or more child properties for child and container.

childType
GType childType()

Returns the type of the children supported by the container.

forall
void forall(GtkCallback callback, void* callbackData)

Invokes callback on each direct child of container, including children that are considered “internal” (implementation details of the container). “Internal” children generally weren’t added by the user of the container, but were added by the container implementation itself.

foreach_
void foreach_(GtkCallback callback, void* callbackData)

Invokes callback on each non-internal child of container. See Container.forall for details on what constitutes an “internal” child. For all practical purposes, this function should iterate over precisely those child widgets that were added to the container by the application with explicit add() calls.

getBorderWidth
uint getBorderWidth()

Retrieves the border width of the container. See Container.setBorderWidth.

getChildren
ListG getChildren()

Returns the container’s non-internal children. See Container.forall for details on what constitutes an "internal" child.

getContainerStruct
GtkContainer* getContainerStruct(bool transferOwnership)

Get the main Gtk struct

getFocusChain
bool getFocusChain(ListG focusableWidgets)

Retrieves the focus chain of the container, if one has been set explicitly. If no focus chain has been explicitly set, GTK+ computes the focus chain based on the positions of the children. In that case, GTK+ stores NULL in focusable_widgets and returns FALSE.

getFocusChild
Widget getFocusChild()

Returns the current focus child widget inside container. This is not the currently focused widget. That can be obtained by calling Window.getFocus.

getFocusHadjustment
Adjustment getFocusHadjustment()

Retrieves the horizontal focus adjustment for the container. See gtk_container_set_focus_hadjustment ().

getFocusVadjustment
Adjustment getFocusVadjustment()

Retrieves the vertical focus adjustment for the container. See Container.setFocusVadjustment.

getPathForChild
WidgetPath getPathForChild(Widget child)

Returns a newly created widget path representing all the widget hierarchy from the toplevel down to and including child.

getResizeMode
GtkResizeMode getResizeMode()

Returns the resize mode for the container. See gtk_container_set_resize_mode ().

getStruct
void* getStruct()

the main Gtk struct as a void*

propagateDraw
void propagateDraw(Widget child, Context cr)

When a container receives a call to the draw function, it must send synthetic draw calls to all children that don’t have their own gdk.Windows This function provides a convenient way of doing this. A container, when it receives a call to its draw function, calls Container.propagateDraw once for each child, passing in the cr the container received.

remove
void remove(Widget widget)

Removes widget from container. widget must be inside container. Note that container will own a reference to widget, and that this may be the last reference held; so removing a widget from its container can destroy that widget. If you want to use widget again, you need to add a reference to it before removing it from a container, using g_object_ref(). If you don’t want to use widget again it’s usually more efficient to simply destroy it directly using Widget.destroy since this will remove it from the container and help break any circular reference count cycles.

removeAll
void removeAll()

Removes all widgets from the container

resizeChildren
void resizeChildren()
setBorderWidth
void setBorderWidth(uint borderWidth)

Sets the border width of the container.

setFocusChain
void setFocusChain(ListG focusableWidgets)

Sets a focus chain, overriding the one computed automatically by GTK+.

setFocusChild
void setFocusChild(Widget child)

Sets, or unsets if child is NULL, the focused child of container.

setFocusHadjustment
void setFocusHadjustment(Adjustment adjustment)

Hooks up an adjustment to focus handling in a container, so when a child of the container is focused, the adjustment is scrolled to show that widget. This function sets the horizontal alignment. See ScrolledWindow.getHadjustment for a typical way of obtaining the adjustment and Container.setFocusVadjustment for setting the vertical adjustment.

setFocusVadjustment
void setFocusVadjustment(Adjustment adjustment)

Hooks up an adjustment to focus handling in a container, so when a child of the container is focused, the adjustment is scrolled to show that widget. This function sets the vertical alignment. See ScrolledWindow.getVadjustment for a typical way of obtaining the adjustment and Container.setFocusHadjustment for setting the horizontal adjustment.

setReallocateRedraws
void setReallocateRedraws(bool needsRedraws)

Sets the reallocate_redraws flag of the container to the given value.

setResizeMode
void setResizeMode(GtkResizeMode resizeMode)

Sets the resize mode for the container.

unsetFocusChain
void unsetFocusChain()

Removes a focus chain explicitly set with Container.setFocusChain.

Static functions

getType
GType getType()

Variables

gtkContainer
GtkContainer* gtkContainer;

the main Gtk struct

Inherited Members

From Widget

gtkWidget
GtkWidget* gtkWidget;

the main Gtk struct

getWidgetStruct
GtkWidget* getWidgetStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getWidth
int getWidth()
getHeight
int getHeight()
setCursor
void setCursor(Cursor cursor)

Sets the cursor.

resetCursor
void resetCursor()

Resets the cursor. don't know if this is implemented by GTK+. Seems that it's not

modifyFont
void modifyFont(string family, int size)

Modifies the font for this widget. This just calls modifyFont(new PgFontDescription(PgFontDescription.fromString(family ~ " " ~ size)));

onEvent
bool onEvent(GdkEvent* event)
onButtonPressEvent
bool onButtonPressEvent(GdkEventButton* event)
onButtonReleaseEvent
bool onButtonReleaseEvent(GdkEventButton* event)
onScrollEvent
bool onScrollEvent(GdkEventScroll* event)
onMotionNotifyEvent
bool onMotionNotifyEvent(GdkEventMotion* event)
onDeleteEvent
bool onDeleteEvent(GdkEventAny* event)
onDestroyEvent
bool onDestroyEvent(GdkEventAny* event)
onKeyPressEvent
bool onKeyPressEvent(GdkEventKey* event)
onKeyReleaseEvent
bool onKeyReleaseEvent(GdkEventKey* event)
onEnterNotifyEvent
bool onEnterNotifyEvent(GdkEventCrossing* event)
onLeaveNotifyEvent
bool onLeaveNotifyEvent(GdkEventCrossing* event)
onConfigureEvent
bool onConfigureEvent(GdkEventConfigure* event)
onFocusInEvent
bool onFocusInEvent(GdkEventFocus* event)
onFocusOutEvent
bool onFocusOutEvent(GdkEventFocus* event)
onMapEvent
bool onMapEvent(GdkEventAny* event)
onUnmapEvent
bool onUnmapEvent(GdkEventAny* event)
onPropertyNotifyEvent
bool onPropertyNotifyEvent(GdkEventProperty* event)
onSelectionClearEvent
bool onSelectionClearEvent(GdkEventSelection* event)
onSelectionRequestEvent
bool onSelectionRequestEvent(GdkEventSelection* event)
onSelectionNotifyEvent
bool onSelectionNotifyEvent(GdkEventSelection* event)
onProximityInEvent
bool onProximityInEvent(GdkEventProximity* event)
onProximityOutEvent
bool onProximityOutEvent(GdkEventProximity* event)
onVisibilityNotifyEvent
bool onVisibilityNotifyEvent(GdkEventVisibility* event)
onWindowStateEvent
bool onWindowStateEvent(GdkEventWindowState* event)
onDamageEvent
bool onDamageEvent(GdkEventExpose* event)
onGrabBrokenEvent
bool onGrabBrokenEvent(GdkEventGrabBroken* event)
addTickCallback
void addTickCallback(bool delegate(Widget, FrameClock) callback)

Queues an animation frame update and adds a callback to be called before each frame. Until the tick callback is removed, it will be called frequently (usually at the frame rate of the output device or as quickly as the application can be repainted, whichever is slower). For this reason, is most suitable for handling graphics that change every frame or every few frames. The tick callback does not automatically imply a relayout or repaint. If you want a repaint or relayout, and aren't changing widget properties that would trigger that (for example, changing the text of a gtk.Label), then you will have to call queueResize() or queuDrawArea() yourself.

addOnDraw
gulong addOnDraw(bool delegate(Scoped!Context, Widget) dlg, ConnectFlags connectFlags)

This signal is emitted when a widget is supposed to render itself. The widget's top left corner must be painted at the origin of the passed in context and be sized to the values returned by Widget.getAllocatedWidth and Widget.getAllocatedHeight.

addOnDraw
gulong addOnDraw(bool delegate(Context, Widget) dlg, ConnectFlags connectFlags)

This signal is emitted when a widget is supposed to render itself. The widget's top left corner must be painted at the origin of the passed in context and be sized to the values returned by Widget.getAllocatedWidth and Widget.getAllocatedHeight.

getType
GType getType()
getDefaultDirection
GtkTextDirection getDefaultDirection()

Obtains the current default reading direction. See Widget.setDefaultDirection.

getDefaultStyle
Style getDefaultStyle()

Returns the default style used by all widgets initially.

popCompositeChild
void popCompositeChild()

Cancels the effect of a previous call to Widget.pushCompositeChild.

pushCompositeChild
void pushCompositeChild()

Makes all newly-created widgets as composite children until the corresponding Widget.popCompositeChild call.

setDefaultDirection
void setDefaultDirection(GtkTextDirection dir)

Sets the default reading direction for widgets where the direction has not been explicitly set by Widget.setDirection.

activate
bool activate()

For widgets that can be “activated” (buttons, menu items, etc.) this function activates them. Activation is what happens when you press Enter on a widget during key navigation. If widget isn't activatable, the function returns FALSE.

addAccelerator
void addAccelerator(string accelSignal, AccelGroup accelGroup, uint accelKey, GdkModifierType accelMods, GtkAccelFlags accelFlags)

Installs an accelerator for this widget in accel_group that causes accel_signal to be emitted if the accelerator is activated. The accel_group needs to be added to the widget’s toplevel via Window.addAccelGroup, and the signal must be of type G_SIGNAL_ACTION. Accelerators added through this function are not user changeable during runtime. If you want to support accelerators that can be changed by the user, use AccelMap.addEntry and Widget.setAccelPath or Menu.itemSetAccelPath instead.

addDeviceEvents
void addDeviceEvents(Device device, GdkEventMask events)

Adds the device events in the bitfield events to the event mask for widget. See Widget.setDeviceEvents for details.

addEvents
void addEvents(int events)

Adds the events in the bitfield events to the event mask for widget. See Widget.setEvents and the [input handling overview][event-masks] for details.

addMnemonicLabel
void addMnemonicLabel(Widget label)

Adds a widget to the list of mnemonic labels for this widget. (See Widget.listMnemonicLabels). Note the list of mnemonic labels for the widget is cleared when the widget is destroyed, so the caller must make sure to update its internal state at this point as well, by using a connection to the destroy signal or a weak notifier.

addTickCallback
uint addTickCallback(GtkTickCallback callback, void* userData, GDestroyNotify notify)

Queues an animation frame update and adds a callback to be called before each frame. Until the tick callback is removed, it will be called frequently (usually at the frame rate of the output device or as quickly as the application can be repainted, whichever is slower). For this reason, is most suitable for handling graphics that change every frame or every few frames. The tick callback does not automatically imply a relayout or repaint. If you want a repaint or relayout, and aren’t changing widget properties that would trigger that (for example, changing the text of a gtk.Label), then you will have to call Widget.queueResize or Widget.queueDrawArea yourself.

canActivateAccel
bool canActivateAccel(uint signalId)

Determines whether an accelerator that activates the signal identified by signal_id can currently be activated. This is done by emitting the can-activate-accel signal on widget; if the signal isn’t overridden by a handler or in a derived widget, then the default check is that the widget must be sensitive, and the widget and all its ancestors mapped.

childFocus
bool childFocus(GtkDirectionType direction)

This function is used by custom widget implementations; if you're writing an app, you’d use Widget.grabFocus to move the focus to a particular widget, and Container.setFocusChain to change the focus tab order. So you may want to investigate those functions instead.

childNotify
void childNotify(string childProperty)

Emits a child-notify signal for the [child property][child-properties] child_property on widget.

classPath
void classPath(uint pathLength, string path, string pathReversed)

Same as Widget.path, but always uses the name of a widget’s type, never uses a custom name set with Widget.setName.

computeExpand
bool computeExpand(GtkOrientation orientation)

Computes whether a container should give this widget extra space when possible. Containers should check this, rather than looking at Widget.getHexpand or Widget.getVexpand.

createPangoContext
PgContext createPangoContext()

Creates a new gstreamer.Context with the appropriate font map, font options, font description, and base direction for drawing text for this widget. See also Widget.getPangoContext.

createPangoLayout
PgLayout createPangoLayout(string text)

Creates a new gtk.Layout with the appropriate font map, font description, and base direction for drawing text for this widget.

destroy
void destroy()

Destroys a widget.

destroyed
void destroyed(Widget widgetPointer)

This function sets *widget_pointer to NULL if widget_pointer != NULL. It’s intended to be used as a callback connected to the “destroy” signal of a widget. You connect Widget.destroyed as a signal handler, and pass the address of your widget variable as user data. Then when the widget is destroyed, the variable will be set to NULL. Useful for example to avoid multiple copies of the same dialog.

deviceIsShadowed
bool deviceIsShadowed(Device device)

Returns TRUE if device has been shadowed by a GTK+ device grab on another widget, so it would stop sending events to widget. This may be used in the grab-notify signal to check for specific devices. See Device.grabAdd.

dragBegin
DragContext dragBegin(TargetList targets, GdkDragAction actions, int button, Event event)

This function is equivalent to gtk_drag_begin_with_coordinates(), passing -1, -1 as coordinates.

dragBeginWithCoordinates
DragContext dragBeginWithCoordinates(TargetList targets, GdkDragAction actions, int button, Event event, int x, int y)

Initiates a drag on the source side. The function only needs to be used when the application is starting drags itself, and is not needed when gtk_drag_source_set() is used.

dragCheckThreshold
bool dragCheckThreshold(int startX, int startY, int currentX, int currentY)

Checks to see if a mouse drag starting at (start_x, start_y) and ending at (current_x, current_y) has passed the GTK+ drag threshold, and thus should trigger the beginning of a drag-and-drop operation.

dragDestAddImageTargets
void dragDestAddImageTargets()

Add the image targets supported by gtk.SelectionData to the target list of the drag destination. The targets are added with info = 0. If you need another value, use TargetList.addImageTargets and gtk_drag_dest_set_target_list().

dragDestAddTextTargets
void dragDestAddTextTargets()

Add the text targets supported by gtk.SelectionData to the target list of the drag destination. The targets are added with info = 0. If you need another value, use TargetList.addTextTargets and gtk_drag_dest_set_target_list().

dragDestAddUriTargets
void dragDestAddUriTargets()

Add the URI targets supported by gtk.SelectionData to the target list of the drag destination. The targets are added with info = 0. If you need another value, use TargetList.addUriTargets and gtk_drag_dest_set_target_list().

dragDestFindTarget
GdkAtom dragDestFindTarget(DragContext context, TargetList targetList)

Looks for a match between the supported targets of context and the dest_target_list, returning the first matching target, otherwise returning GDK_NONE. dest_target_list should usually be the return value from gtk_drag_dest_get_target_list(), but some widgets may have different valid targets for different parts of the widget; in that case, they will have to implement a drag_motion handler that passes the correct target list to this function.

dragDestGetTargetList
TargetList dragDestGetTargetList()

Returns the list of targets this widget can accept from drag-and-drop.

dragDestGetTrackMotion
bool dragDestGetTrackMotion()

Returns whether the widget has been configured to always emit drag-motion signals.

dragDestSet
void dragDestSet(GtkDestDefaults flags, TargetEntry[] targets, GdkDragAction actions)

Sets a widget as a potential drop destination, and adds default behaviors.

dragDestSetProxy
void dragDestSetProxy(GdkWin proxyWindow, GdkDragProtocol protocol, bool useCoordinates)

Sets this widget as a proxy for drops to another window.

dragDestSetTargetList
void dragDestSetTargetList(TargetList targetList)

Sets the target types that this widget can accept from drag-and-drop. The widget must first be made into a drag destination with gtk_drag_dest_set().

dragDestSetTrackMotion
void dragDestSetTrackMotion(bool trackMotion)

Tells the widget to emit drag-motion and drag-leave events regardless of the targets and the GTK_DEST_DEFAULT_MOTION flag.

dragDestUnset
void dragDestUnset()

Clears information about a drop destination set with gtk_drag_dest_set(). The widget will no longer receive notification of drags.

dragGetData
void dragGetData(DragContext context, GdkAtom target, uint time)

Gets the data associated with a drag. When the data is received or the retrieval fails, GTK+ will emit a drag-data-received signal. Failure of the retrieval is indicated by the length field of the selection_data signal parameter being negative. However, when gtk_drag_get_data() is called implicitely because the GTK_DEST_DEFAULT_DROP was set, then the widget will not receive notification of failed drops.

dragHighlight
void dragHighlight()

Highlights a widget as a currently hovered drop target. To end the highlight, call gtk_drag_unhighlight(). GTK+ calls this automatically if GTK_DEST_DEFAULT_HIGHLIGHT is set.

dragSourceAddImageTargets
void dragSourceAddImageTargets()

Add the writable image targets supported by gtk.SelectionData to the target list of the drag source. The targets are added with info = 0. If you need another value, use TargetList.addImageTargets and gtk_drag_source_set_target_list().

dragSourceAddTextTargets
void dragSourceAddTextTargets()

Add the text targets supported by gtk.SelectionData to the target list of the drag source. The targets are added with info = 0. If you need another value, use TargetList.addTextTargets and gtk_drag_source_set_target_list().

dragSourceAddUriTargets
void dragSourceAddUriTargets()

Add the URI targets supported by gtk.SelectionData to the target list of the drag source. The targets are added with info = 0. If you need another value, use TargetList.addUriTargets and gtk_drag_source_set_target_list().

dragSourceGetTargetList
TargetList dragSourceGetTargetList()

Gets the list of targets this widget can provide for drag-and-drop.

dragSourceSet
void dragSourceSet(GdkModifierType startButtonMask, TargetEntry[] targets, GdkDragAction actions)

Sets up a widget so that GTK+ will start a drag operation when the user clicks and drags on the widget. The widget must have a window.

dragSourceSetIconGicon
void dragSourceSetIconGicon(IconIF icon)

Sets the icon that will be used for drags from a particular source to icon. See the docs for gtk.IconTheme for more details.

dragSourceSetIconName
void dragSourceSetIconName(string iconName)

Sets the icon that will be used for drags from a particular source to a themed icon. See the docs for gtk.IconTheme for more details.

dragSourceSetIconPixbuf
void dragSourceSetIconPixbuf(Pixbuf pixbuf)

Sets the icon that will be used for drags from a particular widget from a gdk.Pixbuf GTK+ retains a reference for pixbuf and will release it when it is no longer needed.

dragSourceSetIconStock
void dragSourceSetIconStock(string stockId)

Sets the icon that will be used for drags from a particular source to a stock icon.

dragSourceSetTargetList
void dragSourceSetTargetList(TargetList targetList)

Changes the target types that this widget offers for drag-and-drop. The widget must first be made into a drag source with gtk_drag_source_set().

dragSourceUnset
void dragSourceUnset()

Undoes the effects of gtk_drag_source_set().

dragUnhighlight
void dragUnhighlight()

Removes a highlight set by gtk_drag_highlight() from a widget.

draw
void draw(Context cr)

Draws widget to cr. The top left corner of the widget will be drawn to the currently set origin point of cr.

ensureStyle
void ensureStyle()

Ensures that widget has a style (widget->style).

errorBell
void errorBell()

Notifies the user about an input-related error on this widget. If the gtk-error-bell setting is TRUE, it calls Window.beep, otherwise it does nothing.

event
bool event(Event event)

Rarely-used function. This function is used to emit the event signals on a widget (those signals should never be emitted without using this function to do so). If you want to synthesize an event though, don’t use this function; instead, use Main.doEvent so the event will behave as if it were in the event queue. Don’t synthesize expose events; instead, use Window.invalidateRect to invalidate a region of the window.

freezeChildNotify
void freezeChildNotify()

Stops emission of child-notify signals on widget. The signals are queued until Widget.thawChildNotify is called on widget.

getAccessible
ObjectAtk getAccessible()

Returns the accessible object that describes the widget to an assistive technology.

getActionGroup
ActionGroupIF getActionGroup(string prefix)

Retrieves the gtk.ActionGroup that was registered using prefix. The resulting gtk.ActionGroup may have been registered to widget or any gtk.Widget in its ancestry.

getAllocatedBaseline
int getAllocatedBaseline()

Returns the baseline that has currently been allocated to widget. This function is intended to be used when implementing handlers for the draw function, and when allocating child widgets in size_allocate.

getAllocatedHeight
int getAllocatedHeight()

Returns the height that has currently been allocated to widget. This function is intended to be used when implementing handlers for the draw function.

getAllocatedSize
void getAllocatedSize(GtkAllocation allocation, int baseline)

Retrieves the widget’s allocated size.

getAllocatedWidth
int getAllocatedWidth()

Returns the width that has currently been allocated to widget. This function is intended to be used when implementing handlers for the draw function.

getAllocation
void getAllocation(GtkAllocation allocation)

Retrieves the widget’s allocation.

getAncestor
Widget getAncestor(GType widgetType)

Gets the first ancestor of widget with type widget_type. For example, gtk_widget_get_ancestor (widget, GTK_TYPE_BOX) gets the first gtk.Box that’s an ancestor of widget. No reference will be added to the returned widget; it should not be unreferenced. See note about checking for a toplevel gtk.Window in the docs for Widget.getToplevel.

getAppPaintable
bool getAppPaintable()

Determines whether the application intends to draw on the widget in an draw handler.

getCanDefault
bool getCanDefault()

Determines whether widget can be a default widget. See Widget.setCanDefault.

getCanFocus
bool getCanFocus()

Determines whether widget can own the input focus. See Widget.setCanFocus.

getChildRequisition
void getChildRequisition(Requisition requisition)

This function is only for use in widget implementations. Obtains widget->requisition, unless someone has forced a particular geometry on the widget (e.g. with Widget.setSizeRequest), in which case it returns that geometry instead of the widget's requisition.

getChildVisible
bool getChildVisible()

Gets the value set with Widget.setChildVisible. If you feel a need to use this function, your code probably needs reorganization.

getClip
void getClip(GtkAllocation clip)

Retrieves the widget’s clip area.

getClipboard
Clipboard getClipboard(GdkAtom selection)

Returns the clipboard object for the given selection to be used with widget. widget must have a gdk.Display associated with it, so must be attached to a toplevel window.

getCompositeName
string getCompositeName()

Obtains the composite name of a widget.

getDeviceEnabled
bool getDeviceEnabled(Device device)

Returns whether device can interact with widget and its children. See Widget.setDeviceEnabled.

getDeviceEvents
GdkEventMask getDeviceEvents(Device device)

Returns the events mask for the widget corresponding to an specific device. These are the events that the widget will receive when device operates on it.

getDirection
GtkTextDirection getDirection()

Gets the reading direction for a particular widget. See Widget.setDirection.

getDisplay
Display getDisplay()

Get the gdk.Display for the toplevel window associated with this widget. This function can only be called after the widget has been added to a widget hierarchy with a gtk.Window at the top.

getDoubleBuffered
bool getDoubleBuffered()

Determines whether the widget is double buffered.

getEvents
int getEvents()

Returns the event mask (see GdkEventMask) for the widget. These are the events that the widget will receive.

getFocusOnClick
bool getFocusOnClick()

Returns whether the widget should grab focus when it is clicked with the mouse. See Widget.setFocusOnClick.

getFontMap
PgFontMap getFontMap()

Gets the font map that has been set with Widget.setFontMap.

getFontOptions
FontOption getFontOptions()

Returns the cairo_font_options_t used for Pango rendering. When not set, the defaults font options for the gdk.Screen will be used.

getFrameClock
FrameClock getFrameClock()

Obtains the frame clock for a widget. The frame clock is a global “ticker” that can be used to drive animations and repaints. The most common reason to get the frame clock is to call Frame.clockGetFrameTime, in order to get a time to use for animating. For example you might record the start of the animation with an initial value from Frame.clockGetFrameTime, and then update the animation by calling Frame.clockGetFrameTime again during each repaint.

getHalign
GtkAlign getHalign()

Gets the value of the halign property.

getHasTooltip
bool getHasTooltip()

Returns the current value of the has-tooltip property. See has-tooltip for more information.

getHasWindow
bool getHasWindow()

Determines whether widget has a gdk.Window of its own. See Widget.setHasWindow.

getHexpand
bool getHexpand()

Gets whether the widget would like any available extra horizontal space. When a user resizes a gtk.Window, widgets with expand=TRUE generally receive the extra space. For example, a list or scrollable area or document in your window would often be set to expand.

getHexpandSet
bool getHexpandSet()

Gets whether Widget.setHexpand has been used to explicitly set the expand flag on this widget.

getMapped
bool getMapped()

Whether the widget is mapped.

getMarginBottom
int getMarginBottom()

Gets the value of the margin-bottom property.

getMarginEnd
int getMarginEnd()

Gets the value of the margin-end property.

getMarginLeft
int getMarginLeft()

Gets the value of the margin-left property.

getMarginRight
int getMarginRight()

Gets the value of the margin-right property.

getMarginStart
int getMarginStart()

Gets the value of the margin-start property.

getMarginTop
int getMarginTop()

Gets the value of the margin-top property.

getModifierMask
GdkModifierType getModifierMask(GdkModifierIntent intent)

Returns the modifier mask the widget’s windowing system backend uses for a particular purpose.

getModifierStyle
RcStyle getModifierStyle()

Returns the current modifier style for the widget. (As set by Widget.modifyStyle.) If no style has previously set, a new gtk.RcStyle will be created with all values unset, and set as the modifier style for the widget. If you make changes to this rc style, you must call Widget.modifyStyle, passing in the returned rc style, to make sure that your changes take effect.

getName
string getName()

Retrieves the name of a widget. See Widget.setName for the significance of widget names.

getNoShowAll
bool getNoShowAll()

Returns the current value of the no-show-all property, which determines whether calls to Widget.showAll will affect this widget.

getOpacity
double getOpacity()

Fetches the requested opacity for this widget. See Widget.setOpacity.

getPangoContext
PgContext getPangoContext()

Gets a gstreamer.Context with the appropriate font map, font description, and base direction for this widget. Unlike the context returned by Widget.createPangoContext, this context is owned by the widget (it can be used until the screen for the widget changes or the widget is removed from its toplevel), and will be updated to match any changes to the widget’s attributes. This can be tracked by using the screen-changed signal on the widget.

getParent
Widget getParent()

Returns the parent container of widget.

getParentWindow
GdkWin getParentWindow()

Gets widget’s parent window, or NULL if it does not have one.

getPath
WidgetPath getPath()

Returns the gtk.WidgetPath representing widget, if the widget is not connected to a toplevel widget, a partial path will be created.

getPointer
void getPointer(int x, int y)

Obtains the location of the mouse pointer in widget coordinates. Widget coordinates are a bit odd; for historical reasons, they are defined as widget->window coordinates for widgets that return TRUE for Widget.getHasWindow; and are relative to widget->allocation.x, widget->allocation.y otherwise.

getPreferredHeight
void getPreferredHeight(int minimumHeight, int naturalHeight)

Retrieves a widget’s initial minimum and natural height.

getPreferredHeightAndBaselineForWidth
void getPreferredHeightAndBaselineForWidth(int width, int minimumHeight, int naturalHeight, int minimumBaseline, int naturalBaseline)

Retrieves a widget’s minimum and natural height and the corresponding baselines if it would be given the specified width, or the default height if width is -1. The baselines may be -1 which means that no baseline is requested for this widget.

getPreferredHeightForWidth
void getPreferredHeightForWidth(int width, int minimumHeight, int naturalHeight)

Retrieves a widget’s minimum and natural height if it would be given the specified width.

getPreferredSize
void getPreferredSize(Requisition minimumSize, Requisition naturalSize)

Retrieves the minimum and natural size of a widget, taking into account the widget’s preference for height-for-width management.

getPreferredWidth
void getPreferredWidth(int minimumWidth, int naturalWidth)

Retrieves a widget’s initial minimum and natural width.

getPreferredWidthForHeight
void getPreferredWidthForHeight(int height, int minimumWidth, int naturalWidth)

Retrieves a widget’s minimum and natural width if it would be given the specified height.

getRealized
bool getRealized()

Determines whether widget is realized.

getReceivesDefault
bool getReceivesDefault()

Determines whether widget is always treated as the default widget within its toplevel when it has the focus, even if another widget is the default.

getRequestMode
GtkSizeRequestMode getRequestMode()

Gets whether the widget prefers a height-for-width layout or a width-for-height layout.

getRequisition
void getRequisition(Requisition requisition)

Retrieves the widget’s requisition.

getRootWindow
GdkWin getRootWindow()

Get the root window where this widget is located. This function can only be called after the widget has been added to a widget hierarchy with gtk.Window at the top.

getScaleFactor
int getScaleFactor()

Retrieves the internal scale factor that maps from window coordinates to the actual device pixels. On traditional systems this is 1, on high density outputs, it can be a higher value (typically 2).

getScreen
Screen getScreen()

Get the gdk.Screen from the toplevel window associated with this widget. This function can only be called after the widget has been added to a widget hierarchy with a gtk.Window at the top.

getSensitive
bool getSensitive()

Returns the widget’s sensitivity (in the sense of returning the value that has been set using Widget.setSensitive).

getSettings
Settings getSettings()

Gets the settings object holding the settings used for this widget.

getSizeRequest
void getSizeRequest(int width, int height)

Gets the size request that was explicitly set for the widget using Widget.setSizeRequest. A value of -1 stored in width or height indicates that that dimension has not been set explicitly and the natural requisition of the widget will be used instead. See Widget.setSizeRequest. To get the size a widget will actually request, call Widget.getPreferredSize instead of this function.

getStateFlags
GtkStateFlags getStateFlags()

Returns the widget state as a flag set. It is worth mentioning that the effective GTK_STATE_FLAG_INSENSITIVE state will be returned, that is, also based on parent insensitivity, even if widget itself is sensitive.

getStyle
Style getStyle()

Simply an accessor function that returns widget->style.

getStyleContext
StyleContext getStyleContext()

Returns the style context associated to widget. The returned object is guaranteed to be the same for the lifetime of widget.

getSupportMultidevice
bool getSupportMultidevice()

Returns TRUE if widget is multiple pointer aware. See Widget.setSupportMultidevice for more information.

getTemplateChild
ObjectG getTemplateChild(GType widgetType, string name)

Fetch an object build from the template XML for widget_type in this widget instance.

getTooltipMarkup
string getTooltipMarkup()

Gets the contents of the tooltip for widget.

getTooltipText
string getTooltipText()

Gets the contents of the tooltip for widget.

getTooltipWindow
Window getTooltipWindow()

Returns the gtk.Window of the current tooltip. This can be the GtkWindow created by default, or the custom tooltip window set using Widget.setTooltipWindow.

getToplevel
Widget getToplevel()

This function returns the topmost widget in the container hierarchy widget is a part of. If widget has no parent widgets, it will be returned as the topmost widget. No reference will be added to the returned widget; it should not be unreferenced.

getValign
GtkAlign getValign()

Gets the value of the valign property.

getValignWithBaseline
GtkAlign getValignWithBaseline()

Gets the value of the valign property, including GTK_ALIGN_BASELINE.

getVexpand
bool getVexpand()

Gets whether the widget would like any available extra vertical space.

getVexpandSet
bool getVexpandSet()

Gets whether Widget.setVexpand has been used to explicitly set the expand flag on this widget.

getVisible
bool getVisible()

Determines whether the widget is visible. If you want to take into account whether the widget’s parent is also marked as visible, use Widget.isVisible instead.

getVisual
Visual getVisual()

Gets the visual that will be used to render widget.

getWindow
GdkWin getWindow()

Returns the widget’s window if it is realized, NULL otherwise

grabAdd
void grabAdd()

Makes widget the current grabbed widget.

grabDefault
void grabDefault()

Causes widget to become the default widget. widget must be able to be a default widget; typically you would ensure this yourself by calling Widget.setCanDefault with a TRUE value. The default widget is activated when the user presses Enter in a window. Default widgets must be activatable, that is, Widget.activate should affect them. Note that gtk.Entry widgets require the “activates-default” property set to TRUE before they activate the default widget when Enter is pressed and the gtk.Entry is focused.

grabFocus
void grabFocus()

Causes widget to have the keyboard focus for the gtk.Window it's inside. widget must be a focusable widget, such as a gtk.Entry; something like gtk.Frame won’t work.

grabRemove
void grabRemove()

Removes the grab from the given widget.

hasDefault
bool hasDefault()

Determines whether widget is the current default widget within its toplevel. See Widget.setCanDefault.

hasFocus
bool hasFocus()

Determines if the widget has the global input focus. See Widget.isFocus for the difference between having the global input focus, and only having the focus within a toplevel.

hasGrab
bool hasGrab()

Determines whether the widget is currently grabbing events, so it is the only widget receiving input events (keyboard and mouse).

hasRcStyle
bool hasRcStyle()

Determines if the widget style has been looked up through the rc mechanism.

hasScreen
bool hasScreen()

Checks whether there is a gdk.Screen is associated with this widget. All toplevel widgets have an associated screen, and all widgets added into a hierarchy with a toplevel window at the top.

hasVisibleFocus
bool hasVisibleFocus()

Determines if the widget should show a visible indication that it has the global input focus. This is a convenience function for use in ::draw handlers that takes into account whether focus indication should currently be shown in the toplevel window of widget. See Window.getFocusVisible for more information about focus indication.

hide
void hide()

Reverses the effects of Widget.show, causing the widget to be hidden (invisible to the user).

hideOnDelete
bool hideOnDelete()

Utility function; intended to be connected to the delete-event signal on a gtk.Window The function calls Widget.hide on its argument, then returns TRUE. If connected to ::delete-event, the result is that clicking the close button for a window (on the window frame, top right corner usually) will hide but not destroy the window. By default, GTK+ destroys windows when ::delete-event is received.

inDestruction
bool inDestruction()

Returns whether the widget is currently being destroyed. This information can sometimes be used to avoid doing unnecessary work.

initTemplate
void initTemplate()

Creates and initializes child widgets defined in templates. This function must be called in the instance initializer for any class which assigned itself a template using Widget.classSetTemplate

inputShapeCombineRegion
void inputShapeCombineRegion(Region region)

Sets an input shape for this widget’s GDK window. This allows for windows which react to mouse click in a nonrectangular region, see Window.inputShapeCombineRegion for more information.

insertActionGroup
void insertActionGroup(string name, ActionGroupIF group)

Inserts group into widget. Children of widget that implement GtkActionable can then be associated with actions in group by setting their “action-name” to prefix.action-name.

intersect
bool intersect(GdkRectangle* area, GdkRectangle intersection)

Computes the intersection of a widget’s area and area, storing the intersection in intersection, and returns TRUE if there was an intersection. intersection may be NULL if you’re only interested in whether there was an intersection.

isAncestor
bool isAncestor(Widget ancestor)

Determines whether widget is somewhere inside ancestor, possibly with intermediate containers.

isComposited
bool isComposited()

Whether widget can rely on having its alpha channel drawn correctly. On X11 this function returns whether a compositing manager is running for widget’s screen.

isDrawable
bool isDrawable()

Determines whether widget can be drawn to. A widget can be drawn to if it is mapped and visible.

isFocus
bool isFocus()

Determines if the widget is the focus widget within its toplevel. (This does not mean that the has-focus property is necessarily set; has-focus will only be set if the toplevel widget additionally has the global input focus.)

isSensitive
bool isSensitive()

Returns the widget’s effective sensitivity, which means it is sensitive itself and also its parent widget is sensitive

isToplevel
bool isToplevel()

Determines whether widget is a toplevel widget.

isVisible
bool isVisible()

Determines whether the widget and all its parents are marked as visible.

keynavFailed
bool keynavFailed(GtkDirectionType direction)

This function should be called whenever keyboard navigation within a single widget hits a boundary. The function emits the keynav-failed signal on the widget and its return value should be interpreted in a way similar to the return value of Widget.childFocus:

listAccelClosures
ListG listAccelClosures()

Lists the closures used by widget for accelerator group connections with AccelGroup.connectByPath or AccelGroup.connect. The closures can be used to monitor accelerator changes on widget, by connecting to the GtkAccelGroup::accel-changed signal of the gtk.AccelGroup of a closure which can be found out with AccelGroup.fromAccelClosure.

listActionPrefixes
string[] listActionPrefixes()

Retrieves a NULL-terminated array of strings containing the prefixes of gtk.ActionGroup's available to widget.

listMnemonicLabels
ListG listMnemonicLabels()

Returns a newly allocated list of the widgets, normally labels, for which this widget is the target of a mnemonic (see for example, Label.setMnemonicWidget).

map
void map()

This function is only for use in widget implementations. Causes a widget to be mapped if it isn’t already.

mnemonicActivate
bool mnemonicActivate(bool groupCycling)

Emits the mnemonic-activate signal.

modifyBase
void modifyBase(GtkStateType state, Color color)

Sets the base color for a widget in a particular state. All other style values are left untouched. The base color is the background color used along with the text color (see Widget.modifyText) for widgets such as gtk.Entry and gtk.TextView See also Widget.modifyStyle.

modifyBg
void modifyBg(GtkStateType state, Color color)

Sets the background color for a widget in a particular state.

modifyCursor
void modifyCursor(Color primary, Color secondary)

Sets the cursor color to use in a widget, overriding the gtk.Widget cursor-color and secondary-cursor-color style properties.

modifyFg
void modifyFg(GtkStateType state, Color color)

Sets the foreground color for a widget in a particular state.

modifyFont
void modifyFont(PgFontDescription fontDesc)

Sets the font to use for a widget.

modifyStyle
void modifyStyle(RcStyle style)

Modifies style values on the widget.

modifyText
void modifyText(GtkStateType state, Color color)

Sets the text color for a widget in a particular state.

overrideBackgroundColor
void overrideBackgroundColor(GtkStateFlags state, RGBA color)

Sets the background color to use for a widget.

overrideColor
void overrideColor(GtkStateFlags state, RGBA color)

Sets the color to use for a widget.

overrideCursor
void overrideCursor(RGBA cursor, RGBA secondaryCursor)

Sets the cursor color to use in a widget, overriding the cursor-color and secondary-cursor-color style properties. All other style values are left untouched. See also Widget.modifyStyle.

overrideFont
void overrideFont(PgFontDescription fontDesc)

Sets the font to use for a widget. All other style values are left untouched. See Widget.overrideColor.

overrideSymbolicColor
void overrideSymbolicColor(string name, RGBA color)

Sets a symbolic color for a widget.

path
void path(uint pathLength, string path, string pathReversed)

Obtains the full path to widget. The path is simply the name of a widget and all its parents in the container hierarchy, separated by periods. The name of a widget comes from Widget.getName. Paths are used to apply styles to a widget in gtkrc configuration files. Widget names are the type of the widget by default (e.g. “GtkButton”) or can be set to an application-specific value with Widget.setName. By setting the name of a widget, you allow users or theme authors to apply styles to that specific widget in their gtkrc file. path_reversed_p fills in the path in reverse order, i.e. starting with widget’s name instead of starting with the name of widget’s outermost ancestor.

queueAllocate
void queueAllocate()

This function is only for use in widget implementations.

queueComputeExpand
void queueComputeExpand()

Mark widget as needing to recompute its expand flags. Call this function when setting legacy expand child properties on the child of a container.

queueDraw
void queueDraw()

Equivalent to calling Widget.queueDrawArea for the entire area of a widget.

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

Convenience function that calls Widget.queueDrawRegion on the region created from the given coordinates.

queueDrawRegion
void queueDrawRegion(Region region)

Invalidates the area of widget defined by region by calling Window.invalidateRegion on the widget’s window and all its child windows. Once the main loop becomes idle (after the current batch of events has been processed, roughly), the window will receive expose events for the union of all regions that have been invalidated.

queueResize
void queueResize()

This function is only for use in widget implementations. Flags a widget to have its size renegotiated; should be called when a widget for some reason has a new size request. For example, when you change the text in a gtk.Label, gtk.Label queues a resize to ensure there’s enough space for the new text.

queueResizeNoRedraw
void queueResizeNoRedraw()

This function works like Widget.queueResize, except that the widget is not invalidated.

realize
void realize()

Creates the GDK (windowing system) resources associated with a widget. For example, widget->window will be created when a widget is realized. Normally realization happens implicitly; if you show a widget and all its parent containers, then the widget will be realized and mapped automatically.

regionIntersect
Region regionIntersect(Region region)

Computes the intersection of a widget’s area and region, returning the intersection. The result may be empty, use Region.isEmpty to check.

registerWindow
void registerWindow(GdkWin window)

Registers a gdk.Window with the widget and sets it up so that the widget receives events for it. Call Widget.unregisterWindow when destroying the window.

removeAccelerator
bool removeAccelerator(AccelGroup accelGroup, uint accelKey, GdkModifierType accelMods)

Removes an accelerator from widget, previously installed with Widget.addAccelerator.

removeMnemonicLabel
void removeMnemonicLabel(Widget label)

Removes a widget from the list of mnemonic labels for this widget. (See Widget.listMnemonicLabels). The widget must have previously been added to the list with Widget.addMnemonicLabel.

removeTickCallback
void removeTickCallback(uint id)

Removes a tick callback previously registered with Widget.addTickCallback.

renderIcon
Pixbuf renderIcon(string stockId, GtkIconSize size, string detail)

A convenience function that uses the theme settings for widget to look up stock_id and render it to a pixbuf. stock_id should be a stock icon ID such as GTK_STOCK_OPEN or GTK_STOCK_OK size should be a size such as GTK_ICON_SIZE_MENU detail should be a string that identifies the widget or code doing the rendering, so that theme engines can special-case rendering for that widget or code.

renderIconPixbuf
Pixbuf renderIconPixbuf(string stockId, GtkIconSize size)

A convenience function that uses the theme engine and style settings for widget to look up stock_id and render it to a pixbuf. stock_id should be a stock icon ID such as GTK_STOCK_OPEN or GTK_STOCK_OK size should be a size such as GTK_ICON_SIZE_MENU

reparent
void reparent(Widget newParent)

Moves a widget from one gtk.Container to another, handling reference count issues to avoid destroying the widget.

resetRcStyles
void resetRcStyles()

Reset the styles of widget and all descendents, so when they are looked up again, they get the correct values for the currently loaded RC file settings.

resetStyle
void resetStyle()

Updates the style context of widget and all descendants by updating its widget path. gtk.Containers may want to use this on a child when reordering it in a way that a different style might apply to it. See also Container.getPathForChild.

sendExpose
int sendExpose(Event event)

Very rarely-used function. This function is used to emit an expose event on a widget. This function is not normally used directly. The only time it is used is when propagating an expose event to a windowless child widget (Widget.getHasWindow is FALSE), and that is normally done using Container.propagateDraw.

sendFocusChange
bool sendFocusChange(Event event)

Sends the focus change event to widget

setAccelPath
void setAccelPath(string accelPath, AccelGroup accelGroup)

Given an accelerator group, accel_group, and an accelerator path, accel_path, sets up an accelerator in accel_group so whenever the key binding that is defined for accel_path is pressed, widget will be activated. This removes any accelerators (for any accelerator group) installed by previous calls to Widget.setAccelPath. Associating accelerators with paths allows them to be modified by the user and the modifications to be saved for future use. (See AccelMap.save.)

setAllocation
void setAllocation(GtkAllocation* allocation)

Sets the widget’s allocation. This should not be used directly, but from within a widget’s size_allocate method.

setAppPaintable
void setAppPaintable(bool appPaintable)

Sets whether the application intends to draw on the widget in an draw handler.

setCanDefault
void setCanDefault(bool canDefault)

Specifies whether widget can be a default widget. See Widget.grabDefault for details about the meaning of “default”.

setCanFocus
void setCanFocus(bool canFocus)

Specifies whether widget can own the input focus. See Widget.grabFocus for actually setting the input focus on a widget.

setChildVisible
void setChildVisible(bool isVisible)

Sets whether widget should be mapped along with its when its parent is mapped and widget has been shown with Widget.show.

setClip
void setClip(GtkAllocation* clip)

Sets the widget’s clip. This must not be used directly, but from within a widget’s size_allocate method. It must be called after Widget.setAllocation (or after chaining up to the parent class), because that function resets the clip.

setCompositeName
void setCompositeName(string name)

Sets a widgets composite name. The widget must be a composite child of its parent; see Widget.pushCompositeChild.

setDeviceEnabled
void setDeviceEnabled(Device device, bool enabled)

Enables or disables a gdk.Device to interact with widget and all its children.

setDeviceEvents
void setDeviceEvents(Device device, GdkEventMask events)

Sets the device event mask (see GdkEventMask) for a widget. The event mask determines which events a widget will receive from device. Keep in mind that different widgets have different default event masks, and by changing the event mask you may disrupt a widget’s functionality, so be careful. This function must be called while a widget is unrealized. Consider Widget.addDeviceEvents for widgets that are already realized, or if you want to preserve the existing event mask. This function can’t be used with windowless widgets (which return FALSE from Widget.getHasWindow); to get events on those widgets, place them inside a gtk.EventBox and receive events on the event box.

setDirection
void setDirection(GtkTextDirection dir)

Sets the reading direction on a particular widget. This direction controls the primary direction for widgets containing text, and also the direction in which the children of a container are packed. The ability to set the direction is present in order so that correct localization into languages with right-to-left reading directions can be done. Generally, applications will let the default reading direction present, except for containers where the containers are arranged in an order that is explicitly visual rather than logical (such as buttons for text justification).

setDoubleBuffered
void setDoubleBuffered(bool doubleBuffered)

Widgets are double buffered by default; you can use this function to turn off the buffering. “Double buffered” simply means that Window.beginDrawFrame and Window.endDrawFrame are called automatically around expose events sent to the widget. Window.beginDrawFrame diverts all drawing to a widget's window to an offscreen buffer, and Window.endDrawFrame draws the buffer to the screen. The result is that users see the window update in one smooth step, and don’t see individual graphics primitives being rendered.

setEvents
void setEvents(int events)

Sets the event mask (see GdkEventMask) for a widget. The event mask determines which events a widget will receive. Keep in mind that different widgets have different default event masks, and by changing the event mask you may disrupt a widget’s functionality, so be careful. This function must be called while a widget is unrealized. Consider Widget.addEvents for widgets that are already realized, or if you want to preserve the existing event mask. This function can’t be used with widgets that have no window. (See Widget.getHasWindow). To get events on those widgets, place them inside a gtk.EventBox and receive events on the event box.

setFocusOnClick
void setFocusOnClick(bool focusOnClick)

Sets whether the widget should grab focus when it is clicked with the mouse. Making mouse clicks not grab focus is useful in places like toolbars where you don’t want the keyboard focus removed from the main area of the application.

setFontMap
void setFontMap(PgFontMap fontMap)

Sets the font map to use for Pango rendering. When not set, the widget will inherit the font map from its parent.

setFontOptions
void setFontOptions(FontOption options)

Sets the cairo_font_options_t used for Pango rendering in this widget. When not set, the default font options for the gdk.Screen will be used.

setHalign
void setHalign(GtkAlign align_)

Sets the horizontal alignment of widget. See the halign property.

setHasTooltip
void setHasTooltip(bool hasTooltip)

Sets the has-tooltip property on widget to has_tooltip. See has-tooltip for more information.

setHasWindow
void setHasWindow(bool hasWindow)

Specifies whether widget has a gdk.Window of its own. Note that all realized widgets have a non-NULL “window” pointer (Widget.getWindow never returns a NULL window when a widget is realized), but for many of them it’s actually the gdk.Window of one of its parent widgets. Widgets that do not create a window for themselves in realize must announce this by calling this function with has_window = FALSE.

setHexpand
void setHexpand(bool expand)

Sets whether the widget would like any available extra horizontal space. When a user resizes a gtk.Window, widgets with expand=TRUE generally receive the extra space. For example, a list or scrollable area or document in your window would often be set to expand.

setHexpandSet
void setHexpandSet(bool set)

Sets whether the hexpand flag (see Widget.getHexpand) will be used.

setMapped
void setMapped(bool mapped)

Marks the widget as being mapped.

setMarginBottom
void setMarginBottom(int margin)

Sets the bottom margin of widget. See the margin-bottom property.

setMarginEnd
void setMarginEnd(int margin)

Sets the end margin of widget. See the margin-end property.

setMarginLeft
void setMarginLeft(int margin)

Sets the left margin of widget. See the margin-left property.

setMarginRight
void setMarginRight(int margin)

Sets the right margin of widget. See the margin-right property.

setMarginStart
void setMarginStart(int margin)

Sets the start margin of widget. See the margin-start property.

setMarginTop
void setMarginTop(int margin)

Sets the top margin of widget. See the margin-top property.

setName
void setName(string name)

Widgets can be named, which allows you to refer to them from a CSS file. You can apply a style to widgets with a particular name in the CSS file. See the documentation for the CSS syntax (on the same page as the docs for gtk.StyleContext).

setNoShowAll
void setNoShowAll(bool noShowAll)

Sets the no-show-all property, which determines whether calls to Widget.showAll will affect this widget.

setOpacity
void setOpacity(double opacity)

Request the widget to be rendered partially transparent, with opacity 0 being fully transparent and 1 fully opaque. (Opacity values are clamped to the [0,1] range.). This works on both toplevel widget, and child widgets, although there are some limitations:

setParent
void setParent(Widget parent)

This function is useful only when implementing subclasses of gtk.Container

Sets the container as the parent of widget, and takes care of some details such as updating the state and style of the child to reflect its new location. The opposite function is Widget.unparent.

setParentWindow
void setParentWindow(GdkWin parentWindow)

Sets a non default parent window for widget.

setRealized
void setRealized(bool realized)

Marks the widget as being realized. This function must only be called after all gdk.Windows for the widget have been created and registered.

setReceivesDefault
void setReceivesDefault(bool receivesDefault)

Specifies whether widget will be treated as the default widget within its toplevel when it has the focus, even if another widget is the default.

setRedrawOnAllocate
void setRedrawOnAllocate(bool redrawOnAllocate)

Sets whether the entire widget is queued for drawing when its size allocation changes. By default, this setting is TRUE and the entire widget is redrawn on every size change. If your widget leaves the upper left unchanged when made bigger, turning this setting off will improve performance.

setSensitive
void setSensitive(bool sensitive)

Sets the sensitivity of a widget. A widget is sensitive if the user can interact with it. Insensitive widgets are “grayed out” and the user can’t interact with them. Insensitive widgets are known as “inactive”, “disabled”, or “ghosted” in some other toolkits.

setSizeRequest
void setSizeRequest(int width, int height)

Sets the minimum size of a widget; that is, the widget’s size request will be at least width by height. You can use this function to force a widget to be larger than it normally would be.

setStateFlags
void setStateFlags(GtkStateFlags flags, bool clear)

This function is for use in widget implementations. Turns on flag values in the current widget state (insensitive, prelighted, etc.).

setStyle
void setStyle(Style style)

Used to set the gtk.Style for a widget (widget->style). Since GTK 3, this function does nothing, the passed in style is ignored.

setSupportMultidevice
void setSupportMultidevice(bool supportMultidevice)

Enables or disables multiple pointer awareness. If this setting is TRUE, widget will start receiving multiple, per device enter/leave events. Note that if custom gdk.Windows are created in realize, Window.setSupportMultidevice will have to be called manually on them.

setTooltipMarkup
void setTooltipMarkup(string markup)

Sets markup as the contents of the tooltip, which is marked up with the [Pango text markup language]PangoMarkupFormat.

setTooltipText
void setTooltipText(string text)

Sets text as the contents of the tooltip. This function will take care of setting has-tooltip to TRUE and of the default handler for the query-tooltip signal.

setTooltipWindow
void setTooltipWindow(Window customWindow)

Replaces the default window used for displaying tooltips with custom_window. GTK+ will take care of showing and hiding custom_window at the right moment, to behave likewise as the default tooltip window. If custom_window is NULL, the default tooltip window will be used.

setValign
void setValign(GtkAlign align_)

Sets the vertical alignment of widget. See the valign property.

setVexpand
void setVexpand(bool expand)

Sets whether the widget would like any available extra vertical space.

setVexpandSet
void setVexpandSet(bool set)

Sets whether the vexpand flag (see Widget.getVexpand) will be used.

setVisible
void setVisible(bool visible)

Sets the visibility state of widget. Note that setting this to TRUE doesn’t mean the widget is actually viewable, see Widget.getVisible.

setVisual
void setVisual(Visual visual)

Sets the visual that should be used for by widget and its children for creating gdk.Windows The visual must be on the same gdk.Screen as returned by Widget.getScreen, so handling the screen-changed signal is necessary.

setWindow
void setWindow(GdkWin window)

Sets a widget’s window. This function should only be used in a widget’s realize implementation. The window passed is usually either new window created with Window.new, or the window of its parent widget as returned by Widget.getParentWindow.

shapeCombineRegion
void shapeCombineRegion(Region region)

Sets a shape for this widget’s GDK window. This allows for transparent windows etc., see Window.shapeCombineRegion for more information.

show
void show()

Flags a widget to be displayed. Any widget that isn’t shown will not appear on the screen. If you want to show all the widgets in a container, it’s easier to call Widget.showAll on the container, instead of individually showing the widgets.

showAll
void showAll()

Recursively shows a widget, and any child widgets (if the widget is a container).

showNow
void showNow()

Shows a widget. If the widget is an unmapped toplevel widget (i.e. a gtk.Window that has not yet been shown), enter the main loop and wait for the window to actually be mapped. Be careful; because the main loop is running, anything can happen during this function.

sizeAllocate
void sizeAllocate(GtkAllocation* allocation)

This function is only used by gtk.Container subclasses, to assign a size and position to their child widgets.

sizeAllocateWithBaseline
void sizeAllocateWithBaseline(GtkAllocation* allocation, int baseline)

This function is only used by gtk.Container subclasses, to assign a size, position and (optionally) baseline to their child widgets.

sizeRequest
void sizeRequest(Requisition requisition)

This function is typically used when implementing a gtk.Container subclass. Obtains the preferred size of a widget. The container uses this information to arrange its child widgets and decide what size allocations to give them with Widget.sizeAllocate.

styleAttach
void styleAttach()

This function attaches the widget’s gtk.Style to the widget's gdk.Window It is a replacement for

styleGetProperty
void styleGetProperty(string propertyName, Value value)

Gets the value of a style property of widget.

styleGetValist
void styleGetValist(string firstPropertyName, void* varArgs)

Non-vararg variant of Widget.styleGet. Used primarily by language bindings.

thawChildNotify
void thawChildNotify()

Reverts the effect of a previous call to Widget.freezeChildNotify. This causes all queued child-notify signals on widget to be emitted.

translateCoordinates
bool translateCoordinates(Widget destWidget, int srcX, int srcY, int destX, int destY)

Translate coordinates relative to src_widget’s allocation to coordinates relative to dest_widget’s allocations. In order to perform this operation, both widgets must be realized, and must share a common toplevel.

triggerTooltipQuery
void triggerTooltipQuery()

Triggers a tooltip query on the display where the toplevel of widget is located. See Tooltip.triggerTooltipQuery for more information.

unmap
void unmap()

This function is only for use in widget implementations. Causes a widget to be unmapped if it’s currently mapped.

unparent
void unparent()

This function is only for use in widget implementations. Should be called by implementations of the remove method on gtk.Container, to dissociate a child from the container.

unrealize
void unrealize()

This function is only useful in widget implementations. Causes a widget to be unrealized (frees all GDK resources associated with the widget, such as widget->window).

unregisterWindow
void unregisterWindow(GdkWin window)

Unregisters a gdk.Window from the widget that was previously set up with Widget.registerWindow. You need to call this when the window is no longer used by the widget, such as when you destroy it.

unsetStateFlags
void unsetStateFlags(GtkStateFlags flags)

This function is for use in widget implementations. Turns off flag values for the current widget state (insensitive, prelighted, etc.). See Widget.setStateFlags.

addOnAccelClosuresChanged
gulong addOnAccelClosuresChanged(void delegate(Widget) dlg, ConnectFlags connectFlags)
addOnButtonPress
gulong addOnButtonPress(bool delegate(GdkEventButton*, Widget) dlg, ConnectFlags connectFlags)

The ::button-press-event signal will be emitted when a button (typically from a mouse) is pressed.

addOnButtonPress
gulong addOnButtonPress(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::button-press-event signal will be emitted when a button (typically from a mouse) is pressed.

addOnButtonRelease
gulong addOnButtonRelease(bool delegate(GdkEventButton*, Widget) dlg, ConnectFlags connectFlags)

The ::button-release-event signal will be emitted when a button (typically from a mouse) is released.

addOnButtonRelease
gulong addOnButtonRelease(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::button-release-event signal will be emitted when a button (typically from a mouse) is released.

addOnCanActivateAccel
gulong addOnCanActivateAccel(bool delegate(uint, Widget) dlg, ConnectFlags connectFlags)

Determines whether an accelerator that activates the signal identified by signal_id can currently be activated. This signal is present to allow applications and derived widgets to override the default gtk.Widget handling for determining whether an accelerator can be activated.

addOnChildNotify
gulong addOnChildNotify(void delegate(ParamSpec, Widget) dlg, ConnectFlags connectFlags)

The ::child-notify signal is emitted for each [child property][child-properties] that has changed on an object. The signal's detail holds the property name.

addOnCompositedChanged
gulong addOnCompositedChanged(void delegate(Widget) dlg, ConnectFlags connectFlags)

The ::composited-changed signal is emitted when the composited status of widgets screen changes. See Screen.isComposited.

addOnConfigure
gulong addOnConfigure(bool delegate(GdkEventConfigure*, Widget) dlg, ConnectFlags connectFlags)

The ::configure-event signal will be emitted when the size, position or stacking of the widget's window has changed.

addOnConfigure
gulong addOnConfigure(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::configure-event signal will be emitted when the size, position or stacking of the widget's window has changed.

addOnDamage
gulong addOnDamage(bool delegate(GdkEventExpose*, Widget) dlg, ConnectFlags connectFlags)

Emitted when a redirected window belonging to widget gets drawn into. The region/area members of the event shows what area of the redirected drawable was drawn into.

addOnDamage
gulong addOnDamage(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

Emitted when a redirected window belonging to widget gets drawn into. The region/area members of the event shows what area of the redirected drawable was drawn into.

addOnDelete
gulong addOnDelete(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::delete-event signal is emitted if a user requests that a toplevel window is closed. The default handler for this signal destroys the window. Connecting Widget.hideOnDelete to this signal will cause the window to be hidden instead, so that it can later be shown again without reconstructing it.

addOnDestroy
gulong addOnDestroy(void delegate(Widget) dlg, ConnectFlags connectFlags)

Signals that all holders of a reference to the widget should release the reference that they hold. May result in finalization of the widget if all references are released.

addOnDestroyEvent
gulong addOnDestroyEvent(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::destroy-event signal is emitted when a gdk.Window is destroyed. You rarely get this signal, because most widgets disconnect themselves from their window before they destroy it, so no widget owns the window at destroy time.

addOnDirectionChanged
gulong addOnDirectionChanged(void delegate(GtkTextDirection, Widget) dlg, ConnectFlags connectFlags)

The ::direction-changed signal is emitted when the text direction of a widget changes.

addOnDragBegin
gulong addOnDragBegin(void delegate(DragContext, Widget) dlg, ConnectFlags connectFlags)

The ::drag-begin signal is emitted on the drag source when a drag is started. A typical reason to connect to this signal is to set up a custom drag icon with e.g. gtk_drag_source_set_icon_pixbuf().

addOnDragDataDelete
gulong addOnDragDataDelete(void delegate(DragContext, Widget) dlg, ConnectFlags connectFlags)

The ::drag-data-delete signal is emitted on the drag source when a drag with the action GDK_ACTION_MOVE is successfully completed. The signal handler is responsible for deleting the data that has been dropped. What "delete" means depends on the context of the drag operation.

addOnDragDataGet
gulong addOnDragDataGet(void delegate(DragContext, SelectionData, uint, uint, Widget) dlg, ConnectFlags connectFlags)

The ::drag-data-get signal is emitted on the drag source when the drop site requests the data which is dragged. It is the responsibility of the signal handler to fill data with the data in the format which is indicated by info. See SelectionData.set and SelectionData.setText.

addOnDragDataReceived
gulong addOnDragDataReceived(void delegate(DragContext, int, int, SelectionData, uint, uint, Widget) dlg, ConnectFlags connectFlags)

The ::drag-data-received signal is emitted on the drop site when the dragged data has been received. If the data was received in order to determine whether the drop will be accepted, the handler is expected to call gdk_drag_status() and not finish the drag. If the data was received in response to a drag-drop signal (and this is the last target to be received), the handler for this signal is expected to process the received data and then call gtk_drag_finish(), setting the success parameter depending on whether the data was processed successfully.

addOnDragDrop
gulong addOnDragDrop(bool delegate(DragContext, int, int, uint, Widget) dlg, ConnectFlags connectFlags)

The ::drag-drop signal is emitted on the drop site when the user drops the data onto the widget. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns FALSE and no further processing is necessary. Otherwise, the handler returns TRUE. In this case, the handler must ensure that gtk_drag_finish() is called to let the source know that the drop is done. The call to gtk_drag_finish() can be done either directly or in a drag-data-received handler which gets triggered by calling gtk_drag_get_data() to receive the data for one or more of the supported targets.

addOnDragEnd
gulong addOnDragEnd(void delegate(DragContext, Widget) dlg, ConnectFlags connectFlags)

The ::drag-end signal is emitted on the drag source when a drag is finished. A typical reason to connect to this signal is to undo things done in drag-begin.

addOnDragFailed
gulong addOnDragFailed(bool delegate(DragContext, GtkDragResult, Widget) dlg, ConnectFlags connectFlags)

The ::drag-failed signal is emitted on the drag source when a drag has failed. The signal handler may hook custom code to handle a failed DnD operation based on the type of error, it returns TRUE is the failure has been already handled (not showing the default "drag operation failed" animation), otherwise it returns FALSE.

addOnDragLeave
gulong addOnDragLeave(void delegate(DragContext, uint, Widget) dlg, ConnectFlags connectFlags)

The ::drag-leave signal is emitted on the drop site when the cursor leaves the widget. A typical reason to connect to this signal is to undo things done in drag-motion, e.g. undo highlighting with gtk_drag_unhighlight().

addOnDragMotion
gulong addOnDragMotion(bool delegate(DragContext, int, int, uint, Widget) dlg, ConnectFlags connectFlags)

The ::drag-motion signal is emitted on the drop site when the user moves the cursor over the widget during a drag. The signal handler must determine whether the cursor position is in a drop zone or not. If it is not in a drop zone, it returns FALSE and no further processing is necessary. Otherwise, the handler returns TRUE. In this case, the handler is responsible for providing the necessary information for displaying feedback to the user, by calling gdk_drag_status().

addOnEnterNotify
gulong addOnEnterNotify(bool delegate(GdkEventCrossing*, Widget) dlg, ConnectFlags connectFlags)

The ::enter-notify-event will be emitted when the pointer enters the widget's window.

addOnEnterNotify
gulong addOnEnterNotify(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::enter-notify-event will be emitted when the pointer enters the widget's window.

addOnEvent
gulong addOnEvent(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The GTK+ main loop will emit three signals for each GDK event delivered to a widget: one generic ::event signal, another, more specific, signal that matches the type of event delivered (e.g. key-press-event) and finally a generic event-after signal.

addOnEventAfter
gulong addOnEventAfter(void delegate(Event, Widget) dlg, ConnectFlags connectFlags)

After the emission of the event signal and (optionally) the second more specific signal, ::event-after will be emitted regardless of the previous two signals handlers return values.

addOnFocus
gulong addOnFocus(bool delegate(GtkDirectionType, Widget) dlg, ConnectFlags connectFlags)
addOnFocusIn
gulong addOnFocusIn(bool delegate(GdkEventFocus*, Widget) dlg, ConnectFlags connectFlags)

The ::focus-in-event signal will be emitted when the keyboard focus enters the widget's window.

addOnFocusIn
gulong addOnFocusIn(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::focus-in-event signal will be emitted when the keyboard focus enters the widget's window.

addOnFocusOut
gulong addOnFocusOut(bool delegate(GdkEventFocus*, Widget) dlg, ConnectFlags connectFlags)

The ::focus-out-event signal will be emitted when the keyboard focus leaves the widget's window.

addOnFocusOut
gulong addOnFocusOut(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::focus-out-event signal will be emitted when the keyboard focus leaves the widget's window.

addOnGrabBroken
gulong addOnGrabBroken(bool delegate(GdkEventGrabBroken*, Widget) dlg, ConnectFlags connectFlags)

Emitted when a pointer or keyboard grab on a window belonging to widget gets broken.

addOnGrabBroken
gulong addOnGrabBroken(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

Emitted when a pointer or keyboard grab on a window belonging to widget gets broken.

addOnGrabFocus
gulong addOnGrabFocus(void delegate(Widget) dlg, ConnectFlags connectFlags)
addOnGrabNotify
gulong addOnGrabNotify(void delegate(bool, Widget) dlg, ConnectFlags connectFlags)

The ::grab-notify signal is emitted when a widget becomes shadowed by a GTK+ grab (not a pointer or keyboard grab) on another widget, or when it becomes unshadowed due to a grab being removed.

addOnHide
gulong addOnHide(void delegate(Widget) dlg, ConnectFlags connectFlags)

The ::hide signal is emitted when widget is hidden, for example with Widget.hide.

addOnHierarchyChanged
gulong addOnHierarchyChanged(void delegate(Widget, Widget) dlg, ConnectFlags connectFlags)

The ::hierarchy-changed signal is emitted when the anchored state of a widget changes. A widget is “anchored” when its toplevel ancestor is a gtk.Window This signal is emitted when a widget changes from un-anchored to anchored or vice-versa.

addOnKeyPress
gulong addOnKeyPress(bool delegate(GdkEventKey*, Widget) dlg, ConnectFlags connectFlags)

The ::key-press-event signal is emitted when a key is pressed. The signal emission will reoccur at the key-repeat rate when the key is kept pressed.

addOnKeyPress
gulong addOnKeyPress(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::key-press-event signal is emitted when a key is pressed. The signal emission will reoccur at the key-repeat rate when the key is kept pressed.

addOnKeyRelease
gulong addOnKeyRelease(bool delegate(GdkEventKey*, Widget) dlg, ConnectFlags connectFlags)

The ::key-release-event signal is emitted when a key is released.

addOnKeyRelease
gulong addOnKeyRelease(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::key-release-event signal is emitted when a key is released.

addOnKeynavFailed
gulong addOnKeynavFailed(bool delegate(GtkDirectionType, Widget) dlg, ConnectFlags connectFlags)

Gets emitted if keyboard navigation fails. See Widget.keynavFailed for details.

addOnLeaveNotify
gulong addOnLeaveNotify(bool delegate(GdkEventCrossing*, Widget) dlg, ConnectFlags connectFlags)

The ::leave-notify-event will be emitted when the pointer leaves the widget's window.

addOnLeaveNotify
gulong addOnLeaveNotify(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::leave-notify-event will be emitted when the pointer leaves the widget's window.

addOnMap
gulong addOnMap(void delegate(Widget) dlg, ConnectFlags connectFlags)

The ::map signal is emitted when widget is going to be mapped, that is when the widget is visible (which is controlled with Widget.setVisible) and all its parents up to the toplevel widget are also visible. Once the map has occurred, map-event will be emitted.

addOnMapEvent
gulong addOnMapEvent(bool delegate(GdkEventAny*, Widget) dlg, ConnectFlags connectFlags)

The ::map-event signal will be emitted when the widget's window is mapped. A window is mapped when it becomes visible on the screen.

addOnMapEvent
gulong addOnMapEvent(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::map-event signal will be emitted when the widget's window is mapped. A window is mapped when it becomes visible on the screen.

addOnMnemonicActivate
gulong addOnMnemonicActivate(bool delegate(bool, Widget) dlg, ConnectFlags connectFlags)

The default handler for this signal activates widget if group_cycling is FALSE, or just makes widget grab focus if group_cycling is TRUE.

addOnMotionNotify
gulong addOnMotionNotify(bool delegate(GdkEventMotion*, Widget) dlg, ConnectFlags connectFlags)

The ::motion-notify-event signal is emitted when the pointer moves over the widget's gdk.Window

addOnMotionNotify
gulong addOnMotionNotify(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::motion-notify-event signal is emitted when the pointer moves over the widget's gdk.Window

addOnMoveFocus
gulong addOnMoveFocus(void delegate(GtkDirectionType, Widget) dlg, ConnectFlags connectFlags)
addOnParentSet
gulong addOnParentSet(void delegate(Widget, Widget) dlg, ConnectFlags connectFlags)

The ::parent-set signal is emitted when a new parent has been set on a widget.

addOnPopupMenu
gulong addOnPopupMenu(bool delegate(Widget) dlg, ConnectFlags connectFlags)

This signal gets emitted whenever a widget should pop up a context menu. This usually happens through the standard key binding mechanism; by pressing a certain key while a widget is focused, the user can cause the widget to pop up a menu. For example, the gtk.Entry widget creates a menu with clipboard commands. See the [Popup Menu Migration Checklist][checklist-popup-menu] for an example of how to use this signal.

addOnPropertyNotify
gulong addOnPropertyNotify(bool delegate(GdkEventProperty*, Widget) dlg, ConnectFlags connectFlags)

The ::property-notify-event signal will be emitted when a property on the widget's window has been changed or deleted.

addOnPropertyNotify
gulong addOnPropertyNotify(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::property-notify-event signal will be emitted when a property on the widget's window has been changed or deleted.

addOnProximityIn
gulong addOnProximityIn(bool delegate(GdkEventProximity*, Widget) dlg, ConnectFlags connectFlags)

To receive this signal the gdk.Window associated to the widget needs to enable the GDK_PROXIMITY_IN_MASK mask.

addOnProximityIn
gulong addOnProximityIn(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

To receive this signal the gdk.Window associated to the widget needs to enable the GDK_PROXIMITY_IN_MASK mask.

addOnProximityOut
gulong addOnProximityOut(bool delegate(GdkEventProximity*, Widget) dlg, ConnectFlags connectFlags)

To receive this signal the gdk.Window associated to the widget needs to enable the GDK_PROXIMITY_OUT_MASK mask.

addOnProximityOut
gulong addOnProximityOut(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

To receive this signal the gdk.Window associated to the widget needs to enable the GDK_PROXIMITY_OUT_MASK mask.

addOnQueryTooltip
gulong addOnQueryTooltip(bool delegate(int, int, bool, Tooltip, Widget) dlg, ConnectFlags connectFlags)

Emitted when has-tooltip is TRUE and the hover timeout has expired with the cursor hovering "above" widget; or emitted when widget got focus in keyboard mode.

addOnRealize
gulong addOnRealize(void delegate(Widget) dlg, ConnectFlags connectFlags)

The ::realize signal is emitted when widget is associated with a gdk.Window, which means that Widget.realize has been called or the widget has been mapped (that is, it is going to be drawn).

addOnScreenChanged
gulong addOnScreenChanged(void delegate(Screen, Widget) dlg, ConnectFlags connectFlags)

The ::screen-changed signal gets emitted when the screen of a widget has changed.

addOnScroll
gulong addOnScroll(bool delegate(GdkEventScroll*, Widget) dlg, ConnectFlags connectFlags)

The ::scroll-event signal is emitted when a button in the 4 to 7 range is pressed. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned.

addOnScroll
gulong addOnScroll(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::scroll-event signal is emitted when a button in the 4 to 7 range is pressed. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned.

addOnSelectionClear
gulong addOnSelectionClear(bool delegate(GdkEventSelection*, Widget) dlg, ConnectFlags connectFlags)

The ::selection-clear-event signal will be emitted when the the widget's window has lost ownership of a selection.

addOnSelectionClear
gulong addOnSelectionClear(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::selection-clear-event signal will be emitted when the the widget's window has lost ownership of a selection.

addOnSelectionGet
gulong addOnSelectionGet(void delegate(SelectionData, uint, uint, Widget) dlg, ConnectFlags connectFlags)
addOnSelectionNotify
gulong addOnSelectionNotify(bool delegate(GdkEventSelection*, Widget) dlg, ConnectFlags connectFlags)
addOnSelectionNotify
gulong addOnSelectionNotify(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)
addOnSelectionReceived
gulong addOnSelectionReceived(void delegate(SelectionData, uint, Widget) dlg, ConnectFlags connectFlags)
addOnSelectionRequest
gulong addOnSelectionRequest(bool delegate(GdkEventSelection*, Widget) dlg, ConnectFlags connectFlags)

The ::selection-request-event signal will be emitted when another client requests ownership of the selection owned by the widget's window.

addOnSelectionRequest
gulong addOnSelectionRequest(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::selection-request-event signal will be emitted when another client requests ownership of the selection owned by the widget's window.

addOnShow
gulong addOnShow(void delegate(Widget) dlg, ConnectFlags connectFlags)

The ::show signal is emitted when widget is shown, for example with Widget.show.

addOnShowHelp
gulong addOnShowHelp(bool delegate(GtkWidgetHelpType, Widget) dlg, ConnectFlags connectFlags)
addOnSizeAllocate
gulong addOnSizeAllocate(void delegate(Allocation, Widget) dlg, ConnectFlags connectFlags)
addOnStateChanged
gulong addOnStateChanged(void delegate(GtkStateType, Widget) dlg, ConnectFlags connectFlags)

The ::state-changed signal is emitted when the widget state changes. See Widget.getState.

addOnStateFlagsChanged
gulong addOnStateFlagsChanged(void delegate(GtkStateFlags, Widget) dlg, ConnectFlags connectFlags)

The ::state-flags-changed signal is emitted when the widget state changes, see Widget.getStateFlags.

addOnStyleSet
gulong addOnStyleSet(void delegate(Style, Widget) dlg, ConnectFlags connectFlags)

The ::style-set signal is emitted when a new style has been set on a widget. Note that style-modifying functions like Widget.modifyBase also cause this signal to be emitted.

addOnStyleUpdated
gulong addOnStyleUpdated(void delegate(Widget) dlg, ConnectFlags connectFlags)

The ::style-updated signal is a convenience signal that is emitted when the changed signal is emitted on the widget's associated gtk.StyleContext as returned by Widget.getStyleContext.

addOnTouch
gulong addOnTouch(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)
addOnUnmap
gulong addOnUnmap(void delegate(Widget) dlg, ConnectFlags connectFlags)

The ::unmap signal is emitted when widget is going to be unmapped, which means that either it or any of its parents up to the toplevel widget have been set as hidden.

addOnUnmapEvent
gulong addOnUnmapEvent(bool delegate(GdkEventAny*, Widget) dlg, ConnectFlags connectFlags)

The ::unmap-event signal will be emitted when the widget's window is unmapped. A window is unmapped when it becomes invisible on the screen.

addOnUnmapEvent
gulong addOnUnmapEvent(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::unmap-event signal will be emitted when the widget's window is unmapped. A window is unmapped when it becomes invisible on the screen.

addOnUnrealize
gulong addOnUnrealize(void delegate(Widget) dlg, ConnectFlags connectFlags)

The ::unrealize signal is emitted when the gdk.Window associated with widget is destroyed, which means that Widget.unrealize has been called or the widget has been unmapped (that is, it is going to be hidden).

addOnVisibilityNotify
gulong addOnVisibilityNotify(bool delegate(GdkEventVisibility*, Widget) dlg, ConnectFlags connectFlags)

The ::visibility-notify-event will be emitted when the widget's window is obscured or unobscured.

addOnVisibilityNotify
gulong addOnVisibilityNotify(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::visibility-notify-event will be emitted when the widget's window is obscured or unobscured.

addOnWindowState
gulong addOnWindowState(bool delegate(GdkEventWindowState*, Widget) dlg, ConnectFlags connectFlags)

The ::window-state-event will be emitted when the state of the toplevel window associated to the widget changes.

addOnWindowState
gulong addOnWindowState(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::window-state-event will be emitted when the state of the toplevel window associated to the widget changes.

cairoShouldDrawWindow
bool cairoShouldDrawWindow(Context cr, GdkWin window)

This function is supposed to be called in draw implementations for widgets that support multiple windows. cr must be untransformed from invoking of the draw function. This function will return TRUE if the contents of the given window are supposed to be drawn and FALSE otherwise. Note that when the drawing was not initiated by the windowing system this function will return TRUE for all windows, so you need to draw the bottommost window first. Also, do not use “else if” statements to check which window should be drawn.

cairoTransformToWindow
void cairoTransformToWindow(Context cr, Widget widget, GdkWin window)

Transforms the given cairo context cr that from widget-relative coordinates to window-relative coordinates. If the widget’s window is not an ancestor of window, no modification will be applied.

distributeNaturalAllocation
int distributeNaturalAllocation(int extraSpace, uint nRequestedSizes, GtkRequestedSize* sizes)

Distributes extra_space to child sizes by bringing smaller children up to natural size first.