-
-/* accessibility: object */
-
-/* dummy typedefs */
-typedef struct _GtkSwitchAccessible GtkSwitchAccessible;
-typedef struct _GtkSwitchAccessibleClass GtkSwitchAccessibleClass;
-
-ATK_DEFINE_TYPE (GtkSwitchAccessible, gtk_switch_accessible, GTK_TYPE_WIDGET);
-
-static AtkStateSet *
-gtk_switch_accessible_ref_state_set (AtkObject *accessible)
-{
- AtkStateSet *state_set;
- GtkWidget *widget;
-
- state_set = ATK_OBJECT_CLASS (gtk_switch_accessible_parent_class)->ref_state_set (accessible);
-
- widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
- if (widget == NULL)
- return state_set;
-
- if (gtk_switch_get_active (GTK_SWITCH (widget)))
- atk_state_set_add_state (state_set, ATK_STATE_CHECKED);
-
- return state_set;
-}
-
-static void
-gtk_switch_accessible_initialize (AtkObject *accessible,
- gpointer widget)
-{
- ATK_OBJECT_CLASS (gtk_switch_accessible_parent_class)->initialize (accessible, widget);
-
- atk_object_set_role (accessible, ATK_ROLE_TOGGLE_BUTTON);
- atk_object_set_name (accessible, C_("light switch widget", "Switch"));
- atk_object_set_description (accessible, _("Switches between on and off states"));
-}
-
-static void
-gtk_switch_accessible_class_init (GtkSwitchAccessibleClass *klass)
-{
- AtkObjectClass *atk_class = ATK_OBJECT_CLASS (klass);
-
- atk_class->initialize = gtk_switch_accessible_initialize;
- atk_class->ref_state_set = gtk_switch_accessible_ref_state_set;
-}
-
-static void
-gtk_switch_accessible_init (GtkSwitchAccessible *self)
-{
-}
-
-/* accessibility: factory */
-
-typedef AtkObjectFactoryClass GtkSwitchAccessibleFactoryClass;
-typedef AtkObjectFactory GtkSwitchAccessibleFactory;
-
-G_DEFINE_TYPE (GtkSwitchAccessibleFactory,
- gtk_switch_accessible_factory,
- ATK_TYPE_OBJECT_FACTORY);
-
-static GType
-gtk_switch_accessible_factory_get_accessible_type (void)
-{
- return gtk_switch_accessible_get_type ();
-}
-
-static AtkObject *
-gtk_switch_accessible_factory_create_accessible (GObject *obj)
-{
- AtkObject *accessible;
-
- accessible = g_object_new (gtk_switch_accessible_get_type (), NULL);
- atk_object_initialize (accessible, obj);
-
- return accessible;
-}
-
-static void
-gtk_switch_accessible_factory_class_init (AtkObjectFactoryClass *klass)
-{
- klass->create_accessible = gtk_switch_accessible_factory_create_accessible;
- klass->get_accessible_type = gtk_switch_accessible_factory_get_accessible_type;
-}
-
-static void
-gtk_switch_accessible_factory_init (AtkObjectFactory *factory)
-{
-}