Top |
Functions
GtkWidget * | gtk_switch_new () |
void | gtk_switch_set_active () |
gboolean | gtk_switch_get_active () |
Implemented Interfaces
GtkSwitch implements AtkImplementorIface, GtkBuildable, GtkActionable and GtkActivatable.
Description
GtkSwitch is a widget that has two states: on or off. The user can control which state should be active by clicking the empty area, or by dragging the handle.
Functions
gtk_switch_set_active ()
void gtk_switch_set_active (GtkSwitch *sw
,gboolean is_active
);
Changes the state of sw
to the desired one.
Since 3.0
Types and Values
struct GtkSwitch
struct GtkSwitch;
The GtkSwitch contains private data and it should only be accessed using the provided API.
struct GtkSwitchClass
struct GtkSwitchClass { GtkWidgetClass parent_class; void (* activate) (GtkSwitch *sw); };
Members
GtkWidgetClass |
The parent class. |
|
An action signal and emitting it causes the switch to animate. |
Signal Details
The “activate”
signal
void user_function (GtkSwitch *widget, gpointer user_data)
The ::activate signal on GtkSwitch is an action signal and emitting it causes the switch to animate. Applications should never connect to this signal, but use the notify::active signal.
Parameters
widget |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action