[gtk+/font-chooser] Add a getter for the accessible type of a widget class



commit 47573e6b93e1b7d42604404cabe8451e5cff4025
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jul 13 22:46:13 2011 -0400

    Add a getter for the accessible type of a widget class
    
    This will be necessary to port out-of-tree a11y implementations
    from the atk object factory approach to this new way of doing
    things.

 docs/reference/gtk/gtk3-sections.txt |    1 +
 gtk/gtk.symbols                      |    1 +
 gtk/gtkwidget.c                      |   23 +++++++++++++++++++++++
 gtk/gtkwidget.h                      |    1 +
 4 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt
index c897e1b..4050e09 100644
--- a/docs/reference/gtk/gtk3-sections.txt
+++ b/docs/reference/gtk/gtk3-sections.txt
@@ -5052,6 +5052,7 @@ gtk_widget_style_get_property
 gtk_widget_style_get_valist
 gtk_widget_style_attach
 gtk_widget_class_set_accessible_type
+gtk_widget_class_get_accessible_type
 gtk_widget_get_accessible
 gtk_widget_child_focus
 gtk_widget_child_notify
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index 38ff633..d965806 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -3464,6 +3464,7 @@ gtk_widget_class_install_style_property
 gtk_widget_class_install_style_property_parser
 gtk_widget_class_list_style_properties
 gtk_widget_class_path
+gtk_widget_class_get_accessible_type
 gtk_widget_class_set_accessible_type
 gtk_widget_compute_expand
 gtk_widget_create_pango_context
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 5491107..d529bba 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -11943,6 +11943,29 @@ gtk_widget_class_set_accessible_type (GtkWidgetClass *widget_class,
 }
 
 /**
+ * gtk_widget_class_get_accessible_type:
+ * @widget_class: class to query the accessible type for
+ *
+ * Returns the #GType for accessibles for widgets of the given
+ * class. See gtk_widget_class_set_accessible_type().
+ *
+ * Returns: the accessible type for @widget_class
+ *
+ * Since: 3.2
+ */
+GType
+gtk_widget_class_get_accessible_type (GtkWidgetClass *widget_class)
+{
+  GtkWidgetClassPrivate *priv;
+
+  g_return_if_fail (GTK_IS_WIDGET_CLASS (widget_class));
+
+  priv = widget_class->priv;
+
+  return priv->accessible_type;
+}
+
+/**
  * gtk_widget_get_accessible:
  * @widget: a #GtkWidget
  *
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 8aa1e1f..008d0ca 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -724,6 +724,7 @@ void             gtk_widget_set_support_multidevice (GtkWidget      *widget,
 /* Accessibility support */
 void             gtk_widget_class_set_accessible_type    (GtkWidgetClass     *widget_class,
                                                           GType               type);
+GType            gtk_widget_class_get_accessible_type    (GtkWidgetClass     *widget_class);
 AtkObject*       gtk_widget_get_accessible               (GtkWidget          *widget);
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]