GtkWidgetClass

struct GtkWidgetClass {}

Members

Variables

computeExpand
void function(GtkWidget* widget, bool* hexpandP, bool* vexpandP) computeExpand;

Computes whether a container should give this widget extra space when possible.

contains
bool function(GtkWidget* widget, double x, double y) contains;

Vfunc for gtk.widget.Widget.contains.

cssChanged
void function(GtkWidget* widget, GtkCssStyleChange* change) cssChanged;

Vfunc called when the CSS used by widget was changed. Widgets should then discard their caches that depend on CSS and queue resizes or redraws accordingly. The default implementation will take care of this for all the default CSS properties, so implementations must chain up.

directionChanged
void function(GtkWidget* widget, GtkTextDirection previousDirection) directionChanged;

Signal emitted when the text direction of a widget changes.

focus
bool function(GtkWidget* widget, GtkDirectionType direction) focus;

Vfunc for gtk.widget.Widget.childFocus

getRequestMode
GtkSizeRequestMode function(GtkWidget* widget) getRequestMode;

Called to get the request mode, if the widget does not have a layout manager. This allows a widget to tell its parent container whether it prefers to be allocated in gtk.types.SizeRequestMode.HeightForWidth or gtk.types.SizeRequestMode.WidthForHeight mode. gtk.types.SizeRequestMode.HeightForWidth means the widget prefers to have GtkWidgetClass.measure() called first to get the default width (passing a for_size of -1), then again to get the height for said default width. gtk.types.SizeRequestMode.ConstantSize disables any height-for-width or width-for-height geometry management for said widget and is the default return. It’s important to note that any widget which trades height-for-width or width-for-height must respond properly to a for_size value >= -1 passed to GtkWidgetClass.measure, for both possible orientations.

grabFocus
bool function(GtkWidget* widget) grabFocus;

Causes @widget to have the keyboard focus for the gtk.window.Window it’s inside.

hide
void function(GtkWidget* widget) hide;

Signal emitted when widget is hidden.

keynavFailed
bool function(GtkWidget* widget, GtkDirectionType direction) keynavFailed;

Signal emitted if keyboard navigation fails.

map
void function(GtkWidget* widget) map;

Signal emitted when widget is going to be mapped, that is when the widget is visible (which is controlled with gtk.widget.Widget.setVisible) and all its parents up to the toplevel widget are also visible.

measure
void function(GtkWidget* widget, GtkOrientation orientation, int forSize, int* minimum, int* natural, int* minimumBaseline, int* naturalBaseline) measure;

Called to obtain the minimum and natural size of the widget, if the widget does not have a layout manager. Depending on the orientation parameter, the passed for_size can be interpreted as width or height. A widget will never be allocated less than its minimum size.

mnemonicActivate
bool function(GtkWidget* widget, bool groupCycling) mnemonicActivate;

Activates the @widget if @group_cycling is false, and just grabs the focus if @group_cycling is true.

moveFocus
void function(GtkWidget* widget, GtkDirectionType direction) moveFocus;

Signal emitted when a change of focus is requested

padding
void*[8] padding;
parentClass
GInitiallyUnownedClass parentClass;

The object class structure needs to be the first element in the widget class structure in order for the class mechanism to work correctly. This allows a GtkWidgetClass pointer to be cast to a GObjectClass pointer.

priv
GtkWidgetClassPrivate* priv;
queryTooltip
bool function(GtkWidget* widget, int x, int y, bool keyboardTooltip, GtkTooltip* tooltip) queryTooltip;

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

realize
void function(GtkWidget* widget) realize;

Signal emitted when widget is associated with a gdk.surface.Surface, which means that gtk.widget.Widget.realize has been called or the widget has been mapped (that is, it is going to be drawn).

root
void function(GtkWidget* widget) root;

Called when the widget gets added to a gtk.root.Root widget. Must chain up

setFocusChild
void function(GtkWidget* widget, GtkWidget* child) setFocusChild;

Sets the focused child of a widget. Must chain up

show
void function(GtkWidget* widget) show;

Signal emitted when widget is shown

sizeAllocate
void function(GtkWidget* widget, int width, int height, int baseline) sizeAllocate;

Called to set the allocation, if the widget does not have a layout manager.

snapshot
void function(GtkWidget* widget, GtkSnapshot* snapshot) snapshot;

Vfunc called when a new snapshot of the widget has to be taken.

stateFlagsChanged
void function(GtkWidget* widget, GtkStateFlags previousStateFlags) stateFlagsChanged;

Signal emitted when the widget state changes, see gtk.widget.Widget.getStateFlags.

systemSettingChanged
void function(GtkWidget* widget, GtkSystemSetting settings) systemSettingChanged;

Emitted when a system setting was changed. Must chain up.

unmap
void function(GtkWidget* widget) unmap;

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

unrealize
void function(GtkWidget* widget) unrealize;

Signal emitted when the GdkSurface associated with widget is destroyed, which means that gtk.widget.Widget.unrealize has been called or the widget has been unmapped (that is, it is going to be hidden).

unroot
void function(GtkWidget* widget) unroot;

Called when the widget is about to be removed from its gtk.root.Root widget. Must chain up