Commit 775ccf39 authored by Matthias Clasen's avatar Matthias Clasen

Initial conversion of GailWidget to GtkWidgetAccessible

parent 89e57c69
......@@ -49,7 +49,7 @@ gail_c_sources = \
gailtoplevel.c \
gtktreeviewaccessible.c \
gailutil.c \
gailwidget.c \
gtkwidgetaccessible.c \
gtkwindowaccessible.c
libgailincludedir=$(includedir)/gail-3.0/gail
......@@ -104,7 +104,7 @@ gail_private_h_sources = \
gtkwindowaccessible.h
gail_public_h_sources = \
gailwidget.h
gtkwidgetaccessible.h
libgail_la_SOURCES = \
$(gail_c_sources) \
......
......@@ -31,7 +31,6 @@
#include "gailtextcell.h"
#include "gailtoplevel.h"
#include "gailutil.h"
#include "gailwidget.h"
#include "gailfactory.h"
......@@ -77,7 +76,6 @@ static guint focus_notify_handler = 0;
static guint focus_tracker_id = 0;
static GQuark quark_focus_object = 0;
GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_WIDGET, GailWidget, gail_widget, GTK_TYPE_WIDGET)
GAIL_IMPLEMENT_FACTORY_WITH_FUNC_DUMMY (GAIL_TYPE_RENDERER_CELL, GailRendererCell, gail_renderer_cell, GTK_TYPE_CELL_RENDERER, gail_renderer_cell_new)
GAIL_IMPLEMENT_FACTORY_WITH_FUNC_DUMMY (GAIL_TYPE_BOOLEAN_CELL, GailBooleanCell, gail_boolean_cell, GTK_TYPE_CELL_RENDERER_TOGGLE, gail_boolean_cell_new)
GAIL_IMPLEMENT_FACTORY_WITH_FUNC_DUMMY (GAIL_TYPE_IMAGE_CELL, GailImageCell, gail_image_cell, GTK_TYPE_CELL_RENDERER_PIXBUF, gail_image_cell_new)
......@@ -822,7 +820,6 @@ gail_accessibility_module_init (void)
if (a_t_support)
fprintf (stderr, "GTK Accessibility Module initialized\n");
GAIL_WIDGET_SET_FACTORY (GTK_TYPE_WIDGET, gail_widget);
GAIL_WIDGET_SET_FACTORY (GTK_TYPE_CELL_RENDERER_TEXT, gail_text_cell);
GAIL_WIDGET_SET_FACTORY (GTK_TYPE_CELL_RENDERER_TOGGLE, gail_boolean_cell);
GAIL_WIDGET_SET_FACTORY (GTK_TYPE_CELL_RENDERER_PIXBUF, gail_image_cell);
......
......@@ -25,7 +25,7 @@
static void atk_image_interface_init (AtkImageIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkArrowAccessible, gtk_arrow_accessible, GAIL_TYPE_WIDGET,
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
......
......@@ -20,7 +20,7 @@
#ifndef __GTK_ARROW_ACCESSIBLE_H__
#define __GTK_ARROW_ACCESSIBLE_H__
#include "gailwidget.h"
#include "gtkwidgetaccessible.h"
G_BEGIN_DECLS
......@@ -36,14 +36,14 @@ typedef struct _GtkArrowAccessibleClass GtkArrowAccessibleClass;
struct _GtkArrowAccessible
{
GailWidget parent;
GtkWidgetAccessible parent;
gchar *image_description;
};
struct _GtkArrowAccessibleClass
{
GailWidgetClass parent_class;
GtkWidgetAccessibleClass parent_class;
};
GType gtk_arrow_accessible_get_type (void);
......
......@@ -219,7 +219,7 @@ gtk_button_accessible_notify_gtk (GObject *obj,
g_signal_emit_by_name (atk_obj, "visible_data_changed");
}
else
GAIL_WIDGET_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
......@@ -227,7 +227,7 @@ gtk_button_accessible_class_init (GtkButtonAccessibleClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GtkContainerAccessibleClass *container_class = (GtkContainerAccessibleClass*)klass;
GailWidgetClass *widget_class = (GailWidgetClass*)klass;
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
class->get_name = gtk_button_accessible_get_name;
class->get_n_children = gtk_button_accessible_get_n_children;
......
......@@ -102,13 +102,13 @@ gtk_check_menu_item_accessible_notify_gtk (GObject *obj,
atk_object_notify_state_change (atk_obj, ATK_STATE_ENABLED, (sensitive && !inconsistent));
}
else
GAIL_WIDGET_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)
{
GailWidgetClass *widget_class = (GailWidgetClass*)klass;
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
widget_class->notify_gtk = gtk_check_menu_item_accessible_notify_gtk;
......
......@@ -103,14 +103,14 @@ gtk_check_submenu_item_accessible_notify_gtk (GObject *obj,
atk_object_notify_state_change (atk_obj, ATK_STATE_ENABLED, (sensitive && !inconsistent));
}
else
GAIL_WIDGET_CLASS (gtk_check_submenu_item_accessible_parent_class)->notify_gtk (obj, pspec);
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_check_submenu_item_accessible_parent_class)->notify_gtk (obj, pspec);
}
static void
gtk_check_submenu_item_accessible_class_init (GtkCheckSubmenuItemAccessibleClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GailWidgetClass *widget_class = (GailWidgetClass*)klass;
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
widget_class->notify_gtk = gtk_check_submenu_item_accessible_notify_gtk;
......
......@@ -23,7 +23,7 @@
#include "gtkcontaineraccessible.h"
G_DEFINE_TYPE (GtkContainerAccessible, gtk_container_accessible, GAIL_TYPE_WIDGET)
G_DEFINE_TYPE (GtkContainerAccessible, gtk_container_accessible, GTK_TYPE_WIDGET_ACCESSIBLE)
static void
gtk_container_accessible_init (GtkContainerAccessible *container)
......
......@@ -20,7 +20,7 @@
#ifndef __GTK_CONTAINER_ACCESSIBLE_H__
#define __GTK_CONTAINER_ACCESSIBLE_H__
#include "gailwidget.h"
#include "gtkwidgetaccessible.h"
G_BEGIN_DECLS
......@@ -36,14 +36,14 @@ typedef struct _GtkContainerAccessibleClass GtkContainerAccessibleClass;
struct _GtkContainerAccessible
{
GailWidget parent;
GtkWidgetAccessible parent;
GList *children;
};
struct _GtkContainerAccessibleClass
{
GailWidgetClass parent_class;
GtkWidgetAccessibleClass parent_class;
gint (*add_gtk) (GtkContainer *container,
GtkWidget *widget,
......
......@@ -45,7 +45,7 @@ static void atk_text_interface_init (AtkTextIface *iface);
static void atk_action_interface_init (AtkActionIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkEntryAccessible, gtk_entry_accessible, GAIL_TYPE_WIDGET,
G_DEFINE_TYPE_WITH_CODE (GtkEntryAccessible, gtk_entry_accessible, GTK_TYPE_WIDGET_ACCESSIBLE,
G_IMPLEMENT_INTERFACE (ATK_TYPE_EDITABLE_TEXT, atk_editable_text_interface_init)
G_IMPLEMENT_INTERFACE (ATK_TYPE_TEXT, atk_text_interface_init)
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init))
......@@ -187,7 +187,7 @@ gtk_entry_accessible_notify_gtk (GObject *obj,
atk_object_set_role (atk_obj, new_role);
}
else
GAIL_WIDGET_CLASS (gtk_entry_accessible_parent_class)->notify_gtk (obj, pspec);
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_entry_accessible_parent_class)->notify_gtk (obj, pspec);
}
static gint
......@@ -209,7 +209,7 @@ gtk_entry_accessible_class_init (GtkEntryAccessibleClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GailWidgetClass *widget_class = (GailWidgetClass*)klass;
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
gobject_class->finalize = gtk_entry_accessible_finalize;
......
......@@ -20,7 +20,7 @@
#ifndef __GTK_ENTRY_ACCESSIBLE_H__
#define __GTK_ENTRY_ACCESSIBLE_H__
#include "gailwidget.h"
#include "gtkwidgetaccessible.h"
G_BEGIN_DECLS
......@@ -36,7 +36,7 @@ typedef struct _GtkEntryAccessibleClass GtkEntryAccessibleClass;
struct _GtkEntryAccessible
{
GailWidget parent;
GtkWidgetAccessible parent;
gint position_insert;
gint position_delete;
......@@ -48,13 +48,13 @@ struct _GtkEntryAccessible
guint action_idle_handler;
};
GType gtk_entry_accessible_get_type (void);
struct _GtkEntryAccessibleClass
{
GailWidgetClass parent_class;
GtkWidgetAccessibleClass parent_class;
};
GType gtk_entry_accessible_get_type (void);
G_END_DECLS
#endif /* __GTK_ENTRY_ACCESSIBLE_H__ */
......@@ -162,7 +162,7 @@ gtk_expander_accessible_notify_gtk (GObject *obj,
g_signal_emit_by_name (atk_obj, "visible_data_changed");
}
else
GAIL_WIDGET_CLASS (gtk_expander_accessible_parent_class)->notify_gtk (obj, pspec);
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_expander_accessible_parent_class)->notify_gtk (obj, pspec);
}
static AtkStateSet*
......@@ -195,7 +195,7 @@ static void
gtk_expander_accessible_class_init (GtkExpanderAccessibleClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GailWidgetClass *widget_class = (GailWidgetClass*)klass;
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
widget_class->notify_gtk = gtk_expander_accessible_notify_gtk;
......
......@@ -26,7 +26,7 @@
static void atk_image_interface_init (AtkImageIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkImageAccessible, gtk_image_accessible, GAIL_TYPE_WIDGET,
G_DEFINE_TYPE_WITH_CODE (GtkImageAccessible, gtk_image_accessible, GTK_TYPE_WIDGET_ACCESSIBLE,
G_IMPLEMENT_INTERFACE (ATK_TYPE_IMAGE, atk_image_interface_init))
static void
......
......@@ -20,7 +20,7 @@
#ifndef __GTK_IMAGE_ACCESSIBLE_H__
#define __GTK_IMAGE_ACCESSIBLE_H__
#include "gailwidget.h"
#include "gtkwidgetaccessible.h"
G_BEGIN_DECLS
......@@ -36,7 +36,7 @@ typedef struct _GtkImageAccessibleClass GtkImageAccessibleClass;
struct _GtkImageAccessible
{
GailWidget parent;
GtkWidgetAccessible parent;
gchar* image_description;
gchar* stock_name;
......@@ -44,7 +44,7 @@ struct _GtkImageAccessible
struct _GtkImageAccessibleClass
{
GailWidgetClass parent_class;
GtkWidgetAccessibleClass parent_class;
};
GType gtk_image_accessible_get_type (void);
......
......@@ -28,7 +28,7 @@
static void atk_text_interface_init (AtkTextIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkLabelAccessible, gtk_label_accessible, GAIL_TYPE_WIDGET,
G_DEFINE_TYPE_WITH_CODE (GtkLabelAccessible, gtk_label_accessible, GTK_TYPE_WIDGET_ACCESSIBLE,
G_IMPLEMENT_INTERFACE (ATK_TYPE_TEXT, atk_text_interface_init))
static void
......@@ -119,7 +119,7 @@ gtk_label_accessible_notify_gtk (GObject *obj,
g_signal_emit_by_name (atk_obj, "text_selection_changed");
}
else
GAIL_WIDGET_CLASS (gtk_label_accessible_parent_class)->notify_gtk (obj, pspec);
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_label_accessible_parent_class)->notify_gtk (obj, pspec);
}
static void
......@@ -247,7 +247,7 @@ gtk_label_accessible_class_init (GtkLabelAccessibleClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GailWidgetClass *widget_class = (GailWidgetClass*)klass;
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
gobject_class->finalize = gtk_label_accessible_finalize;
......
......@@ -20,7 +20,7 @@
#ifndef __GTK_LABEL_ACCESSIBLE_H__
#define __GTK_LABEL_ACCESSIBLE_H__
#include "gailwidget.h"
#include "gtkwidgetaccessible.h"
G_BEGIN_DECLS
......@@ -36,14 +36,14 @@ typedef struct _GtkLabelAccessibleClass GtkLabelAccessibleClass;
struct _GtkLabelAccessible
{
GailWidget parent;
GtkWidgetAccessible parent;
gchar *text;
};
struct _GtkLabelAccessibleClass
{
GailWidgetClass parent_class;
GtkWidgetAccessibleClass parent_class;
};
GType gtk_label_accessible_get_type (void);
......
......@@ -203,7 +203,7 @@ gtk_menu_item_accessible_notify_gtk (GObject *obj,
g_signal_emit_by_name (atk_obj, "visible_data_changed");
}
else
GAIL_WIDGET_CLASS (gtk_menu_item_accessible_parent_class)->notify_gtk (obj, pspec);
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_menu_item_accessible_parent_class)->notify_gtk (obj, pspec);
}
static void
......@@ -211,7 +211,7 @@ gtk_menu_item_accessible_class_init (GtkMenuItemAccessibleClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GailWidgetClass *widget_class = (GailWidgetClass*)klass;
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
widget_class->notify_gtk = gtk_menu_item_accessible_notify_gtk;
......
......@@ -280,7 +280,7 @@ gtk_notebook_accessible_notify_gtk (GObject *obj,
}
}
else
GAIL_WIDGET_CLASS (gtk_notebook_accessible_parent_class)->notify_gtk (obj, pspec);
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_notebook_accessible_parent_class)->notify_gtk (obj, pspec);
}
/*
......@@ -309,7 +309,7 @@ gtk_notebook_accessible_class_init (GtkNotebookAccessibleClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GailWidgetClass *widget_class = (GailWidgetClass*)klass;
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
GtkContainerAccessibleClass *container_class = (GtkContainerAccessibleClass*)klass;
......
......@@ -28,7 +28,7 @@
static void atk_value_interface_init (AtkValueIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkProgressBarAccessible, gtk_progress_bar_accessible, GAIL_TYPE_WIDGET,
G_DEFINE_TYPE_WITH_CODE (GtkProgressBarAccessible, gtk_progress_bar_accessible, GTK_TYPE_WIDGET_ACCESSIBLE,
G_IMPLEMENT_INTERFACE (ATK_TYPE_VALUE, atk_value_interface_init))
static void
......@@ -52,15 +52,13 @@ gtk_progress_bar_accessible_notify_gtk (GObject *obj,
if (strcmp (pspec->name, "fraction") == 0)
g_object_notify (G_OBJECT (accessible), "accessible-value");
else
GAIL_WIDGET_CLASS (gtk_progress_bar_accessible_parent_class)->notify_gtk (obj, pspec);
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_progress_bar_accessible_parent_class)->notify_gtk (obj, pspec);
}
static void
gtk_progress_bar_accessible_class_init (GtkProgressBarAccessibleClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GailWidgetClass *widget_class;
widget_class = (GailWidgetClass*)klass;
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
widget_class->notify_gtk = gtk_progress_bar_accessible_notify_gtk;
......
......@@ -20,7 +20,7 @@
#ifndef __GTK_PROGRESS_BAR_ACCESSIBLE_H__
#define __GTK_PROGRESS_BAR_ACCESSIBLE_H__
#include "gailwidget.h"
#include "gtkwidgetaccessible.h"
G_BEGIN_DECLS
......@@ -31,17 +31,17 @@ G_BEGIN_DECLS
#define GTK_IS_PROGRESS_BAR_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PROGRESS_BAR_ACCESSIBLE))
#define GTK_PROGRESS_BAR_ACCESSIBLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_PROGRESS_BAR_ACCESSIBLE, GtkProgressBarAccessibleClass))
typedef struct _GtkProgressBarAccessible GtkProgressBarAccessible;
typedef struct _GtkProgressBarAccessibleClass GtkProgressBarAccessibleClass;
typedef struct _GtkProgressBarAccessible GtkProgressBarAccessible;
typedef struct _GtkProgressBarAccessibleClass GtkProgressBarAccessibleClass;
struct _GtkProgressBarAccessible
{
GailWidget parent;
GtkWidgetAccessible parent;
};
struct _GtkProgressBarAccessibleClass
{
GailWidgetClass parent_class;
GtkWidgetAccessibleClass parent_class;
};
GType gtk_progress_bar_accessible_get_type (void);
......
......@@ -27,7 +27,7 @@
static void atk_action_interface_init (AtkActionIface *iface);
static void atk_value_interface_init (AtkValueIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkRangeAccessible, gtk_range_accessible, GAIL_TYPE_WIDGET,
G_DEFINE_TYPE_WITH_CODE (GtkRangeAccessible, gtk_range_accessible, GTK_TYPE_WIDGET_ACCESSIBLE,
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init)
G_IMPLEMENT_INTERFACE (ATK_TYPE_VALUE, atk_value_interface_init))
......@@ -109,7 +109,7 @@ gtk_range_accessible_notify_gtk (GObject *obj,
range);
}
else
GAIL_WIDGET_CLASS (gtk_range_accessible_parent_class)->notify_gtk (obj, pspec);
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_range_accessible_parent_class)->notify_gtk (obj, pspec);
}
......@@ -118,7 +118,7 @@ gtk_range_accessible_class_init (GtkRangeAccessibleClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GailWidgetClass *widget_class = (GailWidgetClass*)klass;
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
widget_class->notify_gtk = gtk_range_accessible_notify_gtk;
......
......@@ -20,7 +20,7 @@
#ifndef __GTK_RANGE_ACCESSIBLE_H__
#define __GTK_RANGE_ACCESSIBLE_H__
#include "gailwidget.h"
#include "gtkwidgetaccessible.h"
G_BEGIN_DECLS
......@@ -36,14 +36,14 @@ typedef struct _GtkRangeAccessibleClass GtkRangeAccessibleClass;
struct _GtkRangeAccessible
{
GailWidget parent;
GtkWidgetAccessible parent;
guint action_idle_handler;
};
struct _GtkRangeAccessibleClass
{
GailWidgetClass parent_class;
GtkWidgetAccessibleClass parent_class;
};
GType gtk_range_accessible_get_type (void);
......
......@@ -79,7 +79,7 @@ gtk_scale_button_accessible_notify_gtk (GObject *obj,
}
else
{
GAIL_WIDGET_CLASS (gtk_scale_button_accessible_parent_class)->notify_gtk (obj, pspec);
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_scale_button_accessible_parent_class)->notify_gtk (obj, pspec);
}
}
......@@ -87,7 +87,7 @@ static void
gtk_scale_button_accessible_class_init (GtkScaleButtonAccessibleClass *klass)
{
AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
GailWidgetClass *widget_class = GAIL_WIDGET_CLASS (klass);
GtkWidgetAccessibleClass *widget_class = GTK_WIDGET_ACCESSIBLE_CLASS (klass);
atk_object_class->initialize = gtk_scale_button_accessible_initialize;
......
......@@ -79,7 +79,7 @@ gtk_spin_button_accessible_notify_gtk (GObject *obj,
spin_button);
}
else
GAIL_WIDGET_CLASS (gtk_spin_button_accessible_parent_class)->notify_gtk (obj, pspec);
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_spin_button_accessible_parent_class)->notify_gtk (obj, pspec);
}
......@@ -88,9 +88,7 @@ static void
gtk_spin_button_accessible_class_init (GtkSpinButtonAccessibleClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GailWidgetClass *widget_class;
widget_class = (GailWidgetClass*)klass;
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
widget_class->notify_gtk = gtk_spin_button_accessible_notify_gtk;
......
......@@ -101,7 +101,7 @@ gtk_text_view_accessible_notify_gtk (GObject *obj,
setup_buffer (GTK_TEXT_VIEW (obj), GTK_TEXT_VIEW_ACCESSIBLE (atk_obj));
}
else
GAIL_WIDGET_CLASS (gtk_text_view_accessible_parent_class)->notify_gtk (obj, pspec);
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_text_view_accessible_parent_class)->notify_gtk (obj, pspec);
}
static AtkStateSet*
......@@ -128,9 +128,7 @@ gtk_text_view_accessible_class_init (GtkTextViewAccessibleClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GailWidgetClass *widget_class;
widget_class = (GailWidgetClass*)klass;
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
gobject_class->finalize = gtk_text_view_accessible_finalize;
......
......@@ -79,7 +79,7 @@ gtk_toggle_button_accessible_notify_gtk (GObject *obj,
atk_object_notify_state_change (atk_obj, ATK_STATE_ENABLED, (sensitive && !inconsistent));
}
else
GAIL_WIDGET_CLASS (gtk_toggle_button_accessible_parent_class)->notify_gtk (obj, pspec);
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_toggle_button_accessible_parent_class)->notify_gtk (obj, pspec);
}
static AtkStateSet*
......@@ -111,10 +111,9 @@ gtk_toggle_button_accessible_ref_state_set (AtkObject *accessible)
static void
gtk_toggle_button_accessible_class_init (GtkToggleButtonAccessibleClass *klass)
{
GailWidgetClass *widget_class;
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
widget_class = (GailWidgetClass*)klass;
widget_class->notify_gtk = gtk_toggle_button_accessible_notify_gtk;
class->ref_state_set = gtk_toggle_button_accessible_ref_state_set;
......
......@@ -395,7 +395,7 @@ gtk_tree_view_accessible_notify_gtk (GObject *obj,
g_signal_connect (adj, "value-changed", G_CALLBACK (adjustment_changed), tree_view);
}
else
GAIL_WIDGET_CLASS (gtk_tree_view_accessible_parent_class)->notify_gtk (obj, pspec);
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_tree_view_accessible_parent_class)->notify_gtk (obj, pspec);
}
static void
......@@ -722,13 +722,9 @@ gtk_tree_view_accessible_class_init (GtkTreeViewAccessibleClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GtkAccessibleClass *accessible_class;
GailWidgetClass *widget_class;
GtkContainerAccessibleClass *container_class;
accessible_class = (GtkAccessibleClass*)klass;
widget_class = (GailWidgetClass*)klass;
container_class = (GtkContainerAccessibleClass*)klass;
GtkAccessibleClass *accessible_class = (GtkAccessibleClass*)klass;
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
GtkContainerAccessibleClass *container_class = (GtkContainerAccessibleClass*)klass;
class->get_n_children = gtk_tree_view_accessible_get_n_children;
class->ref_child = gtk_tree_view_accessible_ref_child;
......
......@@ -17,31 +17,29 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef __GAIL_WIDGET_H__
#define __GAIL_WIDGET_H__
#ifndef __GTK_WIDGET_ACCESSIBLE_H__
#define __GTK_WIDGET_ACCESSIBLE_H__
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define GAIL_TYPE_WIDGET (gail_widget_get_type ())
#define GAIL_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAIL_TYPE_WIDGET, GailWidget))
#define GAIL_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAIL_TYPE_WIDGET, GailWidgetClass))
#define GAIL_IS_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAIL_TYPE_WIDGET))
#define GAIL_IS_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAIL_TYPE_WIDGET))
#define GAIL_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIL_TYPE_WIDGET, GailWidgetClass))
#define GTK_TYPE_WIDGET_ACCESSIBLE (gtk_widget_accessible_get_type ())
#define GTK_WIDGET_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_WIDGET_ACCESSIBLE, GtkWidgetAccessible))
#define GTK_WIDGET_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_WIDGET_ACCESSIBLE, GtkWidgetAccessibleClass))
#define GTK_IS_WIDGET_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_WIDGET_ACCESSIBLE))
#define GTK_IS_WIDGET_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_WIDGET_ACCESSIBLE))
#define GTK_WIDGET_ACCESSIBLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_WIDGET_ACCESSIBLE, GtkWidgetAccessibleClass))
typedef struct _GailWidget GailWidget;
typedef struct _GailWidgetClass GailWidgetClass;
typedef struct _GtkWidgetAccessible GtkWidgetAccessible;
typedef struct _GtkWidgetAccessibleClass GtkWidgetAccessibleClass;
struct _GailWidget
struct _GtkWidgetAccessible
{
GtkAccessible parent;
};
GType gail_widget_get_type (void);
struct _GailWidgetClass
struct _GtkWidgetAccessibleClass
{
GtkAccessibleClass parent_class;
......@@ -58,6 +56,8 @@ struct _GailWidgetClass
};
GType gtk_widget_accessible_get_type (void);
G_END_DECLS
#endif /* __GAIL_WIDGET_H__ */
#endif /* __GTK_WIDGET_ACCESSIBLE_H__ */
......@@ -85,7 +85,7 @@ gtk_window_accessible_notify_gtk (GObject *obj,
g_signal_emit_by_name (atk_obj, "visible_data_changed");
}
else
GAIL_WIDGET_CLASS (gtk_window_accessible_parent_class)->notify_gtk (obj, pspec);
GTK_WIDGET_ACCESSIBLE_CLASS (gtk_window_accessible_parent_class)->notify_gtk (obj, pspec);
}
static gboolean
......@@ -320,8 +320,8 @@ gtk_window_accessible_ref_state_set (AtkObject *accessible)
static void
gtk_window_accessible_class_init (GtkWindowAccessibleClass *klass)
{
GailWidgetClass *widget_class = (GailWidgetClass*)klass;
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
GtkWidgetAccessibleClass *widget_class = (GtkWidgetAccessibleClass*)klass;
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
widget_class->focus_gtk = gtk_window_accessible_focus_gtk;
widget_class->notify_gtk = gtk_window_accessible_notify_gtk;
......
......@@ -124,12 +124,8 @@ gtk_accessible_real_connect_widget_destroyed (GtkAccessible *accessible)
GtkAccessiblePrivate *priv = accessible->priv;
if (priv->widget)
{
g_signal_connect (priv->widget,
"destroy",
G_CALLBACK (gtk_widget_destroyed),
&priv->widget);
}
g_signal_connect (priv->widget, "destroy",
G_CALLBACK (gtk_widget_destroyed), &priv->widget);
}
/*
......
......@@ -35,6 +35,7 @@
#include "gtkaccessible.h"
#include "gtkimage.h"
#include "gtkspinner.h"
#include "a11y/gtkwidgetaccessible.h"
/**
......@@ -83,8 +84,7 @@ static void gtk_spinner_get_preferred_height (GtkWidget *widget,
gint *minimum_size,
gint *natural_size);
static AtkObject *gtk_spinner_get_accessible (GtkWidget *widget);
static GType gtk_spinner_accessible_get_type (void);
GType _gtk_spinner_accessible_get_type (void);
G_DEFINE_TYPE (GtkSpinner, gtk_spinner, GTK_TYPE_WIDGET)
......@@ -101,7 +101,6 @@ gtk_spinner_class_init (GtkSpinnerClass *klass)
widget_class = GTK_WIDGET_CLASS(klass);
widget_class->draw = gtk_spinner_draw;
widget_class->get_accessible = gtk_spinner_get_accessible;
widget_class->get_preferred_width = gtk_spinner_get_preferred_width;
widget_class->get_preferred_height = gtk_spinner_get_preferred_height;
......@@ -118,6 +117,8 @@ gtk_spinner_class_init (GtkSpinnerClass *klass)
P_("Whether the spinner is active"),
FALSE,
G_PARAM_READWRITE));
gtk_widget_class_set_accessible_type (widget_class, _gtk_spinner_accessible_get_type ());
}
static void
......@@ -268,20 +269,18 @@ gtk_spinner_accessible_image_iface_init (AtkImageIface *iface)
}
/* dummy typedef */
typedef struct _GtkSpinnerAccessible GtkSpinnerAccessible;
typedef struct _GtkSpinnerAccessibleClass GtkSpinnerAccessibleClass;
typedef GtkWidgetAccessible GtkSpinnerAccessible;
typedef GtkWidgetAccessibleClass GtkSpinnerAccessibleClass;
ATK_DEFINE_TYPE_WITH_CODE (GtkSpinnerAccessible,
gtk_spinner_accessible,
GTK_TYPE_IMAGE,
G_IMPLEMENT_INTERFACE (ATK_TYPE_IMAGE,
gtk_spinner_accessible_image_iface_init));
G_DEFINE_TYPE_WITH_CODE (GtkSpinnerAccessible, _gtk_spinner_accessible, GTK_TYPE_WIDGET_ACCESSIBLE,
G_IMPLEMENT_INTERFACE (ATK_TYPE_IMAGE,
gtk_spinner_accessible_image_iface_init));
static void
gtk_spinner_accessible_initialize (AtkObject *accessible,
gpointer widget)
{