![]() |
![]() |
![]() |
GTK+ Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Style Properties |
#include <gtk/gtk.h> GtkSwitch; GtkWidget * gtk_switch_new (void
); void gtk_switch_set_active (GtkSwitch *sw
,gboolean is_active
); gboolean gtk_switch_get_active (GtkSwitch *sw
);
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.
typedef struct _GtkSwitch GtkSwitch;
The GtkSwitch structure contains private data and it should only be accessed using the provided API.
GtkWidget * gtk_switch_new (void
);
Creates a new GtkSwitch widget.
Returns : |
the newly created GtkSwitch instance |
Since 3.0
void gtk_switch_set_active (GtkSwitch *sw
,gboolean is_active
);
Changes the state of sw
to the desired one.
Since 3.0