Widget.getStateFlags
gtk.types.StateFlags getStateFlags()Returns the widget state as a flag set. It is worth mentioning that the effective [gtk.types.StateFlags.Insensitive] state will be returned, that is, also based on parent insensitivity, even if widget itself is sensitive.
Also note that if you are looking for a way to obtain the #GtkStateFlags to pass to a #GtkStyleContext method, you should look at [gtk.style_context.StyleContext.getState].
Returns
The state flags for widget