static AtkRelationSet * gtk_label_accessible_ref_relation_set (AtkObject *obj) { GtkWidget *widget; AtkRelationSet *relation_set; g_return_val_if_fail (GTK_IS_LABEL_ACCESSIBLE (obj), NULL); widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj)); if (widget == NULL) return NULL; relation_set = ATK_OBJECT_CLASS (_gtk_label_accessible_parent_class)->ref_relation_set (obj); if (!atk_relation_set_contains (relation_set, ATK_RELATION_LABEL_FOR)) { /* Get the mnemonic widget. * The relation set is not updated if the mnemonic widget is changed */ GtkWidget *mnemonic_widget; mnemonic_widget = gtk_label_get_mnemonic_widget (GTK_LABEL (widget)); if (mnemonic_widget) { AtkObject *accessible_array[1]; AtkRelation* relation; if (!gtk_widget_get_can_focus (mnemonic_widget)) { /* * Handle the case where a GtkFileChooserButton is specified * as the mnemonic widget. use the combobox which is a child of the * GtkFileChooserButton as the mnemonic widget. See bug #359843. */ if (GTK_IS_BOX (mnemonic_widget)) { GList *list, *tmpl; list = gtk_container_get_children (GTK_CONTAINER (mnemonic_widget)); if (g_list_length (list) == 2) { tmpl = g_list_last (list); if (GTK_IS_COMBO_BOX(tmpl->data)) { mnemonic_widget = GTK_WIDGET(tmpl->data); } } g_list_free (list); } } accessible_array[0] = gtk_widget_get_accessible (mnemonic_widget); relation = atk_relation_new (accessible_array, 1, ATK_RELATION_LABEL_FOR); atk_relation_set_add (relation_set, relation); /* * Unref the relation so that it is not leaked. */ g_object_unref (relation); } } return relation_set; }
/** * @brief EailPhoto class initializer * * @param klass EailPhotoClass instance */ static void eail_photo_class_init(EailPhotoClass *klass) { AtkObjectClass *atk_class = ATK_OBJECT_CLASS(klass); atk_class->initialize = eail_photo_initialize; }
/** * @brief EailActionSlider object initialization * * @param obj EailActionSlider object * @param data user set additional initialization data */ static void eail_action_slider_initialize(AtkObject *obj, gpointer data) { ATK_OBJECT_CLASS(eail_action_slider_parent_class)->initialize(obj, data); obj->role = ATK_ROLE_SLIDER; }
/** * @brief EailPhoto initializer * * @param obj AtkObject instance * @param data initialization data */ static void eail_photo_initialize(AtkObject *obj, gpointer data) { ATK_OBJECT_CLASS(eail_photo_parent_class)->initialize(obj, data); }
/** * @brief Initializer for AtkObjectClass */ static void eail_segment_control_initialize(AtkObject *obj, gpointer data) { ATK_OBJECT_CLASS(eail_segment_control_parent_class)->initialize(obj, data); obj->role = ATK_ROLE_LIST; }