Widget

Description GtkWidget is the base class all widgets in GTK+ derive from. It manages the widget lifecycle, states and style. GtkWidget introduces style properties - these are basically object properties that are stored not on the object, but in the style object associated to the widget. Style properties are set in resource files. This mechanism is used for configuring such things as the location of the scrollbar arrows through the theme, giving theme authors more control over the look of applications without the need to write a theme engine in C. Use gtk_widget_class_install_style_property() to install style properties for a widget class, gtk_widget_class_find_style_property() or gtk_widget_class_list_style_properties() to get information about existing style properties and gtk_widget_style_get_property(), gtk_widget_style_get() or gtk_widget_style_get_valist() to obtain the value of a style property. <hr> GtkWidget as GtkBuildable The GtkWidget implementation of the GtkBuildable interface supports a custom <accelerator> element, which has attributes named key, modifiers and signal and allows to specify accelerators. In addition to accelerators, GtkWidget also support a custom <accessible> element, which supports actions and relations. Properties on the accessible implementation of an object can be set by accessing the internal child "accessible" of a GtkWidget.

class Widget : ObjectGtk , BuildableIF {}

Constructors

this
this(GtkWidget* gtkWidget)

Sets our main struct and passes it to the parent class

Members

Aliases

addOnDestroy
alias addOnDestroy = ObjectGtk.addOnDestroy
Undocumented in source.

Functions

activate
int 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 gtk_window_add_accel_group(), and the signal must be of type G_RUN_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 gtk_accel_map_add_entry() and gtk_widget_set_accel_path() or gtk_menu_item_set_accel_path() instead.

addEvents
void addEvents(int events)

Adds the events in the bitfield events to the event mask for widget. See gtk_widget_set_events() for details.

addMnemonicLabel
void addMnemonicLabel(Widget label)

Adds a widget to the list of mnemonic labels for this widget. (See gtk_widget_list_mnemonic_labels()). 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. Since 2.4

addOn
void addOn(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.

addOnAccelClosuresChanged
void addOnAccelClosuresChanged(void delegate(Widget) dlg, ConnectFlags connectFlags)
addOnButtonPress
void 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. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_BUTTON_PRESS_MASK mask. This signal will be sent to the grab widget if there is one.

addOnButtonRelease
void 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. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_BUTTON_RELEASE_MASK mask. This signal will be sent to the grab widget if there is one.

addOnCanActivateAccel
void addOnCanActivateAccel(bool delegate(guint, 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 GtkWidget handling for determining whether an accelerator can be activated.

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

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

addOnClient
void addOnClient(bool delegate(GdkEventClient*, Widget) dlg, ConnectFlags connectFlags)

The ::client-event will be emitted when the widget's window receives a message (via a ClientMessage event) from another application.

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

The ::composited-changed signal is emitted when the composited status of widgets screen changes. See gdk_screen_is_composited().

addOnConfigure
void 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. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

addOnDamage
void 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. Since 2.14

addOnDelete
void 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 gtk_widget_hide_on_delete() to this signal will cause the window to be hidden instead, so that it can later be shown again without reconstructing it.

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

The ::destroy-event signal is emitted when a GdkWindow 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. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

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

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

addOnDragBegin
void addOnDragBegin(void delegate(GdkDragContext*, 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 gtk_drag_source_set_icon(). Note that some widgets set up a drag icon in the default handler of this signal, so you may have to use g_signal_connect_after() to override what the default handler did.

addOnDragDataDelete
void addOnDragDataDelete(void delegate(GdkDragContext*, 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
void addOnDragDataGet(void delegate(GdkDragContext*, GtkSelectionData*, guint, guint, 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 gtk_selection_data_set() and gtk_selection_data_set_text().

addOnDragDataReceived
void addOnDragDataReceived(void delegate(GdkDragContext*, gint, gint, GtkSelectionData*, guint, guint, 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. The handler may inspect and modify drag_context->action before calling gtk_drag_finish(), e.g. to implement GDK_ACTION_ASK as shown in the

addOnDragDrop
void addOnDragDrop(bool delegate(GdkDragContext*, gint, gint, guint, 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
void addOnDragEnd(void delegate(GdkDragContext*, 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
void addOnDragFailed(bool delegate(GdkDragContext*, 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. Since 2.12

addOnDragLeave
void addOnDragLeave(void delegate(GdkDragContext*, guint, 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
void addOnDragMotion(bool delegate(GdkDragContext*, gint, gint, guint, 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(). If the decision whether the drop will be accepted or rejected can't be made based solely on the cursor position and the type of the data, the handler may inspect the dragged data by calling gtk_drag_get_data() and defer the gdk_drag_status() call to the "drag-data-received" handler. Note that you cannot not pass GTK_DEST_DEFAULT_DROP, GTK_DEST_DEFAULT_MOTION or GTK_DEST_DEFAULT_ALL to gtk_drag_dest_set() when using the drag-motion signal that way. Also note that there is no drag-enter signal. The drag receiver has to keep track of whether he has received any drag-motion signals since the last "drag-leave" and if not, treat the drag-motion signal as an "enter" signal. Upon an "enter", the handler will typically highlight the drop site with gtk_drag_highlight().

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

The ::enter-notify-event will be emitted when the pointer enters the widget's window. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_ENTER_NOTIFY_MASK mask. This signal will be sent to the grab widget if there is one.

addOnEventAfter
void 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.

addOnExpose
void addOnExpose(bool delegate(GdkEventExpose*, Widget) dlg, ConnectFlags connectFlags)

The ::expose-event signal is emitted when an area of a previously obscured GdkWindow is made visible and needs to be redrawn. GTK_NO_WINDOW widgets will get a synthesized event from their parent widget. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_EXPOSURE_MASK mask.

addOnFocus
void addOnFocus(bool delegate(GtkDirectionType, Widget) dlg, ConnectFlags connectFlags)
addOnFocusIn
void 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. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_FOCUS_CHANGE_MASK mask.

addOnFocusOut
void 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. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_FOCUS_CHANGE_MASK mask.

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

Emitted when a pointer or keyboard grab on a window belonging to widget gets broken. On X11, this happens when the grab window becomes unviewable (i.e. it or one of its ancestors is unmapped), or if the same application grabs the pointer or keyboard again. Since 2.8

addOnGrabFocus
void addOnGrabFocus(void delegate(Widget) dlg, ConnectFlags connectFlags)
addOnGrabNotify
void addOnGrabNotify(void delegate(gboolean, 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. A widget is shadowed by a gtk_grab_add() when the topmost grab widget in the grab stack of its window group is not its ancestor. FALSE if the widget becomes shadowed, TRUE if it becomes unshadowed

addOnHide
void addOnHide(void delegate(Widget) dlg, ConnectFlags connectFlags)
addOnHierarchyChanged
void 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 GtkWindow. This signal is emitted when a widget changes from un-anchored to anchored or vice-versa.

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

The ::key-press-event signal is emitted when a key is pressed. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_KEY_PRESS_MASK mask. This signal will be sent to the grab widget if there is one.

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

The ::key-release-event signal is emitted when a key is pressed. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_KEY_RELEASE_MASK mask. This signal will be sent to the grab widget if there is one.

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

Gets emitted if keyboard navigation fails. See gtk_widget_keynav_failed() for details. Since 2.12

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

The ::leave-notify-event will be emitted when the pointer leaves the widget's window. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_LEAVE_NOTIFY_MASK mask. This signal will be sent to the grab widget if there is one.

addOnMap
void addOnMap(void delegate(Widget) dlg, ConnectFlags connectFlags)
addOnMapEvent
void 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. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

addOnMnemonicActivate
void addOnMnemonicActivate(bool delegate(gboolean, Widget) dlg, ConnectFlags connectFlags)
addOnMotionNotify
void addOnMotionNotify(bool delegate(GdkEventMotion*, Widget) dlg, ConnectFlags connectFlags)

The ::motion-notify-event signal is emitted when the pointer moves over the widget's GdkWindow. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_POINTER_MOTION_MASK mask. This signal will be sent to the grab widget if there is one.

addOnMoveFocus
void addOnMoveFocus(void delegate(GtkDirectionType, Widget) dlg, ConnectFlags connectFlags)
addOnNoExpose
void addOnNoExpose(bool delegate(GdkEventNoExpose*, Widget) dlg, ConnectFlags connectFlags)

The ::no-expose-event will be emitted when the widget's window is drawn as a copy of another GdkDrawable (with gdk_draw_drawable() or gdk_window_copy_area()) which was completely unobscured. If the source window was partially obscured GdkEventExpose events will be generated for those areas.

addOnParentSet
void addOnParentSet(void delegate(GtkObject*, Widget) dlg, ConnectFlags connectFlags)

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

addOnPopupMenu
void 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 GtkEntry widget creates a menu with clipboard commands. See the section called “Implement GtkWidget::popup_menu” for an example of how to use this signal.

addOnPropertyNotify
void 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. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_PROPERTY_CHANGE_MASK mask.

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

To receive this signal the GdkWindow associated to the widget needs to enable the GDK_PROXIMITY_IN_MASK mask. This signal will be sent to the grab widget if there is one.

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

To receive this signal the GdkWindow associated to the widget needs to enable the GDK_PROXIMITY_OUT_MASK mask. This signal will be sent to the grab widget if there is one.

addOnQueryTooltip
void addOnQueryTooltip(bool delegate(gint, gint, gboolean, GtkTooltip*, Widget) dlg, ConnectFlags connectFlags)

Emitted when "has-tooltip" is TRUE and the "gtk-tooltip-timeout" has expired with the cursor hovering "above" widget; or emitted when widget got focus in keyboard mode. Using the given coordinates, the signal handler should determine whether a tooltip should be shown for widget. If this is the case TRUE should be returned, FALSE otherwise. Note that if keyboard_mode is TRUE, the values of x and y are undefined and should not be used. The signal handler is free to manipulate tooltip with the therefore destined function calls. TRUE if the tooltip was trigged using the keyboard Since 2.12

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

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

addOnScroll
void 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. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_BUTTON_PRESS_MASK mask. This signal will be sent to the grab widget if there is one.

addOnSelectionClear
void 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.

addOnSelectionGet
void addOnSelectionGet(void delegate(GtkSelectionData*, guint, guint, Widget) dlg, ConnectFlags connectFlags)
addOnSelectionNotify
void addOnSelectionNotify(bool delegate(GdkEventSelection*, Widget) dlg, ConnectFlags connectFlags)
addOnSelectionReceived
void addOnSelectionReceived(void delegate(GtkSelectionData*, guint, Widget) dlg, ConnectFlags connectFlags)
addOnSelectionRequest
void 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.

addOnShow
void addOnShow(void delegate(Widget) dlg, ConnectFlags connectFlags)
addOnShowHelp
void addOnShowHelp(bool delegate(GtkWidgetHelpType, Widget) dlg, ConnectFlags connectFlags)
addOnSizeAllocate
void addOnSizeAllocate(void delegate(GtkAllocation*, Widget) dlg, ConnectFlags connectFlags)
addOnSizeRequest
void addOnSizeRequest(void delegate(GtkRequisition*, Widget) dlg, ConnectFlags connectFlags)
addOnStateChanged
void addOnStateChanged(void delegate(GtkStateType, Widget) dlg, ConnectFlags connectFlags)

The ::state-changed signal is emitted when the widget state changes. See gtk_widget_get_state().

addOnStyleSet
void 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 gtk_widget_modify_base() also cause this signal to be emitted.

addOnUnmap
void addOnUnmap(void delegate(Widget) dlg, ConnectFlags connectFlags)
addOnUnmapEvent
void 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. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

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

The ::visibility-notify-event will be emitted when the widget's window is obscured or unobscured. To receive this signal the GdkWindow associated to the widget needs to enable the GDK_VISIBILITY_NOTIFY_MASK mask.

addOnWindowState
void 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. To receive this signal the GdkWindow associated to the widget needs to enable the GDK_STRUCTURE_MASK mask. GDK will enable this mask automatically for all new windows.

canActivateAccel
int 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. Since 2.4

childFocus
int childFocus(GtkDirectionType direction)

This function is used by custom widget implementations; if you're writing an app, you'd use gtk_widget_grab_focus() to move the focus to a particular widget, and gtk_container_set_focus_chain() to change the focus tab order. So you may want to investigate those functions instead. gtk_widget_child_focus() is called by containers as the user moves around the window using keyboard shortcuts. direction indicates what kind of motion is taking place (up, down, left, right, tab forward, tab backward). gtk_widget_child_focus() emits the "focus" signal; widgets override the default handler for this signal in order to implement appropriate focus behavior. The default ::focus handler for a widget should return TRUE if moving in direction left the focus on a focusable location inside that widget, and FALSE if moving in direction moved the focus outside the widget. If returning TRUE, widgets normally call gtk_widget_grab_focus() to place the focus accordingly; if returning FALSE, they don't modify the current focus location. This function replaces gtk_container_focus() from GTK+ 1.2. It was necessary to check that the child was visible, sensitive, and focusable before calling gtk_container_focus(). gtk_widget_child_focus() returns FALSE if the widget is not currently in a focusable state, so there's no need for those checks.

childNotify
void childNotify(string childProperty)

Emits a "child-notify" signal for the child property child_property on widget. This is the analogue of g_object_notify() for child properties.

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

Same as gtk_widget_path(), but always uses the name of a widget's type, never uses a custom name set with gtk_widget_set_name().

createPangoContext
PgContext createPangoContext()

Creates a new PangoContext with the appropriate font map, font description, and base direction for drawing text for this widget. See also gtk_widget_get_pango_context().

createPangoLayout
PgLayout createPangoLayout(string text)

Creates a new PangoLayout with the appropriate font map, font description, and base direction for drawing text for this widget. If you keep a PangoLayout created in this way around, in order to notify the layout of changes to the base direction or font of this widget, you must call pango_layout_context_changed() in response to the "style-set" and "direction-changed" signals for the widget.

destroy
void destroy()

Destroys a widget. Equivalent to gtk_object_destroy(), except that you don't have to cast the widget to GtkObject. When a widget is destroyed, it will break any references it holds to other objects. If the widget is inside a container, the widget will be removed from the container. If the widget is a toplevel (derived from GtkWindow), it will be removed from the list of toplevels, and the reference GTK+ holds to it will be removed. Removing a widget from its container or the list of toplevels results in the widget being finalized, unless you've added additional references to the widget with g_object_ref(). In most cases, only toplevel widgets (windows) require explicit destruction, because when you destroy a toplevel its children will be destroyed as well.

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

draw
void draw(Rectangle area)

Warning gtk_widget_draw is deprecated and should not be used in newly-written code. In GTK+ 1.2, this function would immediately render the region area of a widget, by invoking the virtual draw method of a widget. In GTK+ 2.0, the draw method is gone, and instead gtk_widget_draw() simply invalidates the specified region of the widget, then updates the invalid region of the widget immediately. Usually you don't want to update the region immediately for performance reasons, so in general gtk_widget_queue_draw_area() is a better choice if you want to draw a region of a widget.

ensureStyle
void ensureStyle()

Ensures that widget has a style (widget->style). Not a very useful function; most of the time, if you want the style, the widget is realized, and realized widgets are guaranteed to have a style already.

errorBell
void errorBell()

Notifies the user about an input-related error on this widget. If the "gtk-error-bell" setting is TRUE, it calls gdk_window_beep(), otherwise it does nothing. Note that the effect of gdk_window_beep() can be configured in many ways, depending on the windowing backend and the desktop environment or window manager that is used. Since 2.12

event
int 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 gtk_main_do_event() so the event will behave as if it were in the event queue. Don't synthesize expose events; instead, use gdk_window_invalidate_rect() to invalidate a region of the window.

freezeChildNotify
void freezeChildNotify()

Stops emission of "child-notify" signals on widget. The signals are queued until gtk_widget_thaw_child_notify() is called on widget. This is the analogue of g_object_freeze_notify() for child properties.

getAccessible
ObjectAtk getAccessible()

Returns the accessible object that describes the widget to an assistive technology. If no accessibility library is loaded (i.e. no ATK implementation library is loaded via GTK_MODULES or via another application library, such as libgnome), then this AtkObject instance may be a no-op. Likewise, if no class-specific AtkObject implementation is available for the widget instance in question, it will inherit an AtkObject implementation from the first ancestor class for which such an implementation is defined. The documentation of the ATK library contains more information about accessible objects and their uses.

getAction
Action getAction()

Warning gtk_widget_get_action has been deprecated since version 2.16 and should not be used in newly-written code. Use gtk_activatable_get_related_action() instead. Returns the GtkAction that widget is a proxy for. See also gtk_action_get_proxies(). Since 2.10

getAllocation
GtkAllocation getAllocation()

The widget's allocated size.

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 GtkBox 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 GtkWindow in the docs for gtk_widget_get_toplevel(). Note that unlike gtk_widget_is_ancestor(), gtk_widget_get_ancestor() considers widget to be an ancestor of itself.

getAppPaintable
int getAppPaintable()

Determines whether the application intends to draw on the widget in an "expose-event" handler. See gtk_widget_set_app_paintable() Since 2.18

getCanDefault
int getCanDefault()

Determines whether widget can be a default widget. See gtk_widget_set_can_default(). Since 2.18

getCanFocus
int getCanFocus()

Determines whether widget can own the input focus. See gtk_widget_set_can_focus(). Since 2.18

getChildRequisition
void getChildRequisition(GtkRequisition 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 gtk_widget_set_size_request()), in which case it returns that geometry instead of the widget's requisition. This function differs from gtk_widget_size_request() in that it retrieves the last size request value from widget->requisition, while gtk_widget_size_request() actually calls the "size_request" method on widget to compute the size request and fill in widget->requisition, and only then returns widget->requisition. Because this function does not call the "size_request" method, it can only be used when you know that widget->requisition is up-to-date, that is, gtk_widget_size_request() has been called since the last time a resize was queued. In general, only container implementations have this information; applications should use gtk_widget_size_request().

getChildVisible
int getChildVisible()

Gets the value set with gtk_widget_set_child_visible(). If you feel a need to use this function, your code probably needs reorganization. This function is only useful for container implementations and never should be called by an application.

getClipboard
Clipboard getClipboard(GdkAtom selection)

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

getColormap
Colormap getColormap()

Gets the colormap that will be used to render widget. No reference will be added to the returned colormap; it should not be unreferenced.

getCompositeName
string getCompositeName()

Obtains the composite name of a widget.

getDirection
GtkTextDirection getDirection()

Gets the reading direction for a particular widget. See gtk_widget_set_direction().

getDisplay
Display getDisplay()

Get the GdkDisplay 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 GtkWindow at the top. In general, you should only create display specific resources when a widget has been realized, and you should free those resources when the widget is unrealized. Since 2.2

getDoubleBuffered
int getDoubleBuffered()

Determines whether the widget is double buffered. See gtk_widget_set_double_buffered() Since 2.18

getDrawable
deprecated Drawable getDrawable()

Gets the drawable for this widget

getEvents
int getEvents()

Returns the event mask for the widget (a bitfield containing flags from the GdkEventMask enumeration). These are the events that the widget will receive.

getExtensionEvents
GdkExtensionMode getExtensionEvents()

Retrieves the extension events the widget will receive; see gdk_input_set_extension_events().

getHasTooltip
int getHasTooltip()

Returns the current value of the has-tooltip property. See GtkWidget:has-tooltip for more information. Since 2.12

getHasWindow
int getHasWindow()

Determines whether widget has a GdkWindow of its own. See gtk_widget_set_has_window(). Since 2.18

getHeight
int getHeight()
getMapped
int getMapped()

Whether the widget is mapped. Since 2.20

getModifierStyle
RcStyle getModifierStyle()

Returns the current modifier style for the widget. (As set by gtk_widget_modify_style().) If no style has previously set, a new GtkRcStyle 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 gtk_widget_modify_style(), passing in the returned rc style, to make sure that your changes take effect. Caution: passing the style back to gtk_widget_modify_style() will normally end up destroying it, because gtk_widget_modify_style() copies the passed-in style and sets the copy as the new modifier style, thus dropping any reference to the old modifier style. Add a reference to the modifier style if you want to keep it alive.

getName
string getName()

Retrieves the name of a widget. See gtk_widget_set_name() for the significance of widget names.

getNoShowAll
int getNoShowAll()

Returns the current value of the GtkWidget:no-show-all property, which determines whether calls to gtk_widget_show_all() and gtk_widget_hide_all() will affect this widget. Since 2.4

getPangoContext
PgContext getPangoContext()

Gets a PangoContext with the appropriate font map, font description, and base direction for this widget. Unlike the context returned by gtk_widget_create_pango_context(), 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. If you create and keep a PangoLayout using this context, you must deal with changes to the context by calling pango_layout_context_changed() on the layout in response to the "style-set" and "direction-changed" signals for the widget.

getParent
Widget getParent()

Returns the parent container of widget.

getParentWindow
Window getParentWindow()

Gets widget's parent window.

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 are not GTK_NO_WINDOW widgets, and are relative to widget->allocation.x, widget->allocation.y for widgets that are GTK_NO_WINDOW widgets.

getRealized
int getRealized()

Determines whether widget is realized. Since 2.20

getReceivesDefault
int getReceivesDefault()

Determines whether widget is alyways treated as default widget withing its toplevel when it has the focus, even if another widget is the default. See gtk_widget_set_receives_default(). Since 2.18

getRequisition
void getRequisition(GtkRequisition requisition)

Retrieves the widget's requisition. This function should only be used by widget implementations in order to figure whether the widget's requisition has actually changed after some internal state change (so that they can call gtk_widget_queue_resize() instead of gtk_widget_queue_draw()). Normally, gtk_widget_size_request() should be used. Since 2.20

getRootWindow
Window 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 GtkWindow at the top. The root window is useful for such purposes as creating a popup GdkWindow associated with the window. In general, you should only create display specific resources when a widget has been realized, and you should free those resources when the widget is unrealized. Since 2.2

getScreen
Screen getScreen()

Get the GdkScreen 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 GtkWindow at the top. In general, you should only create screen specific resources when a widget has been realized, and you should free those resources when the widget is unrealized. Since 2.2

getSensitive
int getSensitive()

Returns the widget's sensitivity (in the sense of returning the value that has been set using gtk_widget_set_sensitive()). The effective sensitivity of a widget is however determined by both its own and its parent widget's sensitivity. See gtk_widget_is_sensitive(). Since 2.18

getSettings
Settings getSettings()

Gets the settings object holding the settings (global property settings, RC file information, etc) used for this widget. Note that this function can only be called when the GtkWidget is attached to a toplevel, since the settings object is specific to a particular GdkScreen.

getSizeRequest
void getSizeRequest(int width, int height)

Gets the size request that was explicitly set for the widget using gtk_widget_set_size_request(). 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 intead. See gtk_widget_set_size_request(). To get the size a widget will actually use, call gtk_widget_size_request() instead of this function.

getSnapshot
Pixmap getSnapshot(Rectangle clipRect)

Create a GdkPixmap of the contents of the widget and its children. Works even if the widget is obscured. The depth and visual of the resulting pixmap is dependent on the widget being snapshot and likely differs from those of a target widget displaying the pixmap. The function gdk_pixbuf_get_from_drawable() can be used to convert the pixmap to a visual independant representation. The snapshot area used by this function is the widget's allocation plus any extra space occupied by additional windows belonging to this widget (such as the arrows of a spin button). Thus, the resulting snapshot pixmap is possibly larger than the allocation. If clip_rect is non-NULL, the resulting pixmap is shrunken to match the specified clip_rect. The (x,y) coordinates of clip_rect are interpreted widget relative. If width or height of clip_rect are 0 or negative, the width or height of the resulting pixmap will be shrunken by the respective amount. For instance a clip_rect { +5, +5, -10, -10 } will chop off 5 pixels at each side of the snapshot pixmap. If non-NULL, clip_rect will contain the exact widget-relative snapshot coordinates upon return. A clip_rect of { -1, -1, 0, 0 } can be used to preserve the auto-grown snapshot area and use clip_rect as a pure output parameter. The returned pixmap can be NULL, if the resulting clip_area was empty. Since 2.14

getState
GtkStateType getState()

Returns the widget's state. See gtk_widget_set_state(). Since 2.18

getStruct
void* getStruct()

the main Gtk struct as a void*

getStyle
Style getStyle()

Simply an accessor function that returns widget->style.

getTooltipMarkup
string getTooltipMarkup()

Gets the contents of the tooltip for widget. Since 2.12

getTooltipText
string getTooltipText()

Gets the contents of the tooltip for widget. Since 2.12

getTooltipWindow
GtkWindow* getTooltipWindow()

Returns the GtkWindow of the current tooltip. This can be the GtkWindow created by default, or the custom tooltip window set using gtk_widget_set_tooltip_window(). Since 2.12

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. Note the difference in behavior vs. gtk_widget_get_ancestor(); gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW) would return NULL if widget wasn't inside a toplevel window, and if the window was inside a GtkWindow-derived widget which was in turn inside the toplevel GtkWindow. While the second case may seem unlikely, it actually happens when a GtkPlug is embedded inside a GtkSocket within the same application. To reliably find the toplevel GtkWindow, use gtk_widget_get_toplevel() and check if the TOPLEVEL flags is set on the result.

getVisible
int getVisible()

Determines whether the widget is visible. Note that this doesn't take into account whether the widget's parent is also visible or the widget is obscured in any way. See gtk_widget_set_visible(). Since 2.18

getVisual
Visual getVisual()

Gets the visual that will be used to render widget.

getWidgetClass
GtkWidgetClass* getWidgetClass()
Undocumented in source. Be warned that the author may not have intended to support it.
getWidgetStruct
GtkWidget* getWidgetStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getWidth
int getWidth()
getWindow
Window getWindow()

Gets the Window for this widget

grabDefault
void grabDefault()

Causes widget to become the default widget. widget must have the GTK_CAN_DEFAULT flag set; typically you have to set this flag yourself by calling gtk_widget_set_can_default (widget, TRUE). The default widget is activated when the user presses Enter in a window. Default widgets must be activatable, that is, gtk_widget_activate() should affect them.

grabFocus
void grabFocus()

Causes widget to have the keyboard focus for the GtkWindow it's inside. widget must be a focusable widget, such as a GtkEntry; something like GtkFrame won't work. More precisely, it must have the GTK_CAN_FOCUS flag set. Use gtk_widget_set_can_focus() to modify that flag. The widget also needs to be realized and mapped. This is indicated by the related signals. Grabbing the focus immediately after creating the widget will likely fail and cause critical warnings.

hasDefault
int hasDefault()

Determines whether widget is the current default widget within its toplevel. See gtk_widget_set_can_default(). Since 2.18

hasFocus
int hasFocus()

Determines if the widget has the global input focus. See gtk_widget_is_focus() for the difference between having the global input focus, and only having the focus within a toplevel. Since 2.18

hasGrab
int hasGrab()

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

hasRcStyle
int hasRcStyle()

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

hasScreen
int hasScreen()

Checks whether there is a GdkScreen 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. Since 2.2

hide
void hide()

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

hideAll
void hideAll()

Recursively hides a widget and any child widgets.

hideOnDelete
int hideOnDelete()

Utility function; intended to be connected to the "delete-event" signal on a GtkWindow. The function calls gtk_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.

inputShapeCombineMask
void inputShapeCombineMask(Bitmap shapeMask, int offsetX, int offsetY)

Sets an input shape for this widget's GDK window. This allows for windows which react to mouse click in a nonrectangular region, see gdk_window_input_shape_combine_mask() for more information. Since 2.10

intersect
int intersect(Rectangle area, Rectangle 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
int isAncestor(Widget ancestor)

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

isComposited
int 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. Please note that the semantics of this call will change in the future if used on a widget that has a composited window in its hierarchy (as set by gdk_window_set_composited()). Since 2.10

isDrawable
int isDrawable()

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

isFocus
int isFocus()

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

isSensitive
int isSensitive()

Returns the widget's effective sensitivity, which means it is sensitive itself and also its parent widget is sensntive Since 2.18

isToplevel
int isToplevel()

Determines whether widget is a toplevel widget. Currently only GtkWindow and GtkInvisible are toplevel widgets. Toplevel widgets have no parent widget. Since 2.18

keynavFailed
int 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 Since 2.12

listAccelClosures
ListG listAccelClosures()

Lists the closures used by widget for accelerator group connections with gtk_accel_group_connect_by_path() or gtk_accel_group_connect(). The closures can be used to monitor accelerator changes on widget, by connecting to the GtkAccelGroup::accel-changed signal of the GtkAccelGroup of a closure which can be found out with gtk_accel_group_from_accel_closure().

listMnemonicLabels
ListG listMnemonicLabels()

Returns a newly allocated list of the widgets, normally labels, for which this widget is a the target of a mnemonic (see for example, gtk_label_set_mnemonic_widget()). The widgets in the list are not individually referenced. If you want to iterate through the list and perform actions involving callbacks that might destroy the widgets, you must call g_list_foreach (result, (GFunc)g_object_ref, NULL) first, and then unref all the widgets afterwards. Since 2.4

map
void map()

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

mnemonicActivate
int mnemonicActivate(int groupCycling)

Emits the "mnemonic-activate" signal. The default handler for this signal activates the widget if group_cycling is FALSE, and just grabs the focus if group_cycling is TRUE.

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 gtk_widget_modify_text()) for widgets such as GtkEntry and GtkTextView. See also gtk_widget_modify_style(). Note that "no window" widgets (which have the GTK_NO_WINDOW flag set) draw on their parent container's window and thus may not draw any background themselves. This is the case for e.g. GtkLabel. To modify the background of such widgets, you have to set the base color on their parent; if you want to set the background of a rectangular area around a label, try placing the label in a GtkEventBox widget and setting the base color on that.

modifyBg
void modifyBg(GtkStateType state, Color color)

Sets the background color for a widget in a particular state. All other style values are left untouched. See also gtk_widget_modify_style(). Note that "no window" widgets (which have the GTK_NO_WINDOW flag set) draw on their parent container's window and thus may not draw any background themselves. This is the case for e.g. GtkLabel. To modify the background of such widgets, you have to set the background color on their parent; if you want to set the background of a rectangular area around a label, try placing the label in a GtkEventBox widget and setting the background color on that.

modifyCursor
void modifyCursor(Color primary, Color secondary)

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 gtk_widget_modify_style(). Since 2.12

modifyFg
void modifyFg(GtkStateType state, Color color)

Sets the foreground color for a widget in a particular state. All other style values are left untouched. See also gtk_widget_modify_style().

modifyFont
void modifyFont(PgFontDescription fontDesc)

Sets the font to use for a widget. All other style values are left untouched. See also gtk_widget_modify_style().

modifyFont
void modifyFont(string family, int size)

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

modifyStyle
void modifyStyle(RcStyle style)

Modifies style values on the widget. Modifications made using this technique take precedence over style values set via an RC file, however, they will be overriden if a style is explicitely set on the widget using gtk_widget_set_style(). The GtkRcStyle structure is designed so each field can either be set or unset, so it is possible, using this function, to modify some style values and leave the others unchanged. Note that modifications made with this function are not cumulative with previous calls to gtk_widget_modify_style() or with such functions as gtk_widget_modify_fg(). If you wish to retain previous values, you must first call gtk_widget_get_modifier_style(), make your modifications to the returned style, then call gtk_widget_modify_style() with that style. On the other hand, if you first call gtk_widget_modify_style(), subsequent calls to such functions gtk_widget_modify_fg() will have a cumulative effect with the initial modifications.

modifyText
void modifyText(GtkStateType state, Color color)

Sets the text color for a widget in a particular state. All other style values are left untouched. The text color is the foreground color used along with the base color (see gtk_widget_modify_base()) for widgets such as GtkEntry and GtkTextView. See also gtk_widget_modify_style().

onButtonPressEvent
bool onButtonPressEvent(GdkEventButton* event)
onButtonReleaseEvent
bool onButtonReleaseEvent(GdkEventButton* event)
onClientEvent
bool onClientEvent(GdkEventClient* event)
onConfigureEvent
bool onConfigureEvent(GdkEventConfigure* event)
onDeleteEvent
bool onDeleteEvent(GdkEventAny* event)
onEnterNotifyEvent
bool onEnterNotifyEvent(GdkEventCrossing* event)
onEvent
bool onEvent(GdkEvent* event)
onExposeEvent
bool onExposeEvent(GdkEventExpose* event)
onFocusInEvent
bool onFocusInEvent(GdkEventFocus* event)
onFocusOutEvent
bool onFocusOutEvent(GdkEventFocus* event)
onKeyPressEvent
bool onKeyPressEvent(GdkEventKey* event)
onKeyReleaseEvent
bool onKeyReleaseEvent(GdkEventKey* event)
onLeaveNotifyEvent
bool onLeaveNotifyEvent(GdkEventCrossing* event)
onMapEvent
bool onMapEvent(GdkEventAny* event)
onMotionNotifyEvent
bool onMotionNotifyEvent(GdkEventMotion* event)
onNoExposeEvent
bool onNoExposeEvent(GdkEventAny* event)
onPropertyNotifyEvent
bool onPropertyNotifyEvent(GdkEventProperty* event)
onProximityInEvent
bool onProximityInEvent(GdkEventProximity* event)
onProximityOutEvent
bool onProximityOutEvent(GdkEventProximity* event)
onScrollEvent
bool onScrollEvent(GdkEventScroll* event)
onSelectionClearEvent
bool onSelectionClearEvent(GdkEventSelection* event)
onSelectionNotifyEvent
bool onSelectionNotifyEvent(GdkEventSelection* event)
onSelectionRequestEvent
bool onSelectionRequestEvent(GdkEventSelection* event)
onUnmapEvent
bool onUnmapEvent(GdkEventAny* event)
onVisibilityNotifyEvent
bool onVisibilityNotifyEvent(GdkEventVisibility* event)
onWindowStateEvent
bool onWindowStateEvent(GdkEventWindowState* event)
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 gtk_widget_get_name(). 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 gtk_widget_set_name(). 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.

queueClear
void queueClear()

Warning gtk_widget_queue_clear has been deprecated since version 2.2 and should not be used in newly-written code. Use gtk_widget_queue_draw() instead. This function does the same as gtk_widget_queue_draw().

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

Warning gtk_widget_queue_clear_area has been deprecated since version 2.2 and should not be used in newly-written code. Use gtk_widget_queue_draw_area() instead. This function is no longer different from gtk_widget_queue_draw_area(), though it once was. Now it just calls gtk_widget_queue_draw_area(). Originally gtk_widget_queue_clear_area() would force a redraw of the background for GTK_NO_WINDOW widgets, and gtk_widget_queue_draw_area() would not. Now both functions ensure the background will be redrawn.

queueDraw
void queueDraw()

Equivalent to calling gtk_widget_queue_draw_area() for the entire area of a widget.

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

Invalidates the rectangular area of widget defined by x, y, width and height by calling gdk_window_invalidate_rect() 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. Normally you would only use this function in widget implementations. You might also use it, or gdk_window_invalidate_rect() directly, to schedule a redraw of a GtkDrawingArea or some portion thereof. Frequently you can just call gdk_window_invalidate_rect() or gdk_window_invalidate_region() instead of this function. Those functions will invalidate only a single window, instead of the widget and all its children. The advantage of adding to the invalidated region compared to simply drawing immediately is efficiency; using an invalid region ensures that you only have to redraw one time.

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 GtkLabel, GtkLabel queues a resize to ensure there's enough space for the new text.

queueResizeNoRedraw
void queueResizeNoRedraw()

This function works like gtk_widget_queue_resize(), except that the widget is not invalidated. Since 2.4

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. Realizing a widget requires all the widget's parent widgets to be realized; calling gtk_widget_realize() realizes the widget's parents in addition to widget itself. If a widget is not yet inside a toplevel window when you realize it, bad things will happen. This function is primarily used in widget implementations, and isn't very useful otherwise. Many times when you think you might need it, a better approach is to connect to a signal that will be called after the widget is realized automatically, such as GtkWidget::expose-event. Or simply g_signal_connect() to the GtkWidget::realize signal.

regionIntersect
Region regionIntersect(Region region)

Computes the intersection of a widget's area and region, returning the intersection. The result may be empty, use gdk_region_empty() to check.

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

Removes an accelerator from widget, previously installed with gtk_widget_add_accelerator().

removeMnemonicLabel
void removeMnemonicLabel(Widget label)

Removes a widget from the list of mnemonic labels for this widget. (See gtk_widget_list_mnemonic_labels()). The widget must have previously been added to the list with gtk_widget_add_mnemonic_label(). Since 2.4

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

A convenience function that uses the theme engine and RC file 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. The pixels in the returned GdkPixbuf are shared with the rest of the application and should not be modified. The pixbuf should be freed after use with g_object_unref().

reparent
void reparent(Widget newParent)

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

resetCursor
void resetCursor()

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

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. This function is not useful for applications.

resetShapes
void resetShapes()

Recursively resets the shape on this widget and its descendants.

sendExpose
int sendExpose(Event event)

Very rarely-used function. This function is used to emit an expose event signals on a widget. This function is not normally used directly. The only time it is used is when propagating an expose event to a child NO_WINDOW widget, and that is normally done using gtk_container_propagate_expose(). If you want to force an area of a window to be redrawn, use gdk_window_invalidate_rect() or gdk_window_invalidate_region(). To cause the redraw to be done immediately, follow that call with a call to gdk_window_process_updates().

sendFocusChange
int sendFocusChange(Event event)

Sends the focus change event to widget This function is not meant to be used by applications. The only time it should be used is when it is necessary for a GtkWidget to assign focus to a widget that is semantically owned by the first widget even though it's not a direct child - for instance, a search entry in a floating window similar to the quick search in GtkTreeView. Since 2.22

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 gtk_widget_set_accel_path(). Associating accelerators with paths allows them to be modified by the user and the modifications to be saved for future use. (See gtk_accel_map_save().) This function is a low level function that would most likely be used by a menu creation system like GtkUIManager. If you use GtkUIManager, setting up accelerator paths will be done automatically. Even when you you aren't using GtkUIManager, if you only want to set up accelerators on menu items gtk_menu_item_set_accel_path() provides a somewhat more convenient interface. Note that accel_path string will be stored in a GQuark. Therefore, if you pass a static string, you can save some memory by interning it first with g_intern_static_string().

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. Since 2.18

setAppPaintable
void setAppPaintable(int appPaintable)

Sets whether the application intends to draw on the widget in an "expose-event" handler. This is a hint to the widget and does not affect the behavior of the GTK+ core; many widgets ignore this flag entirely. For widgets that do pay attention to the flag, such as GtkEventBox and GtkWindow, the effect is to suppress default themed drawing of the widget's background. (Children of the widget will still be drawn.) The application is then entirely responsible for drawing the widget background. Note that the background is still drawn when the widget is mapped. If this is not suitable (e.g. because you want to make a transparent

setCanDefault
void setCanDefault(int canDefault)

Specifies whether widget can be a default widget. See gtk_widget_grab_default() for details about the meaning of "default". Since 2.18

setCanFocus
void setCanFocus(int canFocus)

Specifies whether widget can own the input focus. See gtk_widget_grab_focus() for actually setting the input focus on a widget. Since 2.18

setChildVisible
void setChildVisible(int isVisible)

Sets whether widget should be mapped along with its when its parent is mapped and widget has been shown with gtk_widget_show(). The child visibility can be set for widget before it is added to a container with gtk_widget_set_parent(), to avoid mapping children unnecessary before immediately unmapping them. However it will be reset to its default state of TRUE when the widget is removed from a container. Note that changing the child visibility of a widget does not queue a resize on the widget. Most of the time, the size of a widget is computed from all visible children, whether or not they are mapped. If this is not the case, the container can queue a resize itself. This function is only useful for container implementations and never should be called by an application.

setColormap
void setColormap(Colormap colormap)

Sets the colormap for the widget to the given value. Widget must not have been previously realized. This probably should only be used from an init() function (i.e. from the constructor for the widget).

setCompositeName
void setCompositeName(string name)

Sets a widgets composite name. The widget must be a composite child of its parent; see gtk_widget_push_composite_child().

setCursor
void setCursor(Cursor cursor)

Sets the cursor.

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 explicitely visual rather than logical (such as buttons for text justification). If the direction is set to GTK_TEXT_DIR_NONE, then the value set by gtk_widget_set_default_direction() will be used.

setDoubleBuffered
void setDoubleBuffered(int doubleBuffered)

Widgets are double buffered by default; you can use this function to turn off the buffering. "Double buffered" simply means that gdk_window_begin_paint_region() and gdk_window_end_paint() are called automatically around expose events sent to the widget. gdk_window_begin_paint() diverts all drawing to a widget's window to an offscreen buffer, and gdk_window_end_paint() 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. In very simple terms, double buffered widgets don't flicker, so you would only use this function to turn off double buffering if you had special needs and really knew what you were doing. Note: if you turn off double-buffering, you have to handle expose events, since even the clearing to the background color or pixmap will not happen automatically (as it is done in gdk_window_begin_paint()).

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 gtk_widget_add_events() for widgets that are already realized, or if you want to preserve the existing event mask. This function can't be used with GTK_NO_WINDOW widgets; to get events on those widgets, place them inside a GtkEventBox and receive events on the event box.

setExtensionEvents
void setExtensionEvents(GdkExtensionMode mode)

Sets the extension events mask to mode. See GdkExtensionMode and gdk_input_set_extension_events().

setHasTooltip
void setHasTooltip(int hasTooltip)

Sets the has-tooltip property on widget to has_tooltip. See GtkWidget:has-tooltip for more information. Since 2.12

setHasWindow
void setHasWindow(int hasWindow)

Specifies whether widget has a GdkWindow of its own. Note that all realized widgets have a non-NULL "window" pointer (gtk_widget_get_window() never returns a NULL window when a widget is realized), but for many of them it's actually the GdkWindow of one of its parent widgets. Widgets that do not create a window for themselves in GtkWidget::realize() must announce this by calling this function with has_window = FALSE. This function should only be called by widget implementations, and they should call it in their init() function. Since 2.18

setMapped
void setMapped(int mapped)

Marks the widget as being realized. This function should only ever be called in a derived widget's "map" or "unmap" implementation. Since 2.20

setName
void setName(string name)

Widgets can be named, which allows you to refer to them from a gtkrc file. You can apply a style to widgets with a particular name in the gtkrc file. See the documentation for gtkrc files (on the same page as the docs for GtkRcStyle). Note that widget names are separated by periods in paths (see gtk_widget_path()), so names with embedded periods may cause confusion.

setNoShowAll
void setNoShowAll(int noShowAll)

Sets the "no-show-all" property, which determines whether calls to gtk_widget_show_all() and gtk_widget_hide_all() will affect this widget. This is mostly for use in constructing widget hierarchies with externally controlled visibility, see GtkUIManager. Since 2.4

setParent
void setParent(Widget parent)

This function is useful only when implementing subclasses of GtkContainer. 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 gtk_widget_unparent().

setParentWindow
void setParentWindow(Window parentWindow)

Sets a non default parent window for widget.

setRealized
void setRealized(int realized)

Marks the widget as being realized. This function should only ever be called in a derived widget's "realize" or "unrealize" implementation. Since 2.20

setReceivesDefault
void setReceivesDefault(int 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. See gtk_widget_grab_default() for details about the meaning of "default". Since 2.18

setRedrawOnAllocate
void setRedrawOnAllocate(int 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. Note that for NO_WINDOW widgets setting this flag to FALSE turns off all allocation on resizing: the widget will not even redraw if its position changes; this is to allow containers that don't draw anything to avoid excess invalidations. If you set this flag on a NO_WINDOW widget that does draw on widget->window, you are responsible for invalidating both the old and new allocation of the widget when the widget is moved and responsible for invalidating regions newly when the widget increases size.

setScrollAdjustments
int setScrollAdjustments(Adjustment hadjustment, Adjustment vadjustment)

For widgets that support scrolling, sets the scroll adjustments and returns TRUE. For widgets that don't support scrolling, does nothing and returns FALSE. Widgets that don't support scrolling can be scrolled by placing them in a GtkViewport, which does support scrolling.

setSensitive
void setSensitive(int 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 width by height. You can use this function to force a widget to be either larger or smaller than it normally would be. In most cases, gtk_window_set_default_size() is a better choice for toplevel windows than this function; setting the default size will still allow users to shrink the window. Setting the size request will force them to leave the window at least as large as the size request. When dealing with window sizes, gtk_window_set_geometry_hints() can be a useful function as well. Note the inherent danger of setting any fixed size - themes, translations into other languages, different fonts, and user action can all change the appropriate size for a given widget. So, it's basically impossible to hardcode a size that will always be correct. The size request of a widget is the smallest size a widget can accept while still functioning well and drawing itself correctly. However in some strange cases a widget may be allocated less than its requested size, and in many cases a widget may be allocated more space than it requested. If the size request in a given direction is -1 (unset), then the "natural" size request of the widget will be used instead. Widgets can't actually be allocated a size less than 1 by 1, but you can pass 0,0 to this function to mean "as small as possible."

setState
void setState(GtkStateType state)

This function is for use in widget implementations. Sets the state of a widget (insensitive, prelighted, etc.) Usually you should set the state using wrapper functions such as gtk_widget_set_sensitive().

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
setStyle
void setStyle(Style style)

Sets the GtkStyle for a widget (widget->style). You probably don't want to use this function; it interacts badly with themes, because themes work by replacing the GtkStyle. Instead, use gtk_widget_modify_style().

setTooltip
void setTooltip(string tipText, string tipPrivate)

Sets this widget tooltip

setTooltipMarkup
void setTooltipMarkup(string markup)

Sets markup as the contents of the tooltip, which is marked up with the Pango text markup language. This function will take care of setting GtkWidget:has-tooltip to TRUE and of the default handler for the GtkWidget::query-tooltip signal. See also the GtkWidget:tooltip-markup property and gtk_tooltip_set_markup(). Since 2.12

setTooltipText
void setTooltipText(string text)

Sets text as the contents of the tooltip. This function will take care of setting GtkWidget:has-tooltip to TRUE and of the default handler for the GtkWidget::query-tooltip signal. See also the GtkWidget:tooltip-text property and gtk_tooltip_set_text(). Since 2.12

setTooltipWindow
void setTooltipWindow(GtkWindow* customWindow)

Replaces the default, usually yellow, 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. If the custom window should have the default theming it needs to have the name "gtk-tooltip", see gtk_widget_set_name(). Since 2.12

setUposition
void setUposition(int x, int y)

Warning gtk_widget_set_uposition is deprecated and should not be used in newly-written code. Sets the position of a widget. The funny "u" in the name comes from the "user position" hint specified by the X Window System, and exists for legacy reasons. This function doesn't work if a widget is inside a container; it's only really useful on GtkWindow. Don't use this function to center dialogs over the main application window; most window managers will do the centering on your behalf if you call gtk_window_set_transient_for(), and it's really not possible to get the centering to work correctly in all cases from application code. But if you insist, use gtk_window_set_position() to set GTK_WIN_POS_CENTER_ON_PARENT, don't do the centering manually. Note that although x and y can be individually unset, the position is not honoured unless both x and y are set.

setUsize
void setUsize(int width, int height)

Warning gtk_widget_set_usize has been deprecated since version 2.2 and should not be used in newly-written code. Use gtk_widget_set_size_request() instead. Sets the minimum size of a widget; that is, the widget's size request will be width by height. You can use this function to force a widget to be either larger or smaller than it is. The strange "usize" name dates from the early days of GTK+, and derives from X Window System terminology. In many cases, gtk_window_set_default_size() is a better choice for toplevel windows than this function; setting the default size will still allow users to shrink the window. Setting the usize will force them to leave the window at least as large as the usize. When dealing with window sizes, gtk_window_set_geometry_hints() can be a useful function as well. Note the inherent danger of setting any fixed size - themes, translations into other languages, different fonts, and user action can all change the appropriate size for a given widget. So, it's basically impossible to hardcode a size that will always be correct.

setVisible
void setVisible(int visible)

Sets the visibility state of widget. Note that setting this to TRUE doesn't mean the widget is actually viewable, see gtk_widget_get_visible(). This function simply calls gtk_widget_show() or gtk_widget_hide() but is nicer to use when the visibility of the widget depends on some condition. Since 2.18

setWindow
void setWindow(Window window)

Sets a widget's window. This function should only be used in a widget's GtkWidget::realize() implementation. The window passed is usually either new window created with gdk_window_new(), or the window of its parent widget as returned by gtk_widget_get_parent_window(). Widgets must indicate whether they will create their own GdkWindow by calling gtk_widget_set_has_window(). This is usually done in the widget's init() function. Since 2.18

shapeCombineMask
void shapeCombineMask(Bitmap shapeMask, int offsetX, int offsetY)

Sets a shape for this widget's GDK window. This allows for transparent windows etc., see gdk_window_shape_combine_mask() 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 gtk_widget_show_all() on the container, instead of individually showing the widgets. Remember that you have to show the containers containing a widget, in addition to the widget itself, before it will appear onscreen. When a toplevel container is shown, it is immediately realized and mapped; other shown widgets are realized and mapped when their toplevel container is realized and mapped.

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 GtkWindow 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 GtkContainer subclasses, to assign a size and position to their child widgets.

sizeRequest
void sizeRequest(GtkRequisition requisition)

This function is typically used when implementing a GtkContainer 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 gtk_widget_size_allocate(). You can also call this function from an application, with some caveats. Most notably, getting a size request requires the widget to be associated with a screen, because font information may be needed. Multihead-aware applications should keep this in mind. Also remember that the size request is not necessarily the size a widget will actually be allocated. See also gtk_widget_get_child_requisition().

styleAttach
void styleAttach()

This function attaches the widget's GtkStyle to the widget's GdkWindow. It is a replacement for widget->style = gtk_style_attach (widget->style, widget->window); and should only ever be called in a derived widget's "realize" implementation which does not chain up to its parent class' "realize" implementation, because one of the parent classes (finally GtkWidget) would attach the style itself. Since 2.20

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 gtk_widget_style_get(). Used primarily by language bindings.

thawChildNotify
void thawChildNotify()

Reverts the effect of a previous call to gtk_widget_freeze_child_notify(). This causes all queued "child-notify" signals on widget to be emitted.

translateCoordinates
int 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 gtk_tooltip_trigger_tooltip_query() for more information. Since 2.12

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

unref
void unref()

Warning gtk_widget_unref has been deprecated since version 2.12 and should not be used in newly-written code. Use g_object_unref() instead. Inverse of gtk_widget_ref(). Equivalent to g_object_unref().

Mixins

__anonymous
mixin BuildableT!(GtkWidget)
Undocumented in source.

Static functions

callBack
gboolean callBack(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackAccelClosuresChanged
void callBackAccelClosuresChanged(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackButtonPress
gboolean callBackButtonPress(GtkWidget* widgetStruct, GdkEventButton* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackButtonRelease
gboolean callBackButtonRelease(GtkWidget* widgetStruct, GdkEventButton* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackCanActivateAccel
gboolean callBackCanActivateAccel(GtkWidget* widgetStruct, guint signalId, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackChildNotify
void callBackChildNotify(GtkWidget* widgetStruct, GParamSpec* pspec, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackClient
gboolean callBackClient(GtkWidget* widgetStruct, GdkEventClient* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackCompositedChanged
void callBackCompositedChanged(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackConfigure
gboolean callBackConfigure(GtkWidget* widgetStruct, GdkEventConfigure* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDamage
gboolean callBackDamage(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDelete
gboolean callBackDelete(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDestroyEvent
gboolean callBackDestroyEvent(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDirectionChanged
void callBackDirectionChanged(GtkWidget* widgetStruct, GtkTextDirection previousDirection, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDragBegin
void callBackDragBegin(GtkWidget* widgetStruct, GdkDragContext* dragContext, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDragDataDelete
void callBackDragDataDelete(GtkWidget* widgetStruct, GdkDragContext* dragContext, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDragDataGet
void callBackDragDataGet(GtkWidget* widgetStruct, GdkDragContext* dragContext, GtkSelectionData* data, guint info, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDragDataReceived
void callBackDragDataReceived(GtkWidget* widgetStruct, GdkDragContext* dragContext, gint x, gint y, GtkSelectionData* data, guint info, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDragDrop
gboolean callBackDragDrop(GtkWidget* widgetStruct, GdkDragContext* dragContext, gint x, gint y, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDragEnd
void callBackDragEnd(GtkWidget* widgetStruct, GdkDragContext* dragContext, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDragFailed
gboolean callBackDragFailed(GtkWidget* widgetStruct, GdkDragContext* dragContext, GtkDragResult result, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDragLeave
void callBackDragLeave(GtkWidget* widgetStruct, GdkDragContext* dragContext, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackDragMotion
gboolean callBackDragMotion(GtkWidget* widgetStruct, GdkDragContext* dragContext, gint x, gint y, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackEnterNotify
gboolean callBackEnterNotify(GtkWidget* widgetStruct, GdkEventCrossing* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackEventAfter
void callBackEventAfter(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackExpose
gboolean callBackExpose(GtkWidget* widgetStruct, GdkEventExpose* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackFocus
gboolean callBackFocus(GtkWidget* widgetStruct, GtkDirectionType direction, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackFocusIn
gboolean callBackFocusIn(GtkWidget* widgetStruct, GdkEventFocus* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackFocusOut
gboolean callBackFocusOut(GtkWidget* widgetStruct, GdkEventFocus* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackGrabBroken
gboolean callBackGrabBroken(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackGrabFocus
void callBackGrabFocus(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackGrabNotify
void callBackGrabNotify(GtkWidget* widgetStruct, gboolean wasGrabbed, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackHide
void callBackHide(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackHierarchyChanged
void callBackHierarchyChanged(GtkWidget* widgetStruct, GtkWidget* previousToplevel, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackKeyPress
gboolean callBackKeyPress(GtkWidget* widgetStruct, GdkEventKey* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackKeyRelease
gboolean callBackKeyRelease(GtkWidget* widgetStruct, GdkEventKey* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackKeynavFailed
gboolean callBackKeynavFailed(GtkWidget* widgetStruct, GtkDirectionType direction, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackLeaveNotify
gboolean callBackLeaveNotify(GtkWidget* widgetStruct, GdkEventCrossing* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackMap
void callBackMap(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackMapEvent
gboolean callBackMapEvent(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackMnemonicActivate
gboolean callBackMnemonicActivate(GtkWidget* widgetStruct, gboolean arg1, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackMotionNotify
gboolean callBackMotionNotify(GtkWidget* widgetStruct, GdkEventMotion* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackMoveFocus
void callBackMoveFocus(GtkWidget* widgetStruct, GtkDirectionType direction, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackNoExpose
gboolean callBackNoExpose(GtkWidget* widgetStruct, GdkEventNoExpose* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackParentSet
void callBackParentSet(GtkWidget* widgetStruct, GtkObject* oldParent, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackPopupMenu
gboolean callBackPopupMenu(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackPropertyNotify
gboolean callBackPropertyNotify(GtkWidget* widgetStruct, GdkEventProperty* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackProximityIn
gboolean callBackProximityIn(GtkWidget* widgetStruct, GdkEventProximity* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackProximityOut
gboolean callBackProximityOut(GtkWidget* widgetStruct, GdkEventProximity* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackQueryTooltip
gboolean callBackQueryTooltip(GtkWidget* widgetStruct, gint x, gint y, gboolean keyboardMode, GtkTooltip* tooltip, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackRealize
void callBackRealize(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackScreenChanged
void callBackScreenChanged(GtkWidget* widgetStruct, GdkScreen* previousScreen, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackScroll
gboolean callBackScroll(GtkWidget* widgetStruct, GdkEventScroll* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackSelectionClear
gboolean callBackSelectionClear(GtkWidget* widgetStruct, GdkEventSelection* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackSelectionGet
void callBackSelectionGet(GtkWidget* widgetStruct, GtkSelectionData* data, guint info, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackSelectionNotify
gboolean callBackSelectionNotify(GtkWidget* widgetStruct, GdkEventSelection* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackSelectionReceived
void callBackSelectionReceived(GtkWidget* widgetStruct, GtkSelectionData* data, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackSelectionRequest
gboolean callBackSelectionRequest(GtkWidget* widgetStruct, GdkEventSelection* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackShow
void callBackShow(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackShowHelp
gboolean callBackShowHelp(GtkWidget* widgetStruct, GtkWidgetHelpType helpType, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackSizeAllocate
void callBackSizeAllocate(GtkWidget* widgetStruct, GtkAllocation* allocation, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackSizeRequest
void callBackSizeRequest(GtkWidget* widgetStruct, GtkRequisition* requisition, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackStateChanged
void callBackStateChanged(GtkWidget* widgetStruct, GtkStateType state, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackStyleSet
void callBackStyleSet(GtkWidget* widgetStruct, GtkStyle* previousStyle, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackUnmap
void callBackUnmap(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackUnmapEvent
gboolean callBackUnmapEvent(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackUnrealize
void callBackUnrealize(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackVisibilityNotify
gboolean callBackVisibilityNotify(GtkWidget* widgetStruct, GdkEventVisibility* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
callBackWindowState
gboolean callBackWindowState(GtkWidget* widgetStruct, GdkEventWindowState* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
classFindStyleProperty
ParamSpec classFindStyleProperty(GtkWidgetClass* klass, string propertyName)

Finds a style property of a widget class by name. Since 2.2

classInstallStyleProperty
void classInstallStyleProperty(GtkWidgetClass* klass, ParamSpec pspec)

Installs a style property on a widget class. The parser for the style property is determined by the value type of pspec.

classInstallStylePropertyParser
void classInstallStylePropertyParser(GtkWidgetClass* klass, ParamSpec pspec, GtkRcPropertyParser parser)

Installs a style property on a widget class.

classListStyleProperties
ParamSpec[] classListStyleProperties(GtkWidgetClass* klass)

Returns all style properties of a widget class. Since 2.2

getDefaultColormap
Colormap getDefaultColormap()

Obtains the default colormap used to create widgets.

getDefaultDirection
GtkTextDirection getDefaultDirection()

Obtains the current default reading direction. See gtk_widget_set_default_direction().

getDefaultStyle
Style getDefaultStyle()

Returns the default style used by all widgets initially.

getDefaultVisual
Visual getDefaultVisual()

Obtains the visual of the default colormap. Not really useful; used to be useful before gdk_colormap_get_visual() existed.

popColormap
void popColormap()

Removes a colormap pushed with gtk_widget_push_colormap().

popCompositeChild
void popCompositeChild()

Cancels the effect of a previous call to gtk_widget_push_composite_child().

pushColormap
void pushColormap(Colormap cmap)

Pushes cmap onto a global stack of colormaps; the topmost colormap on the stack will be used to create all widgets. Remove cmap with gtk_widget_pop_colormap(). There's little reason to use this function.

pushCompositeChild
void pushCompositeChild()

Makes all newly-created widgets as composite children until the corresponding gtk_widget_pop_composite_child() call. A composite child is a child that's an implementation detail of the container it's inside and should not be visible to people using the container. Composite children aren't treated differently by GTK (but see gtk_container_foreach() vs. gtk_container_forall()), but e.g. GUI builders might want to treat them in a different way.

requisitionCopy
GtkRequisition* requisitionCopy(GtkRequisition* requisition)

Copies a GtkRequisition.

requisitionFree
void requisitionFree(GtkRequisition* requisition)

Frees a GtkRequisition.

setDefaultColormap
void setDefaultColormap(Colormap colormap)

Sets the default colormap to use when creating widgets. gtk_widget_push_colormap() is a better function to use if you only want to affect a few widgets, rather than all widgets.

setDefaultDirection
void setDefaultDirection(GtkTextDirection dir)

Sets the default reading direction for widgets where the direction has not been explicitly set by gtk_widget_set_direction().

Variables

connectedSignals
int[string] connectedSignals;
gtkWidget
GtkWidget* gtkWidget;

the main Gtk struct

onAccelClosuresChangedListeners
void delegate(Widget)[] onAccelClosuresChangedListeners;
Undocumented in source.
onButtonPressListeners
bool delegate(GdkEventButton*, Widget)[] onButtonPressListeners;
Undocumented in source.
onButtonReleaseListeners
bool delegate(GdkEventButton*, Widget)[] onButtonReleaseListeners;
Undocumented in source.
onCanActivateAccelListeners
bool delegate(guint, Widget)[] onCanActivateAccelListeners;
Undocumented in source.
onChildNotifyListeners
void delegate(ParamSpec, Widget)[] onChildNotifyListeners;
Undocumented in source.
onClientListeners
bool delegate(GdkEventClient*, Widget)[] onClientListeners;
Undocumented in source.
onCompositedChangedListeners
void delegate(Widget)[] onCompositedChangedListeners;
Undocumented in source.
onConfigureListeners
bool delegate(GdkEventConfigure*, Widget)[] onConfigureListeners;
Undocumented in source.
onDamageListeners
bool delegate(Event, Widget)[] onDamageListeners;
Undocumented in source.
onDeleteListeners
bool delegate(Event, Widget)[] onDeleteListeners;
Undocumented in source.
onDestroyEventListeners
bool delegate(Event, Widget)[] onDestroyEventListeners;
Undocumented in source.
onDirectionChangedListeners
void delegate(GtkTextDirection, Widget)[] onDirectionChangedListeners;
Undocumented in source.
onDragBeginListeners
void delegate(GdkDragContext*, Widget)[] onDragBeginListeners;
Undocumented in source.
onDragDataDeleteListeners
void delegate(GdkDragContext*, Widget)[] onDragDataDeleteListeners;
Undocumented in source.
onDragDataGetListeners
void delegate(GdkDragContext*, GtkSelectionData*, guint, guint, Widget)[] onDragDataGetListeners;
Undocumented in source.
onDragDataReceivedListeners
void delegate(GdkDragContext*, gint, gint, GtkSelectionData*, guint, guint, Widget)[] onDragDataReceivedListeners;
Undocumented in source.
onDragDropListeners
bool delegate(GdkDragContext*, gint, gint, guint, Widget)[] onDragDropListeners;
Undocumented in source.
onDragEndListeners
void delegate(GdkDragContext*, Widget)[] onDragEndListeners;
Undocumented in source.
onDragFailedListeners
bool delegate(GdkDragContext*, GtkDragResult, Widget)[] onDragFailedListeners;
Undocumented in source.
onDragLeaveListeners
void delegate(GdkDragContext*, guint, Widget)[] onDragLeaveListeners;
Undocumented in source.
onDragMotionListeners
bool delegate(GdkDragContext*, gint, gint, guint, Widget)[] onDragMotionListeners;
Undocumented in source.
onEnterNotifyListeners
bool delegate(GdkEventCrossing*, Widget)[] onEnterNotifyListeners;
Undocumented in source.
onEventAfterListeners
void delegate(Event, Widget)[] onEventAfterListeners;
Undocumented in source.
onExposeListeners
bool delegate(GdkEventExpose*, Widget)[] onExposeListeners;
Undocumented in source.
onFocusInListeners
bool delegate(GdkEventFocus*, Widget)[] onFocusInListeners;
Undocumented in source.
onFocusListeners
bool delegate(GtkDirectionType, Widget)[] onFocusListeners;
Undocumented in source.
onFocusOutListeners
bool delegate(GdkEventFocus*, Widget)[] onFocusOutListeners;
Undocumented in source.
onGrabBrokenListeners
bool delegate(Event, Widget)[] onGrabBrokenListeners;
Undocumented in source.
onGrabFocusListeners
void delegate(Widget)[] onGrabFocusListeners;
Undocumented in source.
onGrabNotifyListeners
void delegate(gboolean, Widget)[] onGrabNotifyListeners;
Undocumented in source.
onHideListeners
void delegate(Widget)[] onHideListeners;
Undocumented in source.
onHierarchyChangedListeners
void delegate(Widget, Widget)[] onHierarchyChangedListeners;
Undocumented in source.
onKeyPressListeners
bool delegate(GdkEventKey*, Widget)[] onKeyPressListeners;
Undocumented in source.
onKeyReleaseListeners
bool delegate(GdkEventKey*, Widget)[] onKeyReleaseListeners;
Undocumented in source.
onKeynavFailedListeners
bool delegate(GtkDirectionType, Widget)[] onKeynavFailedListeners;
Undocumented in source.
onLeaveNotifyListeners
bool delegate(GdkEventCrossing*, Widget)[] onLeaveNotifyListeners;
Undocumented in source.
onListeners
bool delegate(Event, Widget)[] onListeners;
Undocumented in source.
onMapEventListeners
bool delegate(Event, Widget)[] onMapEventListeners;
Undocumented in source.
onMapListeners
void delegate(Widget)[] onMapListeners;
Undocumented in source.
onMnemonicActivateListeners
bool delegate(gboolean, Widget)[] onMnemonicActivateListeners;
Undocumented in source.
onMotionNotifyListeners
bool delegate(GdkEventMotion*, Widget)[] onMotionNotifyListeners;
Undocumented in source.
onMoveFocusListeners
void delegate(GtkDirectionType, Widget)[] onMoveFocusListeners;
Undocumented in source.
onNoExposeListeners
bool delegate(GdkEventNoExpose*, Widget)[] onNoExposeListeners;
Undocumented in source.
onParentSetListeners
void delegate(GtkObject*, Widget)[] onParentSetListeners;
Undocumented in source.
onPopupMenuListeners
bool delegate(Widget)[] onPopupMenuListeners;
Undocumented in source.
onPropertyNotifyListeners
bool delegate(GdkEventProperty*, Widget)[] onPropertyNotifyListeners;
Undocumented in source.
onProximityInListeners
bool delegate(GdkEventProximity*, Widget)[] onProximityInListeners;
Undocumented in source.
onProximityOutListeners
bool delegate(GdkEventProximity*, Widget)[] onProximityOutListeners;
Undocumented in source.
onQueryTooltipListeners
bool delegate(gint, gint, gboolean, GtkTooltip*, Widget)[] onQueryTooltipListeners;
Undocumented in source.
onRealizeListeners
void delegate(Widget)[] onRealizeListeners;
Undocumented in source.
onScreenChangedListeners
void delegate(Screen, Widget)[] onScreenChangedListeners;
Undocumented in source.
onScrollListeners
bool delegate(GdkEventScroll*, Widget)[] onScrollListeners;
Undocumented in source.
onSelectionClearListeners
bool delegate(GdkEventSelection*, Widget)[] onSelectionClearListeners;
Undocumented in source.
onSelectionGetListeners
void delegate(GtkSelectionData*, guint, guint, Widget)[] onSelectionGetListeners;
Undocumented in source.
onSelectionNotifyListeners
bool delegate(GdkEventSelection*, Widget)[] onSelectionNotifyListeners;
Undocumented in source.
onSelectionReceivedListeners
void delegate(GtkSelectionData*, guint, Widget)[] onSelectionReceivedListeners;
Undocumented in source.
onSelectionRequestListeners
bool delegate(GdkEventSelection*, Widget)[] onSelectionRequestListeners;
Undocumented in source.
onShowHelpListeners
bool delegate(GtkWidgetHelpType, Widget)[] onShowHelpListeners;
Undocumented in source.
onShowListeners
void delegate(Widget)[] onShowListeners;
Undocumented in source.
onSizeAllocateListeners
void delegate(GtkAllocation*, Widget)[] onSizeAllocateListeners;
Undocumented in source.
onSizeRequestListeners
void delegate(GtkRequisition*, Widget)[] onSizeRequestListeners;
Undocumented in source.
onStateChangedListeners
void delegate(GtkStateType, Widget)[] onStateChangedListeners;
Undocumented in source.
onStyleSetListeners
void delegate(Style, Widget)[] onStyleSetListeners;
Undocumented in source.
onUnmapEventListeners
bool delegate(Event, Widget)[] onUnmapEventListeners;
Undocumented in source.
onUnmapListeners
void delegate(Widget)[] onUnmapListeners;
Undocumented in source.
onUnrealizeListeners
void delegate(Widget)[] onUnrealizeListeners;
Undocumented in source.
onVisibilityNotifyListeners
bool delegate(GdkEventVisibility*, Widget)[] onVisibilityNotifyListeners;
Undocumented in source.
onWindowStateListeners
bool delegate(GdkEventWindowState*, Widget)[] onWindowStateListeners;
Undocumented in source.

Inherited Members

From ObjectGtk

gtkObject
GtkObject* gtkObject;

the main Gtk struct

getObjectGtkStruct
GtkObject* getObjectGtkStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getStruct
void* getStruct()

the main Gtk struct as a void*

setStruct
void setStruct(GObject* obj)
Undocumented in source. Be warned that the author may not have intended to support it.
getId
string getId(StockID id)
connectedSignals
int[string] connectedSignals;
onDestroyListeners
void delegate(ObjectGtk)[] onDestroyListeners;
Undocumented in source.
addOnDestroy
void addOnDestroy(void delegate(ObjectGtk) dlg, ConnectFlags connectFlags)

Signals that all holders of a reference to the GtkObject should release the reference that they hold. May result in finalization of the object if all references are released. See Also GObject

callBackDestroy
void callBackDestroy(GtkObject* objectStruct, ObjectGtk _objectGtk)
Undocumented in source. Be warned that the author may not have intended to support it.
sink
void sink()

Warning gtk_object_sink has been deprecated since version 2.10 and should not be used in newly-written code. Use g_object_ref_sink() instead Removes the floating reference from a GtkObject, if it exists; otherwise does nothing. See the GtkObject overview documentation at the top of the page.

weakref
void weakref(GDestroyNotify notify, void* data)

Warning gtk_object_weakref is deprecated and should not be used in newly-written code. Use g_object_weak_ref() instead. Adds a weak reference callback to an object. Weak references are used for notification when an object is finalized. They are called "weak references" because they allow you to safely hold a pointer to an object without calling g_object_ref() (g_object_ref() adds a strong reference, that is, forces the object to stay alive).

weakunref
void weakunref(GDestroyNotify notify, void* data)

Warning gtk_object_weakunref is deprecated and should not be used in newly-written code. Use g_object_weak_unref() instead. Removes a weak reference callback to an object.

destroy
void destroy()

Warning gtk_object_destroy has been deprecated since version 2.24 and should not be used in newly-written code. Use gtk_widget_destroy() instead (if object is a widget) Emits the "destroy" signal notifying all reference holders that they should release the GtkObject. See the overview documentation at the top of the page for more details. The memory for the object itself won't be deleted until its reference count actually drops to 0; gtk_object_destroy() merely asks reference holders to release their references, it does not free the object.

removeNoNotify
void removeNoNotify(string key)

Warning gtk_object_remove_no_notify is deprecated and should not be used in newly-written code. Use g_object_steal_data() instead. Remove a specified datum from the object's data associations (the object_data), without invoking the association's destroy handler. Just like gtk_object_remove_data() except that any destroy handler will be ignored. Therefore this only affects data set using gtk_object_set_data_full().

setUserData
void setUserData(void* data)

Warning gtk_object_set_user_data is deprecated and should not be used in newly-written code. Use g_object_set_data() instead. For convenience, every object offers a generic user data pointer. This function sets it.

getUserData
void* getUserData()

Warning gtk_object_get_user_data is deprecated and should not be used in newly-written code. Use g_object_get_data() instead. Get the object's user data pointer. This is intended to be a pointer for your convenience in writing applications.

addArgType
void addArgType(string argName, GType argType, uint argFlags, uint argId)

Warning gtk_object_add_arg_type is deprecated and should not be used in newly-written code. Deprecated in favor of the GObject property system including GParamSpec. Add a new type of argument to an object class. Usually this is called when registering a new type of object.

setDataById
void setDataById(GQuark dataId, void* data)

Warning gtk_object_set_data_by_id is deprecated and should not be used in newly-written code. Use g_object_set_qdata() instead. Just like gtk_object_set_data() except that it takes a GQuark instead of a string, so it is slightly faster. Use gtk_object_data_try_key() and gtk_object_data_force_id() to get an id from a string.

setDataByIdFull
void setDataByIdFull(GQuark dataId, void* data, GDestroyNotify destroy)

Warning gtk_object_set_data_by_id_full is deprecated and should not be used in newly-written code. Use g_object_set_qdata_full() instead. Just like gtk_object_set_data_full() except that it takes a GQuark instead of a string, so it is slightly faster. Use gtk_object_data_try_key() and gtk_object_data_force_id() to get an id from a string.

getDataById
void* getDataById(GQuark dataId)

Warning gtk_object_get_data_by_id is deprecated and should not be used in newly-written code. Use g_object_get_qdata() instead. Just like gtk_object_get_data() except that it takes a GQuark instead of a string, so it is slightly faster. Use gtk_object_data_try_key() and gtk_object_data_force_id() to get an id from a string.

removeDataById
void removeDataById(GQuark dataId)

Warning gtk_object_remove_data_by_id is deprecated and should not be used in newly-written code. Use g_object_set_qdata() with data of NULL instead. Just like gtk_object_remove_data() except that it takes a GQuark instead of a string, so it is slightly faster. Remove a specified datum from the object's data associations. Subsequent calls to gtk_object_get_data() will return NULL. Use gtk_object_data_try_key() and gtk_object_data_force_id() to get an id from a string.

removeNoNotifyById
void removeNoNotifyById(GQuark keyId)

Warning gtk_object_remove_no_notify_by_id is deprecated and should not be used in newly-written code. Use g_object_steal_qdata() instead. Just like gtk_object_remove_no_notify() except that it takes a GQuark instead of a string, so it is slightly faster. Use gtk_object_data_try_key() and gtk_object_data_force_id() to get an id from a string.

From BuildableIF

getBuildableTStruct
GtkBuildable* getBuildableTStruct()
Undocumented in source.
getStruct
void* getStruct()

the main Gtk struct as a void*

buildableSetName
void buildableSetName(string name)

Sets the name of the buildable object. Since 2.12

buildableGetName
string buildableGetName()

Gets the name of the buildable object. GtkBuilder sets the name based on the the GtkBuilder UI definition used to construct the buildable. Since 2.12

addChild
void addChild(Builder builder, ObjectG child, string type)

Adds a child to buildable. type is an optional string describing how the child should be added. Since 2.12

setBuildableProperty
void setBuildableProperty(Builder builder, string name, Value value)

Sets the property name name to value on the buildable object. Since 2.12

constructChild
ObjectG constructChild(Builder builder, string name)

Constructs a child of buildable with the name name. GtkBuilder calls this function if a "constructor" has been specified in the UI definition. Since 2.12

customTagStart
int customTagStart(Builder builder, ObjectG child, string tagname, GMarkupParser* parser, void** data)

This is called for each unknown element under <child>. Since 2.12

customTagEnd
void customTagEnd(Builder builder, ObjectG child, string tagname, void** data)

This is called at the end of each custom element handled by the buildable. Since 2.12

customFinished
void customFinished(Builder builder, ObjectG child, string tagname, void* data)

This is similar to gtk_buildable_parser_finished() but is called once for each custom tag handled by the buildable. Since 2.12

parserFinished
void parserFinished(Builder builder)

Called when the builder finishes the parsing of a GtkBuilder UI definition. Note that this will be called once for each time gtk_builder_add_from_file() or gtk_builder_add_from_string() is called on a builder. Since 2.12

getInternalChild
ObjectG getInternalChild(Builder builder, string childname)

Get the internal child called childname of the buildable object. Since 2.12

Meta