DrawingArea

The GtkDrawingArea widget is used for creating custom user interface elements. It's essentially a blank widget; you can draw on it. After creating a drawing area, the application may want to connect to:

Mouse and button press signals to respond to input from the user. (Use gtk_widget_add_events() to enable events you wish to receive.)

The "realize" signal to take any necessary actions when the widget is instantiated on a particular display. (Create GDK resources in response to this signal.)

The "configure-event" signal to take any necessary actions when the widget changes size.

The "draw" signal to handle redrawing the contents of the widget.

The following code portion demonstrates using a drawing area to display a circle in the normal widget foreground color.

Note that GDK automatically clears the exposed area to the background color before sending the expose event, and that drawing is implicitly clipped to the exposed area.

Draw signals are normally delivered when a drawing area first comes onscreen, or when it's covered by another window and then uncovered. You can also force an expose event by adding to the "damage region" of the drawing area's window; gtk_widget_queue_draw_area() and gdk_window_invalidate_rect() are equally good ways to do this. You'll then get a draw signal for the invalid region.

The available routines for drawing are documented on the GDK Drawing Primitives page and the cairo documentation.

To receive mouse events on a drawing area, you will need to enable them with gtk_widget_add_events(). To receive keyboard events, you will need to set the "can-focus" property on the drawing area, and you should probably draw some user-visible indication that the drawing area is focused. Use gtk_widget_has_focus() in your expose event handler to decide whether to draw the focus indicator. See gtk_render_focus() for one way to draw focus.

Constructors

this
this(GtkDrawingArea* gtkDrawingArea)

Sets our main struct and passes it to the parent class

this
this(int width, int height)

Create a new DrawingArea and sets the SizeRequest

this
this()

Creates a new drawing area.

Members

Functions

getDrawingAreaStruct
GtkDrawingArea* getDrawingAreaStruct()
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.

Variables

gtkDrawingArea
GtkDrawingArea* gtkDrawingArea;

the main Gtk struct

Inherited Members

From Widget

gtkWidget
GtkWidget* gtkWidget;

the main Gtk struct

getWidgetStruct
GtkWidget* getWidgetStruct()
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.
__anonymous
mixin BuildableT!(GtkWidget)
Undocumented in source.
getWidgetClass
GtkWidgetClass* getWidgetClass()
Undocumented in source. Be warned that the author may not have intended to support it.
getWidth
int getWidth()
getHeight
int getHeight()
setCursor
void setCursor(Cursor cursor)

Sets the cursor.

resetCursor
void resetCursor()

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

modifyFont
void modifyFont(string family, int size)

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

onEvent
bool onEvent(GdkEvent* event)
onButtonPressEvent
bool onButtonPressEvent(GdkEventButton* event)
onButtonReleaseEvent
bool onButtonReleaseEvent(GdkEventButton* event)
onScrollEvent
bool onScrollEvent(GdkEventScroll* event)
onMotionNotifyEvent
bool onMotionNotifyEvent(GdkEventMotion* event)
onDeleteEvent
bool onDeleteEvent(GdkEventAny* event)
onDestroyEvent
bool onDestroyEvent(GdkEventAny* event)
onKeyPressEvent
bool onKeyPressEvent(GdkEventKey* event)
onKeyReleaseEvent
bool onKeyReleaseEvent(GdkEventKey* event)
onEnterNotifyEvent
bool onEnterNotifyEvent(GdkEventCrossing* event)
onLeaveNotifyEvent
bool onLeaveNotifyEvent(GdkEventCrossing* event)
onConfigureEvent
bool onConfigureEvent(GdkEventConfigure* event)
onFocusInEvent
bool onFocusInEvent(GdkEventFocus* event)
onFocusOutEvent
bool onFocusOutEvent(GdkEventFocus* event)
onMapEvent
bool onMapEvent(GdkEventAny* event)
onUnmapEvent
bool onUnmapEvent(GdkEventAny* event)
onPropertyNotifyEvent
bool onPropertyNotifyEvent(GdkEventProperty* event)
onSelectionClearEvent
bool onSelectionClearEvent(GdkEventSelection* event)
onSelectionRequestEvent
bool onSelectionRequestEvent(GdkEventSelection* event)
onSelectionNotifyEvent
bool onSelectionNotifyEvent(GdkEventSelection* event)
onProximityInEvent
bool onProximityInEvent(GdkEventProximity* event)
onProximityOutEvent
bool onProximityOutEvent(GdkEventProximity* event)
onVisibilityNotifyEvent
bool onVisibilityNotifyEvent(GdkEventVisibility* event)
onWindowStateEvent
bool onWindowStateEvent(GdkEventWindowState* event)
onDamageEvent
bool onDamageEvent(GdkEventExpose* event)
onGrabBrokenEvent
bool onGrabBrokenEvent(GdkEventGrabBroken* event)
CairoContext
alias CairoContext = cairo_t
Undocumented in source.
connectedSignals
int[string] connectedSignals;
onAccelClosuresChangedListeners
void delegate(Widget)[] onAccelClosuresChangedListeners;
Undocumented in source.
addOnAccelClosuresChanged
void addOnAccelClosuresChanged(void delegate(Widget) dlg, ConnectFlags connectFlags)
callBackAccelClosuresChanged
void callBackAccelClosuresChanged(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onButtonPressListeners
bool delegate(Event, Widget)[] onButtonPressListeners;
Undocumented in source.
addOnButtonPress
void addOnButtonPress(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::button-press-event signal will be emitted when a button (typically from a mouse) is pressed. 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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackButtonPress
gboolean callBackButtonPress(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onButtonReleaseListeners
bool delegate(Event, Widget)[] onButtonReleaseListeners;
Undocumented in source.
addOnButtonRelease
void addOnButtonRelease(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::button-release-event signal will be emitted when a button (typically from a mouse) is released. 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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackButtonRelease
gboolean callBackButtonRelease(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onCanActivateAccelListeners
bool delegate(guint, Widget)[] onCanActivateAccelListeners;
Undocumented in source.
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. TRUE if the signal can be activated.

callBackCanActivateAccel
gboolean callBackCanActivateAccel(GtkWidget* widgetStruct, guint signalId, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onChildNotifyListeners
void delegate(ParamSpec, Widget)[] onChildNotifyListeners;
Undocumented in source.
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.

callBackChildNotify
void callBackChildNotify(GtkWidget* widgetStruct, GParamSpec* childProperty, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onCompositedChangedListeners
void delegate(Widget)[] onCompositedChangedListeners;
Undocumented in source.
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().

callBackCompositedChanged
void callBackCompositedChanged(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onConfigureListeners
bool delegate(Event, Widget)[] onConfigureListeners;
Undocumented in source.
addOnConfigure
void addOnConfigure(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::configure-event signal will be emitted when the size, position or stacking of the widget's window has changed. 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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackConfigure
gboolean callBackConfigure(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDamageListeners
bool delegate(Event, Widget)[] onDamageListeners;
Undocumented in source.
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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. Since 2.14

callBackDamage
gboolean callBackDamage(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDeleteListeners
bool delegate(Event, Widget)[] onDeleteListeners;
Undocumented in source.
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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackDelete
gboolean callBackDelete(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDestroyListeners
void delegate(Widget)[] onDestroyListeners;
Undocumented in source.
addOnDestroy
void addOnDestroy(void delegate(Widget) dlg, ConnectFlags connectFlags)

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

callBackDestroy
void callBackDestroy(GtkWidget* objectStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDestroyEventListeners
bool delegate(Event, Widget)[] onDestroyEventListeners;
Undocumented in source.
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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackDestroyEvent
gboolean callBackDestroyEvent(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDirectionChangedListeners
void delegate(GtkTextDirection, Widget)[] onDirectionChangedListeners;
Undocumented in source.
addOnDirectionChanged
void addOnDirectionChanged(void delegate(GtkTextDirection, Widget) dlg, ConnectFlags connectFlags)

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

callBackDirectionChanged
void callBackDirectionChanged(GtkWidget* widgetStruct, GtkTextDirection previousDirection, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDragBeginListeners
void delegate(DragContext, Widget)[] onDragBeginListeners;
Undocumented in source.
addOnDragBegin
void addOnDragBegin(void delegate(DragContext, Widget) dlg, ConnectFlags connectFlags)

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

callBackDragBegin
void callBackDragBegin(GtkWidget* widgetStruct, GdkDragContext* context, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDragDataDeleteListeners
void delegate(DragContext, Widget)[] onDragDataDeleteListeners;
Undocumented in source.
addOnDragDataDelete
void addOnDragDataDelete(void delegate(DragContext, Widget) dlg, ConnectFlags connectFlags)

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

callBackDragDataDelete
void callBackDragDataDelete(GtkWidget* widgetStruct, GdkDragContext* context, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDragDataGetListeners
void delegate(DragContext, SelectionData, guint, guint, Widget)[] onDragDataGetListeners;
Undocumented in source.
addOnDragDataGet
void addOnDragDataGet(void delegate(DragContext, SelectionData, 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().

callBackDragDataGet
void callBackDragDataGet(GtkWidget* widgetStruct, GdkDragContext* context, GtkSelectionData* data, guint info, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDragDataReceivedListeners
void delegate(DragContext, gint, gint, SelectionData, guint, guint, Widget)[] onDragDataReceivedListeners;
Undocumented in source.
addOnDragDataReceived
void addOnDragDataReceived(void delegate(DragContext, gint, gint, SelectionData, 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. Applications must create some means to determine why the signal was emitted and therefore whether to call gdk_drag_status() or gtk_drag_finish(). The handler may inspect the selected action with gdk_drag_context_get_selected_action() before calling gtk_drag_finish(), e.g. to implement GDK_ACTION_ASK as

callBackDragDataReceived
void callBackDragDataReceived(GtkWidget* widgetStruct, GdkDragContext* context, 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.
onDragDropListeners
bool delegate(DragContext, gint, gint, guint, Widget)[] onDragDropListeners;
Undocumented in source.
addOnDragDrop
void addOnDragDrop(bool delegate(DragContext, 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.

callBackDragDrop
gboolean callBackDragDrop(GtkWidget* widgetStruct, GdkDragContext* context, gint x, gint y, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDragEndListeners
void delegate(DragContext, Widget)[] onDragEndListeners;
Undocumented in source.
addOnDragEnd
void addOnDragEnd(void delegate(DragContext, Widget) dlg, ConnectFlags connectFlags)

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

callBackDragEnd
void callBackDragEnd(GtkWidget* widgetStruct, GdkDragContext* context, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDragFailedListeners
bool delegate(DragContext, GtkDragResult, Widget)[] onDragFailedListeners;
Undocumented in source.
addOnDragFailed
void addOnDragFailed(bool delegate(DragContext, GtkDragResult, Widget) dlg, ConnectFlags connectFlags)

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

callBackDragFailed
gboolean callBackDragFailed(GtkWidget* widgetStruct, GdkDragContext* context, GtkDragResult result, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDragLeaveListeners
void delegate(DragContext, guint, Widget)[] onDragLeaveListeners;
Undocumented in source.
addOnDragLeave
void addOnDragLeave(void delegate(DragContext, 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(). Likewise, the "drag-leave" signal is also emitted before the ::drag-drop signal, for instance to allow cleaning up of a preview item created in the "drag-motion" signal handler.

callBackDragLeave
void callBackDragLeave(GtkWidget* widgetStruct, GdkDragContext* context, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDragMotionListeners
bool delegate(DragContext, gint, gint, guint, Widget)[] onDragMotionListeners;
Undocumented in source.
addOnDragMotion
void addOnDragMotion(bool delegate(DragContext, 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().

callBackDragMotion
gboolean callBackDragMotion(GtkWidget* widgetStruct, GdkDragContext* context, gint x, gint y, guint time, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onDrawListeners
bool delegate(Context, Widget)[] onDrawListeners;
Undocumented in source.
addOnDraw
void addOnDraw(bool delegate(Context, Widget) dlg, ConnectFlags connectFlags)

This signal is emitted when a widget is supposed to render itself. The widget's top left corner must be painted at the origin of the passed in context and be sized to the values returned by gtk_widget_get_allocated_width() and gtk_widget_get_allocated_height(). Signal handlers connected to this signal can modify the cairo context passed as cr in any way they like and don't need to restore it. The signal emission takes care of calling cairo_save() before and cairo_restore() after invoking the handler. The signal handler will get a cr with a clip region already set to the widget's dirty region, i.e. to the area that needs repainting. Complicated widgets that want to avoid redrawing themselves completely can get the full extents of the clip region with gdk_cairo_get_clip_rectangle(), or they can get a finer-grained representation of the dirty region with cairo_copy_clip_rectangle_list(). TRUE to stop other handlers from being invoked for the event. % FALSE to propagate the event further. Since 3.0

callBackDraw
gboolean callBackDraw(GtkWidget* widgetStruct, CairoContext* cr, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onEnterNotifyListeners
bool delegate(Event, Widget)[] onEnterNotifyListeners;
Undocumented in source.
addOnEnterNotify
void addOnEnterNotify(bool delegate(Event, 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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackEnterNotify
gboolean callBackEnterNotify(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onListeners
bool delegate(Event, Widget)[] onListeners;
Undocumented in source.
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. TRUE to stop other handlers from being invoked for the event and to cancel the emission of the second specific ::event signal. FALSE to propagate the event further and to allow the emission of the second signal. The ::event-after signal is emitted regardless of the return value.

callBack
gboolean callBack(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onEventAfterListeners
void delegate(Event, Widget)[] onEventAfterListeners;
Undocumented in source.
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.

callBackEventAfter
void callBackEventAfter(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onFocusListeners
bool delegate(GtkDirectionType, Widget)[] onFocusListeners;
Undocumented in source.
addOnFocus
void addOnFocus(bool delegate(GtkDirectionType, Widget) dlg, ConnectFlags connectFlags)

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackFocus
gboolean callBackFocus(GtkWidget* widgetStruct, GtkDirectionType direction, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onFocusInListeners
bool delegate(Event, Widget)[] onFocusInListeners;
Undocumented in source.
addOnFocusIn
void addOnFocusIn(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::focus-in-event signal will be emitted when the keyboard focus enters the widget's window. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_FOCUS_CHANGE_MASK mask. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackFocusIn
gboolean callBackFocusIn(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onFocusOutListeners
bool delegate(Event, Widget)[] onFocusOutListeners;
Undocumented in source.
addOnFocusOut
void addOnFocusOut(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::focus-out-event signal will be emitted when the keyboard focus leaves the widget's window. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_FOCUS_CHANGE_MASK mask. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackFocusOut
gboolean callBackFocusOut(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onGrabBrokenListeners
bool delegate(Event, Widget)[] onGrabBrokenListeners;
Undocumented in source.
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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further. Since 2.8

callBackGrabBroken
gboolean callBackGrabBroken(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onGrabFocusListeners
void delegate(Widget)[] onGrabFocusListeners;
Undocumented in source.
addOnGrabFocus
void addOnGrabFocus(void delegate(Widget) dlg, ConnectFlags connectFlags)
callBackGrabFocus
void callBackGrabFocus(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onGrabNotifyListeners
void delegate(gboolean, Widget)[] onGrabNotifyListeners;
Undocumented in source.
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

callBackGrabNotify
void callBackGrabNotify(GtkWidget* widgetStruct, gboolean wasGrabbed, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onHideListeners
void delegate(Widget)[] onHideListeners;
Undocumented in source.
addOnHide
void addOnHide(void delegate(Widget) dlg, ConnectFlags connectFlags)

The ::hide signal is emitted when widget is hidden, for example with gtk_widget_hide().

callBackHide
void callBackHide(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onHierarchyChangedListeners
void delegate(Widget, Widget)[] onHierarchyChangedListeners;
Undocumented in source.
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.

callBackHierarchyChanged
void callBackHierarchyChanged(GtkWidget* widgetStruct, GtkWidget* previousToplevel, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onKeyPressListeners
bool delegate(Event, Widget)[] onKeyPressListeners;
Undocumented in source.
addOnKeyPress
void addOnKeyPress(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::key-press-event signal is emitted when a key is pressed. The signal emission will reoccur at the key-repeat rate when the key is kept pressed. 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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackKeyPress
gboolean callBackKeyPress(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onKeyReleaseListeners
bool delegate(Event, Widget)[] onKeyReleaseListeners;
Undocumented in source.
addOnKeyRelease
void addOnKeyRelease(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::key-release-event signal is emitted when a key is released. 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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackKeyRelease
gboolean callBackKeyRelease(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onKeynavFailedListeners
bool delegate(GtkDirectionType, Widget)[] onKeynavFailedListeners;
Undocumented in source.
addOnKeynavFailed
void addOnKeynavFailed(bool delegate(GtkDirectionType, Widget) dlg, ConnectFlags connectFlags)

Gets emitted if keyboard navigation fails. See gtk_widget_keynav_failed() for details. TRUE if stopping keyboard navigation is fine, FALSE if the emitting widget should try to handle the keyboard navigation attempt in its parent container(s). Since 2.12

callBackKeynavFailed
gboolean callBackKeynavFailed(GtkWidget* widgetStruct, GtkDirectionType direction, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onLeaveNotifyListeners
bool delegate(Event, Widget)[] onLeaveNotifyListeners;
Undocumented in source.
addOnLeaveNotify
void addOnLeaveNotify(bool delegate(Event, 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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackLeaveNotify
gboolean callBackLeaveNotify(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onMapListeners
void delegate(Widget)[] onMapListeners;
Undocumented in source.
addOnMap
void addOnMap(void delegate(Widget) dlg, ConnectFlags connectFlags)

The ::map signal is emitted when widget is going to be mapped, that is when the widget is visible (which is controlled with gtk_widget_set_visible()) and all its parents up to the toplevel widget are also visible. Once the map has occurred, "map-event" will be emitted. The ::map signal can be used to determine whether a widget will be drawn, for instance it can resume an animation that was stopped during the emission of "unmap".

callBackMap
void callBackMap(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onMapEventListeners
bool delegate(Event, Widget)[] onMapEventListeners;
Undocumented in source.
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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackMapEvent
gboolean callBackMapEvent(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onMnemonicActivateListeners
bool delegate(gboolean, Widget)[] onMnemonicActivateListeners;
Undocumented in source.
addOnMnemonicActivate
void addOnMnemonicActivate(bool delegate(gboolean, Widget) dlg, ConnectFlags connectFlags)

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackMnemonicActivate
gboolean callBackMnemonicActivate(GtkWidget* widgetStruct, gboolean arg1, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onMotionNotifyListeners
bool delegate(Event, Widget)[] onMotionNotifyListeners;
Undocumented in source.
addOnMotionNotify
void addOnMotionNotify(bool delegate(Event, 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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackMotionNotify
gboolean callBackMotionNotify(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onMoveFocusListeners
void delegate(GtkDirectionType, Widget)[] onMoveFocusListeners;
Undocumented in source.
addOnMoveFocus
void addOnMoveFocus(void delegate(GtkDirectionType, Widget) dlg, ConnectFlags connectFlags)
callBackMoveFocus
void callBackMoveFocus(GtkWidget* widgetStruct, GtkDirectionType direction, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onParentSetListeners
void delegate(Widget, Widget)[] onParentSetListeners;
Undocumented in source.
addOnParentSet
void addOnParentSet(void delegate(Widget, Widget) dlg, ConnectFlags connectFlags)

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

callBackParentSet
void callBackParentSet(GtkWidget* widgetStruct, GtkWidget* oldParent, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onPopupMenuListeners
bool delegate(Widget)[] onPopupMenuListeners;
Undocumented in source.
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. TRUE if a menu was activated

callBackPopupMenu
gboolean callBackPopupMenu(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onPropertyNotifyListeners
bool delegate(Event, Widget)[] onPropertyNotifyListeners;
Undocumented in source.
addOnPropertyNotify
void addOnPropertyNotify(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::property-notify-event signal will be emitted when a property on the widget's window has been changed or deleted. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_PROPERTY_CHANGE_MASK mask. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackPropertyNotify
gboolean callBackPropertyNotify(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onProximityInListeners
bool delegate(Event, Widget)[] onProximityInListeners;
Undocumented in source.
addOnProximityIn
void addOnProximityIn(bool delegate(Event, 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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackProximityIn
gboolean callBackProximityIn(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onProximityOutListeners
bool delegate(Event, Widget)[] onProximityOutListeners;
Undocumented in source.
addOnProximityOut
void addOnProximityOut(bool delegate(Event, 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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackProximityOut
gboolean callBackProximityOut(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onQueryTooltipListeners
bool delegate(gint, gint, gboolean, Tooltip, Widget)[] onQueryTooltipListeners;
Undocumented in source.
addOnQueryTooltip
void addOnQueryTooltip(bool delegate(gint, gint, gboolean, Tooltip, Widget) dlg, ConnectFlags connectFlags)

Emitted when "has-tooltip" is TRUE and the hover timeout has expired with the cursor hovering "above" widget; or emitted when widget got focus in keyboard mode. 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 TRUE if tooltip should be shown right now, FALSE otherwise. Since 2.12

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.
onRealizeListeners
void delegate(Widget)[] onRealizeListeners;
Undocumented in source.
addOnRealize
void addOnRealize(void delegate(Widget) dlg, ConnectFlags connectFlags)

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

callBackRealize
void callBackRealize(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onScreenChangedListeners
void delegate(Screen, Widget)[] onScreenChangedListeners;
Undocumented in source.
addOnScreenChanged
void addOnScreenChanged(void delegate(Screen, Widget) dlg, ConnectFlags connectFlags)

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

callBackScreenChanged
void callBackScreenChanged(GtkWidget* widgetStruct, GdkScreen* previousScreen, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onScrollListeners
bool delegate(Event, Widget)[] onScrollListeners;
Undocumented in source.
addOnScroll
void addOnScroll(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::scroll-event signal is emitted when a button in the 4 to 7 range is pressed. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned. To receive this signal, the GdkWindow associated to the widget needs to enable the GDK_SCROLL_MASK mask. This signal will be sent to the grab widget if there is one. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackScroll
gboolean callBackScroll(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onSelectionClearListeners
bool delegate(Event, Widget)[] onSelectionClearListeners;
Undocumented in source.
addOnSelectionClear
void addOnSelectionClear(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::selection-clear-event signal will be emitted when the the widget's window has lost ownership of a selection. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackSelectionClear
gboolean callBackSelectionClear(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onSelectionGetListeners
void delegate(SelectionData, guint, guint, Widget)[] onSelectionGetListeners;
Undocumented in source.
addOnSelectionGet
void addOnSelectionGet(void delegate(SelectionData, guint, guint, Widget) dlg, ConnectFlags connectFlags)
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.
onSelectionNotifyListeners
bool delegate(Event, Widget)[] onSelectionNotifyListeners;
Undocumented in source.
addOnSelectionNotify
void addOnSelectionNotify(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackSelectionNotify
gboolean callBackSelectionNotify(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onSelectionReceivedListeners
void delegate(SelectionData, guint, Widget)[] onSelectionReceivedListeners;
Undocumented in source.
addOnSelectionReceived
void addOnSelectionReceived(void delegate(SelectionData, guint, Widget) dlg, ConnectFlags connectFlags)
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.
onSelectionRequestListeners
bool delegate(Event, Widget)[] onSelectionRequestListeners;
Undocumented in source.
addOnSelectionRequest
void addOnSelectionRequest(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::selection-request-event signal will be emitted when another client requests ownership of the selection owned by the widget's window. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackSelectionRequest
gboolean callBackSelectionRequest(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onShowListeners
void delegate(Widget)[] onShowListeners;
Undocumented in source.
addOnShow
void addOnShow(void delegate(Widget) dlg, ConnectFlags connectFlags)

The ::show signal is emitted when widget is shown, for example with gtk_widget_show().

callBackShow
void callBackShow(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onShowHelpListeners
bool delegate(GtkWidgetHelpType, Widget)[] onShowHelpListeners;
Undocumented in source.
addOnShowHelp
void addOnShowHelp(bool delegate(GtkWidgetHelpType, Widget) dlg, ConnectFlags connectFlags)

TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackShowHelp
gboolean callBackShowHelp(GtkWidget* widgetStruct, GtkWidgetHelpType helpType, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onSizeAllocateListeners
void delegate(GdkRectangle*, Widget)[] onSizeAllocateListeners;
Undocumented in source.
addOnSizeAllocate
void addOnSizeAllocate(void delegate(GdkRectangle*, Widget) dlg, ConnectFlags connectFlags)
callBackSizeAllocate
void callBackSizeAllocate(GtkWidget* widgetStruct, GdkRectangle* allocation, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onStateChangedListeners
void delegate(GtkStateType, Widget)[] onStateChangedListeners;
Undocumented in source.
addOnStateChanged
void addOnStateChanged(void delegate(GtkStateType, Widget) dlg, ConnectFlags connectFlags)

Warning GtkWidget::state-changed is deprecated and should not be used in newly-written code. 3.0. Use "state-flags-changed" instead. The ::state-changed signal is emitted when the widget state changes. See gtk_widget_get_state().

callBackStateChanged
void callBackStateChanged(GtkWidget* widgetStruct, GtkStateType state, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onStateFlagsChangedListeners
void delegate(GtkStateFlags, Widget)[] onStateFlagsChangedListeners;
Undocumented in source.
addOnStateFlagsChanged
void addOnStateFlagsChanged(void delegate(GtkStateFlags, Widget) dlg, ConnectFlags connectFlags)

The ::state-flags-changed signal is emitted when the widget state changes, see gtk_widget_get_state_flags(). Since 3.0

callBackStateFlagsChanged
void callBackStateFlagsChanged(GtkWidget* widgetStruct, GtkStateFlags flags, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onStyleSetListeners
void delegate(Style, Widget)[] onStyleSetListeners;
Undocumented in source.
addOnStyleSet
void addOnStyleSet(void delegate(Style, Widget) dlg, ConnectFlags connectFlags)

Warning GtkWidget::style-set has been deprecated since version 3.0 and should not be used in newly-written code. Use the "style-updated" signal 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. Note that this signal is emitted for changes to the deprecated GtkStyle. To track changes to the GtkStyleContext associated with a widget, use the "style-updated" signal.

callBackStyleSet
void callBackStyleSet(GtkWidget* widgetStruct, GtkStyle* previousStyle, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onStyleUpdatedListeners
void delegate(Widget)[] onStyleUpdatedListeners;
Undocumented in source.
addOnStyleUpdated
void addOnStyleUpdated(void delegate(Widget) dlg, ConnectFlags connectFlags)

The ::style-updated signal is emitted when the GtkStyleContext of a widget is changed. Note that style-modifying functions like gtk_widget_override_color() also cause this signal to be emitted. Since 3.0

callBackStyleUpdated
void callBackStyleUpdated(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onTouchListeners
bool delegate(Event, Widget)[] onTouchListeners;
Undocumented in source.
addOnTouch
void addOnTouch(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)
callBackTouch
gboolean callBackTouch(GtkWidget* widgetStruct, GdkEvent* arg1, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onUnmapListeners
void delegate(Widget)[] onUnmapListeners;
Undocumented in source.
addOnUnmap
void addOnUnmap(void delegate(Widget) dlg, ConnectFlags connectFlags)

The ::unmap signal is emitted when widget is going to be unmapped, which means that either it or any of its parents up to the toplevel widget have been set as hidden. As ::unmap indicates that a widget will not be shown any longer, it can be used to, for example, stop an animation on the widget.

callBackUnmap
void callBackUnmap(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onUnmapEventListeners
bool delegate(Event, Widget)[] onUnmapEventListeners;
Undocumented in source.
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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackUnmapEvent
gboolean callBackUnmapEvent(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onUnrealizeListeners
void delegate(Widget)[] onUnrealizeListeners;
Undocumented in source.
addOnUnrealize
void addOnUnrealize(void delegate(Widget) dlg, ConnectFlags connectFlags)

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

callBackUnrealize
void callBackUnrealize(GtkWidget* widgetStruct, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onVisibilityNotifyListeners
bool delegate(Event, Widget)[] onVisibilityNotifyListeners;
Undocumented in source.
addOnVisibilityNotify
void addOnVisibilityNotify(bool delegate(Event, 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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackVisibilityNotify
gboolean callBackVisibilityNotify(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
onWindowStateListeners
bool delegate(Event, Widget)[] onWindowStateListeners;
Undocumented in source.
addOnWindowState
void addOnWindowState(bool delegate(Event, Widget) dlg, ConnectFlags connectFlags)

The ::window-state-event will be emitted when the state of the toplevel window associated to the widget changes. 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. TRUE to stop other handlers from being invoked for the event. FALSE to propagate the event further.

callBackWindowState
gboolean callBackWindowState(GtkWidget* widgetStruct, GdkEvent* event, Widget _widget)
Undocumented in source. Be warned that the author may not have intended to support it.
destroy
void destroy()

Destroys a widget. 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.

inDestruction
int inDestruction()

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

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.

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.

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.

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.

hide
void hide()

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

showAll
void showAll()

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

map
void map()

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

unmap
void unmap()

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

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 "draw". Or simply g_signal_connect() to the "realize" signal.

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

draw
void draw(Context cr)

Draws widget to cr. The top left corner of the widget will be drawn to the currently set origin point of cr. You should pass a cairo context as cr argument that is in an original state. Otherwise the resulting drawing is undefined. For example changing the operator using cairo_set_operator() or the line width using cairo_set_line_width() might have unwanted side effects. You may however change the context's transform matrix - like with cairo_scale(), cairo_translate() or cairo_set_matrix() and clip region with cairo_clip() prior to calling this function. Also, it is fine to modify the context with cairo_save() and cairo_push_group() prior to calling this function. Note Special purpose widgets may contain special code for rendering to the screen and might appear differently on screen and when rendered using gtk_widget_draw().

queueDraw
void queueDraw()

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

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. Note You cannot call gtk_widget_queue_resize() on a widget from inside its implementation of the GtkWidgetClass::size_allocate virtual method. Calls to gtk_widget_queue_resize() from inside GtkWidgetClass::size_allocate will be silently ignored.

queueResizeNoRedraw
void queueResizeNoRedraw()

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

getFrameClock
FrameClock getFrameClock()

Obtains the frame clock for a widget. The frame clock is a global "ticker" that can be used to drive animations and repaints. The most common reason to get the frame clock is to call gdk_frame_clock_get_frame_time(), in order to get a time to use for animating. For example you might record the start of the animation with an initial value from gdk_frame_clock_get_frame_time(), and then update the animation by calling gdk_frame_clock_get_frame_time() again during each repaint. gdk_frame_clock_request_phase() will result in a new frame on the clock, but won't necessarily repaint any widgets. To repaint a widget, you have to use gtk_widget_queue_draw() which invalidates the widget (thus scheduling it to receive a draw on the next frame). gtk_widget_queue_draw() will also end up requesting a frame on the appropriate frame clock. A widget's frame clock will not change while the widget is mapped. Reparenting a widget (which implies a temporary unmap) can change the widget's frame clock. Unrealized widgets do not have a frame clock.

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

Queues an animation frame update and adds a callback to be called before each frame. Until the tick callback is removed, it will be called frequently (usually at the frame rate of the output device or as quickly as the application can be repainted, whichever is slower). For this reason, is most suitable for handling graphics that change every frame or every few frames. The tick callback does not automatically imply a relayout or repaint. If you want a repaint or relayout, and aren't changing widget properties that would trigger that (for example, changing the text of a GtkLabel), then you will have to call gtk_widget_queue_resize() or gtk_widget_queue_draw_area() yourself. gdk_frame_clock_get_frame_time() should generally be used for timing continuous animations and gdk_frame_timings_get_predicted_presentation_time() if you are trying to display isolated frames at particular times. This is a more convenient alternative to connecting directly to the "update" signal of GdkFrameClock, since you don't have to worry about when a GdkFrameClock is assigned to a widget.

removeTickCallback
void removeTickCallback(uint id)

Removes a tick callback previously registered with gtk_widget_add_tick_callback().

sizeRequest
void sizeRequest(GtkRequisition requisition)

Warning gtk_widget_size_request has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_get_preferred_size() instead. 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.

getChildRequisition
void getChildRequisition(GtkRequisition requisition)

Warning gtk_widget_get_child_requisition has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_get_preferred_size() instead. 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().

sizeAllocate
void sizeAllocate(GtkAllocation allocation)

This function is only used by GtkContainer subclasses, to assign a size and position to their child widgets. In this function, the allocation may be adjusted. It will be forced to a 1x1 minimum size, and the adjust_size_allocation virtual method on the child will be used to adjust the allocation. Standard adjustments include removing the widget's margins, and applying the widget's "halign" and "valign" properties. For baseline support in containers you need to use gtk_widget_size_allocate_with_baseline() instead.

sizeAllocateWithBaseline
void sizeAllocateWithBaseline(GtkAllocation allocation, int baseline)

This function is only used by GtkContainer subclasses, to assign a size, position and (optionally) baseline to their child widgets. In this function, the allocation and baseline may be adjusted. It will be forced to a 1x1 minimum size, and the adjust_size_allocation virtual and adjust_baseline_allocation methods on the child will be used to adjust the allocation and baseline. Standard adjustments include removing the widget's margins, and applying the widget's "halign" and "valign" properties. If the child widget does not have a valign of GTK_ALIGN_BASELINE the baseline argument is ignored and -1 is used instead.

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_SIGNAL_ACTION. Accelerators added through this function are not user changeable during runtime. If you want to support accelerators that can be changed by the user, use gtk_accel_map_add_entry() and gtk_widget_set_accel_path() or gtk_menu_item_set_accel_path() instead.

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

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

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

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

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

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.

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.

reparent
void reparent(Widget newParent)

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

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.

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

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.

grabDefault
void grabDefault()

Causes widget to become the default widget. widget must be able to be a default widget; typically you would ensure this yourself by calling gtk_widget_set_can_default() with a TRUE value. 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. Note that GtkEntry widgets require the "activates-default" property set to TRUE before they activate the default widget when Enter is pressed and the GtkEntry is focused.

setName
void setName(string name)

Widgets can be named, which allows you to refer to them from a CSS file. You can apply a style to widgets with a particular name in the CSS file. See the documentation for the CSS syntax (on the same page as the docs for GtkStyleContext). Note that the CSS syntax has certain special characters to delimit and represent elements in a selector (period, #, >, *...), so using these will make your widget impossible to match by name. Any combination of alphanumeric symbols, dashes and underscores will suffice.

getName
string getName()

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

setState
void setState(GtkStateType state)

Warning gtk_widget_set_state is deprecated and should not be used in newly-written code. 3.0. Use gtk_widget_set_state_flags() instead. 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().

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.

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. For GtkWindow classes, setting a parent_window effects whether the window is a toplevel window or can be embedded into other widgets. Note For GtkWindow classes, this needs to be called before the window is realized.

getParentWindow
Window getParentWindow()

Gets widget's parent window.

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.

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.

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.

setDeviceEvents
void setDeviceEvents(Device device, GdkEventMask events)

Sets the device event mask (see GdkEventMask) for a widget. The event mask determines which events a widget will receive from device. Keep in mind that different widgets have different default event masks, and by changing the event mask you may disrupt a widget's functionality, so be careful. This function must be called while a widget is unrealized. Consider gtk_widget_add_device_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.

getDeviceEvents
GdkEventMask getDeviceEvents(Device device)

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

addDeviceEvents
void addDeviceEvents(Device device, GdkEventMask events)

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

setDeviceEnabled
void setDeviceEnabled(Device device, int enabled)

Enables or disables a GdkDevice to interact with widget and all its children. It does so by descending through the GdkWindow hierarchy and enabling the same mask that is has for core events (i.e. the one that gdk_window_get_events() returns).

getDeviceEnabled
int getDeviceEnabled(Device device)

Returns whether device can interact with widget and its children. See gtk_widget_set_device_enabled().

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.

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.

getVisual
Visual getVisual()

Gets the visual that will be used to render widget.

setVisual
void setVisual(Visual visual)

Sets the visual that should be used for by widget and its children for creating GdkWindows. The visual must be on the same GdkScreen as returned by gtk_widget_get_screen(), so handling the "screen-changed" signal is necessary. Setting a new visual will not cause widget to recreate its windows, so you should call this function before widget is realized.

getPointer
void getPointer(int x, int y)

Warning gtk_widget_get_pointer has been deprecated since version 3.4 and should not be used in newly-written code. Use gdk_window_get_device_position() instead. 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.

isAncestor
int isAncestor(Widget ancestor)

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

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.

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.

setStyle
void setStyle(Style style)

Warning gtk_widget_set_style has been deprecated since version 3.0 and should not be used in newly-written code. Use GtkStyleContext instead Used to set the GtkStyle for a widget (widget->style). Since GTK 3, this function does nothing, the passed in style is ignored.

ensureStyle
void ensureStyle()

Warning gtk_widget_ensure_style has been deprecated since version 3.0 and should not be used in newly-written code. Use GtkStyleContext instead 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.

getStyle
Style getStyle()

Warning gtk_widget_get_style has been deprecated since version 3.0 and should not be used in newly-written code. Use GtkStyleContext instead Simply an accessor function that returns widget->style.

resetRcStyles
void resetRcStyles()

Warning gtk_widget_reset_rc_styles has been deprecated since version 3.0 and should not be used in newly-written code. Use GtkStyleContext instead, and gtk_widget_reset_style() 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.

getDefaultStyle
Style getDefaultStyle()

Warning gtk_widget_get_default_style has been deprecated since version 3.0 and should not be used in newly-written code. Use GtkStyleContext instead, and gtk_css_provider_get_default() to obtain a GtkStyleProvider with the default widget style information. Returns the default style used by all widgets initially.

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.

getDirection
GtkTextDirection getDirection()

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

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

getDefaultDirection
GtkTextDirection getDefaultDirection()

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

shapeCombineRegion
void shapeCombineRegion(Region region)

Sets a shape for this widget's GDK window. This allows for transparent windows etc., see gdk_window_shape_combine_region() for more information.

inputShapeCombineRegion
void inputShapeCombineRegion(Region region)

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

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

Warning gtk_widget_path has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_get_path() instead 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.

getCompositeName
string getCompositeName()

Warning gtk_widget_get_composite_name has been deprecated since version 3.10 and should not be used in newly-written code. Use gtk_widget_class_set_template(), or don't use this API at all. Obtains the composite name of a widget.

overrideBackgroundColor
void overrideBackgroundColor(GtkStateFlags state, RGBA color)

Sets the background color to use for a widget. All other style values are left untouched. See gtk_widget_override_color().

overrideColor
void overrideColor(GtkStateFlags state, RGBA color)

Sets the color to use for a widget. All other style values are left untouched. Note This API is mostly meant as a quick way for applications to change a widget appearance. If you are developing a widgets library and intend this change to be themeable, it is better done by setting meaningful CSS classes and regions in your widget/container implementation through gtk_style_context_add_class() and gtk_style_context_add_region(). This way, your widget library can install a GtkCssProvider with the GTK_STYLE_PROVIDER_PRIORITY_FALLBACK priority in order to provide a default styling for those widgets that need so, and this theming may fully overridden by the user's theme. Note Note that for complex widgets this may bring in undesired results (such as uniform background color everywhere), in these cases it is better to fully style such widgets through a GtkCssProvider with the GTK_STYLE_PROVIDER_PRIORITY_APPLICATION priority.

overrideFont
void overrideFont(PgFontDescription fontDesc)

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

overrideSymbolicColor
void overrideSymbolicColor(string name, RGBA color)

Sets a symbolic color for a widget. All other style values are left untouched. See gtk_widget_override_color() for overriding the foreground or background color.

overrideCursor
void overrideCursor(RGBA cursor, RGBA secondaryCursor)

Sets the cursor color to use in a widget, overriding the "cursor-color" and "secondary-cursor-color" style properties. All other style values are left untouched. See also gtk_widget_modify_style(). Note that the underlying properties have the GdkColor type, so the alpha value in primary and secondary will be ignored.

modifyStyle
void modifyStyle(RcStyle style)

Warning gtk_widget_modify_style has been deprecated since version 3.0 and should not be used in newly-written code. Use GtkStyleContext with a custom GtkStyleProvider instead 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 overridden 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.

getModifierStyle
RcStyle getModifierStyle()

Warning gtk_widget_get_modifier_style has been deprecated since version 3.0 and should not be used in newly-written code. Use GtkStyleContext with a custom GtkStyleProvider instead 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.

modifyFg
void modifyFg(GtkStateType state, Color color)

Warning gtk_widget_modify_fg has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_override_color() instead Sets the foreground color for a widget in a particular state. All other style values are left untouched. See also gtk_widget_modify_style().

modifyBg
void modifyBg(GtkStateType state, Color color)

Warning gtk_widget_modify_bg has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_override_background_color() instead 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 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.

modifyText
void modifyText(GtkStateType state, Color color)

Warning gtk_widget_modify_text has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_override_color() instead 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().

modifyBase
void modifyBase(GtkStateType state, Color color)

Warning gtk_widget_modify_base has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_override_background_color() instead 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 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.

modifyFont
void modifyFont(PgFontDescription fontDesc)

Warning gtk_widget_modify_font has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_override_font() instead Sets the font to use for a widget. All other style values are left untouched. See also gtk_widget_modify_style().

modifyCursor
void modifyCursor(Color primary, Color secondary)

Warning gtk_widget_modify_cursor is deprecated and should not be used in newly-written code. 3.0. Use gtk_widget_override_cursor() instead. 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

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

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. This can be tracked by using the "screen-changed" signal on the widget.

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, you need to re-create it when the widget PangoContext is replaced. This can be tracked by using the "screen-changed" signal on the widget.

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

Warning gtk_widget_render_icon has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_render_icon_pixbuf() instead. A convenience function that uses the theme settings for widget to look up stock_id and render it to a pixbuf. stock_id should be a stock icon ID such as GTK_STOCK_OPEN or GTK_STOCK_OK. size should be a size such as GTK_ICON_SIZE_MENU. detail should be a string that identifies the widget or code doing the rendering, so that theme engines can special-case rendering for that widget or code. 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().

renderIconPixbuf
Pixbuf renderIconPixbuf(string stockId, GtkIconSize size)

Warning gtk_widget_render_icon_pixbuf has been deprecated since version 3.10 and should not be used in newly-written code. Use gtk_icon_theme_load_icon() instead. A convenience function that uses the theme engine and style settings for widget to look up stock_id and render it to a pixbuf. stock_id should be a stock icon ID such as GTK_STOCK_OPEN or GTK_STOCK_OK. size should be a size such as GTK_ICON_SIZE_MENU. 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().

popCompositeChild
void popCompositeChild()

Warning gtk_widget_pop_composite_child has been deprecated since version 3.10 and should not be used in newly-written code. Use gtk_widget_class_set_template(), or don't use this API at all. Cancels the effect of a previous call to gtk_widget_push_composite_child().

pushCompositeChild
void pushCompositeChild()

Warning gtk_widget_push_composite_child has been deprecated since version 3.10 and should not be used in newly-written code. This API never really worked well and was mostly unused, now we have a more complete mechanism for composite children, see gtk_widget_class_set_template(). 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.

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

Convenience function that calls gtk_widget_queue_draw_region() on the region created from the given coordinates. The region here is specified 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.

queueDrawRegion
void queueDrawRegion(Region region)

Invalidates the area of widget defined by region by calling gdk_window_invalidate_region() 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 to schedule a redraw of a GtkDrawingArea or some portion thereof.

setAppPaintable
void setAppPaintable(int appPaintable)

Sets whether the application intends to draw on the widget in an "draw" 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.

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_region() 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_region()). Since 3.10 this function only works for widgets with native windows.

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.

setCompositeName
void setCompositeName(string name)

Warning gtk_widget_set_composite_name has been deprecated since version 3.10 and should not be used in newly-written code. Use gtk_widget_class_set_template(), or don't use this API at all. Sets a widgets composite name. The widget must be a composite child of its parent; see gtk_widget_push_composite_child().

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.

regionIntersect
Region regionIntersect(Region region)

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

sendExpose
int sendExpose(Event event)

Very rarely-used function. This function is used to emit an expose event on a widget. This function is not normally used directly. The only time it is used is when propagating an expose event to a child NO_WINDOW widget, and that is normally done using gtk_container_propagate_draw(). 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.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.

styleAttach
void styleAttach()

Warning gtk_widget_style_attach is deprecated and should not be used in newly-written code. 3.0. This step is unnecessary with GtkStyleContext. 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

getAccessible
ObjectAtk getAccessible()

Returns the accessible object that describes the widget to an assistive technology. If accessibility support is not available, 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.

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.

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. Also see gtk_container_child_notify().

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.

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.

getParent
Widget getParent()

Returns the parent container of widget.

getSettings
Settings getSettings()

Gets the settings object holding the settings 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.

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

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

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

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

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 request, call gtk_widget_get_preferred_size() instead of this function.

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.

setSizeRequest
void setSizeRequest(int width, int height)

Sets the minimum size of a widget; that is, the widget's size request will be at least width by height. You can use this function to force a widget to be larger than it normally would be. 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. The size request set here does not include any margin from the GtkWidget properties margin-left, margin-right, margin-top, and margin-bottom, but it does include pretty much all other padding or border properties set by any subclass of GtkWidget.

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.

setNoShowAll
void setNoShowAll(int noShowAll)

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

getNoShowAll
int getNoShowAll()

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

listMnemonicLabels
ListG listMnemonicLabels()

Returns a newly allocated list of the widgets, normally labels, for which this widget is the target of a mnemonic (see for example, 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

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

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

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

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

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

getTooltipMarkup
string getTooltipMarkup()

Gets the contents of the tooltip for widget. Since 2.12

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 "has-tooltip" to TRUE and of the default handler for the "query-tooltip" signal. See also the "tooltip-markup" property and gtk_tooltip_set_markup(). Since 2.12

getTooltipText
string getTooltipText()

Gets the contents of the tooltip for widget. Since 2.12

setTooltipText
void setTooltipText(string text)

Sets text as the contents of the tooltip. This function will take care of setting "has-tooltip" to TRUE and of the default handler for the "query-tooltip" signal. See also the "tooltip-text" property and gtk_tooltip_set_text(). 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

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

getHasTooltip
int getHasTooltip()

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

setHasTooltip
void setHasTooltip(int hasTooltip)

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

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

getWindow
Window getWindow()

Returns the widget's window if it is realized, NULL otherwise Since 2.14

registerWindow
void registerWindow(Window window)

Registers a GdkWindow with the widget and sets it up so that the widget receives events for it. Call gtk_widget_unregister_window() when destroying the window. Before 3.8 you needed to call gdk_window_set_user_data() directly to set this up. This is now deprecated and you should use gtk_widget_register_window() instead. Old code will keep working as is, although some new features like transparency might not work perfectly.

unregisterWindow
void unregisterWindow(Window window)

Unregisters a GdkWindow from the widget that was previously set up with gtk_widget_register_window(). You need to call this when the window is no longer used by the widget, such as when you destroy it.

cairoShouldDrawWindow
int cairoShouldDrawWindow(Context cr, Window window)

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

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

Transforms the given cairo context cr that from widget-relative coordinates to window-relative coordinates. If the widget's window is not an ancestor of window, no modification will be applied. This is the inverse to the transformation GTK applies when preparing an expose event to be emitted with the "draw" signal. It is intended to help porting multiwindow widgets from GTK+ 2 to the rendering architecture of GTK+ 3.

getAllocatedWidth
int getAllocatedWidth()

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

getAllocatedHeight
int getAllocatedHeight()

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

getAllocation
void getAllocation(GtkAllocation allocation)

Retrieves the widget's allocation. Note, when implementing a GtkContainer: a widget's allocation will be its "adjusted" allocation, that is, the widget's parent container typically calls gtk_widget_size_allocate() with an allocation, and that allocation is then adjusted (to handle margin and alignment for example) before assignment to the widget. gtk_widget_get_allocation() returns the adjusted allocation that was actually assigned to the widget. The adjusted allocation is guaranteed to be completely contained within the gtk_widget_size_allocate() allocation, however. So a GtkContainer is guaranteed that its children stay inside the assigned bounds, but not that they have exactly the bounds the container assigned. There is no way to get the original allocation assigned by gtk_widget_size_allocate(), since it isn't stored; if a container implementation needs that information it will have to track it itself. Since 2.18

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. The allocation set should be the "adjusted" or actual allocation. If you're implementing a GtkContainer, you want to use gtk_widget_size_allocate() instead of gtk_widget_set_allocation(). The GtkWidgetClass::adjust_size_allocation virtual method adjusts the allocation inside gtk_widget_size_allocate() to create an adjusted allocation. Since 2.18

getAllocatedBaseline
int getAllocatedBaseline()

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

getAppPaintable
int getAppPaintable()

Determines whether the application intends to draw on the widget in an "draw" 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

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

getCanFocus
int getCanFocus()

Determines whether widget can own the input focus. See gtk_widget_set_can_focus(). 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

getDoubleBuffered
int getDoubleBuffered()

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

getHasWindow
int getHasWindow()

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

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 "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

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

isSensitive
int isSensitive()

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

getState
GtkStateType getState()

Warning gtk_widget_get_state is deprecated and should not be used in newly-written code. 3.0. Use gtk_widget_get_state_flags() instead. Returns the widget's state. See gtk_widget_set_state(). Since 2.18

getVisible
int getVisible()

Determines whether the widget is visible. If you want to take into account whether the widget's parent is also marked as visible, use gtk_widget_is_visible() instead. This function does not check if the widget is obscured in any way. See gtk_widget_set_visible(). Since 2.18

isVisible
int isVisible()

Determines whether the widget and all its parents are marked as visible. This function does not check if the widget is obscured in any way. See also gtk_widget_get_visible() and gtk_widget_set_visible()

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

setStateFlags
void setStateFlags(GtkStateFlags flags, int clear)

This function is for use in widget implementations. Turns on flag values in the current widget state (insensitive, prelighted, etc.). It is worth mentioning that any other state than GTK_STATE_FLAG_INSENSITIVE, will be propagated down to all non-internal children if widget is a GtkContainer, while GTK_STATE_FLAG_INSENSITIVE itself will be propagated down to all GtkContainer children by different means than turning on the state flag down the hierarchy, both gtk_widget_get_state_flags() and gtk_widget_is_sensitive() will make use of these.

unsetStateFlags
void unsetStateFlags(GtkStateFlags flags)

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

getStateFlags
GtkStateFlags getStateFlags()

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

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

hasVisibleFocus
int hasVisibleFocus()

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

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

Warning gtk_widget_has_rc_style has been deprecated since version 3.0 and should not be used in newly-written code. Use GtkStyleContext instead Determines if the widget style has been looked up through the rc mechanism. Since 2.20

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

isToplevel
int isToplevel()

Determines whether widget is a toplevel widget. Currently only GtkWindow and GtkInvisible (and out-of-process GtkPlugs) are toplevel widgets. Toplevel widgets have no parent widget. Since 2.18

setWindow
void setWindow(Window window)

Sets a widget's window. This function should only be used in a widget's "realize" implementation. The window passed is usually either new window created with 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. Note This function does not add any reference to window. Since 2.18

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

getReceivesDefault
int getReceivesDefault()

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

setSupportMultidevice
void setSupportMultidevice(int supportMultidevice)

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

getSupportMultidevice
int getSupportMultidevice()

Returns TRUE if widget is multiple pointer aware. See gtk_widget_set_support_multidevice() for more information.

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

getRealized
int getRealized()

Determines whether widget is realized. Since 2.20

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

getMapped
int getMapped()

Whether the widget is mapped. Since 2.20

getRequisition
void getRequisition(GtkRequisition requisition)

Warning gtk_widget_get_requisition has been deprecated since version 3.0 and should not be used in newly-written code. The GtkRequisition cache on the widget was removed, If you need to cache sizes across requests and allocations, add an explicit cache to the widget in question instead. 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

deviceIsShadowed
int deviceIsShadowed(Device device)

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

getModifierMask
GdkModifierType getModifierMask(GdkModifierIntent intent)

Returns the modifier mask the widget's windowing system backend uses for a particular purpose. See gdk_keymap_get_modifier_mask().

insertActionGroup
void insertActionGroup(string name, ActionGroupIF group)

Inserts group into widget. Children of widget that implement GtkActionable can then be associated with actions in group by setting their 'action-name' to prefix.action-name. If group is NULL, a previously inserted group for name is removed from widget.

getOpacity
double getOpacity()

Fetches the requested opacity for this widget. See gtk_widget_set_opacity().

setOpacity
void setOpacity(double opacity)

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

getPath
WidgetPath getPath()

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

getStyleContext
StyleContext getStyleContext()

Returns the style context associated to widget.

resetStyle
void resetStyle()

Updates the style context of widget and all descendents by updating its widget path. GtkContainers may want to use this on a child when reordering it in a way that a different style might apply to it. See also gtk_container_get_path_for_child().

getPreferredHeight
void getPreferredHeight(int minimumHeight, int naturalHeight)

Retrieves a widget's initial minimum and natural height. Note This call is specific to width-for-height requests. The returned request will be modified by the GtkWidgetClass::adjust_size_request virtual method and by any GtkSizeGroups that have been applied. That is, the returned request is the one that should be used for layout, not necessarily the one returned by the widget itself.

getPreferredWidth
void getPreferredWidth(int minimumWidth, int naturalWidth)

Retrieves a widget's initial minimum and natural width. Note This call is specific to height-for-width requests. The returned request will be modified by the GtkWidgetClass::adjust_size_request virtual method and by any GtkSizeGroups that have been applied. That is, the returned request is the one that should be used for layout, not necessarily the one returned by the widget itself.

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

Retrieves a widget's minimum and natural height if it would be given the specified width. The returned request will be modified by the GtkWidgetClass::adjust_size_request virtual method and by any GtkSizeGroups that have been applied. That is, the returned request is the one that should be used for layout, not necessarily the one returned by the widget itself.

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

Retrieves a widget's minimum and natural width if it would be given the specified height. The returned request will be modified by the GtkWidgetClass::adjust_size_request virtual method and by any GtkSizeGroups that have been applied. That is, the returned request is the one that should be used for layout, not necessarily the one returned by the widget itself.

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

Retrieves a widget's minimum and natural height and the corresponding baselines if it would be given the specified width, or the default height if width is -1. The baselines may be -1 which means that no baseline is requested for this widget. The returned request will be modified by the GtkWidgetClass::adjust_size_request and GtkWidgetClass::adjust_baseline_request virtual methods and by any GtkSizeGroups that have been applied. That is, the returned request is the one that should be used for layout, not necessarily the one returned by the widget itself.

getRequestMode
GtkSizeRequestMode getRequestMode()

Gets whether the widget prefers a height-for-width layout or a width-for-height layout. Note GtkBin widgets generally propagate the preference of their child, container widgets need to request something either in context of their children or in context of their allocation capabilities.

getPreferredSize
void getPreferredSize(GtkRequisition minimumSize, GtkRequisition naturalSize)

Retrieves the minimum and natural size of a widget, taking into account the widget's preference for height-for-width management. This is used to retrieve a suitable size by container widgets which do not impose any restrictions on the child placement. It can be used to deduce toplevel window and menu sizes as well as child widgets in free-form containers such as GtkLayout. Note Handle with care. Note that the natural height of a height-for-width widget will generally be a smaller size than the minimum height, since the required height for the natural width is generally smaller than the required height for the minimum width. Use gtk_widget_get_preferred_size_and_baseline() if you want to support baseline alignment.

distributeNaturalAllocation
int distributeNaturalAllocation(int extraSpace, GtkRequestedSize[] sizes)

Distributes extra_space to child sizes by bringing smaller children up to natural size first. The remaining space will be added to the minimum_size member of the GtkRequestedSize struct. If all sizes reach their natural size then the remaining space is returned.

getHalign
GtkAlign getHalign()

Gets the value of the "halign" property. For backwards compatibility reasons this method will never return GTK_ALIGN_BASELINE, but instead it will convert it to GTK_ALIGN_FILL. Baselines are not supported for horizontal alignment.

setHalign
void setHalign(GtkAlign alig)

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

getValign
GtkAlign getValign()

Gets the value of the "valign" property. For backwards compatibility reasons this method will never return GTK_ALIGN_BASELINE, but instead it will convert it to GTK_ALIGN_FILL. If your widget want to support baseline aligned children it must use gtk_widget_get_valign_with_baseline().

getValignWithBaseline
GtkAlign getValignWithBaseline()

Gets the value of the "valign" property, including GTK_ALIGN_BASELINE.

setValign
void setValign(GtkAlign alig)

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

getMarginLeft
int getMarginLeft()

Gets the value of the "margin-left" property.

setMarginLeft
void setMarginLeft(int margin)

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

getMarginRight
int getMarginRight()

Gets the value of the "margin-right" property.

setMarginRight
void setMarginRight(int margin)

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

getMarginTop
int getMarginTop()

Gets the value of the "margin-top" property.

setMarginTop
void setMarginTop(int margin)

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

getMarginBottom
int getMarginBottom()

Gets the value of the "margin-bottom" property.

setMarginBottom
void setMarginBottom(int margin)

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

getHexpand
int getHexpand()

Gets whether the widget would like any available extra horizontal space. When a user resizes a GtkWindow, widgets with expand=TRUE generally receive the extra space. For example, a list or scrollable area or document in your window would often be set to expand. Containers should use gtk_widget_compute_expand() rather than this function, to see whether a widget, or any of its children, has the expand flag set. If any child of a widget wants to expand, the parent may ask to expand also. This function only looks at the widget's own hexpand flag, rather than computing whether the entire widget tree rooted at this widget wants to expand.

setHexpand
void setHexpand(int expand)

Sets whether the widget would like any available extra horizontal space. When a user resizes a GtkWindow, widgets with expand=TRUE generally receive the extra space. For example, a list or scrollable area or document in your window would often be set to expand. Call this function to set the expand flag if you would like your widget to become larger horizontally when the window has extra room. By default, widgets automatically expand if any of their children want to expand. (To see if a widget will automatically expand given its current children and state, call gtk_widget_compute_expand(). A container can decide how the expandability of children affects the expansion of the container by overriding the compute_expand virtual method on GtkWidget.). Setting hexpand explicitly with this function will override the automatic expand behavior. This function forces the widget to expand or not to expand, regardless of children. The override occurs because gtk_widget_set_hexpand() sets the hexpand-set property (see gtk_widget_set_hexpand_set()) which causes the widget's hexpand value to be used, rather than looking at children and widget state.

getHexpandSet
int getHexpandSet()

Gets whether gtk_widget_set_hexpand() has been used to explicitly set the expand flag on this widget. If hexpand is set, then it overrides any computed expand value based on child widgets. If hexpand is not set, then the expand value depends on whether any children of the widget would like to expand. There are few reasons to use this function, but it's here for completeness and consistency.

setHexpandSet
void setHexpandSet(int set)

Sets whether the hexpand flag (see gtk_widget_get_hexpand()) will be used. The hexpand-set property will be set automatically when you call gtk_widget_set_hexpand() to set hexpand, so the most likely reason to use this function would be to unset an explicit expand flag. If hexpand is set, then it overrides any computed expand value based on child widgets. If hexpand is not set, then the expand value depends on whether any children of the widget would like to expand. There are few reasons to use this function, but it's here for completeness and consistency.

getVexpand
int getVexpand()

Gets whether the widget would like any available extra vertical space. See gtk_widget_get_hexpand() for more detail.

setVexpand
void setVexpand(int expand)

Sets whether the widget would like any available extra vertical space. See gtk_widget_set_hexpand() for more detail.

getVexpandSet
int getVexpandSet()

Gets whether gtk_widget_set_vexpand() has been used to explicitly set the expand flag on this widget. See gtk_widget_get_hexpand_set() for more detail.

setVexpandSet
void setVexpandSet(int set)

Sets whether the vexpand flag (see gtk_widget_get_vexpand()) will be used. See gtk_widget_set_hexpand_set() for more detail.

queueComputeExpand
void queueComputeExpand()

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

computeExpand
int computeExpand(GtkOrientation orientation)

Computes whether a container should give this widget extra space when possible. Containers should check this, rather than looking at gtk_widget_get_hexpand() or gtk_widget_get_vexpand(). This function already checks whether the widget is visible, so visibility does not need to be checked separately. Non-visible widgets are not expanded. The computed expand value uses either the expand setting explicitly set on the widget itself, or, if none has been explicitly set, the widget may expand if some of its children do.

initTemplate
void initTemplate()

Creates and initializes child widgets defined in templates. This function must be called in the instance initializer for any class which assigned itself a template using gtk_widget_class_set_template() It is important to call this function in the instance initializer of a GtkWidget subclass and not in GObject.constructed() or GObject.constructor() for two reasons. One reason is that generally derived widgets will assume that parent class composite widgets have been created in their instance initializers. Another reason is that when calling g_object_new() on a widget with composite templates, it's important to build the composite widgets before the construct properties are set. Properties passed to g_object_new() should take precedence over properties set in the private template XML.

getTemplateChild
ObjectG getTemplateChild(GType widgetType, string name)

Fetch an object build from the template XML for widget_type in this widget instance. This will only report children which were previously declared with gtk_widget_class_bind_template_child_private_full() or one of its variants. This function is only meant to be called for code which is private to the widget_type which declared the child and is meant for language bindings which cannot easily make use of the GObject structure offsets.

Meta