static AtkAttributeSet * gtk_label_accessible_get_default_attributes (AtkText *text) { GtkWidget *widget; AtkAttributeSet *attributes; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) return NULL; attributes = NULL; attributes = add_attribute (attributes, ATK_TEXT_ATTR_DIRECTION, atk_text_attribute_get_value (ATK_TEXT_ATTR_DIRECTION, gtk_widget_get_direction (widget))); attributes = _gtk_pango_get_default_attributes (attributes, gtk_label_get_layout (GTK_LABEL (widget))); attributes = _gtk_style_context_get_attributes (attributes, gtk_widget_get_style_context (widget), gtk_widget_get_state_flags (widget)); return attributes; }
static AtkAttributeSet * gtk_text_cell_accessible_get_default_attributes (AtkText *text) { AtkAttributeSet *attrib_set = NULL; PangoLayout *layout; GtkWidget *widget; layout = create_pango_layout (GTK_TEXT_CELL_ACCESSIBLE (text)); widget = get_widget (GTK_TEXT_CELL_ACCESSIBLE (text)); attrib_set = add_attribute (attrib_set, ATK_TEXT_ATTR_DIRECTION, atk_text_attribute_get_value (ATK_TEXT_ATTR_DIRECTION, gtk_widget_get_direction (widget))); attrib_set = _gtk_pango_get_default_attributes (NULL, layout); attrib_set = _gtk_style_context_get_attributes (attrib_set, gtk_widget_get_style_context (widget), gtk_widget_get_state_flags (widget)); g_object_unref (G_OBJECT (layout)); return attrib_set; }