summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/other/gail/Makefile.am10
-rw-r--r--modules/other/gail/gail.c81
-rw-r--r--modules/other/gail/gail.h5
-rw-r--r--modules/other/gail/gailadjustment.c2
-rw-r--r--modules/other/gail/gailarrow.c21
-rw-r--r--modules/other/gail/gailarrow.h2
-rw-r--r--modules/other/gail/gailbooleancellfactory.c80
-rw-r--r--modules/other/gail/gailbooleancellfactory.h56
-rw-r--r--modules/other/gail/gailbox.c20
-rw-r--r--modules/other/gail/gailbox.h2
-rw-r--r--modules/other/gail/gailbutton.c16
-rw-r--r--modules/other/gail/gailbutton.h2
-rw-r--r--modules/other/gail/gailcalendar.c22
-rw-r--r--modules/other/gail/gailcalendar.h2
-rw-r--r--modules/other/gail/gailclist.c20
-rw-r--r--modules/other/gail/gailclist.h2
-rw-r--r--modules/other/gail/gailcombo.c16
-rw-r--r--modules/other/gail/gailcombo.h2
-rw-r--r--modules/other/gail/gailcombobox.c16
-rw-r--r--modules/other/gail/gailcombobox.h2
-rw-r--r--modules/other/gail/gailcontainer.c18
-rw-r--r--modules/other/gail/gailcontainer.h2
-rw-r--r--modules/other/gail/gailentry.c16
-rw-r--r--modules/other/gail/gailentry.h2
-rw-r--r--modules/other/gail/gailexpander.c16
-rw-r--r--modules/other/gail/gailexpander.h2
-rw-r--r--modules/other/gail/gailfactory.h129
-rw-r--r--modules/other/gail/gailframe.c20
-rw-r--r--modules/other/gail/gailframe.h2
-rw-r--r--modules/other/gail/gailhtmlbox.c17
-rw-r--r--modules/other/gail/gailhtmlbox.h2
-rw-r--r--modules/other/gail/gailimage.c20
-rw-r--r--modules/other/gail/gailimage.h2
-rw-r--r--modules/other/gail/gailimagecellfactory.c81
-rw-r--r--modules/other/gail/gailimagecellfactory.h56
-rw-r--r--modules/other/gail/gailitem.c16
-rw-r--r--modules/other/gail/gailitem.h2
-rw-r--r--modules/other/gail/gaillabel.c16
-rw-r--r--modules/other/gail/gaillabel.h2
-rw-r--r--modules/other/gail/gaillist.c21
-rw-r--r--modules/other/gail/gaillist.h2
-rw-r--r--modules/other/gail/gailmenu.c21
-rw-r--r--modules/other/gail/gailmenu.h2
-rw-r--r--modules/other/gail/gailmenushell.c24
-rw-r--r--modules/other/gail/gailmenushell.h2
-rw-r--r--modules/other/gail/gailnotebook.c16
-rw-r--r--modules/other/gail/gailnotebook.h2
-rw-r--r--modules/other/gail/gailobject.c13
-rw-r--r--modules/other/gail/gailobject.h2
-rw-r--r--modules/other/gail/gailobjectfactory.c79
-rw-r--r--modules/other/gail/gailobjectfactory.h58
-rw-r--r--modules/other/gail/gailoptionmenu.c16
-rw-r--r--modules/other/gail/gailoptionmenu.h2
-rw-r--r--modules/other/gail/gailpaned.c16
-rw-r--r--modules/other/gail/gailpaned.h2
-rw-r--r--modules/other/gail/gailpixmap.c23
-rw-r--r--modules/other/gail/gailpixmap.h3
-rw-r--r--modules/other/gail/gailprogressbar.c16
-rw-r--r--modules/other/gail/gailprogressbar.h4
-rw-r--r--modules/other/gail/gailradiobutton.c27
-rw-r--r--modules/other/gail/gailradiobutton.h2
-rw-r--r--modules/other/gail/gailrange.c16
-rw-r--r--modules/other/gail/gailrange.h2
-rw-r--r--modules/other/gail/gailrenderercellfactory.c80
-rw-r--r--modules/other/gail/gailrenderercellfactory.h56
-rw-r--r--modules/other/gail/gailscale.c16
-rw-r--r--modules/other/gail/gailscale.h2
-rw-r--r--modules/other/gail/gailscrollbar.c20
-rw-r--r--modules/other/gail/gailscrollbar.h2
-rw-r--r--modules/other/gail/gailscrolledwindow.c16
-rw-r--r--modules/other/gail/gailscrolledwindow.h2
-rw-r--r--modules/other/gail/gailseparator.c22
-rw-r--r--modules/other/gail/gailseparator.h2
-rw-r--r--modules/other/gail/gailspinbutton.c16
-rw-r--r--modules/other/gail/gailspinbutton.h2
-rw-r--r--modules/other/gail/gailstatusbar.c16
-rw-r--r--modules/other/gail/gailstatusbar.h2
-rw-r--r--modules/other/gail/gailtextcellfactory.c81
-rw-r--r--modules/other/gail/gailtextcellfactory.h56
-rw-r--r--modules/other/gail/gailtextview.c16
-rw-r--r--modules/other/gail/gailtextview.h2
-rw-r--r--modules/other/gail/gailtogglebutton.c16
-rw-r--r--modules/other/gail/gailtogglebutton.h2
-rw-r--r--modules/other/gail/gailtoplevel.c31
-rw-r--r--modules/other/gail/gailtoplevel.h2
-rw-r--r--modules/other/gail/gailtreeview.c16
-rw-r--r--modules/other/gail/gailtreeview.h2
-rw-r--r--modules/other/gail/gailutil.c5
-rw-r--r--modules/other/gail/gailwindow.c43
-rw-r--r--modules/other/gail/gailwindow.h2
90 files changed, 252 insertions, 1447 deletions
diff --git a/modules/other/gail/Makefile.am b/modules/other/gail/Makefile.am
index 56f27d34c..b864901e9 100644
--- a/modules/other/gail/Makefile.am
+++ b/modules/other/gail/Makefile.am
@@ -15,7 +15,6 @@ gail_c_sources = \
gailadjustment.c \
gailarrow.c \
gailbooleancell.c \
- gailbooleancellfactory.c \
gailbox.c \
gailbutton.c \
gailcalendar.c \
@@ -34,7 +33,6 @@ gail_c_sources = \
gailframe.c \
gailimage.c \
gailimagecell.c \
- gailimagecellfactory.c \
gailitem.c \
gaillabel.c \
gaillist.c \
@@ -44,7 +42,6 @@ gail_c_sources = \
gailnotebook.c \
gailnotebookpage.c \
gailobject.c \
- gailobjectfactory.c \
gailoptionmenu.c \
gailpaned.c \
gailpixmap.c \
@@ -54,7 +51,6 @@ gail_c_sources = \
gailradiosubmenuitem.c \
gailrange.c \
gailrenderercell.c \
- gailrenderercellfactory.c \
gailscale.c \
gailscrollbar.c \
gailscrolledwindow.c \
@@ -63,7 +59,6 @@ gail_c_sources = \
gailsubmenuitem.c \
gailstatusbar.c \
gailtextcell.c \
- gailtextcellfactory.c \
gailtextview.c \
gailtogglebutton.c \
gailtoplevel.c \
@@ -79,7 +74,6 @@ gail_private_h_sources = \
gailadjustment.h \
gailarrow.h \
gailbooleancell.h \
- gailbooleancellfactory.h \
gailbox.h \
gailbutton.h \
gailcalendar.h \
@@ -99,7 +93,6 @@ gail_private_h_sources = \
gailframe.h \
gailimage.h \
gailimagecell.h \
- gailimagecellfactory.h \
gailitem.h \
gaillabel.h \
gaillist.h \
@@ -109,7 +102,6 @@ gail_private_h_sources = \
gailnotebook.h \
gailnotebookpage.h \
gailobject.h \
- gailobjectfactory.h \
gailoptionmenu.h \
gailpaned.h \
gailpixmap.h \
@@ -119,7 +111,6 @@ gail_private_h_sources = \
gailradiosubmenuitem.h \
gailrange.h \
gailrenderercell.h \
- gailrenderercellfactory.h \
gailscale.h \
gailscrollbar.h \
gailscrolledwindow.h \
@@ -128,7 +119,6 @@ gail_private_h_sources = \
gailsubmenuitem.h \
gailstatusbar.h \
gailtextcell.h \
- gailtextcellfactory.h \
gailtextview.h \
gailtogglebutton.h \
gailtoplevel.h \
diff --git a/modules/other/gail/gail.c b/modules/other/gail/gail.c
index 3f3126023..66055607d 100644
--- a/modules/other/gail/gail.c
+++ b/modules/other/gail/gail.c
@@ -70,44 +70,49 @@ static guint focus_notify_handler = 0;
static guint focus_tracker_id = 0;
static GQuark quark_focus_object = 0;
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_WIDGET, gail_widget, gail_widget_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_CONTAINER, gail_container, gail_container_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_BUTTON, gail_button, gail_button_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_ITEM, gail_item, gail_item_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_MENU_ITEM, gail_menu_item, gail_menu_item_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_TOGGLE_BUTTON, gail_toggle_button, gail_toggle_button_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_IMAGE, gail_image, gail_image_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_TEXT_VIEW, gail_text_view, gail_text_view_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_COMBO, gail_combo, gail_combo_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_COMBO_BOX, gail_combo_box, gail_combo_box_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_ENTRY, gail_entry, gail_entry_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_MENU_SHELL, gail_menu_shell, gail_menu_shell_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_MENU, gail_menu, gail_menu_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_WINDOW, gail_window, gail_window_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_RANGE, gail_range, gail_range_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_SCALE, gail_scale, gail_scale_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_CLIST, gail_clist, gail_clist_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_LABEL, gail_label, gail_label_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_STATUSBAR, gail_statusbar, gail_statusbar_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_NOTEBOOK, gail_notebook, gail_notebook_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_CALENDAR, gail_calendar, gail_calendar_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_PROGRESS_BAR, gail_progress_bar, gail_progress_bar_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_SPIN_BUTTON, gail_spin_button, gail_spin_button_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_TREE_VIEW, gail_tree_view, gail_tree_view_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_FRAME, gail_frame, gail_frame_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_RADIO_BUTTON, gail_radio_button, gail_radio_button_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_ARROW, gail_arrow, gail_arrow_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_PIXMAP, gail_pixmap, gail_pixmap_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_SEPARATOR, gail_separator, gail_separator_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_BOX, gail_box, gail_box_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_SCROLLED_WINDOW, gail_scrolled_window, gail_scrolled_window_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_LIST, gail_list, gail_list_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_PANED, gail_paned, gail_paned_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_SCROLLBAR, gail_scrollbar, gail_scrollbar_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_OPTION_MENU, gail_option_menu, gail_option_menu_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_CHECK_MENU_ITEM, gail_check_menu_item, gail_check_menu_item_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_RADIO_MENU_ITEM, gail_radio_menu_item, gail_radio_menu_item_new)
-GAIL_ACCESSIBLE_FACTORY (GAIL_TYPE_EXPANDER, gail_expander, gail_expander_new)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_OBJECT, GailObject, gail_object, GTK_TYPE_OBJECT)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_WIDGET, GailWidget, gail_widget, GTK_TYPE_WIDGET)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_CONTAINER, GailContainer, gail_container, GTK_TYPE_CONTAINER)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_BUTTON, GailButton, gail_button, GTK_TYPE_BUTTON)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_ITEM, GailItem, gail_item, GTK_TYPE_ITEM)
+GAIL_IMPLEMENT_FACTORY_WITH_FUNC (GAIL_TYPE_MENU_ITEM, GailMenuItem, gail_menu_item, gail_menu_item_new)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_TOGGLE_BUTTON, GailToggleButton, gail_toggle_button, GTK_TYPE_TOGGLE_BUTTON)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_IMAGE, GailImage, gail_image, GTK_TYPE_IMAGE)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_TEXT_VIEW, GailTextView, gail_text_view, GTK_TYPE_TEXT_VIEW)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_COMBO, GailCombo, gail_combo, GTK_TYPE_COMBO)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_COMBO_BOX, GailComboBox, gail_combo_box, GTK_TYPE_COMBO_BOX)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_ENTRY, GailEntry, gail_entry, GTK_TYPE_ENTRY)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_MENU_SHELL, GailMenuShell, gail_menu_shell, GTK_TYPE_MENU_SHELL)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_MENU, GailMenu, gail_menu, GTK_TYPE_MENU)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_WINDOW, GailWindow, gail_window, GTK_TYPE_BIN)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_RANGE, GailRange, gail_range, GTK_TYPE_RANGE)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_SCALE, GailScale, gail_scale, GTK_TYPE_SCALE)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_CLIST, GailCList, gail_clist, GTK_TYPE_CLIST)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_LABEL, GailLabel, gail_label, GTK_TYPE_LABEL)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_STATUSBAR, GailStatusbar, gail_statusbar, GTK_TYPE_STATUSBAR)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_NOTEBOOK, GailNotebook, gail_notebook, GTK_TYPE_NOTEBOOK)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_CALENDAR, GailCalendar, gail_calendar, GTK_TYPE_CALENDAR)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_PROGRESS_BAR, GailProgressBar, gail_progress_bar, GTK_TYPE_PROGRESS_BAR)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_SPIN_BUTTON, GailSpinButton, gail_spin_button, GTK_TYPE_SPIN_BUTTON)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_TREE_VIEW, GailTreeView, gail_tree_view, GTK_TYPE_TREE_VIEW)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_FRAME, GailFrame, gail_frame, GTK_TYPE_FRAME)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_RADIO_BUTTON, GailRadioButton, gail_radio_button, GTK_TYPE_RADIO_BUTTON)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_ARROW, GailArrow, gail_arrow, GTK_TYPE_ARROW)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_PIXMAP, GailPixmap, gail_pixmap, GTK_TYPE_PIXMAP)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_SEPARATOR, GailSeparator, gail_separator, GTK_TYPE_SEPARATOR)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_BOX, GailBox, gail_box, GTK_TYPE_BOX)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_SCROLLED_WINDOW, GailScrolledWindow, gail_scrolled_window, GTK_TYPE_SCROLLED_WINDOW)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_LIST, GailList, gail_list, GTK_TYPE_LIST)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_PANED, GailPaned, gail_paned, GTK_TYPE_PANED)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_SCROLLBAR, GailScrollbar, gail_scrollbar, GTK_TYPE_SCROLLBAR)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_OPTION_MENU, GailOptionMenu, gail_option_menu, GTK_TYPE_OPTION_MENU)
+GAIL_IMPLEMENT_FACTORY_WITH_FUNC (GAIL_TYPE_CHECK_MENU_ITEM, GailCheckMenuItem, gail_check_menu_item, gail_check_menu_item_new)
+GAIL_IMPLEMENT_FACTORY_WITH_FUNC (GAIL_TYPE_RADIO_MENU_ITEM, GailRadioMenuItem, gail_radio_menu_item, gail_radio_menu_item_new)
+GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_EXPANDER, GailExpander, gail_expander, GTK_TYPE_EXPANDER)
+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)
+GAIL_IMPLEMENT_FACTORY_WITH_FUNC_DUMMY (GAIL_TYPE_TEXT_CELL, GailTextCell, gail_text_cell, GTK_TYPE_CELL_RENDERER_TEXT, gail_text_cell_new)
static AtkObject*
gail_get_accessible_for_widget (GtkWidget *widget,
diff --git a/modules/other/gail/gail.h b/modules/other/gail/gail.h
index 5ee6277c0..69da60a73 100644
--- a/modules/other/gail/gail.h
+++ b/modules/other/gail/gail.h
@@ -1,7 +1,6 @@
#include <gail/gailadjustment.h>
#include <gail/gailarrow.h>
#include <gail/gailbooleancell.h>
-#include <gail/gailbooleancellfactory.h>
#include <gail/gailbox.h>
#include <gail/gailbutton.h>
#include <gail/gailcalendar.h>
@@ -18,7 +17,6 @@
#include <gail/gailframe.h>
#include <gail/gailimage.h>
#include <gail/gailimagecell.h>
-#include <gail/gailimagecellfactory.h>
#include <gail/gailitem.h>
#include <gail/gaillabel.h>
#include <gail/gaillist.h>
@@ -27,7 +25,6 @@
#include <gail/gailmenuitem.h>
#include <gail/gailnotebook.h>
#include <gail/gailobject.h>
-#include <gail/gailobjectfactory.h>
#include <gail/gailoptionmenu.h>
#include <gail/gailpaned.h>
#include <gail/gailpixmap.h>
@@ -35,7 +32,6 @@
#include <gail/gailradiobutton.h>
#include <gail/gailradiomenuitem.h>
#include <gail/gailrenderercell.h>
-#include <gail/gailrenderercellfactory.h>
#include <gail/gailrange.h>
#include <gail/gailscale.h>
#include <gail/gailscrollbar.h>
@@ -44,7 +40,6 @@
#include <gail/gailspinbutton.h>
#include <gail/gailstatusbar.h>
#include <gail/gailtextcell.h>
-#include <gail/gailtextcellfactory.h>
#include <gail/gailtextview.h>
#include <gail/gailtogglebutton.h>
#include <gail/gailtoplevel.h>
diff --git a/modules/other/gail/gailadjustment.c b/modules/other/gail/gailadjustment.c
index a22aa9f6c..44df311f5 100644
--- a/modules/other/gail/gailadjustment.c
+++ b/modules/other/gail/gailadjustment.c
@@ -70,8 +70,6 @@ gail_adjustment_new (GtkAdjustment *adjustment)
object = g_object_new (GAIL_TYPE_ADJUSTMENT, NULL);
- g_return_val_if_fail (object != NULL, NULL);
-
atk_object = ATK_OBJECT (object);
atk_object_initialize (atk_object, adjustment);
diff --git a/modules/other/gail/gailarrow.c b/modules/other/gail/gailarrow.c
index bece54bb7..fc1c72c6f 100644
--- a/modules/other/gail/gailarrow.c
+++ b/modules/other/gail/gailarrow.c
@@ -24,6 +24,8 @@
static void gail_arrow_class_init (GailArrowClass *klass);
static void gail_arrow_init (GailArrow *arrow);
+static void gail_arrow_initialize (AtkObject *accessible,
+ gpointer data);
/* AtkImage */
static void atk_image_interface_init (AtkImageIface *iface);
@@ -41,6 +43,9 @@ static void
gail_arrow_class_init (GailArrowClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
+
+ atk_object_class->initialize = gail_arrow_initialize;
gobject_class->finalize = gail_arrow_finalize;
}
@@ -51,21 +56,13 @@ gail_arrow_init (GailArrow *arrow)
arrow->image_description = NULL;
}
-AtkObject*
-gail_arrow_new (GtkWidget *widget)
+static void
+gail_arrow_initialize (AtkObject *accessible,
+ gpointer data)
{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_ARROW (widget), NULL);
+ ATK_OBJECT_CLASS (gail_arrow_parent_class)->initialize (accessible, data);
- object = g_object_new (GAIL_TYPE_ARROW, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
accessible->role = ATK_ROLE_ICON;
-
- return accessible;
}
static void
diff --git a/modules/other/gail/gailarrow.h b/modules/other/gail/gailarrow.h
index b1e7fb272..7d58d78cf 100644
--- a/modules/other/gail/gailarrow.h
+++ b/modules/other/gail/gailarrow.h
@@ -51,8 +51,6 @@ struct _GailArrowClass
GailWidgetClass parent_class;
};
-AtkObject* gail_arrow_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailbooleancellfactory.c b/modules/other/gail/gailbooleancellfactory.c
deleted file mode 100644
index fb003a7b2..000000000
--- a/modules/other/gail/gailbooleancellfactory.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* GAIL - The GNOME Accessibility Enabling 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 Lesser 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <gtk/gtkcellrenderertoggle.h>
-#include "gailbooleancellfactory.h"
-#include "gailbooleancell.h"
-
-static void gail_boolean_cell_factory_class_init (GailBooleanCellFactoryClass *klass);
-
-static AtkObject* gail_boolean_cell_factory_create_accessible (
- GObject *obj);
-static GType gail_boolean_cell_factory_get_accessible_type (void);
-
-GType
-gail_boolean_cell_factory_get_type (void)
-{
- static GType type = 0;
-
- if (!type)
- {
- static const GTypeInfo tinfo =
- {
- sizeof (GailBooleanCellFactoryClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) gail_boolean_cell_factory_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (GailBooleanCellFactory), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
- type = g_type_register_static (ATK_TYPE_OBJECT_FACTORY,
- "GailBooleanCellFactory" , &tinfo, 0);
- }
-
- return type;
-}
-
-static void
-gail_boolean_cell_factory_class_init (GailBooleanCellFactoryClass *klass)
-{
- AtkObjectFactoryClass *class = ATK_OBJECT_FACTORY_CLASS (klass);
-
- class->create_accessible = gail_boolean_cell_factory_create_accessible;
- class->get_accessible_type = gail_boolean_cell_factory_get_accessible_type;
-}
-
-static AtkObject*
-gail_boolean_cell_factory_create_accessible (GObject *obj)
-{
- g_return_val_if_fail (GTK_IS_CELL_RENDERER_TOGGLE (obj), NULL);
-
- return gail_boolean_cell_new ();
-}
-
-static GType
-gail_boolean_cell_factory_get_accessible_type (void)
-{
- return GAIL_TYPE_BOOLEAN_CELL;
-}
diff --git a/modules/other/gail/gailbooleancellfactory.h b/modules/other/gail/gailbooleancellfactory.h
deleted file mode 100644
index fca9c058d..000000000
--- a/modules/other/gail/gailbooleancellfactory.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* GAIL - The GNOME Accessibility Enabling 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, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GAIL_BOOLEAN_CELL_FACTORY_H__
-#define __GAIL_BOOLEAN_CELL_FACTORY_H__
-
-#include <atk/atkobjectfactory.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define GAIL_TYPE_BOOLEAN_CELL_FACTORY (gail_boolean_cell_factory_get_type ())
-#define GAIL_BOOLEAN_CELL_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAIL_TYPE_BOOLEAN_CELL_FACTORY, GailBooleanCellFactory))
-#define GAIL_BOOLEAN_CELL_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AGTK_TYPE_BOOLEAN_CELL_FACTORY, GailBooleanCellFactoryClass))
-#define GAIL_IS_BOOLEAN_CELL_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAIL_TYPE_BOOLEAN_CELL_FACTORY))
-#define GAIL_IS_BOOLEAN_CELL_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAIL_TYPE_BOOLEAN_CELL_FACTORY))
-#define GAIL_BOOLEAN_CELL_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIL_TYPE_BOOLEAN_CELL_FACTORY, GailBooleanCellFactoryClass))
-
-typedef struct _GailBooleanCellFactory GailBooleanCellFactory;
-typedef struct _GailBooleanCellFactoryClass GailBooleanCellFactoryClass;
-
-struct _GailBooleanCellFactory
-{
- AtkObjectFactory parent;
-};
-
-struct _GailBooleanCellFactoryClass
-{
- AtkObjectFactoryClass parent_class;
-};
-
-GType gail_boolean_cell_factory_get_type(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __GAIL_BOOLEAN_CELL_FACTORY_H__ */
diff --git a/modules/other/gail/gailbox.c b/modules/other/gail/gailbox.c
index 80c674b69..a087a7564 100644
--- a/modules/other/gail/gailbox.c
+++ b/modules/other/gail/gailbox.c
@@ -24,6 +24,8 @@
static void gail_box_class_init (GailBoxClass *klass);
static void gail_box_init (GailBox *box);
+static void gail_box_initialize (AtkObject *accessible,
+ gpointer data);
static AtkStateSet* gail_box_ref_state_set (AtkObject *accessible);
G_DEFINE_TYPE (GailBox, gail_box, GAIL_TYPE_CONTAINER)
@@ -33,6 +35,7 @@ gail_box_class_init (GailBoxClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
+ class->initialize = gail_box_initialize;
class->ref_state_set = gail_box_ref_state_set;
}
@@ -41,22 +44,13 @@ gail_box_init (GailBox *box)
{
}
-AtkObject*
-gail_box_new (GtkWidget *widget)
+static void
+gail_box_initialize (AtkObject *accessible,
+ gpointer data)
{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_BOX (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_BOX, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
+ ATK_OBJECT_CLASS (gail_box_parent_class)->initialize (accessible, data);
accessible->role = ATK_ROLE_FILLER;
-
- return accessible;
}
static AtkStateSet*
diff --git a/modules/other/gail/gailbox.h b/modules/other/gail/gailbox.h
index 17c00ece0..64a90dd65 100644
--- a/modules/other/gail/gailbox.h
+++ b/modules/other/gail/gailbox.h
@@ -49,8 +49,6 @@ struct _GailBoxClass
GailContainerClass parent_class;
};
-AtkObject* gail_box_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailbutton.c b/modules/other/gail/gailbutton.c
index 86ce14c71..c2b8e8c70 100644
--- a/modules/other/gail/gailbutton.c
+++ b/modules/other/gail/gailbutton.c
@@ -184,22 +184,6 @@ gail_button_init (GailButton *button)
button->textutil = NULL;
}
-AtkObject*
-gail_button_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_BUTTON (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_BUTTON, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static G_CONST_RETURN gchar*
gail_button_get_name (AtkObject *obj)
{
diff --git a/modules/other/gail/gailbutton.h b/modules/other/gail/gailbutton.h
index 2550af921..7f3c30a76 100644
--- a/modules/other/gail/gailbutton.h
+++ b/modules/other/gail/gailbutton.h
@@ -67,8 +67,6 @@ struct _GailButtonClass
GailContainerClass parent_class;
};
-AtkObject* gail_button_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailcalendar.c b/modules/other/gail/gailcalendar.c
index 1d739b8be..0711b00e5 100644
--- a/modules/other/gail/gailcalendar.c
+++ b/modules/other/gail/gailcalendar.c
@@ -24,12 +24,17 @@
static void gail_calendar_class_init (GailCalendarClass *klass);
static void gail_calendar_init (GailCalendar *calendar);
+static void gail_calendar_initialize (AtkObject *accessible,
+ gpointer data);
G_DEFINE_TYPE (GailCalendar, gail_calendar, GAIL_TYPE_WIDGET)
static void
gail_calendar_class_init (GailCalendarClass *klass)
{
+ AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
+
+ atk_object_class->initialize = gail_calendar_initialize;
}
static void
@@ -37,20 +42,11 @@ gail_calendar_init (GailCalendar *calendar)
{
}
-AtkObject*
-gail_calendar_new (GtkWidget *widget)
+static void
+gail_calendar_initialize (AtkObject *accessible,
+ gpointer data)
{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_CALENDAR (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_CALENDAR, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
+ ATK_OBJECT_CLASS (gail_calendar_parent_class)->initialize (accessible, data);
accessible->role = ATK_ROLE_CALENDAR;
-
- return accessible;
}
diff --git a/modules/other/gail/gailcalendar.h b/modules/other/gail/gailcalendar.h
index 568f4c478..ef6290b7c 100644
--- a/modules/other/gail/gailcalendar.h
+++ b/modules/other/gail/gailcalendar.h
@@ -49,8 +49,6 @@ struct _GailCalendarClass
GailWidgetClass parent_class;
};
-AtkObject* gail_calendar_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailclist.c b/modules/other/gail/gailclist.c
index 1c624c8f4..93e19dceb 100644
--- a/modules/other/gail/gailclist.c
+++ b/modules/other/gail/gailclist.c
@@ -287,24 +287,6 @@ gail_clist_init (GailCList *clist)
{
}
-AtkObject*
-gail_clist_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_CLIST (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_CLIST, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- accessible->role = ATK_ROLE_TABLE;
-
- return accessible;
-}
-
static void
gail_clist_real_initialize (AtkObject *obj,
gpointer data)
@@ -315,6 +297,8 @@ gail_clist_real_initialize (AtkObject *obj,
ATK_OBJECT_CLASS (gail_clist_parent_class)->initialize (obj, data);
+ obj->role = ATK_ROLE_TABLE;
+
clist = GAIL_CLIST (obj);
clist->caption = NULL;
diff --git a/modules/other/gail/gailclist.h b/modules/other/gail/gailclist.h
index 92d1df692..d7b65a3e1 100644
--- a/modules/other/gail/gailclist.h
+++ b/modules/other/gail/gailclist.h
@@ -62,8 +62,6 @@ struct _GailCListClass
GailContainerClass parent_class;
};
-AtkObject* gail_clist_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailcombo.c b/modules/other/gail/gailcombo.c
index d96eef233..ccad01445 100644
--- a/modules/other/gail/gailcombo.c
+++ b/modules/other/gail/gailcombo.c
@@ -91,22 +91,6 @@ gail_combo_init (GailCombo *combo)
combo->select_idle_handler = 0;
}
-AtkObject*
-gail_combo_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_COMBO (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_COMBO, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static void
gail_combo_real_initialize (AtkObject *obj,
gpointer data)
diff --git a/modules/other/gail/gailcombo.h b/modules/other/gail/gailcombo.h
index c3e99c772..6d99e7363 100644
--- a/modules/other/gail/gailcombo.h
+++ b/modules/other/gail/gailcombo.h
@@ -57,8 +57,6 @@ struct _GailComboClass
GailContainerClass parent_class;
};
-AtkObject* gail_combo_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailcombobox.c b/modules/other/gail/gailcombobox.c
index 6b90cbfcd..f56f7cd64 100644
--- a/modules/other/gail/gailcombobox.c
+++ b/modules/other/gail/gailcombobox.c
@@ -90,22 +90,6 @@ gail_combo_box_init (GailComboBox *combo_box)
combo_box->popup_set = FALSE;
}
-AtkObject*
-gail_combo_box_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_COMBO_BOX (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_COMBO_BOX, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static void
gail_combo_box_real_initialize (AtkObject *obj,
gpointer data)
diff --git a/modules/other/gail/gailcombobox.h b/modules/other/gail/gailcombobox.h
index f9307296d..8de7d5589 100644
--- a/modules/other/gail/gailcombobox.h
+++ b/modules/other/gail/gailcombobox.h
@@ -58,8 +58,6 @@ struct _GailComboBoxClass
GailContainerClass parent_class;
};
-AtkObject* gail_combo_box_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailcontainer.c b/modules/other/gail/gailcontainer.c
index aa7bc102b..486d07239 100644
--- a/modules/other/gail/gailcontainer.c
+++ b/modules/other/gail/gailcontainer.c
@@ -70,23 +70,7 @@ gail_container_init (GailContainer *container)
container->children = NULL;
}
-AtkObject*
-gail_container_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_CONTAINER (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_CONTAINER, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
-static gint
+static gint
gail_container_get_n_children (AtkObject* obj)
{
GtkWidget *widget;
diff --git a/modules/other/gail/gailcontainer.h b/modules/other/gail/gailcontainer.h
index 6f0f61954..fab2e5573 100644
--- a/modules/other/gail/gailcontainer.h
+++ b/modules/other/gail/gailcontainer.h
@@ -62,8 +62,6 @@ struct _GailContainerClass
gpointer data);
};
-AtkObject* gail_container_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailentry.c b/modules/other/gail/gailentry.c
index c45e2e1f1..7d0ff6381 100644
--- a/modules/other/gail/gailentry.c
+++ b/modules/other/gail/gailentry.c
@@ -348,22 +348,6 @@ gail_entry_finalize (GObject *object)
G_OBJECT_CLASS (gail_entry_parent_class)->finalize (object);
}
-AtkObject*
-gail_entry_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_ENTRY (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_ENTRY, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static gint
gail_entry_get_index_in_parent (AtkObject *accessible)
{
diff --git a/modules/other/gail/gailentry.h b/modules/other/gail/gailentry.h
index 1fa332f1c..aeed8456f 100644
--- a/modules/other/gail/gailentry.h
+++ b/modules/other/gail/gailentry.h
@@ -68,8 +68,6 @@ struct _GailEntryClass
GailWidgetClass parent_class;
};
-AtkObject* gail_entry_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailexpander.c b/modules/other/gail/gailexpander.c
index 006e95f87..d8e8450e9 100644
--- a/modules/other/gail/gailexpander.c
+++ b/modules/other/gail/gailexpander.c
@@ -144,22 +144,6 @@ gail_expander_init (GailExpander *expander)
expander->textutil = NULL;
}
-AtkObject*
-gail_expander_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_EXPANDER (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_EXPANDER, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static G_CONST_RETURN gchar*
gail_expander_get_name (AtkObject *obj)
{
diff --git a/modules/other/gail/gailexpander.h b/modules/other/gail/gailexpander.h
index a1e8c29d0..94644c551 100644
--- a/modules/other/gail/gailexpander.h
+++ b/modules/other/gail/gailexpander.h
@@ -56,8 +56,6 @@ struct _GailExpanderClass
GailContainerClass parent_class;
};
-AtkObject* gail_expander_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailfactory.h b/modules/other/gail/gailfactory.h
index 0ea4dbac4..453ccfd06 100644
--- a/modules/other/gail/gailfactory.h
+++ b/modules/other/gail/gailfactory.h
@@ -1,5 +1,7 @@
/* GAIL - The GNOME Accessibility Implementation Library
* Copyright 2002 Sun Microsystems Inc.
+ * Copyright (C) 1998-1999, 2000-2001 Tim Janik and Red Hat, Inc.
+ * Copyright (C) 2007 Christian Persch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -23,60 +25,83 @@
#include <glib-object.h>
#include <atk/atkobject.h>
-#define GAIL_ACCESSIBLE_FACTORY(type, type_as_function, opt_create_accessible) \
- \
-static GType \
-type_as_function ## _factory_get_accessible_type (void) \
-{ \
- return type; \
-} \
- \
-static AtkObject* \
-type_as_function ## _factory_create_accessible (GObject *obj) \
-{ \
- GtkWidget *widget; \
- AtkObject *accessible; \
- \
- g_return_val_if_fail (GTK_IS_WIDGET (obj), NULL); \
- \
- widget = GTK_WIDGET (obj); \
- \
- accessible = opt_create_accessible (widget); \
- \
- return accessible; \
-} \
- \
-static void \
-type_as_function ## _factory_class_init (AtkObjectFactoryClass *klass) \
-{ \
- klass->create_accessible = type_as_function ## _factory_create_accessible; \
- klass->get_accessible_type = type_as_function ## _factory_get_accessible_type;\
-} \
- \
-static GType \
-type_as_function ## _factory_get_type (void) \
-{ \
- static GType t = 0; \
- \
- if (!t) \
- { \
- char *name; \
- static const GTypeInfo tinfo = \
- { \
- sizeof (AtkObjectFactoryClass), \
- NULL, NULL, (GClassInitFunc) type_as_function ## _factory_class_init, \
- NULL, NULL, sizeof (AtkObjectFactory), 0, NULL, NULL \
- }; \
- \
- name = g_strconcat (g_type_name (type), "Factory", NULL); \
- t = g_type_register_static ( \
- ATK_TYPE_OBJECT_FACTORY, name, &tinfo, 0); \
- g_free (name); \
- } \
- \
- return t; \
+#define _GAIL_IMPLEMENT_FACTORY_CREATE_ACCESSIBLE(GAIL_TYPE, TYPE) \
+{ \
+ AtkObject *accessible; \
+\
+ g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (object, TYPE), NULL); \
+\
+ accessible = g_object_new (GAIL_TYPE, NULL); \
+ atk_object_initialize (accessible, object); \
+\
+ return accessible; \
}
+#define _GAIL_IMPLEMENT_FACTORY_BEGIN(GAIL_TYPE, TypeName, type_name) \
+\
+static GType \
+type_name##_factory_get_accessible_type (void) \
+{ \
+ return GAIL_TYPE; \
+} \
+\
+static AtkObject* \
+type_name##_factory_create_accessible (GObject *object) \
+{
+
+#define _GAIL_IMPLEMENT_FACTORY_END(GAIL_TYPE, TypeName, type_name) \
+} \
+\
+static void \
+type_name##_factory_class_init (AtkObjectFactoryClass *klass) \
+{ \
+ klass->create_accessible = type_name ## _factory_create_accessible; \
+ klass->get_accessible_type = type_name ## _factory_get_accessible_type;\
+} \
+\
+GType \
+type_name##_factory_get_type (void) \
+{ \
+ static volatile gsize g_define_type_id__volatile = 0; \
+ if (g_once_init_enter (&g_define_type_id__volatile)) \
+ { \
+ GType g_define_type_id = \
+ g_type_register_static_simple (ATK_TYPE_OBJECT_FACTORY, \
+ g_intern_static_string (#TypeName "Factory"), \
+ sizeof (AtkObjectFactoryClass), \
+ (GClassInitFunc) type_name##_factory_class_init, \
+ sizeof (AtkObjectFactory), \
+ (GInstanceInitFunc) NULL, \
+ (GTypeFlags) 0); \
+ g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \
+ } \
+ return g_define_type_id__volatile; \
+}
+
+/* Implements a AtkObjectFactory creating accessibles of type
+ * @GAIL_TYPE for objects of type @TYPE.
+ */
+#define GAIL_IMPLEMENT_FACTORY(GAIL_TYPE, TypeName, type_name, TYPE) \
+_GAIL_IMPLEMENT_FACTORY_BEGIN (GAIL_TYPE, TypeName, type_name) \
+_GAIL_IMPLEMENT_FACTORY_CREATE_ACCESSIBLE (GAIL_TYPE, TYPE) \
+_GAIL_IMPLEMENT_FACTORY_END (GAIL_TYPE, TypeName, type_name)
+
+/* Implements a AtkObjectFactory creating accessibles of type
+ * @GAIL_TYPE with creation func @create_accessible.
+ */
+#define GAIL_IMPLEMENT_FACTORY_WITH_FUNC(GAIL_TYPE, TypeName, type_name, create_accessible) \
+_GAIL_IMPLEMENT_FACTORY_BEGIN (GAIL_TYPE, TypeName, type_name) \
+{ return create_accessible (GTK_WIDGET (object)); } \
+_GAIL_IMPLEMENT_FACTORY_END (GAIL_TYPE, TypeName, type_name)
+
+#define GAIL_IMPLEMENT_FACTORY_WITH_FUNC_DUMMY(GAIL_TYPE, TypeName, type_name, TYPE, create_accessible) \
+_GAIL_IMPLEMENT_FACTORY_BEGIN (GAIL_TYPE, TypeName, type_name) \
+{ \
+ g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (object, TYPE), NULL);\
+ return create_accessible (); \
+} \
+_GAIL_IMPLEMENT_FACTORY_END (GAIL_TYPE, TypeName, type_name)
+
#define GAIL_WIDGET_SET_FACTORY(widget_type, type_as_function) \
atk_registry_set_factory_type (atk_get_default_registry (), \
widget_type, \
diff --git a/modules/other/gail/gailframe.c b/modules/other/gail/gailframe.c
index ad82be6e5..2182fd0a0 100644
--- a/modules/other/gail/gailframe.c
+++ b/modules/other/gail/gailframe.c
@@ -25,6 +25,8 @@
static void gail_frame_class_init (GailFrameClass *klass);
static void gail_frame_init (GailFrame *frame);
+static void gail_frame_initialize (AtkObject *accessible,
+ gpointer data);
static G_CONST_RETURN gchar* gail_frame_get_name (AtkObject *obj);
G_DEFINE_TYPE (GailFrame, gail_frame, GAIL_TYPE_CONTAINER)
@@ -34,6 +36,7 @@ gail_frame_class_init (GailFrameClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
+ class->initialize = gail_frame_initialize;
class->get_name = gail_frame_get_name;
}
@@ -42,22 +45,13 @@ gail_frame_init (GailFrame *frame)
{
}
-AtkObject*
-gail_frame_new (GtkWidget *widget)
+static void
+gail_frame_initialize (AtkObject *accessible,
+ gpointer data)
{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_FRAME (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_FRAME, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
+ ATK_OBJECT_CLASS (gail_frame_parent_class)->initialize (accessible, data);
accessible->role = ATK_ROLE_PANEL;
-
- return accessible;
}
static G_CONST_RETURN gchar*
diff --git a/modules/other/gail/gailframe.h b/modules/other/gail/gailframe.h
index 142c8deb7..4977ea04b 100644
--- a/modules/other/gail/gailframe.h
+++ b/modules/other/gail/gailframe.h
@@ -50,8 +50,6 @@ struct _GailFrameClass
GailContainerClass parent_class;
};
-AtkObject* gail_frame_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailhtmlbox.c b/modules/other/gail/gailhtmlbox.c
index ed988a1f5..5b2e59758 100644
--- a/modules/other/gail/gailhtmlbox.c
+++ b/modules/other/gail/gailhtmlbox.c
@@ -56,27 +56,16 @@ gail_html_box_class_init (GailHtmlBoxClass *klass)
class->initialize = gail_html_box_initialize;
}
-AtkObject*
-gail_html_box_new (GObject *obj)
-{
- GObject *object;
- AtkObject *atk_object;
-
- g_return_val_if_fail (HTML_IS_BOX (obj), NULL);
- object = g_object_new (GAIL_TYPE_HTML_BOX, NULL);
- atk_object = ATK_OBJECT (object);
- atk_object_initialize (atk_object, obj);
- atk_object->role = ATK_ROLE_UNKNOWN;
- return atk_object;
-}
-
static void
gail_html_box_initialize (AtkObject *obj,
gpointer data)
{
HtmlBox *box;
+
ATK_OBJECT_CLASS (gail_html_box_parent_class)->initialize (obj, data);
+ obj->role = ATK_ROLE_UNKNOWN;
+
box = HTML_BOX (data);
/*
diff --git a/modules/other/gail/gailhtmlbox.h b/modules/other/gail/gailhtmlbox.h
index bf2200bbb..c03215be7 100644
--- a/modules/other/gail/gailhtmlbox.h
+++ b/modules/other/gail/gailhtmlbox.h
@@ -48,8 +48,6 @@ struct _GailHtmlBoxClass
GType gail_html_box_get_type (void);
-AtkObject* gail_html_box_new (GObject *obj);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailimage.c b/modules/other/gail/gailimage.c
index a2bed63de..bb9b40ce3 100644
--- a/modules/other/gail/gailimage.c
+++ b/modules/other/gail/gailimage.c
@@ -25,6 +25,8 @@
static void gail_image_class_init (GailImageClass *klass);
static void gail_image_init (GailImage *image);
+static void gail_image_initialize (AtkObject *accessible,
+ gpointer data);
static G_CONST_RETURN gchar* gail_image_get_name (AtkObject *accessible);
@@ -53,6 +55,7 @@ gail_image_class_init (GailImageClass *klass)
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
gobject_class->finalize = gail_image_finalize;
+ class->initialize = gail_image_initialize;
class->get_name = gail_image_get_name;
}
@@ -62,22 +65,13 @@ gail_image_init (GailImage *image)
image->image_description = NULL;
}
-AtkObject*
-gail_image_new (GtkWidget *widget)
+static void
+gail_image_initialize (AtkObject *accessible,
+ gpointer data)
{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_IMAGE (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_IMAGE, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
+ ATK_OBJECT_CLASS (gail_image_parent_class)->initialize (accessible, data);
accessible->role = ATK_ROLE_ICON;
-
- return accessible;
}
/* Copied from gtktoolbar.c, keep in sync */
diff --git a/modules/other/gail/gailimage.h b/modules/other/gail/gailimage.h
index f13b64d07..6221fc041 100644
--- a/modules/other/gail/gailimage.h
+++ b/modules/other/gail/gailimage.h
@@ -52,8 +52,6 @@ struct _GailImageClass
GailWidgetClass parent_class;
};
-AtkObject* gail_image_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailimagecellfactory.c b/modules/other/gail/gailimagecellfactory.c
deleted file mode 100644
index e336e811e..000000000
--- a/modules/other/gail/gailimagecellfactory.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/* GAIL - The GNOME Accessibility Enabling 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 Lesser 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <gtk/gtkcellrendererpixbuf.h>
-#include "gailimagecellfactory.h"
-#include "gailimagecell.h"
-
-static void gail_image_cell_factory_class_init (GailImageCellFactoryClass *klass);
-
-static AtkObject* gail_image_cell_factory_create_accessible (
- GObject *obj);
-
-static GType gail_image_cell_factory_get_accessible_type (void);
-
-GType
-gail_image_cell_factory_get_type (void)
-{
- static GType type = 0;
-
- if (!type)
- {
- static const GTypeInfo tinfo =
- {
- sizeof (GailImageCellFactoryClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) gail_image_cell_factory_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (GailImageCellFactory), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
- type = g_type_register_static (ATK_TYPE_OBJECT_FACTORY,
- "GailImageCellFactory" , &tinfo, 0);
- }
-
- return type;
-}
-
-static void
-gail_image_cell_factory_class_init (GailImageCellFactoryClass *klass)
-{
- AtkObjectFactoryClass *class = ATK_OBJECT_FACTORY_CLASS (klass);
-
- class->create_accessible = gail_image_cell_factory_create_accessible;
- class->get_accessible_type = gail_image_cell_factory_get_accessible_type;
-}
-
-static AtkObject*
-gail_image_cell_factory_create_accessible (GObject *obj)
-{
- g_return_val_if_fail (GTK_IS_CELL_RENDERER_PIXBUF (obj), NULL);
-
- return gail_image_cell_new ();
-}
-
-static GType
-gail_image_cell_factory_get_accessible_type (void)
-{
- return GAIL_TYPE_IMAGE_CELL;
-}
diff --git a/modules/other/gail/gailimagecellfactory.h b/modules/other/gail/gailimagecellfactory.h
deleted file mode 100644
index adf3fd29d..000000000
--- a/modules/other/gail/gailimagecellfactory.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* GAIL - The GNOME Accessibility Enabling 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, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GAIL_IMAGE_CELL_FACTORY_H__
-#define __GAIL_IMAGE_CELL_FACTORY_H__
-
-#include <atk/atkobjectfactory.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define GAIL_TYPE_IMAGE_CELL_FACTORY (gail_image_cell_factory_get_type ())
-#define GAIL_IMAGE_CELL_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAIL_TYPE_IMAGE_CELL_FACTORY, GailImageCellFactory))
-#define GAIL_IMAGE_CELL_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AGTK_TYPE_IMAGE_CELL_FACTORY, GailImageCellFactoryClass))
-#define GAIL_IS_IMAGE_CELL_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAIL_TYPE_IMAGE_CELL_FACTORY))
-#define GAIL_IS_IMAGE_CELL_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAIL_TYPE_IMAGE_CELL_FACTORY))
-#define GAIL_IMAGE_CELL_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIL_TYPE_IMAGE_CELL_FACTORY, GailImageCellFactoryClass))
-
-typedef struct _GailImageCellFactory GailImageCellFactory;
-typedef struct _GailImageCellFactoryClass GailImageCellFactoryClass;
-
-struct _GailImageCellFactory
-{
- AtkObjectFactory parent;
-};
-
-struct _GailImageCellFactoryClass
-{
- AtkObjectFactoryClass parent_class;
-};
-
-GType gail_image_cell_factory_get_type(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __GAIL_IMAGE_CELL_FACTORY_H__ */
diff --git a/modules/other/gail/gailitem.c b/modules/other/gail/gailitem.c
index 7306b4c9b..33bd311e7 100644
--- a/modules/other/gail/gailitem.c
+++ b/modules/other/gail/gailitem.c
@@ -116,22 +116,6 @@ gail_item_init (GailItem *item)
{
}
-AtkObject*
-gail_item_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_ITEM (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_ITEM, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static void
gail_item_real_initialize (AtkObject *obj,
gpointer data)
diff --git a/modules/other/gail/gailitem.h b/modules/other/gail/gailitem.h
index 18e49461f..447ea38cb 100644
--- a/modules/other/gail/gailitem.h
+++ b/modules/other/gail/gailitem.h
@@ -54,8 +54,6 @@ struct _GailItemClass
GailContainerClass parent_class;
};
-AtkObject* gail_item_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gaillabel.c b/modules/other/gail/gaillabel.c
index f912fb463..a54d637c4 100644
--- a/modules/other/gail/gaillabel.c
+++ b/modules/other/gail/gaillabel.c
@@ -208,22 +208,6 @@ gail_label_init_text_util (GailLabel *gail_label,
gail_label->label_length = g_utf8_strlen (label_text, -1);
}
-AtkObject*
-gail_label_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_LABEL (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_LABEL, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static void
notify_name_change (AtkObject *atk_obj)
{
diff --git a/modules/other/gail/gaillabel.h b/modules/other/gail/gaillabel.h
index 3c927c44a..c3acf06ff 100644
--- a/modules/other/gail/gaillabel.h
+++ b/modules/other/gail/gaillabel.h
@@ -57,8 +57,6 @@ struct _GailLabelClass
GailWidgetClass parent_class;
};
-AtkObject* gail_label_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gaillist.c b/modules/other/gail/gaillist.c
index 24097e6ed..de6160d67 100644
--- a/modules/other/gail/gaillist.c
+++ b/modules/other/gail/gaillist.c
@@ -27,6 +27,9 @@ static void gail_list_class_init (GailListClass *klass);
static void gail_list_init (GailList *list);
+static void gail_list_initialize (AtkObject *accessible,
+ gpointer data);
+
static gint gail_list_get_index_in_parent (AtkObject *accessible);
static void atk_selection_interface_init (AtkSelectionIface *iface);
@@ -50,6 +53,7 @@ gail_list_class_init (GailListClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
+ class->initialize = gail_list_initialize;
class->get_index_in_parent = gail_list_get_index_in_parent;
}
@@ -58,22 +62,13 @@ gail_list_init (GailList *list)
{
}
-AtkObject*
-gail_list_new (GtkWidget *widget)
+static void
+gail_list_initialize (AtkObject *accessible,
+ gpointer data)
{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_LIST (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_LIST, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
+ ATK_OBJECT_CLASS (gail_list_parent_class)->initialize (accessible, data);
accessible->role = ATK_ROLE_LIST;
-
- return accessible;
}
static gint
diff --git a/modules/other/gail/gaillist.h b/modules/other/gail/gaillist.h
index cd57874bb..e937a10fa 100644
--- a/modules/other/gail/gaillist.h
+++ b/modules/other/gail/gaillist.h
@@ -49,8 +49,6 @@ struct _GailListClass
GailContainerClass parent_class;
};
-AtkObject* gail_list_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailmenu.c b/modules/other/gail/gailmenu.c
index d18a115ef..57de76d68 100644
--- a/modules/other/gail/gailmenu.c
+++ b/modules/other/gail/gailmenu.c
@@ -51,24 +51,6 @@ gail_menu_init (GailMenu *accessible)
{
}
-AtkObject*
-gail_menu_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_MENU (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_MENU, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- g_object_set_data (G_OBJECT (accessible), "atk-component-layer",
- GINT_TO_POINTER (ATK_LAYER_POPUP));
- return accessible;
-}
-
static void
gail_menu_real_initialize (AtkObject *obj,
gpointer data)
@@ -76,6 +58,9 @@ gail_menu_real_initialize (AtkObject *obj,
ATK_OBJECT_CLASS (gail_menu_parent_class)->initialize (obj, data);
obj->role = ATK_ROLE_MENU;
+
+ g_object_set_data (G_OBJECT (obj), "atk-component-layer",
+ GINT_TO_POINTER (ATK_LAYER_POPUP));
}
static AtkObject*
diff --git a/modules/other/gail/gailmenu.h b/modules/other/gail/gailmenu.h
index 5c1c5f9e7..3ce04157f 100644
--- a/modules/other/gail/gailmenu.h
+++ b/modules/other/gail/gailmenu.h
@@ -50,8 +50,6 @@ struct _GailMenuClass
GailMenuShellClass parent_class;
};
-AtkObject* gail_menu_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailmenushell.c b/modules/other/gail/gailmenushell.c
index 34ff98b54..0fe91f447 100644
--- a/modules/other/gail/gailmenushell.c
+++ b/modules/other/gail/gailmenushell.c
@@ -24,6 +24,8 @@
static void gail_menu_shell_class_init (GailMenuShellClass *klass);
static void gail_menu_shell_init (GailMenuShell *menu_shell);
+static void gail_menu_shell_initialize (AtkObject *accessible,
+ gpointer data);
static void atk_selection_interface_init (AtkSelectionIface *iface);
static gboolean gail_menu_shell_add_selection (AtkSelection *selection,
gint i);
@@ -42,6 +44,9 @@ G_DEFINE_TYPE_WITH_CODE (GailMenuShell, gail_menu_shell, GAIL_TYPE_CONTAINER,
static void
gail_menu_shell_class_init (GailMenuShellClass *klass)
{
+ AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
+
+ atk_object_class->initialize = gail_menu_shell_initialize;
}
static void
@@ -49,28 +54,19 @@ gail_menu_shell_init (GailMenuShell *menu_shell)
{
}
-AtkObject*
-gail_menu_shell_new (GtkWidget *widget)
+static void
+gail_menu_shell_initialize (AtkObject *accessible,
+ gpointer data)
{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_MENU_SHELL (widget), NULL);
+ ATK_OBJECT_CLASS (gail_menu_shell_parent_class)->initialize (accessible, data);
- object = g_object_new (GAIL_TYPE_MENU_SHELL, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- if (GTK_IS_MENU_BAR (widget))
+ if (GTK_IS_MENU_BAR (data))
accessible->role = ATK_ROLE_MENU_BAR;
else
/*
* Accessible object for Menu is created in gailmenu.c
*/
accessible->role = ATK_ROLE_UNKNOWN;
-
- return accessible;
}
static void
diff --git a/modules/other/gail/gailmenushell.h b/modules/other/gail/gailmenushell.h
index a44aa884e..0c099a051 100644
--- a/modules/other/gail/gailmenushell.h
+++ b/modules/other/gail/gailmenushell.h
@@ -50,8 +50,6 @@ struct _GailMenuShellClass
GailContainerClass parent_class;
};
-AtkObject* gail_menu_shell_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailnotebook.c b/modules/other/gail/gailnotebook.c
index 8ffffd8fb..b2c46d453 100644
--- a/modules/other/gail/gailnotebook.c
+++ b/modules/other/gail/gailnotebook.c
@@ -105,22 +105,6 @@ gail_notebook_init (GailNotebook *notebook)
notebook->idle_focus_id = 0;
}
-AtkObject*
-gail_notebook_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_NOTEBOOK (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_NOTEBOOK, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static AtkObject*
gail_notebook_ref_child (AtkObject *obj,
gint i)
diff --git a/modules/other/gail/gailnotebook.h b/modules/other/gail/gailnotebook.h
index ab17ff1c3..f2226b5cf 100644
--- a/modules/other/gail/gailnotebook.h
+++ b/modules/other/gail/gailnotebook.h
@@ -63,8 +63,6 @@ struct _GailNotebookClass
GailContainerClass parent_class;
};
-AtkObject* gail_notebook_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailobject.c b/modules/other/gail/gailobject.c
index 890195a2a..adfe59f59 100644
--- a/modules/other/gail/gailobject.c
+++ b/modules/other/gail/gailobject.c
@@ -31,19 +31,6 @@ static void gail_object_real_initialize (AtkObject *obj,
G_DEFINE_TYPE (GailObject, gail_object, ATK_TYPE_GOBJECT_ACCESSIBLE)
-AtkObject*
-gail_object_new (GObject *obj)
-{
- gpointer object;
- AtkObject *atk_object;
-
- g_return_val_if_fail (GTK_IS_OBJECT (obj), NULL);
- object = g_object_new (GAIL_TYPE_OBJECT, NULL);
- atk_object = ATK_OBJECT (object);
- atk_object_initialize (atk_object, obj);
- return atk_object;
-}
-
static void
gail_object_class_init (GailObjectClass *klass)
{
diff --git a/modules/other/gail/gailobject.h b/modules/other/gail/gailobject.h
index ffa36b3d1..fc981a9c0 100644
--- a/modules/other/gail/gailobject.h
+++ b/modules/other/gail/gailobject.h
@@ -48,8 +48,6 @@ struct _GailObjectClass
AtkGObjectAccessibleClass parent_class;
};
-AtkObject* gail_object_new (GObject *obj);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailobjectfactory.c b/modules/other/gail/gailobjectfactory.c
deleted file mode 100644
index 76901878f..000000000
--- a/modules/other/gail/gailobjectfactory.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* GAIL - The GNOME Accessibility Implementation Library
- * Copyright 2003 Sun Microsystems Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <gtk/gtk.h>
-#include "gailobjectfactory.h"
-#include "gailobject.h"
-
-static void gail_object_factory_class_init (GailObjectFactoryClass *klass);
-
-static AtkObject* gail_object_factory_create_accessible (GObject *obj);
-
-static GType gail_object_factory_get_accessible_type (void);
-
-GType
-gail_object_factory_get_type (void)
-{
- static GType type = 0;
-
- if (!type)
- {
- static const GTypeInfo tinfo =
- {
- sizeof (GailObjectFactoryClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) gail_object_factory_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (GailObjectFactory), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
- type = g_type_register_static (
- ATK_TYPE_OBJECT_FACTORY,
- "GailObjectFactory" , &tinfo, 0);
- }
-
- return type;
-}
-
-static void
-gail_object_factory_class_init (GailObjectFactoryClass *klass)
-{
- AtkObjectFactoryClass *class = ATK_OBJECT_FACTORY_CLASS (klass);
-
- class->create_accessible = gail_object_factory_create_accessible;
- class->get_accessible_type = gail_object_factory_get_accessible_type;
-}
-
-static AtkObject*
-gail_object_factory_create_accessible (GObject *obj)
-{
- return gail_object_new (obj);
-}
-
-static GType
-gail_object_factory_get_accessible_type (void)
-{
- return GAIL_TYPE_OBJECT;
-}
diff --git a/modules/other/gail/gailobjectfactory.h b/modules/other/gail/gailobjectfactory.h
deleted file mode 100644
index 5b8fef83a..000000000
--- a/modules/other/gail/gailobjectfactory.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* GAIL - The GNOME Accessibility Implementation Library
- * Copyright 2003 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, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GAIL_OBJECT_FACTORY_H__
-#define __GAIL_OBJECT_FACTORY_H__
-
-#include <atk/atkobjectfactory.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define GAIL_TYPE_OBJECT_FACTORY (gail_object_factory_get_type ())
-#define GAIL_OBJECT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAIL_TYPE_OBJECT_FACTORY, GailObjectFactory))
-#define GAIL_OBJECT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAIL_TYPE_OBJECT_FACTORY, GailObjectFactoryClass))
-#define GAIL_IS_OBJECT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAIL_TYPE_OBJECT_FACTORY))
-#define GAIL_IS_OBJECT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAIL_TYPE_OBJECT_FACTORY))
-#define GAIL_OBJECT_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIL_TYPE_OBJECT_FACTORY, GailObjectFactoryClass))
-
-
-typedef struct _GailObjectFactory GailObjectFactory;
-typedef struct _GailObjectFactoryClass GailObjectFactoryClass;
-
-struct _GailObjectFactory
-{
- AtkObjectFactory parent;
-};
-
-struct _GailObjectFactoryClass
-{
- AtkObjectFactoryClass parent_class;
-};
-
-GType gail_object_factory_get_type(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __GAIL_OBJECT_FACTORY_H__ */
-
diff --git a/modules/other/gail/gailoptionmenu.c b/modules/other/gail/gailoptionmenu.c
index 59ae7cd79..8c67ce355 100644
--- a/modules/other/gail/gailoptionmenu.c
+++ b/modules/other/gail/gailoptionmenu.c
@@ -78,22 +78,6 @@ gail_option_menu_init (GailOptionMenu *menu)
{
}
-AtkObject*
-gail_option_menu_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_OPTION_MENU (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_OPTION_MENU, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static void
gail_option_menu_real_initialize (AtkObject *obj,
gpointer data)
diff --git a/modules/other/gail/gailoptionmenu.h b/modules/other/gail/gailoptionmenu.h
index dfd42a5e0..0e7bd186e 100644
--- a/modules/other/gail/gailoptionmenu.h
+++ b/modules/other/gail/gailoptionmenu.h
@@ -50,8 +50,6 @@ struct _GailOptionMenuClass
GailButtonClass parent_class;
};
-AtkObject* gail_option_menu_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailpaned.c b/modules/other/gail/gailpaned.c
index c276c100f..9f157f1ca 100644
--- a/modules/other/gail/gailpaned.c
+++ b/modules/other/gail/gailpaned.c
@@ -61,22 +61,6 @@ gail_paned_init (GailPaned *paned)
{
}
-AtkObject*
-gail_paned_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_PANED (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_PANED, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static AtkStateSet*
gail_paned_ref_state_set (AtkObject *accessible)
{
diff --git a/modules/other/gail/gailpaned.h b/modules/other/gail/gailpaned.h
index 0726025c4..bcf90c725 100644
--- a/modules/other/gail/gailpaned.h
+++ b/modules/other/gail/gailpaned.h
@@ -49,8 +49,6 @@ struct _GailPanedClass
GailContainerClass parent_class;
};
-AtkObject* gail_paned_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailpixmap.c b/modules/other/gail/gailpixmap.c
index 2497c0072..108933fb3 100644
--- a/modules/other/gail/gailpixmap.c
+++ b/modules/other/gail/gailpixmap.c
@@ -24,6 +24,8 @@
static void gail_pixmap_class_init (GailPixmapClass *klass);
static void gail_pixmap_init (GailPixmap *pixmap);
+static void gail_pixmap_initialize (AtkObject *accessible,
+ gpointer data);
/* AtkImage */
static void atk_image_interface_init (AtkImageIface *iface);
@@ -49,7 +51,10 @@ static void
gail_pixmap_class_init (GailPixmapClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
+ atk_object_class->initialize = gail_pixmap_initialize;
+
gobject_class->finalize = gail_pixmap_finalize;
}
@@ -59,23 +64,13 @@ gail_pixmap_init (GailPixmap *pixmap)
pixmap->image_description = NULL;
}
-AtkObject*
-gail_pixmap_new (GtkWidget *widget)
+static void
+gail_pixmap_initialize (AtkObject *accessible,
+ gpointer data)
{
- GObject *object;
- AtkObject *accessible;
-
- g_assert (GTK_IS_PIXMAP (widget));
- g_return_val_if_fail (GTK_IS_PIXMAP (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_PIXMAP, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
+ ATK_OBJECT_CLASS (gail_pixmap_parent_class)->initialize (accessible, data);
accessible->role = ATK_ROLE_ICON;
-
- return accessible;
}
static void
diff --git a/modules/other/gail/gailpixmap.h b/modules/other/gail/gailpixmap.h
index 889562a66..e77d1081f 100644
--- a/modules/other/gail/gailpixmap.h
+++ b/modules/other/gail/gailpixmap.h
@@ -52,12 +52,9 @@ struct _GailPixmapClass
GailWidgetClass parent_class;
};
-AtkObject* gail_pixmap_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GAIL_PIXMAP_H__ */
-
diff --git a/modules/other/gail/gailprogressbar.c b/modules/other/gail/gailprogressbar.c
index 0523bd0e9..80053c605 100644
--- a/modules/other/gail/gailprogressbar.c
+++ b/modules/other/gail/gailprogressbar.c
@@ -70,22 +70,6 @@ gail_progress_bar_init (GailProgressBar *bar)
{
}
-AtkObject*
-gail_progress_bar_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_PROGRESS_BAR (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_PROGRESS_BAR, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static void
gail_progress_bar_real_initialize (AtkObject *obj,
gpointer data)
diff --git a/modules/other/gail/gailprogressbar.h b/modules/other/gail/gailprogressbar.h
index 441cb36d6..2f0e02413 100644
--- a/modules/other/gail/gailprogressbar.h
+++ b/modules/other/gail/gailprogressbar.h
@@ -52,13 +52,9 @@ struct _GailProgressBarClass
GailWidgetClass parent_class;
};
-AtkObject* gail_progress_bar_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GAIL_PROGRESS_BAR_H__ */
-
-
diff --git a/modules/other/gail/gailradiobutton.c b/modules/other/gail/gailradiobutton.c
index 330dd54a8..d9363d759 100644
--- a/modules/other/gail/gailradiobutton.c
+++ b/modules/other/gail/gailradiobutton.c
@@ -24,6 +24,8 @@
static void gail_radio_button_class_init (GailRadioButtonClass *klass);
static void gail_radio_button_init (GailRadioButton *radio_button);
+static void gail_radio_button_initialize (AtkObject *accessible,
+ gpointer data);
static AtkRelationSet* gail_radio_button_ref_relation_set (AtkObject *obj);
@@ -34,30 +36,23 @@ gail_radio_button_class_init (GailRadioButtonClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
+ class->initialize = gail_radio_button_initialize;
class->ref_relation_set = gail_radio_button_ref_relation_set;
}
-AtkObject*
-gail_radio_button_new (GtkWidget *widget)
+static void
+gail_radio_button_init (GailRadioButton *radio_button)
{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_RADIO_BUTTON (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_RADIO_BUTTON, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- accessible->role = ATK_ROLE_RADIO_BUTTON;
- return accessible;
+ radio_button->old_group = NULL;
}
static void
-gail_radio_button_init (GailRadioButton *radio_button)
+gail_radio_button_initialize (AtkObject *accessible,
+ gpointer data)
{
- radio_button->old_group = NULL;
+ ATK_OBJECT_CLASS (gail_radio_button_parent_class)->initialize (accessible, data);
+
+ accessible->role = ATK_ROLE_RADIO_BUTTON;
}
AtkRelationSet*
diff --git a/modules/other/gail/gailradiobutton.h b/modules/other/gail/gailradiobutton.h
index d48106bf2..92089a96b 100644
--- a/modules/other/gail/gailradiobutton.h
+++ b/modules/other/gail/gailradiobutton.h
@@ -51,8 +51,6 @@ struct _GailRadioButtonClass
GailToggleButtonClass parent_class;
};
-AtkObject* gail_radio_button_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailrange.c b/modules/other/gail/gailrange.c
index ff260325b..7df51cb6a 100644
--- a/modules/other/gail/gailrange.c
+++ b/modules/other/gail/gailrange.c
@@ -94,22 +94,6 @@ gail_range_init (GailRange *range)
{
}
-AtkObject*
-gail_range_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_RANGE (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_RANGE, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static void
gail_range_real_initialize (AtkObject *obj,
gpointer data)
diff --git a/modules/other/gail/gailrange.h b/modules/other/gail/gailrange.h
index ad6bcd45b..c394c3382 100644
--- a/modules/other/gail/gailrange.h
+++ b/modules/other/gail/gailrange.h
@@ -56,8 +56,6 @@ struct _GailRangeClass
GailWidgetClass parent_class;
};
-AtkObject* gail_range_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailrenderercellfactory.c b/modules/other/gail/gailrenderercellfactory.c
deleted file mode 100644
index 90d5fa34f..000000000
--- a/modules/other/gail/gailrenderercellfactory.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* GAIL - The GNOME Accessibility Enabling Library
- * Copyright 2004 Sun Microsystems Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <gtk/gtkcellrenderer.h>
-#include "gailrenderercellfactory.h"
-#include "gailrenderercell.h"
-
-static void gail_renderer_cell_factory_class_init (GailRendererCellFactoryClass *klass);
-
-static AtkObject* gail_renderer_cell_factory_create_accessible (
- GObject *obj);
-static GType gail_renderer_cell_factory_get_accessible_type (void);
-
-GType
-gail_renderer_cell_factory_get_type (void)
-{
- static GType type = 0;
-
- if (!type)
- {
- static const GTypeInfo tinfo =
- {
- sizeof (GailRendererCellFactoryClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) gail_renderer_cell_factory_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (GailRendererCellFactory), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
- type = g_type_register_static (ATK_TYPE_OBJECT_FACTORY,
- "GailRendererCellFactory" , &tinfo, 0);
- }
-
- return type;
-}
-
-static void
-gail_renderer_cell_factory_class_init (GailRendererCellFactoryClass *klass)
-{
- AtkObjectFactoryClass *class = ATK_OBJECT_FACTORY_CLASS (klass);
-
- class->create_accessible = gail_renderer_cell_factory_create_accessible;
- class->get_accessible_type = gail_renderer_cell_factory_get_accessible_type;
-}
-
-static AtkObject*
-gail_renderer_cell_factory_create_accessible (GObject *obj)
-{
- g_return_val_if_fail (GTK_IS_CELL_RENDERER (obj), NULL);
-
- return gail_renderer_cell_new ();
-}
-
-static GType
-gail_renderer_cell_factory_get_accessible_type (void)
-{
- return GAIL_TYPE_RENDERER_CELL;
-}
diff --git a/modules/other/gail/gailrenderercellfactory.h b/modules/other/gail/gailrenderercellfactory.h
deleted file mode 100644
index 636898126..000000000
--- a/modules/other/gail/gailrenderercellfactory.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* GAIL - The GNOME Accessibility Enabling Library
- * Copyright 2004 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, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GAIL_RENDERER_CELL_FACTORY_H__
-#define __GAIL_RENDERER_CELL_FACTORY_H__
-
-#include <atk/atkobjectfactory.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define GAIL_TYPE_RENDERER_CELL_FACTORY (gail_renderer_cell_factory_get_type ())
-#define GAIL_RENDERER_CELL_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAIL_TYPE_RENDERER_CELL_FACTORY, GailRendererCellFactory))
-#define GAIL_RENDERER_CELL_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AGTK_TYPE_RENDERER_CELL_FACTORY, GailRendererCellFactoryClass))
-#define GAIL_IS_RENDERER_CELL_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAIL_TYPE_RENDERER_CELL_FACTORY))
-#define GAIL_IS_RENDERER_CELL_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAIL_TYPE_RENDERER_CELL_FACTORY))
-#define GAIL_RENDERER_CELL_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIL_TYPE_RENDERER_CELL_FACTORY, GailRendererCellFactoryClass))
-
-typedef struct _GailRendererCellFactory GailRendererCellFactory;
-typedef struct _GailRendererCellFactoryClass GailRendererCellFactoryClass;
-
-struct _GailRendererCellFactory
-{
- AtkObjectFactory parent;
-};
-
-struct _GailRendererCellFactoryClass
-{
- AtkObjectFactoryClass parent_class;
-};
-
-GType gail_renderer_cell_factory_get_type (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __GAIL_RENDERER_CELL_FACTORY_H__ */
diff --git a/modules/other/gail/gailscale.c b/modules/other/gail/gailscale.c
index e82ce5b4c..17372141c 100644
--- a/modules/other/gail/gailscale.c
+++ b/modules/other/gail/gailscale.c
@@ -96,22 +96,6 @@ gail_scale_class_init (GailScaleClass *klass)
gobject_class->notify = gail_scale_notify;
}
-AtkObject*
-gail_scale_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_RANGE (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_SCALE, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static void
gail_scale_init (GailScale *scale)
{
diff --git a/modules/other/gail/gailscale.h b/modules/other/gail/gailscale.h
index 22638a3d1..9e0687a0a 100644
--- a/modules/other/gail/gailscale.h
+++ b/modules/other/gail/gailscale.h
@@ -52,8 +52,6 @@ struct _GailScaleClass
GailRangeClass parent_class;
};
-AtkObject* gail_scale_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailscrollbar.c b/modules/other/gail/gailscrollbar.c
index f696cbc30..0e922247c 100644
--- a/modules/other/gail/gailscrollbar.c
+++ b/modules/other/gail/gailscrollbar.c
@@ -24,6 +24,8 @@
static void gail_scrollbar_class_init (GailScrollbarClass *klass);
static void gail_scrollbar_init (GailScrollbar *accessible);
+static void gail_scrollbar_initialize (AtkObject *accessible,
+ gpointer data);
static gint gail_scrollbar_get_index_in_parent (AtkObject *accessible);
@@ -34,6 +36,7 @@ gail_scrollbar_class_init (GailScrollbarClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
+ class->initialize = gail_scrollbar_initialize;
class->get_index_in_parent = gail_scrollbar_get_index_in_parent;
}
@@ -42,22 +45,13 @@ gail_scrollbar_init (GailScrollbar *accessible)
{
}
-AtkObject*
-gail_scrollbar_new (GtkWidget *widget)
+static void
+gail_scrollbar_initialize (AtkObject *accessible,
+ gpointer data)
{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_SCROLLBAR (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_SCROLLBAR, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
+ ATK_OBJECT_CLASS (gail_scrollbar_parent_class)->initialize (accessible, data);
accessible->role = ATK_ROLE_SCROLL_BAR;
-
- return accessible;
}
static gint
diff --git a/modules/other/gail/gailscrollbar.h b/modules/other/gail/gailscrollbar.h
index 985a71641..624aedef1 100644
--- a/modules/other/gail/gailscrollbar.h
+++ b/modules/other/gail/gailscrollbar.h
@@ -50,8 +50,6 @@ struct _GailScrollbarClass
GailRangeClass parent_class;
};
-AtkObject* gail_scrollbar_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailscrolledwindow.c b/modules/other/gail/gailscrolledwindow.c
index 49ca6e1a9..eb7ad6acc 100644
--- a/modules/other/gail/gailscrolledwindow.c
+++ b/modules/other/gail/gailscrolledwindow.c
@@ -55,22 +55,6 @@ gail_scrolled_window_init (GailScrolledWindow *window)
{
}
-AtkObject*
-gail_scrolled_window_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_SCROLLED_WINDOW (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_SCROLLED_WINDOW, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static void
gail_scrolled_window_real_initialize (AtkObject *obj,
gpointer data)
diff --git a/modules/other/gail/gailscrolledwindow.h b/modules/other/gail/gailscrolledwindow.h
index 0812823a6..b8564780f 100644
--- a/modules/other/gail/gailscrolledwindow.h
+++ b/modules/other/gail/gailscrolledwindow.h
@@ -49,8 +49,6 @@ struct _GailScrolledWindowClass
GailContainerClass parent_class;
};
-AtkObject* gail_scrolled_window_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailseparator.c b/modules/other/gail/gailseparator.c
index 650e9378f..d8fbb7c89 100644
--- a/modules/other/gail/gailseparator.c
+++ b/modules/other/gail/gailseparator.c
@@ -24,6 +24,8 @@
static void gail_separator_class_init (GailSeparatorClass *klass);
static void gail_separator_init (GailSeparator *accessible);
+static void gail_separator_initialize (AtkObject *accessible,
+ gpointer data);
static AtkStateSet* gail_separator_ref_state_set (AtkObject *accessible);
G_DEFINE_TYPE (GailSeparator, gail_separator, GAIL_TYPE_WIDGET)
@@ -33,6 +35,7 @@ gail_separator_class_init (GailSeparatorClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
+ class->initialize = gail_separator_initialize;
class->ref_state_set = gail_separator_ref_state_set;
}
@@ -41,24 +44,13 @@ gail_separator_init (GailSeparator *accessible)
{
}
-AtkObject*
-gail_separator_new (GtkWidget *widget)
+static void
+gail_separator_initialize (AtkObject *accessible,
+ gpointer data)
{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_SEPARATOR (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_SEPARATOR, NULL);
-
- g_return_val_if_fail (GTK_IS_ACCESSIBLE (object), NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
+ ATK_OBJECT_CLASS (gail_separator_parent_class)->initialize (accessible, data);
accessible->role = ATK_ROLE_SEPARATOR;
-
- return accessible;
}
static AtkStateSet*
diff --git a/modules/other/gail/gailseparator.h b/modules/other/gail/gailseparator.h
index 765b73cf3..94420edcd 100644
--- a/modules/other/gail/gailseparator.h
+++ b/modules/other/gail/gailseparator.h
@@ -49,8 +49,6 @@ struct _GailSeparatorClass
GailWidgetClass parent_class;
};
-AtkObject *gail_separator_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailspinbutton.c b/modules/other/gail/gailspinbutton.c
index 2c1589b28..e4ec43e05 100644
--- a/modules/other/gail/gailspinbutton.c
+++ b/modules/other/gail/gailspinbutton.c
@@ -71,22 +71,6 @@ gail_spin_button_init (GailSpinButton *button)
{
}
-AtkObject*
-gail_spin_button_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_SPIN_BUTTON (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_SPIN_BUTTON, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static void
gail_spin_button_real_initialize (AtkObject *obj,
gpointer data)
diff --git a/modules/other/gail/gailspinbutton.h b/modules/other/gail/gailspinbutton.h
index 90e8f4ab7..140ac94dc 100644
--- a/modules/other/gail/gailspinbutton.h
+++ b/modules/other/gail/gailspinbutton.h
@@ -51,8 +51,6 @@ struct _GailSpinButtonClass
GailEntryClass parent_class;
};
-AtkObject* gail_spin_button_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailstatusbar.c b/modules/other/gail/gailstatusbar.c
index 2c36b7a8f..86656ab39 100644
--- a/modules/other/gail/gailstatusbar.c
+++ b/modules/other/gail/gailstatusbar.c
@@ -119,22 +119,6 @@ gail_statusbar_init (GailStatusbar *bar)
{
}
-AtkObject*
-gail_statusbar_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_STATUSBAR (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_STATUSBAR, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static G_CONST_RETURN gchar*
gail_statusbar_get_name (AtkObject *obj)
{
diff --git a/modules/other/gail/gailstatusbar.h b/modules/other/gail/gailstatusbar.h
index 43d25f33f..52efc25bf 100644
--- a/modules/other/gail/gailstatusbar.h
+++ b/modules/other/gail/gailstatusbar.h
@@ -52,8 +52,6 @@ struct _GailStatusbarClass
GailContainerClass parent_class;
};
-AtkObject* gail_statusbar_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailtextcellfactory.c b/modules/other/gail/gailtextcellfactory.c
deleted file mode 100644
index d735684dc..000000000
--- a/modules/other/gail/gailtextcellfactory.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/* GAIL - The GNOME Accessibility Enabling 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 Lesser 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <gtk/gtkcellrenderertext.h>
-#include "gailtextcellfactory.h"
-#include "gailtextcell.h"
-
-static void gail_text_cell_factory_class_init (GailTextCellFactoryClass *klass);
-
-static AtkObject* gail_text_cell_factory_create_accessible (
- GObject *obj);
-
-static GType gail_text_cell_factory_get_accessible_type (void);
-
-GType
-gail_text_cell_factory_get_type (void)
-{
- static GType type = 0;
-
- if (!type)
- {
- static const GTypeInfo tinfo =
- {
- sizeof (GailTextCellFactoryClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) gail_text_cell_factory_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (GailTextCellFactory), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
- type = g_type_register_static (ATK_TYPE_OBJECT_FACTORY,
- "GailTextCellFactory" , &tinfo, 0);
- }
-
- return type;
-}
-
-static void
-gail_text_cell_factory_class_init (GailTextCellFactoryClass *klass)
-{
- AtkObjectFactoryClass *class = ATK_OBJECT_FACTORY_CLASS (klass);
-
- class->create_accessible = gail_text_cell_factory_create_accessible;
- class->get_accessible_type = gail_text_cell_factory_get_accessible_type;
-}
-
-static AtkObject*
-gail_text_cell_factory_create_accessible (GObject *obj)
-{
- g_return_val_if_fail (GTK_IS_CELL_RENDERER_TEXT (obj), NULL);
-
- return gail_text_cell_new ();
-}
-
-static GType
-gail_text_cell_factory_get_accessible_type (void)
-{
- return GAIL_TYPE_TEXT_CELL;
-}
diff --git a/modules/other/gail/gailtextcellfactory.h b/modules/other/gail/gailtextcellfactory.h
deleted file mode 100644
index 1aae137ff..000000000
--- a/modules/other/gail/gailtextcellfactory.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* GAIL - The GNOME Accessibility Enabling 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, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GAIL_TEXT_CELL_FACTORY_H__
-#define __GAIL_TEXT_CELL_FACTORY_H__
-
-#include <atk/atkobjectfactory.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define GAIL_TYPE_TEXT_CELL_FACTORY (gail_text_cell_factory_get_type ())
-#define GAIL_TEXT_CELL_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAIL_TYPE_TEXT_CELL_FACTORY, GailTextCellFactory))
-#define GAIL_TEXT_CELL_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), AGTK_TYPE_TEXT_CELL_FACTORY, GailTextCellFactoryClass))
-#define GAIL_IS_TEXT_CELL_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAIL_TYPE_TEXT_CELL_FACTORY))
-#define GAIL_IS_TEXT_CELL_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAIL_TYPE_TEXT_CELL_FACTORY))
-#define GAIL_TEXT_CELL_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIL_TYPE_TEXT_CELL_FACTORY, GailTextCellFactoryClass))
-
-typedef struct _GailTextCellFactory GailTextCellFactory;
-typedef struct _GailTextCellFactoryClass GailTextCellFactoryClass;
-
-struct _GailTextCellFactory
-{
- AtkObjectFactory parent;
-};
-
-struct _GailTextCellFactoryClass
-{
- AtkObjectFactoryClass parent_class;
-};
-
-GType gail_text_cell_factory_get_type(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __GAIL_TEXT_CELL_FACTORY_H__ */
diff --git a/modules/other/gail/gailtextview.c b/modules/other/gail/gailtextview.c
index 87e0bc302..726aac16c 100644
--- a/modules/other/gail/gailtextview.c
+++ b/modules/other/gail/gailtextview.c
@@ -265,22 +265,6 @@ gail_text_view_finalize (GObject *object)
G_OBJECT_CLASS (gail_text_view_parent_class)->finalize (object);
}
-AtkObject*
-gail_text_view_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_TEXT_VIEW (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_TEXT_VIEW, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static void
gail_text_view_real_notify_gtk (GObject *obj,
GParamSpec *pspec)
diff --git a/modules/other/gail/gailtextview.h b/modules/other/gail/gailtextview.h
index 4218b7b84..4dfd48e9e 100644
--- a/modules/other/gail/gailtextview.h
+++ b/modules/other/gail/gailtextview.h
@@ -62,8 +62,6 @@ struct _GailTextViewClass
GailContainerClass parent_class;
};
-AtkObject* gail_text_view_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailtogglebutton.c b/modules/other/gail/gailtogglebutton.c
index 377004d92..851e8ae60 100644
--- a/modules/other/gail/gailtogglebutton.c
+++ b/modules/other/gail/gailtogglebutton.c
@@ -57,22 +57,6 @@ gail_toggle_button_init (GailToggleButton *button)
{
}
-AtkObject*
-gail_toggle_button_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_TOGGLE_BUTTON (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_TOGGLE_BUTTON, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static void
gail_toggle_button_real_initialize (AtkObject *obj,
gpointer data)
diff --git a/modules/other/gail/gailtogglebutton.h b/modules/other/gail/gailtogglebutton.h
index 77580f26b..b390d8356 100644
--- a/modules/other/gail/gailtogglebutton.h
+++ b/modules/other/gail/gailtogglebutton.h
@@ -49,8 +49,6 @@ struct _GailToggleButtonClass
GailButtonClass parent_class;
};
-AtkObject* gail_toggle_button_new( GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailtoplevel.c b/modules/other/gail/gailtoplevel.c
index a9297a770..0284a9df5 100644
--- a/modules/other/gail/gailtoplevel.c
+++ b/modules/other/gail/gailtoplevel.c
@@ -26,6 +26,8 @@
static void gail_toplevel_class_init (GailToplevelClass *klass);
static void gail_toplevel_init (GailToplevel *toplevel);
+static void gail_toplevel_initialize (AtkObject *accessible,
+ gpointer data);
static void gail_toplevel_object_finalize (GObject *obj);
/* atkobject.h */
@@ -59,29 +61,13 @@ static gboolean is_combo_window (GtkWidget
G_DEFINE_TYPE (GailToplevel, gail_toplevel, ATK_TYPE_OBJECT)
-AtkObject*
-gail_toplevel_new (void)
-{
- GObject *object;
- AtkObject *accessible;
-
- object = g_object_new (GAIL_TYPE_TOPLEVEL, NULL);
- g_return_val_if_fail ((object != NULL), NULL);
-
- accessible = ATK_OBJECT (object);
- accessible->role = ATK_ROLE_APPLICATION;
- accessible->name = g_get_prgname();
- accessible->accessible_parent = NULL;
-
- return accessible;
-}
-
static void
gail_toplevel_class_init (GailToplevelClass *klass)
{
AtkObjectClass *class = ATK_OBJECT_CLASS(klass);
GObjectClass *g_object_class = G_OBJECT_CLASS(klass);
+ class->initialize = gail_toplevel_initialize;
class->get_n_children = gail_toplevel_get_n_children;
class->ref_child = gail_toplevel_ref_child;
class->get_parent = gail_toplevel_get_parent;
@@ -136,6 +122,17 @@ gail_toplevel_init (GailToplevel *toplevel)
}
static void
+gail_toplevel_initialize (AtkObject *accessible,
+ gpointer data)
+{
+ ATK_OBJECT_CLASS (gail_toplevel_parent_class)->initialize (accessible, data);
+
+ accessible->role = ATK_ROLE_APPLICATION;
+ accessible->name = g_get_prgname();
+ accessible->accessible_parent = NULL;
+}
+
+static void
gail_toplevel_object_finalize (GObject *obj)
{
GailToplevel *toplevel = GAIL_TOPLEVEL (obj);
diff --git a/modules/other/gail/gailtoplevel.h b/modules/other/gail/gailtoplevel.h
index 5044a4152..82ee7f58a 100644
--- a/modules/other/gail/gailtoplevel.h
+++ b/modules/other/gail/gailtoplevel.h
@@ -49,8 +49,6 @@ struct _GailToplevelClass
AtkObjectClass parent_class;
};
-AtkObject *gail_toplevel_new(void);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/modules/other/gail/gailtreeview.c b/modules/other/gail/gailtreeview.c
index f71b026c4..e2814127d 100644
--- a/modules/other/gail/gailtreeview.c
+++ b/modules/other/gail/gailtreeview.c
@@ -608,22 +608,6 @@ gail_tree_view_real_notify_gtk (GObject *obj,
GAIL_WIDGET_CLASS (gail_tree_view_parent_class)->notify_gtk (obj, pspec);
}
-AtkObject*
-gail_tree_view_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_TREE_VIEW (widget), NULL);
-
- object = g_object_new (GAIL_TYPE_TREE_VIEW, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
static void
gail_tree_view_finalize (GObject *object)
{
diff --git a/modules/other/gail/gailtreeview.h b/modules/other/gail/gailtreeview.h
index 655b876a7..fd8a43fd1 100644
--- a/modules/other/gail/gailtreeview.h
+++ b/modules/other/gail/gailtreeview.h
@@ -66,8 +66,6 @@ struct _GailTreeViewClass
GailContainerClass parent_class;
};
-AtkObject* gail_tree_view_new (GtkWidget *widget);
-
AtkObject* gail_tree_view_ref_focus_cell (GtkTreeView *treeview);
#ifdef __cplusplus
diff --git a/modules/other/gail/gailutil.c b/modules/other/gail/gailutil.c
index bf2121727..d0607411b 100644
--- a/modules/other/gail/gailutil.c
+++ b/modules/other/gail/gailutil.c
@@ -309,7 +309,10 @@ static AtkObject*
gail_util_get_root (void)
{
if (!root)
- root = gail_toplevel_new();
+ {
+ root = g_object_new (GAIL_TYPE_TOPLEVEL, NULL);
+ atk_object_initialize (root, NULL);
+ }
return root;
}
diff --git a/modules/other/gail/gailwindow.c b/modules/other/gail/gailwindow.c
index 4a35c3c93..5ad2a9e2b 100644
--- a/modules/other/gail/gailwindow.c
+++ b/modules/other/gail/gailwindow.c
@@ -174,35 +174,6 @@ gail_window_class_init (GailWindowClass *klass)
G_TYPE_NONE, 0);
}
-AtkObject*
-gail_window_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- gail_return_val_if_fail (widget != NULL, NULL);
- /*
- * A GailWindow can be created for a GtkHandleBox or a GtkWindow
- */
- if (!GTK_IS_WINDOW (widget) &&
- !GTK_IS_HANDLE_BOX (widget))
- gail_return_val_if_fail (FALSE, NULL);
-
- object = g_object_new (GAIL_TYPE_WINDOW, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- /*
- * Notify that tooltip is showing
- */
- if (accessible->role == ATK_ROLE_TOOL_TIP &&
- GTK_WIDGET_MAPPED (widget))
- atk_object_notify_state_change (accessible, ATK_STATE_SHOWING, 1);
-
- return accessible;
-}
-
static void
gail_window_init (GailWindow *accessible)
{
@@ -215,6 +186,13 @@ gail_window_real_initialize (AtkObject *obj,
GtkWidget *widget;
GailWindow *window;
+ /*
+ * A GailWindow can be created for a GtkHandleBox or a GtkWindow
+ */
+ if (!GTK_IS_WINDOW (widget) &&
+ !GTK_IS_HANDLE_BOX (widget))
+ gail_return_if_fail (FALSE);
+
ATK_OBJECT_CLASS (gail_window_parent_class)->initialize (obj, data);
window = GAIL_WINDOW (obj);
@@ -254,6 +232,13 @@ gail_window_real_initialize (AtkObject *obj,
else
obj->role = ATK_ROLE_FRAME;
}
+
+ /*
+ * Notify that tooltip is showing
+ */
+ if (obj->role == ATK_ROLE_TOOL_TIP &&
+ GTK_WIDGET_MAPPED (widget))
+ atk_object_notify_state_change (obj, ATK_STATE_SHOWING, 1);
}
static void
diff --git a/modules/other/gail/gailwindow.h b/modules/other/gail/gailwindow.h
index 289f83d1b..0b195072e 100644
--- a/modules/other/gail/gailwindow.h
+++ b/modules/other/gail/gailwindow.h
@@ -53,8 +53,6 @@ struct _GailWindowClass
GailContainerClass parent_class;
};
-AtkObject* gail_window_new (GtkWidget *widget);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */