Commit e4b5e94e authored by Matthias Clasen's avatar Matthias Clasen

Make accessible implementations public

This commit exposes the get_type() functions and standard
headers for accessible implementations. This makes it possible
to derive from the GTK accessible implementations without
GType magic tricks. This is necessary, because we require the
a11y type hierarchy to be parallel to the widget type hierarchy.
So, if you derive a widget and need to adjust its a11y implementation,
you have to be able to derive its accessible implementation.

This commit probably exposes more than is absolutely necessary,
it also exposes accessibles of widgets that are unlikely candidates
for deriving from.
parent 853b5e5f
......@@ -53,14 +53,12 @@ gail_c_sources = \
gailmisc.c
gail_private_h_sources = \
gail.h \
gtkarrowaccessible.h \
gtkbooleancellaccessible.h \
gtkbuttonaccessible.h \
gtkcellaccessible.h \
gtkcellaccessibleparent.h \
gtkcheckmenuitemaccessible.h \
gtkcolorswatchaccessible.h \
gtkcomboboxaccessible.h \
gtkcontaineraccessible.h \
gtkcontainercellaccessible.h \
......@@ -99,6 +97,14 @@ gail_private_h_sources = \
gtktreeviewaccessible.h \
gtkwidgetaccessible.h \
gtkwindowaccessible.h \
gtkcolorswatchaccessible.h \
gtkcellaccessibleprivate.h \
gtklockbuttonaccessibleprivate.h \
gtkiconviewaccessibleprivate.h \
gtktreeviewaccessibleprivate.h \
gtktextviewaccessibleprivate.h \
gtkwidgetaccessibleprivate.h \
gail.h \
gailutil.h \
gailmisc.h
......
......@@ -27,14 +27,14 @@ struct _GtkArrowAccessiblePrivate
static void atk_image_interface_init (AtkImageIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkArrowAccessible, _gtk_arrow_accessible, GTK_TYPE_WIDGET_ACCESSIBLE,
G_DEFINE_TYPE_WITH_CODE (GtkArrowAccessible, gtk_arrow_accessible, GTK_TYPE_WIDGET_ACCESSIBLE,
G_IMPLEMENT_INTERFACE (ATK_TYPE_IMAGE, atk_image_interface_init))
static void
gtk_arrow_accessible_initialize (AtkObject *accessible,
gpointer data)
{
ATK_OBJECT_CLASS (_gtk_arrow_accessible_parent_class)->initialize (accessible, data);
ATK_OBJECT_CLASS (gtk_arrow_accessible_parent_class)->initialize (accessible, data);
accessible->role = ATK_ROLE_ICON;
}
......@@ -46,11 +46,11 @@ gtk_arrow_accessible_finalize (GObject *object)
g_free (arrow->priv->image_description);
G_OBJECT_CLASS (_gtk_arrow_accessible_parent_class)->finalize (object);
G_OBJECT_CLASS (gtk_arrow_accessible_parent_class)->finalize (object);
}
static void
_gtk_arrow_accessible_class_init (GtkArrowAccessibleClass *klass)
gtk_arrow_accessible_class_init (GtkArrowAccessibleClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
......@@ -63,7 +63,7 @@ _gtk_arrow_accessible_class_init (GtkArrowAccessibleClass *klass)
}
static void
_gtk_arrow_accessible_init (GtkArrowAccessible *arrow)
gtk_arrow_accessible_init (GtkArrowAccessible *arrow)
{
arrow->priv = G_TYPE_INSTANCE_GET_PRIVATE (arrow,
GTK_TYPE_ARROW_ACCESSIBLE,
......
......@@ -22,7 +22,7 @@
G_BEGIN_DECLS
#define GTK_TYPE_ARROW_ACCESSIBLE (_gtk_arrow_accessible_get_type ())
#define GTK_TYPE_ARROW_ACCESSIBLE (gtk_arrow_accessible_get_type ())
#define GTK_ARROW_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ARROW_ACCESSIBLE, GtkArrowAccessible))
#define GTK_ARROW_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ARROW_ACCESSIBLE, GtkArrowAccessibleClass))
#define GTK_IS_ARROW_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ARROW_ACCESSIBLE))
......@@ -45,7 +45,7 @@ struct _GtkArrowAccessibleClass
GtkWidgetAccessibleClass parent_class;
};
GType _gtk_arrow_accessible_get_type (void);
GType gtk_arrow_accessible_get_type (void);
G_END_DECLS
......
......@@ -76,7 +76,7 @@ gtk_boolean_cell_accessible_action_interface_init (AtkActionIface *iface)
}
G_DEFINE_TYPE_EXTENDED (GtkBooleanCellAccessible, _gtk_boolean_cell_accessible, GTK_TYPE_RENDERER_CELL_ACCESSIBLE, 0,
G_DEFINE_TYPE_EXTENDED (GtkBooleanCellAccessible, gtk_boolean_cell_accessible, GTK_TYPE_RENDERER_CELL_ACCESSIBLE, 0,
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, gtk_boolean_cell_accessible_action_interface_init))
......@@ -86,7 +86,7 @@ gtk_boolean_cell_accessible_ref_state_set (AtkObject *accessible)
GtkBooleanCellAccessible *cell = GTK_BOOLEAN_CELL_ACCESSIBLE (accessible);
AtkStateSet *state_set;
state_set = ATK_OBJECT_CLASS (_gtk_boolean_cell_accessible_parent_class)->ref_state_set (accessible);
state_set = ATK_OBJECT_CLASS (gtk_boolean_cell_accessible_parent_class)->ref_state_set (accessible);
if (cell->priv->cell_value)
atk_state_set_add_state (state_set, ATK_STATE_CHECKED);
......@@ -130,7 +130,7 @@ gtk_boolean_cell_accessible_update_cache (GtkCellAccessible *cell)
}
static void
_gtk_boolean_cell_accessible_class_init (GtkBooleanCellAccessibleClass *klass)
gtk_boolean_cell_accessible_class_init (GtkBooleanCellAccessibleClass *klass)
{
GtkCellAccessibleClass *cell_class = GTK_CELL_ACCESSIBLE_CLASS (klass);
AtkObjectClass *atkobject_class = ATK_OBJECT_CLASS (klass);
......@@ -143,7 +143,7 @@ _gtk_boolean_cell_accessible_class_init (GtkBooleanCellAccessibleClass *klass)
}
static void
_gtk_boolean_cell_accessible_init (GtkBooleanCellAccessible *cell)
gtk_boolean_cell_accessible_init (GtkBooleanCellAccessible *cell)
{
cell->priv = G_TYPE_INSTANCE_GET_PRIVATE (cell,
GTK_TYPE_BOOLEAN_CELL_ACCESSIBLE,
......
......@@ -23,7 +23,7 @@
G_BEGIN_DECLS
#define GTK_TYPE_BOOLEAN_CELL_ACCESSIBLE (_gtk_boolean_cell_accessible_get_type ())
#define GTK_TYPE_BOOLEAN_CELL_ACCESSIBLE (gtk_boolean_cell_accessible_get_type ())
#define GTK_BOOLEAN_CELL_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_BOOLEAN_CELL_ACCESSIBLE, GtkBooleanCellAccessible))
#define GTK_BOOLEAN_CELL_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAIL_BOOLEAN_CELL, GtkBooleanCellAccessibleClass))
#define GTK_IS_BOOLEAN_CELL_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_BOOLEAN_CELL_ACCESSIBLE))
......@@ -46,7 +46,7 @@ struct _GtkBooleanCellAccessibleClass
GtkRendererCellAccessibleClass parent_class;
};
GType _gtk_boolean_cell_accessible_get_type (void);
GType gtk_boolean_cell_accessible_get_type (void);
G_END_DECLS
......
......@@ -25,7 +25,7 @@
static void atk_action_interface_init (AtkActionIface *iface);
static void atk_image_interface_init (AtkImageIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkButtonAccessible, _gtk_button_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
G_DEFINE_TYPE_WITH_CODE (GtkButtonAccessible, gtk_button_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init)
G_IMPLEMENT_INTERFACE (ATK_TYPE_IMAGE, atk_image_interface_init))
......@@ -55,7 +55,7 @@ gtk_button_accessible_initialize (AtkObject *obj,
{
GtkWidget *parent;
ATK_OBJECT_CLASS (_gtk_button_accessible_parent_class)->initialize (obj, data);
ATK_OBJECT_CLASS (gtk_button_accessible_parent_class)->initialize (obj, data);
g_signal_connect (data, "state-flags-changed", G_CALLBACK (state_changed_cb), NULL);
......@@ -143,7 +143,7 @@ gtk_button_accessible_get_name (AtkObject *obj)
if (widget == NULL)
return NULL;
name = ATK_OBJECT_CLASS (_gtk_button_accessible_parent_class)->get_name (obj);
name = ATK_OBJECT_CLASS (gtk_button_accessible_parent_class)->get_name (obj);
if (name != NULL)
return name;
......@@ -190,7 +190,7 @@ gtk_button_accessible_ref_state_set (AtkObject *obj)
if (widget == NULL)
return NULL;
state_set = ATK_OBJECT_CLASS (_gtk_button_accessible_parent_class)->ref_state_set (obj);
state_set = ATK_OBJECT_CLASS (gtk_button_accessible_parent_class)->ref_state_set (obj);
if ((gtk_widget_get_state_flags (widget) & GTK_STATE_FLAG_ACTIVE) != 0)
atk_state_set_add_state (state_set, ATK_STATE_ARMED);
......@@ -216,11 +216,11 @@ gtk_button_accessible_notify_gtk (GObject *obj,
g_signal_emit_by_name (atk_obj, "visible-data-changed");
}
else
GTK_WIDGET_ACCESSIBLE_CLASS (_gtk_button_accessible_parent_class)->notify_gtk (obj, pspec);
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_button_accessible_parent_class)->notify_gtk (obj, pspec);
}
static void
_gtk_button_accessible_class_init (GtkButtonAccessibleClass *klass)
gtk_button_accessible_class_init (GtkButtonAccessibleClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GtkContainerAccessibleClass *container_class = (GtkContainerAccessibleClass*)klass;
......@@ -239,7 +239,7 @@ _gtk_button_accessible_class_init (GtkButtonAccessibleClass *klass)
}
static void
_gtk_button_accessible_init (GtkButtonAccessible *button)
gtk_button_accessible_init (GtkButtonAccessible *button)
{
}
......
......@@ -22,7 +22,7 @@
G_BEGIN_DECLS
#define GTK_TYPE_BUTTON_ACCESSIBLE (_gtk_button_accessible_get_type ())
#define GTK_TYPE_BUTTON_ACCESSIBLE (gtk_button_accessible_get_type ())
#define GTK_BUTTON_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_BUTTON_ACCESSIBLE, GtkButtonAccessible))
#define GTK_BUTTON_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_BUTTON_ACCESSIBLE, GtkButtonAccessibleClass))
#define GTK_IS_BUTTON_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_BUTTON_ACCESSIBLE))
......@@ -45,7 +45,7 @@ struct _GtkButtonAccessibleClass
GtkContainerAccessibleClass parent_class;
};
GType _gtk_button_accessible_get_type (void);
GType gtk_button_accessible_get_type (void);
G_END_DECLS
......
......@@ -19,7 +19,7 @@
#include <gtk/gtk.h>
#include "gtkcontainercellaccessible.h"
#include "gtkcellaccessible.h"
#include "gtkcellaccessibleprivate.h"
#include "gtkcellaccessibleparent.h"
static const struct {
......@@ -37,10 +37,11 @@ static const struct {
{ ATK_STATE_EXPANDED, GTK_CELL_RENDERER_EXPANDED, FALSE },
};
static GtkCellRendererState gtk_cell_accessible_get_state (GtkCellAccessible *cell);
static void atk_action_interface_init (AtkActionIface *iface);
static void atk_component_interface_init (AtkComponentIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkCellAccessible, _gtk_cell_accessible, GTK_TYPE_ACCESSIBLE,
G_DEFINE_TYPE_WITH_CODE (GtkCellAccessible, gtk_cell_accessible, GTK_TYPE_ACCESSIBLE,
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init)
G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, atk_component_interface_init))
......@@ -70,7 +71,7 @@ gtk_cell_accessible_object_finalize (GObject *obj)
}
g_object_unref (relation_set);
}
G_OBJECT_CLASS (_gtk_cell_accessible_parent_class)->finalize (obj);
G_OBJECT_CLASS (gtk_cell_accessible_parent_class)->finalize (obj);
}
static gint
......@@ -83,13 +84,13 @@ gtk_cell_accessible_get_index_in_parent (AtkObject *obj)
parent = atk_object_get_parent (obj);
if (GTK_IS_CONTAINER_CELL_ACCESSIBLE (parent))
return g_list_index (_gtk_container_cell_accessible_get_children (GTK_CONTAINER_CELL_ACCESSIBLE (parent)), obj);
return g_list_index (gtk_container_cell_accessible_get_children (GTK_CONTAINER_CELL_ACCESSIBLE (parent)), obj);
parent = gtk_widget_get_accessible (gtk_accessible_get_widget (GTK_ACCESSIBLE (cell)));
if (parent == NULL)
return -1;
return _gtk_cell_accessible_parent_get_child_index (GTK_CELL_ACCESSIBLE_PARENT (parent), cell);
return gtk_cell_accessible_parent_get_child_index (GTK_CELL_ACCESSIBLE_PARENT (parent), cell);
}
static AtkStateSet *
......@@ -110,7 +111,7 @@ gtk_cell_accessible_ref_state_set (AtkObject *accessible)
return state_set;
}
flags = _gtk_cell_accessible_get_state (cell_accessible);
flags = gtk_cell_accessible_get_state (cell_accessible);
atk_state_set_add_state (state_set, ATK_STATE_FOCUSABLE);
atk_state_set_add_state (state_set, ATK_STATE_SELECTABLE);
......@@ -139,7 +140,7 @@ gtk_cell_accessible_ref_state_set (AtkObject *accessible)
static void
_gtk_cell_accessible_class_init (GtkCellAccessibleClass *klass)
gtk_cell_accessible_class_init (GtkCellAccessibleClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GObjectClass *g_object_class = G_OBJECT_CLASS (klass);
......@@ -151,12 +152,12 @@ _gtk_cell_accessible_class_init (GtkCellAccessibleClass *klass)
}
static void
_gtk_cell_accessible_init (GtkCellAccessible *cell)
gtk_cell_accessible_init (GtkCellAccessible *cell)
{
}
void
_gtk_cell_accessible_initialise (GtkCellAccessible *cell,
_gtk_cell_accessible_initialize (GtkCellAccessible *cell,
GtkWidget *widget,
AtkObject *parent)
{
......@@ -286,13 +287,13 @@ gtk_cell_accessible_action_do_action (AtkAction *action,
switch (index)
{
case 0:
_gtk_cell_accessible_parent_expand_collapse (parent, cell);
gtk_cell_accessible_parent_expand_collapse (parent, cell);
break;
case 1:
_gtk_cell_accessible_parent_edit (parent, cell);
gtk_cell_accessible_parent_edit (parent, cell);
break;
case 2:
_gtk_cell_accessible_parent_activate (parent, cell);
gtk_cell_accessible_parent_activate (parent, cell);
break;
default:
return FALSE;
......@@ -325,7 +326,7 @@ gtk_cell_accessible_get_extents (AtkComponent *component,
cell = GTK_CELL_ACCESSIBLE (component);
parent = gtk_widget_get_accessible (gtk_accessible_get_widget (GTK_ACCESSIBLE (cell)));
_gtk_cell_accessible_parent_get_cell_extents (GTK_CELL_ACCESSIBLE_PARENT (parent),
gtk_cell_accessible_parent_get_cell_extents (GTK_CELL_ACCESSIBLE_PARENT (parent),
cell,
x, y, width, height, coord_type);
}
......@@ -339,7 +340,7 @@ gtk_cell_accessible_grab_focus (AtkComponent *component)
cell = GTK_CELL_ACCESSIBLE (component);
parent = gtk_widget_get_accessible (gtk_accessible_get_widget (GTK_ACCESSIBLE (cell)));
return _gtk_cell_accessible_parent_grab_focus (GTK_CELL_ACCESSIBLE_PARENT (parent), cell);
return gtk_cell_accessible_parent_grab_focus (GTK_CELL_ACCESSIBLE_PARENT (parent), cell);
}
static void
......@@ -349,16 +350,8 @@ atk_component_interface_init (AtkComponentIface *iface)
iface->grab_focus = gtk_cell_accessible_grab_focus;
}
/**
* _gtk_cell_accessible_get_state:
* @cell: a #GtkCellAccessible
*
* Gets the state that would be used to render the area referenced by @cell.
*
* Returns: the #GtkCellRendererState for cell
**/
GtkCellRendererState
_gtk_cell_accessible_get_state (GtkCellAccessible *cell)
static GtkCellRendererState
gtk_cell_accessible_get_state (GtkCellAccessible *cell)
{
AtkObject *parent;
......@@ -368,11 +361,11 @@ _gtk_cell_accessible_get_state (GtkCellAccessible *cell)
if (parent == NULL)
return 0;
return _gtk_cell_accessible_parent_get_renderer_state (GTK_CELL_ACCESSIBLE_PARENT (parent), cell);
return gtk_cell_accessible_parent_get_renderer_state (GTK_CELL_ACCESSIBLE_PARENT (parent), cell);
}
/**
* _gtk_cell_accessible_state_changed:
/*
* gtk_cell_accessible_state_changed:
* @cell: a #GtkCellAccessible
* @added: the flags that were added from @cell
* @removed: the flags that were removed from @cell
......@@ -397,18 +390,18 @@ _gtk_cell_accessible_state_changed (GtkCellAccessible *cell,
for (i = 0; i < G_N_ELEMENTS (state_map); i++)
{
if (added & state_map[i].renderer_state)
atk_object_notify_state_change (object,
atk_object_notify_state_change (object,
state_map[i].atk_state,
!state_map[i].invert);
if (added & state_map[i].renderer_state)
atk_object_notify_state_change (object,
atk_object_notify_state_change (object,
state_map[i].atk_state,
state_map[i].invert);
}
}
/**
* _gtk_cell_accessible_update_cache:
/*
* gtk_cell_accessible_update_cache:
* @cell: the cell that is changed
*
* Notifies the cell that the values in the data in the row that
......@@ -416,7 +409,7 @@ _gtk_cell_accessible_state_changed (GtkCellAccessible *cell,
* cell_changed function of @cell is called to send update
* notifications for the properties it takes from its cell
* renderer.
*
*
* Note that there is no higher granularity available about which
* properties changed, so you will need to make do with this
* function.
......@@ -425,7 +418,7 @@ void
_gtk_cell_accessible_update_cache (GtkCellAccessible *cell)
{
GtkCellAccessibleClass *klass;
g_return_if_fail (GTK_CELL_ACCESSIBLE (cell));
klass = GTK_CELL_ACCESSIBLE_GET_CLASS (cell);
......@@ -433,4 +426,3 @@ _gtk_cell_accessible_update_cache (GtkCellAccessible *cell)
if (klass->update_cache)
klass->update_cache (cell);
}
......@@ -23,7 +23,7 @@
G_BEGIN_DECLS
#define GTK_TYPE_CELL_ACCESSIBLE (_gtk_cell_accessible_get_type ())
#define GTK_TYPE_CELL_ACCESSIBLE (gtk_cell_accessible_get_type ())
#define GTK_CELL_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_ACCESSIBLE, GtkCellAccessible))
#define GTK_CELL_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_ACCESSIBLE, GtkCellAccessibleClass))
#define GTK_IS_CELL_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_ACCESSIBLE))
......@@ -47,24 +47,7 @@ struct _GtkCellAccessibleClass
void (*update_cache) (GtkCellAccessible *cell);
};
GType _gtk_cell_accessible_get_type (void);
GtkCellRendererState
_gtk_cell_accessible_get_state (GtkCellAccessible *cell);
void _gtk_cell_accessible_state_changed (GtkCellAccessible *cell,
GtkCellRendererState added,
GtkCellRendererState removed);
void _gtk_cell_accessible_update_cache (GtkCellAccessible *cell);
void _gtk_cell_accessible_initialise (GtkCellAccessible *cell,
GtkWidget *widget,
AtkObject *parent);
gboolean _gtk_cell_accessible_add_state (GtkCellAccessible *cell,
AtkStateType state_type,
gboolean emit_signal);
gboolean _gtk_cell_accessible_remove_state (GtkCellAccessible *cell,
AtkStateType state_type,
gboolean emit_signal);
GType gtk_cell_accessible_get_type (void);
G_END_DECLS
......
......@@ -22,7 +22,7 @@
#include "gtkcellaccessibleparent.h"
GType
_gtk_cell_accessible_parent_get_type (void)
gtk_cell_accessible_parent_get_type (void)
{
static volatile gsize g_define_type_id__volatile = 0;
......@@ -44,13 +44,13 @@ _gtk_cell_accessible_parent_get_type (void)
}
void
_gtk_cell_accessible_parent_get_cell_extents (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
gint *x,
gint *y,
gint *width,
gint *height,
AtkCoordType coord_type)
gtk_cell_accessible_parent_get_cell_extents (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
gint *x,
gint *y,
gint *width,
gint *height,
AtkCoordType coord_type)
{
GtkCellAccessibleParentIface *iface;
......@@ -63,9 +63,9 @@ _gtk_cell_accessible_parent_get_cell_extents (GtkCellAccessibleParent *parent,
}
void
_gtk_cell_accessible_parent_get_cell_area (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
GdkRectangle *cell_rect)
gtk_cell_accessible_parent_get_cell_area (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
GdkRectangle *cell_rect)
{
GtkCellAccessibleParentIface *iface;
......@@ -79,8 +79,8 @@ _gtk_cell_accessible_parent_get_cell_area (GtkCellAccessibleParent *parent,
}
gboolean
_gtk_cell_accessible_parent_grab_focus (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
gtk_cell_accessible_parent_grab_focus (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
{
GtkCellAccessibleParentIface *iface;
......@@ -95,8 +95,8 @@ _gtk_cell_accessible_parent_grab_focus (GtkCellAccessibleParent *parent,
}
int
_gtk_cell_accessible_parent_get_child_index (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
gtk_cell_accessible_parent_get_child_index (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
{
GtkCellAccessibleParentIface *iface;
......@@ -111,8 +111,8 @@ _gtk_cell_accessible_parent_get_child_index (GtkCellAccessibleParent *parent,
}
GtkCellRendererState
_gtk_cell_accessible_parent_get_renderer_state (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
gtk_cell_accessible_parent_get_renderer_state (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
{
GtkCellAccessibleParentIface *iface;
......@@ -128,8 +128,8 @@ _gtk_cell_accessible_parent_get_renderer_state (GtkCellAccessibleParent *parent,
}
void
_gtk_cell_accessible_parent_expand_collapse (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
gtk_cell_accessible_parent_expand_collapse (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
{
GtkCellAccessibleParentIface *iface;
......@@ -143,8 +143,8 @@ _gtk_cell_accessible_parent_expand_collapse (GtkCellAccessibleParent *parent,
}
void
_gtk_cell_accessible_parent_activate (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
gtk_cell_accessible_parent_activate (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
{
GtkCellAccessibleParentIface *iface;
......@@ -158,8 +158,8 @@ _gtk_cell_accessible_parent_activate (GtkCellAccessibleParent *parent,
}
void
_gtk_cell_accessible_parent_edit (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
gtk_cell_accessible_parent_edit (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
{
GtkCellAccessibleParentIface *iface;
......
......@@ -33,7 +33,7 @@ G_BEGIN_DECLS
* implement atk_component_get_extents().
*/
#define GTK_TYPE_CELL_ACCESSIBLE_PARENT (_gtk_cell_accessible_parent_get_type ())
#define GTK_TYPE_CELL_ACCESSIBLE_PARENT (gtk_cell_accessible_parent_get_type ())
#define GTK_IS_CELL_ACCESSIBLE_PARENT(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_ACCESSIBLE_PARENT)
#define GTK_CELL_ACCESSIBLE_PARENT(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_ACCESSIBLE_PARENT, GtkCellAccessibleParent)
#define GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTK_TYPE_CELL_ACCESSIBLE_PARENT, GtkCellAccessibleParentIface))
......@@ -70,31 +70,31 @@ struct _GtkCellAccessibleParentIface
GtkCellAccessible *cell);
};
GType _gtk_cell_accessible_parent_get_type (void);
GType gtk_cell_accessible_parent_get_type (void);
void _gtk_cell_accessible_parent_get_cell_extents (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
gint *x,
gint *y,
gint *width,
gint *height,
AtkCoordType coord_type);
void _gtk_cell_accessible_parent_get_cell_area (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
GdkRectangle *cell_rect);
gboolean _gtk_cell_accessible_parent_grab_focus (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
int _gtk_cell_accessible_parent_get_child_index (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
void gtk_cell_accessible_parent_get_cell_extents (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
gint *x,
gint *y,
gint *width,
gint *height,
AtkCoordType coord_type);
void gtk_cell_accessible_parent_get_cell_area (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
GdkRectangle *cell_rect);
gboolean gtk_cell_accessible_parent_grab_focus (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
int gtk_cell_accessible_parent_get_child_index (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
GtkCellRendererState
_gtk_cell_accessible_parent_get_renderer_state(GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
void _gtk_cell_accessible_parent_expand_collapse (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
void _gtk_cell_accessible_parent_activate (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
void _gtk_cell_accessible_parent_edit (GtkCellAccessibleParent *parent,
gtk_cell_accessible_parent_get_renderer_state(GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
void gtk_cell_accessible_parent_expand_collapse (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
void gtk_cell_accessible_parent_activate (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
void gtk_cell_accessible_parent_edit (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
G_END_DECLS
......
/* GAIL - The GNOME Accessibility Implementation Library
* Copyright 2001 Sun Microsystems Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GTK_CELL_ACCESSIBLE_PRIVATE_H__
#define __GTK_CELL_ACCESSIBLE_PRIVATE_H__
#include "gtkcellaccessible.h"
G_BEGIN_DECLS
void _gtk_cell_accessible_state_changed (GtkCellAccessible *cell,
GtkCellRendererState added,
GtkCellRendererState removed);
void _gtk_cell_accessible_update_cache (GtkCellAccessible *cell);
void _gtk_cell_accessible_initialize (GtkCellAccessible *cell,
GtkWidget *widget,
AtkObject *parent);
gboolean _gtk_cell_accessible_add_state (GtkCellAccessible *cell,
AtkStateType state_type,
gboolean emit_signal);
gboolean _gtk_cell_accessible_remove_state (GtkCellAccessible *cell,
AtkStateType state_type,
gboolean emit_signal);
G_END_DECLS
#endif /* __GTK_CELL_ACCESSIBLE_PRIVATE_H__ */
......@@ -22,7 +22,7 @@
#include "gtkcheckmenuitemaccessible.h"
G_DEFINE_TYPE (GtkCheckMenuItemAccessible, _gtk_check_menu_item_accessible, GTK_TYPE_MENU_ITEM_ACCESSIBLE)
G_DEFINE_TYPE (GtkCheckMenuItemAccessible, gtk_check_menu_item_accessible, GTK_TYPE_MENU_ITEM_ACCESSIBLE)
static void
toggled_cb (GtkWidget *widget)
......@@ -42,7 +42,7 @@ static void
gtk_check_menu_item_accessible_initialize (AtkObject *obj,
gpointer data)
{
ATK_OBJECT_CLASS (_gtk_check_menu_item_accessible_parent_class)->initialize (obj, data);
ATK_OBJECT_CLASS (gtk_check_menu_item_accessible_parent_class)->initialize (obj, data);
g_signal_connect (data, "toggled", G_CALLBACK (toggled_cb), NULL);
......@@ -60,7 +60,7 @@ gtk_check_menu_item_accessible_ref_state_set (AtkObject *accessible)
if (widget == NULL)
return NULL;
state_set = ATK_OBJECT_CLASS (_gtk_check_menu_item_accessible_parent_class)->ref_state_set (accessible);
state_set = ATK_OBJECT_CLASS (gtk_check_menu_item_accessible_parent_class)->ref_state_set (accessible);
check_menu_item = GTK_CHECK_MENU_ITEM (widget);
......@@ -78,7 +78,7 @@ gtk_check_menu_item_accessible_ref_state_set (AtkObject *accessible)
static void
gtk_check_menu_item_accessible_notify_gtk (GObject *obj,
GParamSpec *pspec)
GParamSpec *pspec)
{
GtkCheckMenuItem *check_menu_item = GTK_CHECK_MENU_ITEM (obj);
AtkObject *atk_obj;
......@@ -101,11 +101,11 @@ gtk_check_menu_item_accessible_notify_gtk (GObject *obj,
atk_object_notify_state_change (atk_obj, ATK_STATE_ENABLED, (sensitive && !inconsistent));
}
else
GTK_WIDGET_ACCESSIBLE_CLASS (_gtk_check_menu_item_accessible_parent_class)->notify_gtk (obj, pspec);
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_check_menu_item_accessible_parent_class)->notify_gtk (obj, pspec);
}
static void
_gtk_check_menu_item_accessible_class_init (GtkCheckMenuItemAccessibleClass *klass)
gtk_check_menu_item_accessible_class_init (GtkCheckMenuItemAccessibleClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
......@@ -117,6 +117,6 @@ _gtk_check_menu_item_accessible_class_init (GtkCheckMenuItemAccessibleClass *kla
}
static void
_gtk_check_menu_item_accessible_init (GtkCheckMenuItemAccessible *item)
gtk_check_menu_item_accessible_init (GtkCheckMenuItemAccessible *item)