Commit 535e29c3 authored by Christian Persch's avatar Christian Persch

Remove relocations from the atk factories. Remove unused gail_foo_new()

	* modules/other/gail/*.[ch]: Remove relocations from the atk
	factories. Remove unused gail_foo_new() functions. Fix object
	instantiation to be derivation safe by moving initialisation code
	from the removed gail_foo_new() functions to the
	AtkObjectClass::initialize implementation. Bug #505226.

svn path=/trunk/; revision=19237
parent 99fa9096
2007-12-22 Christian Persch <chpe@gnome.org>
* modules/other/gail/*.[ch]: Remove relocations from the atk
factories. Remove unused gail_foo_new() functions. Fix object
instantiation to be derivation safe by moving initialisation code
from the removed gail_foo_new() functions to the
AtkObjectClass::initialize implementation. Bug #505226.
2007-12-24 Matthias Clasen <mclasen@redhat.com>
* modules/other/gail/gailentry.c:
......
......@@ -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 \
......
......@@ -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,
......
#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>
......
......@@ -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);
......
......@@ -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
......
......@@ -51,8 +51,6 @@ struct _GailArrowClass
GailWidgetClass parent_class;
};
AtkObject* gail_arrow_new (GtkWidget *widget);
#ifdef __cplusplus
}
#endif /* __cplusplus */
......
/* 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;
}
/* 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__ */
......@@ -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*
......
......@@ -49,8 +49,6 @@ struct _GailBoxClass
GailContainerClass parent_class;
};
AtkObject* gail_box_new (GtkWidget *widget);
#ifdef __cplusplus
}
#endif /* __cplusplus */
......
......@@ -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)
{
......
......@@ -67,8 +67,6 @@ struct _GailButtonClass
GailContainerClass parent_class;
};
AtkObject* gail_button_new (GtkWidget *widget);
#ifdef __cplusplus
}
#endif /* __cplusplus */
......
......@@ -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;
}
......@@ -49,8 +49,6 @@ struct _GailCalendarClass
GailWidgetClass parent_class;
};
AtkObject* gail_calendar_new (GtkWidget *widget);
#ifdef __cplusplus
}
#endif /* __cplusplus */
......
......@@ -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;
......
......@@ -62,8 +62,6 @@ struct _GailCListClass
GailContainerClass parent_class;
};
AtkObject* gail_clist_new (GtkWidget *widget);
#ifdef __cplusplus
}
#endif /* __cplusplus */
......
......@@ -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)
......
......@@ -57,8 +57,6 @@ struct _GailComboClass
GailContainerClass parent_class;
};
AtkObject* gail_combo_new (GtkWidget *widget);
#ifdef __cplusplus
}
#endif /* __cplusplus */
......
......@@ -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)
......
......@@ -58,8 +58,6 @@ struct _GailComboBoxClass
GailContainerClass parent_class;
};
AtkObject* gail_combo_box_new (GtkWidget *widget);
#ifdef __cplusplus
}
#endif /* __cplusplus */
......
......@@ -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;
......
......@@ -62,8 +62,6 @@ struct _GailContainerClass
gpointer data);
};
AtkObject* gail_container_new (GtkWidget *widget);
#ifdef __cplusplus
}
#endif /* __cplusplus */
......
......@@ -348,22 +348,6 @@ gail_entry_finalize (GObject *object)
G_OBJECT_CLASS (gail_entry_parent_class)->finalize (object);
}