aboutsummaryrefslogtreecommitdiffstats
path: root/a11y
diff options
context:
space:
mode:
Diffstat (limited to 'a11y')
-rw-r--r--a11y/.cvsignore2
-rw-r--r--a11y/ChangeLog36
-rw-r--r--a11y/Makefile.am5
-rw-r--r--a11y/calendar/.cvsignore6
-rw-r--r--a11y/calendar/Makefile.am82
-rw-r--r--a11y/calendar/ea-cal-view-event.c460
-rw-r--r--a11y/calendar/ea-cal-view-event.h64
-rw-r--r--a11y/calendar/ea-cal-view.c271
-rw-r--r--a11y/calendar/ea-cal-view.h64
-rw-r--r--a11y/calendar/ea-calendar-helpers.c148
-rw-r--r--a11y/calendar/ea-calendar-helpers.h43
-rw-r--r--a11y/calendar/ea-calendar.c135
-rw-r--r--a11y/calendar/ea-calendar.h37
-rw-r--r--a11y/calendar/ea-day-view.c245
-rw-r--r--a11y/calendar/ea-day-view.h64
-rw-r--r--a11y/calendar/ea-gnome-calendar.c248
-rw-r--r--a11y/calendar/ea-gnome-calendar.h65
-rw-r--r--a11y/calendar/ea-week-view.c235
-rw-r--r--a11y/calendar/ea-week-view.h65
-rw-r--r--a11y/e-table/.cvsignore4
-rw-r--r--a11y/e-table/gal-a11y-e-cell-registry.c132
-rw-r--r--a11y/e-table/gal-a11y-e-cell-registry.h58
-rw-r--r--a11y/e-table/gal-a11y-e-cell-text.c486
-rw-r--r--a11y/e-table/gal-a11y-e-cell-text.h48
-rw-r--r--a11y/e-table/gal-a11y-e-cell.c239
-rw-r--r--a11y/e-table/gal-a11y-e-cell.h61
-rw-r--r--a11y/e-table/gal-a11y-e-table-factory.c83
-rw-r--r--a11y/e-table/gal-a11y-e-table-factory.h36
-rw-r--r--a11y/e-table/gal-a11y-e-table-item.c456
-rw-r--r--a11y/e-table/gal-a11y-e-table-item.h43
-rw-r--r--a11y/e-table/gal-a11y-e-table.c156
-rw-r--r--a11y/e-table/gal-a11y-e-table.h43
-rw-r--r--a11y/e-text/.cvsignore4
-rw-r--r--a11y/e-text/gal-a11y-e-text-factory.c88
-rw-r--r--a11y/e-text/gal-a11y-e-text-factory.h36
-rw-r--r--a11y/e-text/gal-a11y-e-text.c648
-rw-r--r--a11y/e-text/gal-a11y-e-text.h40
-rw-r--r--a11y/ea-factory.h113
-rw-r--r--a11y/gal-a11y-factory.h94
-rw-r--r--a11y/gal-a11y-util.c31
-rw-r--r--a11y/gal-a11y-util.h21
-rw-r--r--a11y/widgets/.cvsignore2
-rw-r--r--a11y/widgets/Makefile.am23
-rw-r--r--a11y/widgets/ea-calendar-item.c165
-rw-r--r--a11y/widgets/ea-calendar-item.h65
-rw-r--r--a11y/widgets/ea-widgets.c35
-rw-r--r--a11y/widgets/ea-widgets.h34
47 files changed, 0 insertions, 5519 deletions
diff --git a/a11y/.cvsignore b/a11y/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/a11y/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/a11y/ChangeLog b/a11y/ChangeLog
deleted file mode 100644
index 5e433f5314..0000000000
--- a/a11y/ChangeLog
+++ /dev/null
@@ -1,36 +0,0 @@
-2003-08-27 Bolian Yin <bolian.yin@sun.com>
-
- * Makefile.am: add widgets directory; move calendar idl stuff to calendar directory; stop make a single shared lib for whole a11y stuff.
- * ea-factory.h: make factory macros available to GOBJECT
- * calendar/Makefile.am: add calendar idl stuff
- * calendar/ea-cal-view-event.c: add atkcomponent interface.
- * calendar/ea-gnome-calendar.c (ea_gcal_switch_view_cb): add details for "children_changed".
- * new widgets directory for widgets a11y stuff, new files are:
- widgets/Makefile.am, widgets/ea-calendar-item.c, widgets/ea-calendar-item.h, widgets/ea-widgets.c, widgets/ea-widgets.h
-
-2003-08-20 Rodrigo Moya <rodrigo@ximian.com>
-
- * calendar/ea-cal-view-event.c (ea_cal_view_event_get_name):
- adapted to changes in ECalViewEvent.
-
-2003-08-20 Bolian Yin <bolian.yin@sun.com>
- setup the a11y directory for evolution accessibility work
- New files are:
- ChangeLog
- ea-factory.h
- Makefile.am
- calendar/ea-calendar.c
- calendar/ea-calendar.h
- calendar/ea-calendar-helpers.c
- calendar/ea-calendar-helpers.h
- calendar/ea-cal-view.c
- calendar/ea-cal-view.h
- calendar/ea-cal-view-event.c
- calendar/ea-cal-view-event.h
- calendar/ea-day-view.c
- calendar/ea-day-view.h
- calendar/ea-week-view.c
- calendar/ea-week-view.h
- calendar/ea-gnome-calendar.c
- calendar/ea-gnome-calendar.h
- calendar/Makefile.am
diff --git a/a11y/Makefile.am b/a11y/Makefile.am
deleted file mode 100644
index 796eeba234..0000000000
--- a/a11y/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-
-SUBDIRS = calendar widgets
-
-
-EXTRA_DIST = ea-factory.h
diff --git a/a11y/calendar/.cvsignore b/a11y/calendar/.cvsignore
deleted file mode 100644
index 0e1e389af7..0000000000
--- a/a11y/calendar/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile
-Makefile.in
-Evolution-*.c
-Evolution.h
-evolution-calendar-*.c
-evolution-calendar.h
diff --git a/a11y/calendar/Makefile.am b/a11y/calendar/Makefile.am
deleted file mode 100644
index 2c3a26f2ba..0000000000
--- a/a11y/calendar/Makefile.am
+++ /dev/null
@@ -1,82 +0,0 @@
-# Calendar IDL files
-
-CALENDAR_IDLS = $(top_srcdir)/calendar/idl/evolution-calendar.idl
-SHELL_IDLS = \
- $(top_srcdir)/shell/Evolution-Activity.idl \
- $(top_srcdir)/shell/Evolution-ConfigControl.idl \
- $(top_srcdir)/shell/Evolution-Offline.idl \
- $(top_srcdir)/shell/Evolution-Session.idl \
- $(top_srcdir)/shell/Evolution-Shell.idl \
- $(top_srcdir)/shell/Evolution-ShellComponent.idl \
- $(top_srcdir)/shell/Evolution-ShellComponentDnd.idl \
- $(top_srcdir)/shell/Evolution-ShellView.idl \
- $(top_srcdir)/shell/Evolution-Shortcuts.idl \
- $(top_srcdir)/shell/Evolution-Storage.idl \
- $(top_srcdir)/shell/Evolution-StorageSetView.idl \
- $(top_srcdir)/shell/Evolution-Wizard.idl \
- $(top_srcdir)/shell/Evolution-common.idl \
- $(top_srcdir)/shell/Evolution.idl
-
-CALENDAR_IDL_GENERATED_H = evolution-calendar.h
-CALENDAR_IDL_GENERATED_C = \
- evolution-calendar-common.c \
- evolution-calendar-skels.c \
- evolution-calendar-stubs.c
-
-SHELL_IDL_GENERATED_H = Evolution.h
-SHELL_IDL_GENERATED_C = \
- Evolution-common.c \
- Evolution-skels.c \
- Evolution-stubs.c
-
-$(CALENDAR_IDL_GENERATED_H): $(CALENDAR_IDLS)
- $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) \
- $(top_srcdir)/calendar/idl/evolution-calendar.idl
-
-$(SHELL_IDL_GENERATED_H): $(SHELL_IDLS)
- $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) \
- $(top_srcdir)/shell/Evolution.idl
-
-IDL_GENERATED = $(SHELL_IDL_GENERATED_H) $(CALENDAR_IDL_GENERATED_H)
-BUILT_SOURCES = $(IDL_GENERATED)
-CLEANFILES = $(BUILT_SOURCES) $(CALENDAR_IDL_GENERATED_C) $(SHELL_IDL_GENERATED_C)
-
-noinst_LTLIBRARIES = libevolution-calendar-a11y.la
-
-INCLUDES = \
- -DG_LOG_DOMAIN=\"evolution-a11y\" \
- -I$(top_srcdir)/shell \
- -I$(top_srcdir)/calendar \
- -I$(top_srcdir)/calendar/cal-client \
- -I$(top_srcdir)/libical/src/libical \
- -I$(top_srcdir)/calendar/gui \
- -I$(top_srcdir)/widgets \
- -I$(top_srcdir)/a11y \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
- -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
- -DEVOLUTION_GALVIEWSDIR=\""$(viewsdir)"\" \
- -DEVOLUTION_UIDIR=\""$(evolutionuidir)"\" \
- -DG_DISABLE_DEPRECATED \
- -DPREFIX=\""$(prefix)"\" \
- $(A11Y_CFLAGS) \
- $(EVOLUTION_CALENDAR_CFLAGS)
-
-libevolution_calendar_a11y_la_SOURCES = \
- $(CALENDAR_IDL_GENERATED_H) \
- $(SHELL_IDL_GENERATED_H) \
- ea-calendar.c \
- ea-calendar.h \
- ea-calendar-helpers.c \
- ea-calendar-helpers.h \
- ea-cal-view.c \
- ea-cal-view.h \
- ea-cal-view-event.c \
- ea-cal-view-event.h \
- ea-day-view.c \
- ea-day-view.h \
- ea-week-view.c \
- ea-week-view.h \
- ea-gnome-calendar.c \
- ea-gnome-calendar.h
diff --git a/a11y/calendar/ea-cal-view-event.c b/a11y/calendar/ea-cal-view-event.c
deleted file mode 100644
index deffa32ce8..0000000000
--- a/a11y/calendar/ea-cal-view-event.c
+++ /dev/null
@@ -1,460 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-cal-view-event.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-cal-view-event.h"
-#include "ea-calendar-helpers.h"
-#include "ea-day-view.h"
-#include "ea-week-view.h"
-#include <gal/e-text/e-text.h>
-
-static void ea_cal_view_event_class_init (EaCalViewEventClass *klass);
-
-static G_CONST_RETURN gchar* ea_cal_view_event_get_name (AtkObject *accessible);
-static G_CONST_RETURN gchar* ea_cal_view_event_get_description (AtkObject *accessible);
-static AtkObject* ea_cal_view_event_get_parent (AtkObject *accessible);
-static gint ea_cal_view_event_get_index_in_parent (AtkObject *accessible);
-
-/* component interface */
-static void atk_component_interface_init (AtkComponentIface *iface);
-static void ea_cal_view_get_extents (AtkComponent *component,
- gint *x, gint *y, gint *width, gint *height,
- AtkCoordType coord_type);
-
-static gpointer parent_class = NULL;
-
-GType
-ea_cal_view_event_get_type (void)
-{
- static GType type = 0;
- AtkObjectFactory *factory;
- GTypeQuery query;
- GType derived_atk_type;
-
-
- if (!type) {
- static GTypeInfo tinfo = {
- sizeof (EaCalViewEventClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) ea_cal_view_event_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (EaCalViewEvent), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
-
- static const GInterfaceInfo atk_component_info = {
- (GInterfaceInitFunc) atk_component_interface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- /*
- * Figure out the size of the class and instance
- * we are run-time deriving from (atk object for E_TEXT, in this case)
- */
-
- factory = atk_registry_get_factory (atk_get_default_registry (),
- E_TYPE_TEXT);
- derived_atk_type = atk_object_factory_get_accessible_type (factory);
- g_type_query (derived_atk_type, &query);
-
- tinfo.class_size = query.class_size;
- tinfo.instance_size = query.instance_size;
-
- /* we inherit the component, text and other interfaces from E_TEXT */
- type = g_type_register_static (derived_atk_type,
- "EaCalViewEvent", &tinfo, 0);
- g_type_add_interface_static (type, ATK_TYPE_COMPONENT,
- &atk_component_info);
- }
-
- return type;
-}
-
-static void
-ea_cal_view_event_class_init (EaCalViewEventClass *klass)
-{
- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
-
- class->get_name = ea_cal_view_event_get_name;
- class->get_description = ea_cal_view_event_get_description;
- class->get_parent = ea_cal_view_event_get_parent;
- class->get_index_in_parent = ea_cal_view_event_get_index_in_parent;
-
-}
-
-AtkObject*
-ea_cal_view_event_new (GObject *obj)
-{
- AtkObject *atk_obj = NULL;
- GObject *target_obj;
- ECalView *cal_view;
-
- g_return_val_if_fail (E_IS_TEXT (obj), NULL);
- cal_view = ea_calendar_helpers_get_cal_view_from (GNOME_CANVAS_ITEM (obj));
- if (E_IS_WEEK_VIEW (cal_view)) {
- gint event_num, span_num;
- EWeekViewEvent *week_view_event;
- EWeekViewEventSpan *event_span;
- EWeekView *week_view = E_WEEK_VIEW (cal_view);
-
- /* for week view, we need to check if a atkobject exists for
- * the first span of the same event
- */
- if (!e_week_view_find_event_from_item (week_view,
- GNOME_CANVAS_ITEM (obj),
- &event_num,
- &span_num))
- return NULL;
- week_view_event = &g_array_index (week_view->events,
- EWeekViewEvent,
- event_num);
- /* get the first span */
- event_span = &g_array_index (week_view->spans,
- EWeekViewEventSpan,
- week_view_event->spans_index);
- target_obj = G_OBJECT (event_span->text_item);
- atk_obj = g_object_get_data (target_obj, "accessible-object");
-
- }
- else
- target_obj = obj;
-
- if (!atk_obj) {
- static AtkRole event_role = ATK_ROLE_INVALID;
- atk_obj = ATK_OBJECT (g_object_new (EA_TYPE_CAL_VIEW_EVENT,
- NULL));
- atk_object_initialize (atk_obj, target_obj);
- if (event_role == ATK_ROLE_INVALID)
- event_role = atk_role_register ("Calendar Event");
- atk_obj->role = event_role;
-#ifdef ACC_DEBUG
- printf ("EvoAcc: ea_cal_view_event created %p for item=%p\n",
- atk_obj, target_obj);
-#endif
- }
-
- /* the registered factory for E_TEXT is cannot create a EaCalViewEvent,
- * we should save the EaCalViewEvent object in it.
- */
- g_object_set_data (obj, "accessible-object", atk_obj);
-
- return atk_obj;
-}
-
-static G_CONST_RETURN gchar*
-ea_cal_view_event_get_name (AtkObject *accessible)
-{
- g_return_val_if_fail (EA_IS_CAL_VIEW_EVENT (accessible), NULL);
-
- if (accessible->name)
- return accessible->name;
- else {
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- ECalViewEvent *event;
- gchar *tmp_name;
- gchar *new_name = g_strdup ("");
- const char *summary;
-
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (accessible);
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (!g_obj || !E_IS_TEXT (g_obj))
- return NULL;
- event = ea_calendar_helpers_get_cal_view_event_from (GNOME_CANVAS_ITEM(g_obj));
-
- if (event && event->comp_data) {
- if (cal_util_component_has_alarms (event->comp_data->icalcomp)) {
- tmp_name = new_name;
- new_name = g_strconcat (new_name, "alarm ", NULL);
- g_free (tmp_name);
- }
-
- if (cal_util_component_has_recurrences (event->comp_data->icalcomp)) {
- tmp_name = new_name;
- new_name = g_strconcat (new_name, "recurrence ", NULL);
- g_free (tmp_name);
- }
-
- if (event->different_timezone) {
- tmp_name = new_name;
- new_name = g_strconcat (new_name, "time-zone ", NULL);
- g_free (tmp_name);
- }
-
- if (cal_util_component_has_organizer (event->comp_data->icalcomp)) {
- tmp_name = new_name;
- new_name = g_strconcat (new_name, "meeting ", NULL);
- g_free (tmp_name);
- }
- }
- tmp_name = new_name;
- new_name = g_strconcat (new_name, "event. Summary is ", NULL);
- g_free (tmp_name);
-
- summary = icalcomponent_get_summary (event->comp_data->icalcomp);
- if (summary) {
- tmp_name = new_name;
- new_name = g_strconcat (new_name, summary, NULL);
- g_free (tmp_name);
- }
- else {
- tmp_name = new_name;
- new_name = g_strconcat (new_name, "empty", NULL);
- g_free (tmp_name);
- }
-
- ATK_OBJECT_CLASS (parent_class)->set_name (accessible, new_name);
-#ifdef ACC_DEBUG
- printf("EvoAcc: name for event accobj=%p, is %s\n",
- accessible, new_name);
-#endif
- g_free (new_name);
- return accessible->name;
- }
-}
-
-static G_CONST_RETURN gchar*
-ea_cal_view_event_get_description (AtkObject *accessible)
-{
- if (accessible->description)
- return accessible->description;
-
- return "calendar view event";
-}
-
-static AtkObject *
-ea_cal_view_event_get_parent (AtkObject *accessible)
-{
- AtkGObjectAccessible *atk_gobj;
- GObject *g_obj;
- GnomeCanvasItem *canvas_item;
- ECalView *cal_view;
-
- g_return_val_if_fail (EA_IS_CAL_VIEW_EVENT (accessible), NULL);
- atk_gobj = ATK_GOBJECT_ACCESSIBLE (accessible);
-
- g_obj = atk_gobject_accessible_get_object (atk_gobj);
- if (g_obj == NULL)
- /* Object is defunct */
- return NULL;
- canvas_item = GNOME_CANVAS_ITEM (g_obj);
-
- cal_view = ea_calendar_helpers_get_cal_view_from (canvas_item);
-
- if (!cal_view)
- return NULL;
-
- return gtk_widget_get_accessible (GTK_WIDGET (cal_view));
-}
-
-static gint
-ea_cal_view_event_get_index_in_parent (AtkObject *accessible)
-{
- GObject *g_obj;
- GnomeCanvasItem *canvas_item;
- ECalView *cal_view;
- ECalViewEvent *cal_view_event;
-
- g_return_val_if_fail (EA_IS_CAL_VIEW_EVENT (accessible), -1);
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(accessible));
- if (!g_obj)
- /* defunct object*/
- return -1;
-
- canvas_item = GNOME_CANVAS_ITEM (g_obj);
- cal_view = ea_calendar_helpers_get_cal_view_from (canvas_item);
- if (!cal_view)
- return -1;
-
- cal_view_event = ea_calendar_helpers_get_cal_view_event_from (canvas_item);
- if (!cal_view_event)
- return -1;
-
- if (E_IS_DAY_VIEW (cal_view)) {
- gint day, event_num, num_before;
- EDayViewEvent *day_view_event;
- EDayView *day_view = E_DAY_VIEW (cal_view);
-
- /* the long event comes first in the order */
- for (event_num = day_view->long_events->len - 1; event_num >= 0;
- --event_num) {
- day_view_event = &g_array_index (day_view->long_events,
- EDayViewEvent, event_num);
- if (cal_view_event == (ECalViewEvent*)day_view_event)
- return event_num;
-
- }
- num_before = day_view->long_events->len;
-
- for (day = 0; day < day_view->days_shown; ++day) {
- for (event_num = day_view->events[day]->len - 1; event_num >= 0;
- --event_num) {
- day_view_event = &g_array_index (day_view->events[day],
- EDayViewEvent, event_num);
- if (cal_view_event == (ECalViewEvent*)day_view_event)
- return num_before + event_num;
- }
- num_before += day_view->events[day]->len;
- }
- }
- else if (E_IS_WEEK_VIEW (cal_view)) {
- gint index;
- EWeekViewEvent *week_view_event;
- EWeekView *week_view = E_WEEK_VIEW (cal_view);
-
- for (index = week_view->events->len - 1; index >= 0; --index) {
- week_view_event = &g_array_index (week_view->events,
- EWeekViewEvent, index);
- if (cal_view_event == (ECalViewEvent*)week_view_event)
- return index;
- }
- }
- else {
- g_assert_not_reached ();
- return -1;
- }
- return -1;
-}
-
-/* Atk Component Interface */
-
-static void
-atk_component_interface_init (AtkComponentIface *iface)
-{
- g_return_if_fail (iface != NULL);
-
- iface->get_extents = ea_cal_view_get_extents;
-}
-
-static void
-ea_cal_view_get_extents (AtkComponent *component,
- gint *x,
- gint *y,
- gint *width,
- gint *height,
- AtkCoordType coord_type)
-{
- GObject *g_obj;
- GnomeCanvasItem *canvas_item;
- gint x_window, y_window;
- gint scroll_x, scroll_y;
- ECalView *cal_view;
- gint item_x, item_y, item_w, item_h;
- GtkWidget *canvas = NULL;
-
- g_return_if_fail (EA_IS_CAL_VIEW_EVENT (component));
-
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(component));
- if (!g_obj)
- /* defunct object*/
- return;
- g_return_if_fail (E_IS_TEXT (g_obj));
-
- canvas_item = GNOME_CANVAS_ITEM (g_obj);
- cal_view = ea_calendar_helpers_get_cal_view_from (canvas_item);
- if (!cal_view)
- return;
-
- if (E_IS_DAY_VIEW (cal_view)) {
- gint day, event_num;
-
- if (!e_day_view_find_event_from_item (E_DAY_VIEW (cal_view),
- canvas_item,
- &day, &event_num))
- return;
- if (day == E_DAY_VIEW_LONG_EVENT) {
- gint start_day, end_day;
- if (!e_day_view_get_long_event_position (E_DAY_VIEW (cal_view),
- event_num,
- &start_day,
- &end_day,
- &item_x,
- &item_y,
- &item_w,
- &item_h))
- return;
- canvas = E_DAY_VIEW (cal_view)->top_canvas;
- }
- else {
- if (!e_day_view_get_event_position (E_DAY_VIEW (cal_view), day,
- event_num,
- &item_x, &item_y,
- &item_w, &item_h))
-
- return;
- canvas = E_DAY_VIEW (cal_view)->main_canvas;
- }
- }
- else if (E_IS_WEEK_VIEW (cal_view)) {
- gint event_num, span_num;
- if (!e_week_view_find_event_from_item (E_WEEK_VIEW (cal_view),
- canvas_item, &event_num,
- &span_num))
- return;
-
- if (!e_week_view_get_span_position (E_WEEK_VIEW (cal_view),
- event_num, span_num,
- &item_x, &item_y, &item_w))
- return;
- item_h = E_WEEK_VIEW_ICON_HEIGHT;
- canvas = E_WEEK_VIEW (cal_view)->main_canvas;
- }
- else
- return;
-
- if (!canvas)
- return;
-
- gdk_window_get_origin (canvas->window,
- &x_window, &y_window);
- gnome_canvas_get_scroll_offsets (GNOME_CANVAS (canvas), &scroll_x, &scroll_y);
-
- *x = item_x + x_window - scroll_x;
- *y = item_y + y_window - scroll_y;
- *width = item_w;
- *height = item_h;
-
- if (coord_type == ATK_XY_WINDOW) {
- GdkWindow *window;
- gint x_toplevel, y_toplevel;
-
- window = gdk_window_get_toplevel (GTK_WIDGET (cal_view)->window);
- gdk_window_get_origin (window, &x_toplevel, &y_toplevel);
-
- *x -= x_toplevel;
- *y -= y_toplevel;
- }
-
-#ifdef ACC_DEBUG
- printf ("Event Bounds (%d, %d, %d, %d)\n", *x, *y, *width, *height);
-#endif
-}
diff --git a/a11y/calendar/ea-cal-view-event.h b/a11y/calendar/ea-cal-view-event.h
deleted file mode 100644
index f139dde9fb..0000000000
--- a/a11y/calendar/ea-cal-view-event.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-cal-view-event.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#ifndef __EA_CAL_VIEW_EVENT_H__
-#define __EA_CAL_VIEW_EVENT_H__
-
-#include <atk/atkgobjectaccessible.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define EA_TYPE_CAL_VIEW_EVENT (ea_cal_view_event_get_type ())
-#define EA_CAL_VIEW_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EA_TYPE_CAL_VIEW_EVENT, EaCalViewEvent))
-#define EA_CAL_VIEW_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EA_TYPE_CAL_VIEW_EVENT, EaCalViewEventClass))
-#define EA_IS_CAL_VIEW_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EA_TYPE_CAL_VIEW_EVENT))
-#define EA_IS_CAL_VIEW_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EA_TYPE_CAL_VIEW_EVENT))
-#define EA_CAL_VIEW_EVENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EA_TYPE_CAL_VIEW_EVENT, EaCalViewEventClass))
-
-typedef struct _EaCalViewEvent EaCalViewEvent;
-typedef struct _EaCalViewEventClass EaCalViewEventClass;
-
-struct _EaCalViewEvent
-{
- AtkGObjectAccessible parent;
-};
-
-GType ea_cal_view_event_get_type (void);
-
-struct _EaCalViewEventClass
-{
- AtkGObjectAccessibleClass parent_class;
-};
-
-AtkObject *ea_cal_view_event_new (GObject *obj);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __EA_CAL_VIEW_EVENT_H__ */
diff --git a/a11y/calendar/ea-cal-view.c b/a11y/calendar/ea-cal-view.c
deleted file mode 100644
index f31d24cc55..0000000000
--- a/a11y/calendar/ea-cal-view.c
+++ /dev/null
@@ -1,271 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-cal-view.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-cal-view.h"
-#include "ea-calendar-helpers.h"
-#include "e-day-view.h"
-#include "e-week-view.h"
-#include "calendar-commands.h"
-#include <glib/gstrfuncs.h>
-
-static void ea_cal_view_class_init (EaCalViewClass *klass);
-
-static AtkObject* ea_cal_view_get_parent (AtkObject *accessible);
-static gint ea_cal_view_get_index_in_parent (AtkObject *accessible);
-static void ea_cal_view_real_initialize (AtkObject *accessible, gpointer data);
-
-static void ea_cal_view_event_changed_cb (ECalView *cal_view,
- ECalViewEvent *event, gpointer data);
-static void ea_cal_view_event_added_cb (ECalView *cal_view,
- ECalViewEvent *event, gpointer data);
-
-static void ea_cal_view_dates_change_cb (GnomeCalendar *gcal, gpointer data);
-
-static gpointer parent_class = NULL;
-
-GType
-ea_cal_view_get_type (void)
-{
- static GType type = 0;
- AtkObjectFactory *factory;
- GTypeQuery query;
- GType derived_atk_type;
-
- if (!type) {
- static GTypeInfo tinfo = {
- sizeof (EaCalViewClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) ea_cal_view_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (EaCalView), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
-
- /*
- * Figure out the size of the class and instance
- * we are run-time deriving from (GailWidget, in this case)
- */
-
- factory = atk_registry_get_factory (atk_get_default_registry (),
- GTK_TYPE_WIDGET);
- derived_atk_type = atk_object_factory_get_accessible_type (factory);
- g_type_query (derived_atk_type, &query);
-
- tinfo.class_size = query.class_size;
- tinfo.instance_size = query.instance_size;
-
- type = g_type_register_static (derived_atk_type,
- "EaCalView", &tinfo, 0);
- }
-
- return type;
-}
-
-static void
-ea_cal_view_class_init (EaCalViewClass *klass)
-{
- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- class->get_parent = ea_cal_view_get_parent;
- class->get_index_in_parent = ea_cal_view_get_index_in_parent;
- class->initialize = ea_cal_view_real_initialize;
-}
-
-AtkObject*
-ea_cal_view_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (E_IS_CAL_VIEW (widget), NULL);
-
- object = g_object_new (EA_TYPE_CAL_VIEW, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- return accessible;
-}
-
-static void
-ea_cal_view_real_initialize (AtkObject *accessible, gpointer data)
-{
- ECalView *cal_view;
- GnomeCalendar *gcal;
-
- g_return_if_fail (EA_IS_CAL_VIEW (accessible));
- g_return_if_fail (E_IS_CAL_VIEW (data));
-
- ATK_OBJECT_CLASS (parent_class)->initialize (accessible, data);
- accessible->role = ATK_ROLE_CANVAS;
- cal_view = E_CAL_VIEW (data);
-
- /* add listener for event_changed, event_added
- * we don't need to listen on event_removed. When the e_text
- * of the event is removed, the cal_view_event will go to the state
- * of "defunct" (changed by weak ref callback of atkgobjectaccessible
- */
- g_signal_connect (G_OBJECT(cal_view), "event_changed",
- G_CALLBACK (ea_cal_view_event_changed_cb), NULL);
- g_signal_connect (G_OBJECT(cal_view), "event_added",
- G_CALLBACK (ea_cal_view_event_added_cb), NULL);
-
- /* listen for date changes of calendar */
- gcal = e_cal_view_get_calendar (cal_view);
-
- if (gcal)
- g_signal_connect (gcal, "dates_shown_changed",
- G_CALLBACK (ea_cal_view_dates_change_cb),
- accessible);
-}
-
-static AtkObject*
-ea_cal_view_get_parent (AtkObject *accessible)
-{
- ECalView *cal_view;
- GnomeCalendar *gnomeCalendar;
-
- g_return_val_if_fail (EA_IS_CAL_VIEW (accessible), NULL);
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return NULL;
- cal_view = E_CAL_VIEW (GTK_ACCESSIBLE (accessible)->widget);
-
- gnomeCalendar = e_cal_view_get_calendar (cal_view);
-
- return gtk_widget_get_accessible (GTK_WIDGET(gnomeCalendar));
-}
-
-static gint
-ea_cal_view_get_index_in_parent (AtkObject *accessible)
-{
- return 1;
-}
-
-static void
-ea_cal_view_event_changed_cb (ECalView *cal_view, ECalViewEvent *event,
- gpointer data)
-{
- AtkObject *atk_obj;
- EaCalView *ea_cal_view;
- AtkObject *event_atk_obj = NULL;
-
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
-
- atk_obj = gtk_widget_get_accessible (GTK_WIDGET(cal_view));
- if (!EA_IS_CAL_VIEW (atk_obj))
- return;
- ea_cal_view = EA_CAL_VIEW (atk_obj);
-
- if ((E_IS_DAY_VIEW (cal_view)) && event && event->canvas_item) {
- event_atk_obj =
- ea_calendar_helpers_get_accessible_for (event->canvas_item);
- }
- else if ((E_IS_WEEK_VIEW (cal_view)) && event) {
- EWeekViewEventSpan *span;
- EWeekViewEvent *week_view_event = (EWeekViewEvent *)event;
- EWeekView *week_view = E_WEEK_VIEW (cal_view);
- /* get the first span of the event */
- span = &g_array_index (week_view->spans, EWeekViewEventSpan,
- week_view_event->spans_index);
- if (span && span->text_item)
- event_atk_obj = ea_calendar_helpers_get_accessible_for (span->text_item);
- }
- if (event_atk_obj) {
-#ifdef ACC_DEBUG
- printf ("AccDebug: event=%p changed\n", event);
-#endif
- g_object_notify (G_OBJECT(event_atk_obj), "accessible-name");
- g_signal_emit_by_name (event_atk_obj, "visible_data_changed");
- }
-
-}
-
-static void
-ea_cal_view_event_added_cb (ECalView *cal_view, ECalViewEvent *event,
- gpointer data)
-{
- AtkObject *atk_obj;
- EaCalView *ea_cal_view;
- AtkObject *event_atk_obj = NULL;
- gint index;
-
- g_return_if_fail (E_IS_CAL_VIEW (cal_view));
-
- atk_obj = gtk_widget_get_accessible (GTK_WIDGET(cal_view));
- if (!EA_IS_CAL_VIEW (atk_obj))
- return;
- ea_cal_view = EA_CAL_VIEW (atk_obj);
-
- if ((E_IS_DAY_VIEW (cal_view)) && event && event->canvas_item) {
- event_atk_obj =
- ea_calendar_helpers_get_accessible_for (event->canvas_item);
- }
- else if ((E_IS_WEEK_VIEW (cal_view)) && event) {
- EWeekViewEventSpan *span;
- EWeekViewEvent *week_view_event = (EWeekViewEvent *)event;
- EWeekView *week_view = E_WEEK_VIEW (cal_view);
- /* get the first span of the event */
- span = &g_array_index (week_view->spans, EWeekViewEventSpan,
- week_view_event->spans_index);
- if (span && span->text_item)
- event_atk_obj = ea_calendar_helpers_get_accessible_for (span->text_item);
-
- }
- if (event_atk_obj) {
- index = atk_object_get_index_in_parent (event_atk_obj);
- if (index < 0)
- return;
-#ifdef ACC_DEBUG
- printf ("AccDebug: event=%p added\n", event);
-#endif
- g_signal_emit_by_name (atk_obj, "children_changed::add",
- index, event_atk_obj, NULL);
- }
-}
-
-static void
-ea_cal_view_dates_change_cb (GnomeCalendar *gcal, gpointer data)
-{
- AtkObject *atk_obj;
-
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
- g_return_if_fail (data);
- g_return_if_fail (EA_IS_CAL_VIEW (data));
-
- atk_obj = ATK_OBJECT(data);
- if (atk_obj->name) {
- g_free (atk_obj->name);
- atk_obj->name = NULL;
- }
- g_object_notify (G_OBJECT (data), "accessible-name");
- g_signal_emit_by_name (data, "visible_data_changed");
-}
diff --git a/a11y/calendar/ea-cal-view.h b/a11y/calendar/ea-cal-view.h
deleted file mode 100644
index 858aa497d4..0000000000
--- a/a11y/calendar/ea-cal-view.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-cal-view.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#ifndef __EA_CAL_VIEW_H__
-#define __EA_CAL_VIEW_H__
-
-#include <gtk/gtkaccessible.h>
-#include "e-cal-view.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define EA_TYPE_CAL_VIEW (ea_cal_view_get_type ())
-#define EA_CAL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EA_TYPE_CAL_VIEW, EaCalView))
-#define EA_CAL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EA_TYPE_CAL_VIEW, EaCalViewClass))
-#define EA_IS_CAL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EA_TYPE_CAL_VIEW))
-#define EA_IS_CAL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EA_TYPE_CAL_VIEW))
-#define EA_CAL_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EA_TYPE_CAL_VIEW, EaCalViewClass))
-
-typedef struct _EaCalView EaCalView;
-typedef struct _EaCalViewClass EaCalViewClass;
-
-struct _EaCalView
-{
- GtkAccessible parent;
-};
-
-GType ea_cal_view_get_type (void);
-
-struct _EaCalViewClass
-{
- GtkAccessibleClass parent_class;
-};
-
-AtkObject* ea_cal_view_new (GtkWidget *widget);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EA_CAL_VIEW_H__ */
diff --git a/a11y/calendar/ea-calendar-helpers.c b/a11y/calendar/ea-calendar-helpers.c
deleted file mode 100644
index e8b0d3aa9c..0000000000
--- a/a11y/calendar/ea-calendar-helpers.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-calendar-helpers.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-calendar-helpers.h"
-#include "ea-cal-view-event.h"
-#include "e-day-view.h"
-#include "e-week-view.h"
-
-#include <gal/e-text/e-text.h>
-
-/**
- * ea_calendar_helpers_get_accessible_for
- * @canvas_item: the canvas item (e_text) for a event
- * @returns: the atk object for the canvas_item
- *
- **/
-AtkObject *
-ea_calendar_helpers_get_accessible_for (GnomeCanvasItem *canvas_item)
-{
- AtkObject *atk_obj = NULL;
- GObject *g_obj;
-
- g_return_val_if_fail (E_IS_TEXT (canvas_item), NULL);
-
- g_obj = G_OBJECT (canvas_item);
- /* we cannot use atk_gobject_accessible_for_object here,
- * EaDayViewEvent/EaWeekViewEvent cannot be created by the
- * registered facotry of E_TEXT
- */
- atk_obj = g_object_get_data (g_obj, "accessible-object");
- if (!atk_obj)
- atk_obj = ea_cal_view_event_new (g_obj);
- return atk_obj;
-}
-
-/**
- * ea_calendar_helpers_get_view_widget_from:
- * @canvas_item: the canvas item (e_text) for a event
- * @returns: the cal view widget if exists
- *
- * Get the cal view widget contains the canvas_item.
- *
- **/
-ECalView *
-ea_calendar_helpers_get_cal_view_from (GnomeCanvasItem *canvas_item)
-{
- GnomeCanvas *canvas;
- GtkWidget *view_widget = NULL;
-
- g_return_val_if_fail (canvas_item, NULL);
- g_return_val_if_fail (E_IS_TEXT (canvas_item), NULL);
-
- /* canvas_item is the e_text for the event */
- /* canvas_item->canvas is the ECanvas for day view */
- /* parent of canvas_item->canvas is the EDayView or EWeekView widget */
- canvas = canvas_item->canvas;
- view_widget = gtk_widget_get_parent (GTK_WIDGET(canvas));
- if (!view_widget || !E_IS_CAL_VIEW (view_widget))
- return NULL;
- return E_CAL_VIEW (view_widget);
-}
-
-/**
- * ea_calendar_helpers_get_cal_view_event_from
- * @canvas_item: the cavas_item (e_text) for the event
- * @returns: the ECalViewEvent
- *
- * Get the ECalViewEvent for the canvas_item.
- *
- **/
-ECalViewEvent *
-ea_calendar_helpers_get_cal_view_event_from (GnomeCanvasItem *canvas_item)
-{
- ECalView *cal_view;
- gboolean event_found;
- ECalViewEvent *cal_view_event;
-
- g_return_val_if_fail (E_IS_TEXT (canvas_item), NULL);
-
- cal_view = ea_calendar_helpers_get_cal_view_from (canvas_item);
-
- if (!cal_view)
- return NULL;
-
- if (E_IS_DAY_VIEW (cal_view)) {
- gint event_day, event_num;
- EDayViewEvent *day_view_event;
- EDayView *day_view = E_DAY_VIEW (cal_view);
- event_found = e_day_view_find_event_from_item (day_view, canvas_item,
- &event_day, &event_num);
- if (!event_found)
- return NULL;
- if (event_day == E_DAY_VIEW_LONG_EVENT) {
- /* a long event */
- day_view_event = &g_array_index (day_view->long_events,
- EDayViewEvent, event_num);
- }
- else {
- /* a main canvas event */
- day_view_event = &g_array_index (day_view->events[event_day],
- EDayViewEvent, event_num);
- }
- cal_view_event = (ECalViewEvent *) day_view_event;
- }
- else if (E_IS_WEEK_VIEW (cal_view)) {
- gint event_num, span_num;
- EWeekViewEvent *week_view_event;
- EWeekView *week_view = E_WEEK_VIEW (cal_view);
- event_found = e_week_view_find_event_from_item (week_view,
- canvas_item,
- &event_num,
- &span_num);
- if (!event_found)
- return NULL;
-
- week_view_event = &g_array_index (week_view->events, EWeekViewEvent,
- event_num);
-
- cal_view_event = (ECalViewEvent *)week_view_event;
- }
- else {
- g_assert_not_reached ();
- return NULL;
- }
- return cal_view_event;
-}
diff --git a/a11y/calendar/ea-calendar-helpers.h b/a11y/calendar/ea-calendar-helpers.h
deleted file mode 100644
index 3b7417a4c0..0000000000
--- a/a11y/calendar/ea-calendar-helpers.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-calendar-helpers.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-/* Evolution Accessibility
- */
-
-#ifndef _EA_CALENDAR_HELPERS_H__
-#define _EA_CALENDAR_HELPERS_H__
-
-#include "ea-cal-view.h"
-
-AtkObject *
-ea_calendar_helpers_get_accessible_for (GnomeCanvasItem *canvas_item);
-
-ECalView *
-ea_calendar_helpers_get_cal_view_from (GnomeCanvasItem *canvas_item);
-
-ECalViewEvent *
-ea_calendar_helpers_get_cal_view_event_from (GnomeCanvasItem *canvas_item);
-
-#endif /* _EA_CALENDAR_HELPERS_H__ */
diff --git a/a11y/calendar/ea-calendar.c b/a11y/calendar/ea-calendar.c
deleted file mode 100644
index b5296c2618..0000000000
--- a/a11y/calendar/ea-calendar.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-calendar.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include <gal/e-text/e-text.h>
-#include "ea-calendar-helpers.h"
-#include "ea-factory.h"
-#include "ea-calendar.h"
-
-#include "calendar/ea-cal-view.h"
-#include "calendar/ea-cal-view-event.h"
-#include "calendar/ea-day-view.h"
-#include "calendar/ea-week-view.h"
-#include "calendar/ea-gnome-calendar.h"
-
-
-EA_FACTORY (EA_TYPE_CAL_VIEW, ea_cal_view, ea_cal_view_new);
-EA_FACTORY (EA_TYPE_DAY_VIEW, ea_day_view, ea_day_view_new);
-EA_FACTORY (EA_TYPE_WEEK_VIEW, ea_week_view, ea_week_view_new);
-EA_FACTORY (EA_TYPE_GNOME_CALENDAR, ea_gnome_calendar, ea_gnome_calendar_new);
-
-static gboolean ea_calendar_focus_watcher (GSignalInvocationHint *ihint,
- guint n_param_values,
- const GValue *param_values,
- gpointer data);
-
-void
-gnome_calendar_a11y_init (void)
-{
- EA_SET_FACTORY (gnome_calendar_get_type(), ea_gnome_calendar);
- /* we only add focus watcher when accessibility is enabled
- */
- if (atk_get_root ())
- g_signal_add_emission_hook (g_signal_lookup ("event", E_TYPE_TEXT),
- 0, ea_calendar_focus_watcher,
- NULL, (GDestroyNotify) NULL);
-}
-
-void
-e_cal_view_a11y_init (void)
-{
- EA_SET_FACTORY (e_cal_view_get_type(), ea_cal_view);
- /* we only add focus watcher when accessibility is enabled
- */
-#if 0
- if (atk_get_root ())
- g_signal_add_emission_hook (g_signal_lookup ("selection_time_changed",
- e_cal_view_get_type ()),
- 0, ea_calendar_focus_watcher,
- NULL, (GDestroyNotify) NULL);
-#endif
-}
-
-void
-e_day_view_a11y_init (void)
-{
- EA_SET_FACTORY (e_day_view_get_type(), ea_day_view);
-}
-
-void
-e_week_view_a11y_init (void)
-{
- EA_SET_FACTORY (e_week_view_get_type(), ea_week_view);
-}
-
-gboolean
-ea_calendar_focus_watcher (GSignalInvocationHint *ihint,
- guint n_param_values,
- const GValue *param_values,
- gpointer data)
-{
- GObject *object;
- GdkEvent *event;
-
- object = g_value_get_object (param_values + 0);
- event = g_value_get_boxed (param_values + 1);
-
- if (E_IS_TEXT (object)) {
- /* "event" signal on canvas item
- */
- GnomeCanvasItem *canvas_item;
- AtkObject *ea_event;
-
- canvas_item = GNOME_CANVAS_ITEM (object);
- if (event->type == GDK_FOCUS_CHANGE) {
- if (event->focus_change.in)
- ea_event =
- ea_calendar_helpers_get_accessible_for (canvas_item);
- else
- /* focus out */
- ea_event = NULL;
- atk_focus_tracker_notify (ea_event);
-
- }
- }
-#if 0
- else if (E_IS_DAY_VIEW (object)) {
- /* "selection_time_changed" signal on day_view
- */
- if (ATK_IS_SELECTION (object)) {
- AtkSelection *atk_selection;
- AtkObject *atk_obj;
- atk_selection = ATK_SELECTION (object);
- atk_obj = atk_selection_ref_selection (atk_selection, 0);
-
-#ifdef ACC_DEBUG
- printf ("EvoAcc: ref a selection %p\n", atk_selection);
-#endif
- atk_focus_tracker_notify (atk_obj);
- }
- }
-#endif
- return TRUE;
-}
diff --git a/a11y/calendar/ea-calendar.h b/a11y/calendar/ea-calendar.h
deleted file mode 100644
index 61cdab1a89..0000000000
--- a/a11y/calendar/ea-calendar.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-calendar.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-/* Evolution Accessibility
-*/
-
-#ifndef _EA_CALENDAR_H__
-#define _EA_CALENDAR_H__
-
-void gnome_calendar_a11y_init (void);
-void e_cal_view_a11y_init (void);
-void e_day_view_a11y_init (void);
-void e_week_view_a11y_init (void);
-
-#endif /* _EA_CALENDAR_H__ */
diff --git a/a11y/calendar/ea-day-view.c b/a11y/calendar/ea-day-view.c
deleted file mode 100644
index 65cfb31752..0000000000
--- a/a11y/calendar/ea-day-view.c
+++ /dev/null
@@ -1,245 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-day-view.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-day-view.h"
-#include "ea-cal-view-event.h"
-
-#include "ea-calendar-helpers.h"
-#include "calendar-commands.h"
-#include <glib/gstrfuncs.h>
-
-static void ea_day_view_class_init (EaDayViewClass *klass);
-
-static G_CONST_RETURN gchar* ea_day_view_get_name (AtkObject *accessible);
-static G_CONST_RETURN gchar* ea_day_view_get_description (AtkObject *accessible);
-static gint ea_day_view_get_n_children (AtkObject *obj);
-static AtkObject* ea_day_view_ref_child (AtkObject *obj,
- gint i);
-static gpointer parent_class = NULL;
-
-GType
-ea_day_view_get_type (void)
-{
- static GType type = 0;
- AtkObjectFactory *factory;
- GTypeQuery query;
- GType derived_atk_type;
-
- if (!type) {
- static GTypeInfo tinfo = {
- sizeof (EaDayViewClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) ea_day_view_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (EaDayView), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
-
- /*
- * Figure out the size of the class and instance
- * we are run-time deriving from (EaCalView, in this case)
- *
- * Note: we must still use run-time deriving here, because
- * our parent class EaCalView is run-time deriving.
- */
-
- factory = atk_registry_get_factory (atk_get_default_registry (),
- e_cal_view_get_type());
- derived_atk_type = atk_object_factory_get_accessible_type (factory);
- g_type_query (derived_atk_type, &query);
-
- tinfo.class_size = query.class_size;
- tinfo.instance_size = query.instance_size;
-
- type = g_type_register_static (derived_atk_type,
- "EaDayView", &tinfo, 0);
- }
-
- return type;
-}
-
-static void
-ea_day_view_class_init (EaDayViewClass *klass)
-{
- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- class->get_name = ea_day_view_get_name;
- class->get_description = ea_day_view_get_description;
-
- class->get_n_children = ea_day_view_get_n_children;
- class->ref_child = ea_day_view_ref_child;
-}
-
-AtkObject*
-ea_day_view_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (E_IS_DAY_VIEW (widget), NULL);
-
- object = g_object_new (EA_TYPE_DAY_VIEW, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
-#ifdef ACC_DEBUG
- printf ("EvoAcc: ea_day_view created %p\n", accessible);
-#endif
-
- return accessible;
-}
-
-static G_CONST_RETURN gchar*
-ea_day_view_get_name (AtkObject *accessible)
-{
- EDayView *day_view;
-
- g_return_val_if_fail (EA_IS_DAY_VIEW (accessible), NULL);
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return NULL;
- day_view = E_DAY_VIEW (GTK_ACCESSIBLE (accessible)->widget);
-
- if (!accessible->name) {
- GnomeCalendar *gcal;
- const gchar *label_text;
- GnomeCalendarViewType view_type;
-
- gcal = e_cal_view_get_calendar (E_CAL_VIEW (day_view));
- label_text = calendar_get_text_for_folder_bar_label (gcal);
-
- view_type = gnome_calendar_get_view (gcal);
- if (view_type == GNOME_CAL_WORK_WEEK_VIEW)
- accessible->name = g_strconcat ("work week view :",
- label_text,
- NULL);
- else
- accessible->name = g_strconcat ("day view :",
- label_text, NULL);
- }
- return accessible->name;
-}
-
-static G_CONST_RETURN gchar*
-ea_day_view_get_description (AtkObject *accessible)
-{
- EDayView *day_view;
-
- g_return_val_if_fail (EA_IS_DAY_VIEW (accessible), NULL);
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return NULL;
- day_view = E_DAY_VIEW (GTK_ACCESSIBLE (accessible)->widget);
-
- if (accessible->description)
- return accessible->description;
- else {
- GnomeCalendar *gcal;
- GnomeCalendarViewType view_type;
-
- gcal = e_cal_view_get_calendar (E_CAL_VIEW (day_view));
- view_type = gnome_calendar_get_view (gcal);
-
- if (view_type == GNOME_CAL_WORK_WEEK_VIEW)
- return "calendar view for a work week";
- else
- return "calendar view for one or more days";
- }
-}
-
-static gint
-ea_day_view_get_n_children (AtkObject *accessible)
-{
- EDayView *day_view;
- gint day;
- gint child_num = 0;
-
- g_return_val_if_fail (EA_IS_DAY_VIEW (accessible), -1);
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return -1;
-
- day_view = E_DAY_VIEW (GTK_ACCESSIBLE (accessible)->widget);
-
- child_num += day_view->long_events->len;
-
- for (day = 0; day < day_view->days_shown; day++) {
- child_num += day_view->events[day]->len;
- }
-
- return child_num;
-}
-
-static AtkObject *
-ea_day_view_ref_child (AtkObject *accessible, gint index)
-{
- EDayView *day_view;
- gint child_num;
- gint day;
- AtkObject *atk_object = NULL;
- EDayViewEvent *event = NULL;
-
- g_return_val_if_fail (EA_IS_DAY_VIEW (accessible), NULL);
-
- child_num = atk_object_get_n_accessible_children (accessible);
- if (child_num <= 0 || index < 0 || index >= child_num)
- return NULL;
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return NULL;
- day_view = E_DAY_VIEW (GTK_ACCESSIBLE (accessible)->widget);
-
- /* a long event */
- if (index < day_view->long_events->len) {
- event = &g_array_index (day_view->long_events,
- EDayViewEvent, index);
- }
- else {
- index -= day_view->long_events->len;
- day = 0;
- while (index >= day_view->events[day]->len) {
- index -= day_view->events[day]->len;
- ++day;
- }
-
- event = &g_array_index (day_view->events[day],
- EDayViewEvent, index);
- }
- if (event && event->canvas_item) {
- /* Not use atk_gobject_accessible_for_object here,
- * we need to do special thing here
- */
- atk_object = ea_calendar_helpers_get_accessible_for (event->canvas_item);
- g_object_ref (atk_object);
- }
- return atk_object;
-}
diff --git a/a11y/calendar/ea-day-view.h b/a11y/calendar/ea-day-view.h
deleted file mode 100644
index 5ca4614f03..0000000000
--- a/a11y/calendar/ea-day-view.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-day-view.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#ifndef __EA_DAY_VIEW_H__
-#define __EA_DAY_VIEW_H__
-
-#include "ea-cal-view.h"
-#include "e-day-view.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define EA_TYPE_DAY_VIEW (ea_day_view_get_type ())
-#define EA_DAY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EA_TYPE_DAY_VIEW, EaDayView))
-#define EA_DAY_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EA_TYPE_DAY_VIEW, EaDayViewClass))
-#define EA_IS_DAY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EA_TYPE_DAY_VIEW))
-#define EA_IS_DAY_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EA_TYPE_DAY_VIEW))
-#define EA_DAY_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EA_TYPE_DAY_VIEW, EaDayViewClass))
-
-typedef struct _EaDayView EaDayView;
-typedef struct _EaDayViewClass EaDayViewClass;
-
-struct _EaDayView
-{
- EaCalView parent;
-};
-
-GType ea_day_view_get_type (void);
-
-struct _EaDayViewClass
-{
- EaCalViewClass parent_class;
-};
-
-AtkObject* ea_day_view_new (GtkWidget *widget);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __EA_DAY_VIEW_H__ */
diff --git a/a11y/calendar/ea-gnome-calendar.c b/a11y/calendar/ea-gnome-calendar.c
deleted file mode 100644
index 407b8ed95f..0000000000
--- a/a11y/calendar/ea-gnome-calendar.c
+++ /dev/null
@@ -1,248 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-gnome-calendar.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-gnome-calendar.h"
-#include "calendar-commands.h"
-#include <gtk/gtknotebook.h>
-
-static void ea_gnome_calendar_class_init (EaGnomeCalendarClass *klass);
-
-static G_CONST_RETURN gchar* ea_gnome_calendar_get_name (AtkObject *accessible);
-static G_CONST_RETURN gchar* ea_gnome_calendar_get_description (AtkObject *accessible);
-static gint ea_gnome_calendar_get_n_children (AtkObject* obj);
-static AtkObject * ea_gnome_calendar_ref_child (AtkObject *obj, gint i);
-
-static void ea_gcal_switch_view_cb (GtkNotebook *widget, GtkNotebookPage *page,
- guint index, gpointer data);
-static void ea_gcal_dates_change_cb (GnomeCalendar *gcal, gpointer data);
-
-static gpointer parent_class = NULL;
-
-GType
-ea_gnome_calendar_get_type (void)
-{
- static GType type = 0;
- AtkObjectFactory *factory;
- GTypeQuery query;
- GType derived_atk_type;
-
- if (!type) {
- static GTypeInfo tinfo = {
- sizeof (EaGnomeCalendarClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) ea_gnome_calendar_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (EaGnomeCalendar), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
-
- /*
- * Figure out the size of the class and instance
- * we are run-time deriving from (GailWidget, in this case)
- */
-
- factory = atk_registry_get_factory (atk_get_default_registry (),
- GTK_TYPE_WIDGET);
- derived_atk_type = atk_object_factory_get_accessible_type (factory);
- g_type_query (derived_atk_type, &query);
- tinfo.class_size = query.class_size;
- tinfo.instance_size = query.instance_size;
-
- type = g_type_register_static (derived_atk_type,
- "EaGnomeCalendar", &tinfo, 0);
-
- }
-
- return type;
-}
-
-static void
-ea_gnome_calendar_class_init (EaGnomeCalendarClass *klass)
-{
- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- class->get_name = ea_gnome_calendar_get_name;
- class->get_description = ea_gnome_calendar_get_description;
-
- class->get_n_children = ea_gnome_calendar_get_n_children;
- class->ref_child = ea_gnome_calendar_ref_child;
-}
-
-AtkObject*
-ea_gnome_calendar_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
- GnomeCalendar *gcal;
- GtkWidget *notebook;
-
- g_return_val_if_fail (GNOME_IS_CALENDAR (widget), NULL);
-
- object = g_object_new (EA_TYPE_GNOME_CALENDAR, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
- accessible->role = ATK_ROLE_FILLER;
-
- gcal = GNOME_CALENDAR (widget);
-
- /* listen on view type change
- */
- g_signal_connect (widget, "dates_shown_changed",
- G_CALLBACK (ea_gcal_dates_change_cb),
- accessible);
- notebook = gnome_calendar_get_view_notebook_widget (gcal);
- if (notebook) {
- g_signal_connect (notebook, "switch_page",
- G_CALLBACK (ea_gcal_switch_view_cb),
- accessible);
- }
-
-#ifdef ACC_DEBUG
- printf ("EvoAcc: ea-gnome-calendar created: %p\n", accessible);
-#endif
-
- return accessible;
-}
-
-static G_CONST_RETURN gchar*
-ea_gnome_calendar_get_name (AtkObject *accessible)
-{
- if (accessible->name)
- return accessible->name;
- return "Gnome Calendar";
-}
-
-static G_CONST_RETURN gchar*
-ea_gnome_calendar_get_description (AtkObject *accessible)
-{
- if (accessible->description)
- return accessible->description;
- return "Gnome Calendar";
-}
-
-static gint
-ea_gnome_calendar_get_n_children (AtkObject* obj)
-{
- g_return_val_if_fail (EA_IS_GNOME_CALENDAR (obj), 0);
-
- if (!GTK_ACCESSIBLE (obj)->widget)
- return -1;
- return 4;
-}
-
-static AtkObject *
-ea_gnome_calendar_ref_child (AtkObject *obj, gint i)
-{
- AtkObject * child = NULL;
- GnomeCalendar * calendarWidget;
- GtkWidget *childWidget;
-
- g_return_val_if_fail (EA_IS_GNOME_CALENDAR (obj), NULL);
- /* valid child index range is [0-3] */
- if (i < 0 || i >3 )
- return NULL;
-
- if (!GTK_ACCESSIBLE (obj)->widget)
- return NULL;
- calendarWidget = GNOME_CALENDAR (GTK_ACCESSIBLE (obj)->widget);
-
- switch (i) {
- case 0:
- /* for the search bar */
- childWidget = gnome_calendar_get_search_bar_widget (calendarWidget);
- child = gtk_widget_get_accessible (childWidget);
- atk_object_set_parent (child, obj);
- atk_object_set_name (child, "search bar");
- atk_object_set_description (child, "evolution calendar search bar");
- break;
- case 1:
- /* for the day/week view */
- childWidget = gnome_calendar_get_current_view_widget (calendarWidget);
- child = gtk_widget_get_accessible (childWidget);
- atk_object_set_parent (child, obj);
- break;
- case 2:
- /* for calendar */
- childWidget = gnome_calendar_get_e_calendar_widget (calendarWidget);
- child = gtk_widget_get_accessible (childWidget);
- break;
- case 3:
- /* for todo list */
- childWidget = GTK_WIDGET (gnome_calendar_get_task_pad (calendarWidget));
- child = gtk_widget_get_accessible (childWidget);
- break;
- default:
- break;
- }
- if (child)
- g_object_ref(child);
- return child;
-}
-
-static void
-ea_gcal_switch_view_cb (GtkNotebook *widget, GtkNotebookPage *page,
- guint index, gpointer data)
-{
- GtkWidget *new_widget;
-
- new_widget = gtk_notebook_get_nth_page (widget, index);
-
- /* views are always the second child in gnome calendar
- */
- if (new_widget)
- g_signal_emit_by_name (G_OBJECT(data), "children_changed::add",
- 1, gtk_widget_get_accessible (new_widget), NULL);
-
-#ifdef ACC_DEBUG
- printf ("AccDebug: view switch to widget %p (index=%d) \n",
- new_widget, index);
-#endif
-}
-
-static void
-ea_gcal_dates_change_cb (GnomeCalendar *gcal, gpointer data)
-{
- const gchar *new_name;
-
- g_return_if_fail (GNOME_IS_CALENDAR (gcal));
- g_return_if_fail (data);
- g_return_if_fail (EA_IS_GNOME_CALENDAR (data));
-
- new_name = calendar_get_text_for_folder_bar_label (gcal);
- atk_object_set_name (ATK_OBJECT(data), new_name);
- g_signal_emit_by_name (data, "visible_data_changed");
-
-#ifdef ACC_DEBUG
- printf ("AccDebug: calendar dates changed, label=%s\n", new_name);
-#endif
-}
diff --git a/a11y/calendar/ea-gnome-calendar.h b/a11y/calendar/ea-gnome-calendar.h
deleted file mode 100644
index 2cb39219c4..0000000000
--- a/a11y/calendar/ea-gnome-calendar.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-gnome-calendar.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#ifndef __EA_GNOME_CALENDAR_H__
-#define __EA_GNOME_CALENDAR_H__
-
-#include <gtk/gtkaccessible.h>
-#include "gnome-cal.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define EA_TYPE_GNOME_CALENDAR (ea_gnome_calendar_get_type ())
-#define EA_GNOME_CALENDAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EA_TYPE_GNOME_CALENDAR, EaGnomeCalendar))
-#define EA_GNOME_CALENDAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EA_TYPE_GNOME_CALENDAR, EaGnomeCalendarClass))
-#define EA_IS_GNOME_CALENDAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EA_TYPE_GNOME_CALENDAR))
-#define EA_IS_GNOME_CALENDAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EA_TYPE_GNOME_CALENDAR))
-#define EA_GNOME_CALENDAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EA_TYPE_GNOME_CALENDAR, EaGnomeCalendarClass))
-
-typedef struct _EaGnomeCalendar EaGnomeCalendar;
-typedef struct _EaGnomeCalendarClass EaGnomeCalendarClass;
-
-struct _EaGnomeCalendar
-{
- GtkAccessible parent;
-};
-
-GType ea_gnome_calendar_get_type (void);
-
-struct _EaGnomeCalendarClass
-{
- GtkAccessibleClass parent_class;
-};
-
-AtkObject* ea_gnome_calendar_new (GtkWidget *widget);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __EA_GNOME_CALENDAR_H__ */
diff --git a/a11y/calendar/ea-week-view.c b/a11y/calendar/ea-week-view.c
deleted file mode 100644
index 9917d147d2..0000000000
--- a/a11y/calendar/ea-week-view.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-week-view.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-week-view.h"
-#include "ea-cal-view.h"
-#include "ea-cal-view-event.h"
-#include "ea-calendar-helpers.h"
-#include "calendar-commands.h"
-
-static void ea_week_view_class_init (EaWeekViewClass *klass);
-
-static G_CONST_RETURN gchar* ea_week_view_get_name (AtkObject *accessible);
-static G_CONST_RETURN gchar* ea_week_view_get_description (AtkObject *accessible);
-static gint ea_week_view_get_n_children (AtkObject *obj);
-static AtkObject* ea_week_view_ref_child (AtkObject *obj,
- gint i);
-
-static gpointer parent_class = NULL;
-
-GType
-ea_week_view_get_type (void)
-{
- static GType type = 0;
- AtkObjectFactory *factory;
- GTypeQuery query;
- GType derived_atk_type;
-
- if (!type) {
- static GTypeInfo tinfo = {
- sizeof (EaWeekViewClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) ea_week_view_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (EaWeekView), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
-
- /*
- * Figure out the size of the class and instance
- * we are run-time deriving from (EaCalView, in this case)
- *
- * Note: we must still use run-time deriving here, because
- * our parent class EaCalView is run-time deriving.
- */
-
- factory = atk_registry_get_factory (atk_get_default_registry (),
- e_cal_view_get_type());
- derived_atk_type = atk_object_factory_get_accessible_type (factory);
- g_type_query (derived_atk_type, &query);
-
- tinfo.class_size = query.class_size;
- tinfo.instance_size = query.instance_size;
-
- type = g_type_register_static (derived_atk_type,
- "EaWeekView", &tinfo, 0);
-
- }
-
- return type;
-}
-
-static void
-ea_week_view_class_init (EaWeekViewClass *klass)
-{
- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- class->get_name = ea_week_view_get_name;
- class->get_description = ea_week_view_get_description;
-
- class->get_n_children = ea_week_view_get_n_children;
- class->ref_child = ea_week_view_ref_child;
-}
-
-AtkObject*
-ea_week_view_new (GtkWidget *widget)
-{
- GObject *object;
- AtkObject *accessible;
-
- g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
-
- object = g_object_new (EA_TYPE_WEEK_VIEW, NULL);
-
- accessible = ATK_OBJECT (object);
- atk_object_initialize (accessible, widget);
-
-#ifdef ACC_DEBUG
- printf ("EvoAcc: ea_week_view created %p\n", accessible);
-#endif
-
- return accessible;
-}
-
-static G_CONST_RETURN gchar*
-ea_week_view_get_name (AtkObject *accessible)
-{
- EWeekView *week_view;
-
- g_return_val_if_fail (EA_IS_WEEK_VIEW (accessible), NULL);
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return NULL;
- week_view = E_WEEK_VIEW (GTK_ACCESSIBLE (accessible)->widget);
-
- if (!accessible->name) {
- GnomeCalendar *gcal;
- const gchar *label_text;
- GnomeCalendarViewType view_type;
-
- gcal = e_cal_view_get_calendar (E_CAL_VIEW (week_view));
- label_text = calendar_get_text_for_folder_bar_label (gcal);
- view_type = gnome_calendar_get_view (gcal);
-
- view_type = gnome_calendar_get_view (gcal);
-
- if (view_type == GNOME_CAL_MONTH_VIEW)
- accessible->name = g_strconcat ("month view :",
- label_text,
- NULL);
-
-
- else
- accessible->name = g_strconcat ("week view :",
- label_text, NULL);
- }
- return accessible->name;
-}
-
-static G_CONST_RETURN gchar*
-ea_week_view_get_description (AtkObject *accessible)
-{
- EWeekView *week_view;
-
- g_return_val_if_fail (EA_IS_WEEK_VIEW (accessible), NULL);
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return NULL;
- week_view = E_WEEK_VIEW (GTK_ACCESSIBLE (accessible)->widget);
-
- if (accessible->description)
- return accessible->description;
- else {
- GnomeCalendar *gcal;
- GnomeCalendarViewType view_type;
-
- gcal = e_cal_view_get_calendar (E_CAL_VIEW (week_view));
- view_type = gnome_calendar_get_view (gcal);
-
- if (view_type == GNOME_CAL_MONTH_VIEW)
- return "calendar view for a month";
- else
- return "calendar view for one or more weeks";
- }
-}
-
-static gint
-ea_week_view_get_n_children (AtkObject *accessible)
-{
- EWeekView *week_view;
-
- g_return_val_if_fail (EA_IS_WEEK_VIEW (accessible), -1);
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return -1;
- week_view = E_WEEK_VIEW (GTK_ACCESSIBLE (accessible)->widget);
-
- return week_view->events->len;
-}
-
-static AtkObject *
-ea_week_view_ref_child (AtkObject *accessible, gint index)
-{
- EWeekView *week_view;
- gint child_num;
- AtkObject *atk_object = NULL;
- EWeekViewEvent *event;
- EWeekViewEventSpan *span;
- gint span_num = 0;
-
- g_return_val_if_fail (EA_IS_WEEK_VIEW (accessible), NULL);
-
- child_num = atk_object_get_n_accessible_children (accessible);
- if (child_num <= 0 || index < 0 || index >= child_num)
- return NULL;
-
- if (!GTK_ACCESSIBLE (accessible)->widget)
- return NULL;
- week_view = E_WEEK_VIEW (GTK_ACCESSIBLE (accessible)->widget);
-
- event = &g_array_index (week_view->events,
- EWeekViewEvent, index);
- span = &g_array_index (week_view->spans, EWeekViewEventSpan,
- event->spans_index + span_num);
-
- if (event) {
- /* Not use atk_gobject_accessible_for_object here,
- * we need to do special thing here
- */
- atk_object = ea_calendar_helpers_get_accessible_for (span->text_item);
- g_object_ref (atk_object);
- }
-#ifdef ACC_DEBUG
- printf ("EvoAcc: ea_week_view_ref_child [%d]=%p\n",
- index, atk_object);
-#endif
- return atk_object;
-}
diff --git a/a11y/calendar/ea-week-view.h b/a11y/calendar/ea-week-view.h
deleted file mode 100644
index f0ed117375..0000000000
--- a/a11y/calendar/ea-week-view.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-week-view.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#ifndef __EA_WEEK_VIEW_H__
-#define __EA_WEEK_VIEW_H__
-
-#include <gtk/gtkaccessible.h>
-#include "e-week-view.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define EA_TYPE_WEEK_VIEW (ea_week_view_get_type ())
-#define EA_WEEK_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EA_TYPE_WEEK_VIEW, EaWeekView))
-#define EA_WEEK_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EA_TYPE_WEEK_VIEW, EaWeekViewClass))
-#define EA_IS_WEEK_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EA_TYPE_WEEK_VIEW))
-#define EA_IS_WEEK_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EA_TYPE_WEEK_VIEW))
-#define EA_WEEK_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EA_TYPE_WEEK_VIEW, EaWeekViewClass))
-
-typedef struct _EaWeekView EaWeekView;
-typedef struct _EaWeekViewClass EaWeekViewClass;
-
-struct _EaWeekView
-{
- GtkAccessible parent;
-};
-
-GType ea_week_view_get_type (void);
-
-struct _EaWeekViewClass
-{
- GtkAccessibleClass parent_class;
-};
-
-AtkObject* ea_week_view_new (GtkWidget *widget);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __EA_WEEK_VIEW_H__ */
diff --git a/a11y/e-table/.cvsignore b/a11y/e-table/.cvsignore
deleted file mode 100644
index 5b48d3f593..0000000000
--- a/a11y/e-table/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.libs
-Makefile.in
-Makefile
-*.la
diff --git a/a11y/e-table/gal-a11y-e-cell-registry.c b/a11y/e-table/gal-a11y-e-cell-registry.c
deleted file mode 100644
index 7110179554..0000000000
--- a/a11y/e-table/gal-a11y-e-cell-registry.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-e-cell-registry.h"
-#include "gal-a11y-e-cell.h"
-
-static GObjectClass *parent_class;
-static GalA11yECellRegistry *default_registry;
-#define PARENT_TYPE (G_TYPE_OBJECT)
-
-struct _GalA11yECellRegistryPrivate {
- GHashTable *table;
-};
-
-/* Static functions */
-
-static void
-gal_a11y_e_cell_registry_finalize (GObject *obj)
-{
- GalA11yECellRegistry *registry = GAL_A11Y_E_CELL_REGISTRY (obj);
-
- g_hash_table_destroy (registry->priv->table);
- g_free (registry->priv);
-}
-
-static void
-gal_a11y_e_cell_registry_class_init (GalA11yECellRegistryClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- object_class->finalize = gal_a11y_e_cell_registry_finalize;
-}
-
-static void
-gal_a11y_e_cell_registry_init (GalA11yECellRegistry *registry)
-{
- registry->priv = g_new (GalA11yECellRegistryPrivate, 1);
- registry->priv->table = g_hash_table_new (NULL, NULL);
-}
-
-/**
- * gal_a11y_e_cell_registry_get_type:
- * @void:
- *
- * Registers the &GalA11yECellRegistry class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yECellRegistry class.
- **/
-GType
-gal_a11y_e_cell_registry_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- GTypeInfo info = {
- sizeof (GalA11yECellRegistryClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) gal_a11y_e_cell_registry_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yECellRegistry),
- 0,
- (GInstanceInitFunc) gal_a11y_e_cell_registry_init,
- NULL /* value_cell */
- };
-
- type = g_type_register_static (PARENT_TYPE, "GalA11yECellRegistry", &info, 0);
- }
-
- return type;
-}
-
-static void
-init_default_registry (void)
-{
- if (default_registry == NULL) {
- default_registry = g_object_new (gal_a11y_e_cell_registry_get_type(), NULL);
- }
-}
-
-
-AtkObject *
-gal_a11y_e_cell_registry_get_object (GalA11yECellRegistry *registry,
- ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row)
-{
- GalA11yECellRegistryFunc func = NULL;
- GType type;
-
- if (registry == NULL) {
- init_default_registry ();
- registry = default_registry;
- }
-
- type = GTK_OBJECT_TYPE (cell_view->ecell);
- while (func == NULL && type != 0) {
- func = g_hash_table_lookup (registry->priv->table, GINT_TO_POINTER (type));
- type = g_type_parent (type);
- }
-
- if (func)
- return func (item, cell_view, parent, model_col, view_col, row);
- else
- return gal_a11y_e_cell_new (item, cell_view, parent, model_col, view_col, row);
-}
-
-void
-gal_a11y_e_cell_registry_add_cell_type (GalA11yECellRegistry *registry,
- GType type,
- GalA11yECellRegistryFunc func)
-{
- if (registry == NULL) {
- init_default_registry ();
- registry = default_registry;
- }
-
- g_hash_table_insert (registry->priv->table, GINT_TO_POINTER (type), func);
-}
diff --git a/a11y/e-table/gal-a11y-e-cell-registry.h b/a11y/e-table/gal-a11y-e-cell-registry.h
deleted file mode 100644
index eecd41139c..0000000000
--- a/a11y/e-table/gal-a11y-e-cell-registry.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_E_CELL_REGISTRY_H__
-#define __GAL_A11Y_E_CELL_REGISTRY_H__
-
-#include <glib-object.h>
-#include <atk/atkobject.h>
-#include <gal/e-table/e-table-item.h>
-#include <gal/e-table/e-cell.h>
-
-#define GAL_A11Y_TYPE_E_CELL_REGISTRY (gal_a11y_e_cell_registry_get_type ())
-#define GAL_A11Y_E_CELL_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_CELL_REGISTRY, GalA11yECellRegistry))
-#define GAL_A11Y_E_CELL_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_CELL_REGISTRY, GalA11yECellRegistryClass))
-#define GAL_A11Y_IS_E_CELL_REGISTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_CELL_REGISTRY))
-#define GAL_A11Y_IS_E_CELL_REGISTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_CELL_REGISTRY))
-
-typedef struct _GalA11yECellRegistry GalA11yECellRegistry;
-typedef struct _GalA11yECellRegistryClass GalA11yECellRegistryClass;
-typedef struct _GalA11yECellRegistryPrivate GalA11yECellRegistryPrivate;
-
-typedef AtkObject *(*GalA11yECellRegistryFunc) (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row);
-
-struct _GalA11yECellRegistry {
- GObject object;
-
- GalA11yECellRegistryPrivate *priv;
-};
-
-struct _GalA11yECellRegistryClass {
- GObjectClass parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_cell_registry_get_type (void);
-AtkObject *gal_a11y_e_cell_registry_get_object (GalA11yECellRegistry *registry,
- ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row);
-void gal_a11y_e_cell_registry_add_cell_type (GalA11yECellRegistry *registry,
- GType type,
- GalA11yECellRegistryFunc func);
-
-#endif /* ! __GAL_A11Y_E_CELL_REGISTRY_H__ */
diff --git a/a11y/e-table/gal-a11y-e-cell-text.c b/a11y/e-table/gal-a11y-e-cell-text.c
deleted file mode 100644
index c5a94144a8..0000000000
--- a/a11y/e-table/gal-a11y-e-cell-text.c
+++ /dev/null
@@ -1,486 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-e-cell-text.h"
-#include "gal-a11y-util.h"
-#include <gal/e-table/e-cell-text.h>
-#include <atk/atkobject.h>
-#include <atk/atktext.h>
-#include <atk/atkeditabletext.h>
-
-#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yECellTextClass))
-static AtkObjectClass *parent_class;
-#define PARENT_TYPE (gal_a11y_e_cell_get_type ())
-
-/* XXX: these functions are undefined */
-#define e_cell_text_get_selection(a,b,c,d,e) NULL
-#define e_cell_text_set_selection(a,b,c,d,e) FALSE
-
-/* Static functions */
-static gchar *
-ect_get_text (AtkText *text,
- gint start_offset,
- gint end_offset)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
- char *ret_val;
- char *full_text =
- e_cell_text_get_text (ect, gaec->item->table_model, gaec->model_col, gaec->row);
-
- if (end_offset == -1)
- end_offset = strlen (full_text);
- else
- end_offset = g_utf8_offset_to_pointer (full_text, end_offset) - full_text;
-
- start_offset = g_utf8_offset_to_pointer (full_text, start_offset) - full_text;
-
- ret_val = g_strndup (full_text + start_offset, end_offset - start_offset);
-
- e_cell_text_free_text (ect, full_text);
-
- return ret_val;
-}
-
-static gchar *
-ect_get_text_after_offset (AtkText *text,
- gint offset,
- AtkTextBoundary boundary_type,
- gint *start_offset,
- gint *end_offset)
-{
- /* Unimplemented */
- return NULL;
-}
-
-static gchar *
-ect_get_text_at_offset (AtkText *text,
- gint offset,
- AtkTextBoundary boundary_type,
- gint *start_offset,
- gint *end_offset)
-{
- /* Unimplemented */
- return NULL;
-}
-
-static gunichar
-ect_get_character_at_offset (AtkText *text,
- gint offset)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
- gunichar ret_val;
- char *full_text;
- char *at_offset;
-
- full_text = e_cell_text_get_text (ect, gaec->item->table_model, gaec->model_col, gaec->row);
- at_offset = g_utf8_offset_to_pointer (full_text, offset);
- ret_val = g_utf8_get_char_validated (at_offset, -1);
- e_cell_text_free_text (ect, full_text);
-
- return ret_val;
-}
-
-
-static gchar*
-ect_get_text_before_offset (AtkText *text,
- gint offset,
- AtkTextBoundary boundary_type,
- gint *start_offset,
- gint *end_offset)
-{
- /* Unimplemented */
- return NULL;
-}
-
-
-static gint
-ect_get_caret_offset (AtkText *text)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- int start, end;
- if (e_cell_text_get_selection (gaec->cell_view,
- gaec->view_col, gaec->row,
- &start, &end)
- && start == end) {
- char *full_text;
- int ret_val;
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
-
- full_text = e_cell_text_get_text (ect, gaec->item->table_model, gaec->model_col, gaec->row);
- ret_val = g_utf8_pointer_to_offset (full_text, full_text + start);
- e_cell_text_free_text (ect, full_text);
-
- return ret_val;
- } else {
- return -1;
- }
-}
-
-
-static AtkAttributeSet*
-ect_get_run_attributes (AtkText *text,
- gint offset,
- gint *start_offset,
- gint *end_offset)
-{
- /* Unimplemented */
- return NULL;
-}
-
-
-static AtkAttributeSet*
-ect_get_default_attributes (AtkText *text)
-{
- /* Unimplemented */
- return NULL;
-}
-
-
-static void
-ect_get_character_extents (AtkText *text,
- gint offset,
- gint *x,
- gint *y,
- gint *width,
- gint *height,
- AtkCoordType coords)
-{
- /* Unimplemented */
-}
-
-
-static gint
-ect_get_character_count (AtkText *text)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
- int ret_val;
-
- char *full_text = e_cell_text_get_text (ect, gaec->item->table_model, gaec->model_col, gaec->row);
-
- ret_val = g_utf8_strlen (full_text, -1);
- e_cell_text_free_text (ect, full_text);
- return ret_val;
-}
-
-
-static gint
-ect_get_offset_at_point (AtkText *text,
- gint x,
- gint y,
- AtkCoordType coords)
-{
- /* Unimplemented */
- return 0;
-}
-
-
-static gint
-ect_get_n_selections (AtkText *text)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- int selection_start, selection_end;
- if (e_cell_text_get_selection (gaec->cell_view,
- gaec->view_col, gaec->row,
- &selection_start,
- &selection_end) &&
- selection_start != selection_end)
- return 1;
- return 0;
-}
-
-
-static gchar*
-ect_get_selection (AtkText *text,
- gint selection_num,
- gint *start_offset,
- gint *end_offset)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
- int selection_start, selection_end;
- if (selection_num == 0 &&
- e_cell_text_get_selection (gaec->cell_view,
- gaec->view_col, gaec->row,
- &selection_start,
- &selection_end) &&
- selection_start != selection_end) {
- char *ret_val;
- char *full_text =
- e_cell_text_get_text (ect, gaec->item->table_model, gaec->model_col, gaec->row);
-
- ret_val = g_strndup (full_text + selection_start, selection_end - selection_start);
-
- if (start_offset)
- *start_offset = g_utf8_pointer_to_offset (full_text, full_text + selection_start);
- if (end_offset)
- *end_offset = g_utf8_pointer_to_offset (full_text, full_text + selection_end);
-
- e_cell_text_free_text (ect, full_text);
-
- return ret_val;
- }
- return NULL;
-}
-
-
-static gboolean
-ect_add_selection (AtkText *text,
- gint start_offset,
- gint end_offset)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
- int selection_start, selection_end;
- if (e_cell_text_get_selection (gaec->cell_view,
- gaec->view_col, gaec->row,
- &selection_start,
- &selection_end) &&
- selection_start == selection_end &&
- start_offset != end_offset) {
- char *full_text;
-
- full_text = e_cell_text_get_text (ect, gaec->item->table_model, gaec->model_col, gaec->row);
- start_offset = g_utf8_offset_to_pointer (full_text, start_offset) - full_text;
- end_offset = g_utf8_offset_to_pointer (full_text, end_offset) - full_text;
- e_cell_text_free_text (ect, full_text);
-
- return e_cell_text_set_selection (gaec->cell_view,
- gaec->view_col, gaec->row,
- start_offset, end_offset);
- }
- return FALSE;
-}
-
-
-static gboolean
-ect_remove_selection (AtkText *text,
- gint selection_num)
-{
- /* Unimplemented */
- return FALSE;
-}
-
-
-static gboolean
-ect_set_selection (AtkText *text,
- gint selection_num,
- gint start_offset,
- gint end_offset)
-{
- /* Unimplemented */
- return FALSE;
-}
-
-
-static gboolean
-ect_set_caret_offset (AtkText *text,
- gint offset)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
- char *full_text;
-
- full_text = e_cell_text_get_text (ect, gaec->item->table_model, gaec->model_col, gaec->row);
- offset = g_utf8_offset_to_pointer (full_text, offset) - full_text;
- e_cell_text_free_text (ect, full_text);
-
- return e_cell_text_set_selection (gaec->cell_view,
- gaec->view_col, gaec->row,
- offset, offset);
-}
-
-static gboolean
-ect_set_run_attributes (AtkEditableText *text,
- AtkAttributeSet *attrib_set,
- gint start_offset,
- gint end_offset)
-{
- /* Unimplemented */
- return FALSE;
-}
-
-static void
-ect_set_text_contents (AtkEditableText *text,
- const gchar *string)
-{
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
-
- e_cell_text_set_value (ect, gaec->item->table_model, gaec->model_col, gaec->row, string);
-}
-
-static void
-ect_insert_text (AtkEditableText *text,
- const gchar *string,
- gint length,
- gint *position)
-{
- /* Utf8 unimplemented */
- GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
- ECellText *ect = E_CELL_TEXT (gaec->cell_view->ecell);
-
- char *full_text = e_cell_text_get_text (ect, gaec->item->table_model, gaec->model_col, gaec->row);
- char *result = g_strdup_printf ("%.*s%.*s%s", *position, full_text, length, string, full_text + *position);
-
- e_cell_text_set_value (ect, gaec->item->table_model, gaec->model_col, gaec->row, result);
-
- *position += length;
-
- g_free (result);
- e_cell_text_free_text (ect, full_text);
-}
-
-static void
-ect_copy_text (AtkEditableText *text,
- gint start_pos,
- gint end_pos)
-{
- /* Unimplemented */
-}
-
-static void
-ect_cut_text (AtkEditableText *text,
- gint start_pos,
- gint end_pos)
-{
- /* Unimplemented */
-}
-
-static void
-ect_delete_text (AtkEditableText *text,
- gint start_pos,
- gint end_pos)
-{
- /* Unimplemented */
-}
-
-static void
-ect_paste_text (AtkEditableText *text,
- gint position)
-{
- /* Unimplemented */
-}
-
-
-static void
-ect_atk_text_iface_init (AtkTextIface *iface)
-{
- iface->get_text = ect_get_text;
- iface->get_text_after_offset = ect_get_text_after_offset;
- iface->get_text_at_offset = ect_get_text_at_offset;
- iface->get_character_at_offset = ect_get_character_at_offset;
- iface->get_text_before_offset = ect_get_text_before_offset;
- iface->get_caret_offset = ect_get_caret_offset;
- iface->get_run_attributes = ect_get_run_attributes;
- iface->get_default_attributes = ect_get_default_attributes;
- iface->get_character_extents = ect_get_character_extents;
- iface->get_character_count = ect_get_character_count;
- iface->get_offset_at_point = ect_get_offset_at_point;
- iface->get_n_selections = ect_get_n_selections;
- iface->get_selection = ect_get_selection;
- iface->add_selection = ect_add_selection;
- iface->remove_selection = ect_remove_selection;
- iface->set_selection = ect_set_selection;
- iface->set_caret_offset = ect_set_caret_offset;
-}
-
-static void
-ect_atk_editable_text_iface_init (AtkEditableTextIface *iface)
-{
- iface->set_run_attributes = ect_set_run_attributes;
- iface->set_text_contents = ect_set_text_contents;
- iface->insert_text = ect_insert_text;
- iface->copy_text = ect_copy_text;
- iface->cut_text = ect_cut_text;
- iface->delete_text = ect_delete_text;
- iface->paste_text = ect_paste_text;
-}
-
-static void
-ect_class_init (GalA11yECellTextClass *klass)
-{
- parent_class = g_type_class_ref (PARENT_TYPE);
-}
-
-static void
-ect_init (GalA11yECellText *a11y)
-{
-}
-
-/**
- * gal_a11y_e_cell_text_get_type:
- * @void:
- *
- * Registers the &GalA11yECellText class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yECellText class.
- **/
-GType
-gal_a11y_e_cell_text_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- GTypeInfo info = {
- sizeof (GalA11yECellTextClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) ect_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yECellText),
- 0,
- (GInstanceInitFunc) ect_init,
- NULL /* value_cell_text */
- };
-
- static const GInterfaceInfo atk_text_info = {
- (GInterfaceInitFunc) ect_atk_text_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- static const GInterfaceInfo atk_editable_text_info = {
- (GInterfaceInitFunc) ect_atk_editable_text_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- type = g_type_register_static (PARENT_TYPE, "GalA11yECellText", &info, 0);
- g_type_add_interface_static (type, ATK_TYPE_TEXT, &atk_text_info);
- g_type_add_interface_static (type, ATK_TYPE_EDITABLE_TEXT, &atk_editable_text_info);
- }
-
- return type;
-}
-AtkObject *
-gal_a11y_e_cell_text_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row)
-{
- AtkObject *a11y;
-
- a11y = g_object_new (gal_a11y_e_cell_text_get_type (), NULL);
-
- gal_a11y_e_cell_construct (a11y,
- item,
- cell_view,
- parent,
- model_col,
- view_col,
- row);
- return a11y;
-}
diff --git a/a11y/e-table/gal-a11y-e-cell-text.h b/a11y/e-table/gal-a11y-e-cell-text.h
deleted file mode 100644
index 3d9a4447be..0000000000
--- a/a11y/e-table/gal-a11y-e-cell-text.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_E_CELL_TEXT_H__
-#define __GAL_A11Y_E_CELL_TEXT_H__
-
-#include <glib-object.h>
-#include <gal/e-table/e-table-item.h>
-#include <gal/e-table/e-cell-text.h>
-#include <a11y/e-table/gal-a11y-e-cell.h>
-
-#define GAL_A11Y_TYPE_E_CELL_TEXT (gal_a11y_e_cell_text_get_type ())
-#define GAL_A11Y_E_CELL_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_CELL_TEXT, GalA11yECellText))
-#define GAL_A11Y_E_CELL_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_CELL_TEXT, GalA11yECellTextClass))
-#define GAL_A11Y_IS_E_CELL_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_CELL_TEXT))
-#define GAL_A11Y_IS_E_CELL_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_CELL_TEXT))
-
-typedef struct _GalA11yECellText GalA11yECellText;
-typedef struct _GalA11yECellTextClass GalA11yECellTextClass;
-typedef struct _GalA11yECellTextPrivate GalA11yECellTextPrivate;
-
-/* This struct should actually be larger as this isn't what we derive from.
- * The GalA11yECellTextPrivate comes right after the parent class structure.
- **/
-struct _GalA11yECellText {
- GalA11yECell object;
-};
-
-struct _GalA11yECellTextClass {
- GalA11yECellClass parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_cell_text_get_type (void);
-AtkObject *gal_a11y_e_cell_text_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row);
-
-#endif /* ! __GAL_A11Y_E_CELL_TEXT_H__ */
diff --git a/a11y/e-table/gal-a11y-e-cell.c b/a11y/e-table/gal-a11y-e-cell.c
deleted file mode 100644
index ceac5d5817..0000000000
--- a/a11y/e-table/gal-a11y-e-cell.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-e-cell.h"
-#include "gal-a11y-util.h"
-#include <atk/atkobject.h>
-#include <atk/atkcomponent.h>
-
-#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yECellClass))
-static GObjectClass *parent_class;
-#define PARENT_TYPE (atk_object_get_type ())
-
-
-#if 0
-static void
-unref_item (gpointer user_data, GObject *obj_loc)
-{
- GalA11yECell *a11y = GAL_A11Y_E_CELL (user_data);
- a11y->item = NULL;
- g_object_unref (a11y);
-}
-
-static void
-unref_cell (gpointer user_data, GObject *obj_loc)
-{
- GalA11yECell *a11y = GAL_A11Y_E_CELL (user_data);
- a11y->cell_view = NULL;
- g_object_unref (a11y);
-}
-#endif
-
-static void
-eti_dispose (GObject *object)
-{
- GalA11yECell *a11y = GAL_A11Y_E_CELL (object);
-
-#if 0
- if (a11y->item)
- g_object_unref (G_OBJECT (a11y->item)); /*, unref_item, a11y); */
- if (a11y->cell_view)
- g_object_unref (G_OBJECT (a11y->cell_view)); /*, unref_cell, a11y); */
- if (a11y->parent)
- g_object_unref (a11y->parent);
-#endif
- a11y->item = NULL;
- a11y->cell_view = NULL;
- a11y->parent = NULL;
- a11y->model_col = -1;
- a11y->view_col = -1;
- a11y->row = -1;
-
- if (parent_class->dispose)
- parent_class->dispose (object);
-}
-
-/* Static functions */
-static AtkObject*
-eti_get_parent (AtkObject *accessible)
-{
- GalA11yECell *a11y = GAL_A11Y_E_CELL (accessible);
- return a11y->parent;
-}
-
-static gint
-eti_get_index_in_parent (AtkObject *accessible)
-{
- GalA11yECell *a11y = GAL_A11Y_E_CELL (accessible);
-
- return a11y->row * a11y->item->cols + a11y->view_col;
-}
-
-
-/* Component IFace */
-static void
-eti_get_extents (AtkComponent *component,
- gint *x,
- gint *y,
- gint *width,
- gint *height,
- AtkCoordType coord_type)
-{
- GalA11yECell *a11y = GAL_A11Y_E_CELL (component);
- int row;
- int col;
- int xval;
- int yval;
-
- row = a11y->row;
- col = a11y->view_col;
-
-
- e_table_item_get_cell_geometry (a11y->item,
- &row,
- &col,
- &xval,
- &yval,
- width,
- height);
-
- atk_component_get_position (ATK_COMPONENT (a11y->parent),
- x, y, coord_type);
- if (x && *x != G_MININT)
- *x += xval;
- if (y && *y != G_MININT)
- *y += yval;
-}
-
-/* Table IFace */
-
-static void
-eti_atk_component_iface_init (AtkComponentIface *iface)
-{
- iface->get_extents = eti_get_extents;
-}
-
-static void
-eti_class_init (GalA11yECellClass *klass)
-{
- AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- object_class->dispose = eti_dispose;
-
- atk_object_class->get_parent = eti_get_parent;
- atk_object_class->get_index_in_parent = eti_get_index_in_parent;
-}
-
-static void
-eti_init (GalA11yECell *a11y)
-{
- a11y->item = NULL;
- a11y->cell_view = NULL;
- a11y->parent = NULL;
- a11y->model_col = -1;
- a11y->view_col = -1;
- a11y->row = -1;
-}
-
-/**
- * gal_a11y_e_cell_get_type:
- * @void:
- *
- * Registers the &GalA11yECell class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yECell class.
- **/
-GType
-gal_a11y_e_cell_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- GTypeInfo info = {
- sizeof (GalA11yECellClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) eti_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yECell),
- 0,
- (GInstanceInitFunc) eti_init,
- NULL /* value_cell */
- };
-
- static const GInterfaceInfo atk_component_info = {
- (GInterfaceInitFunc) eti_atk_component_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- type = g_type_register_static (PARENT_TYPE, "GalA11yECell", &info, 0);
- g_type_add_interface_static (type, ATK_TYPE_COMPONENT, &atk_component_info);
- }
-
- return type;
-}
-AtkObject *
-gal_a11y_e_cell_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row)
-{
- AtkObject *a11y;
-
- a11y = g_object_new (gal_a11y_e_cell_get_type (), NULL);
-
- gal_a11y_e_cell_construct (a11y,
- item,
- cell_view,
- parent,
- model_col,
- view_col,
- row);
- return a11y;
-}
-
-void
-gal_a11y_e_cell_construct (AtkObject *object,
- ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row)
-{
- GalA11yECell *a11y = GAL_A11Y_E_CELL (object);
- a11y->item = item;
- a11y->cell_view = cell_view;
- a11y->parent = parent;
- a11y->model_col = model_col;
- a11y->view_col = view_col;
- a11y->row = row;
-
-#if 0
- if (parent)
- g_object_ref (parent);
-
- if (item)
- g_object_ref (G_OBJECT (item)); /*,
- unref_item,
- a11y);*/
- if (cell_view)
- g_object_ref (G_OBJECT (cell_view)); /*,
- unref_cell,
- a11y);*/
-#endif
-}
diff --git a/a11y/e-table/gal-a11y-e-cell.h b/a11y/e-table/gal-a11y-e-cell.h
deleted file mode 100644
index ff9e5162d8..0000000000
--- a/a11y/e-table/gal-a11y-e-cell.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_E_CELL_H__
-#define __GAL_A11Y_E_CELL_H__
-
-#include <glib-object.h>
-#include <gal/e-table/e-table-item.h>
-#include <gal/e-table/e-cell.h>
-
-#define GAL_A11Y_TYPE_E_CELL (gal_a11y_e_cell_get_type ())
-#define GAL_A11Y_E_CELL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_CELL, GalA11yECell))
-#define GAL_A11Y_E_CELL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_CELL, GalA11yECellClass))
-#define GAL_A11Y_IS_E_CELL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_CELL))
-#define GAL_A11Y_IS_E_CELL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_CELL))
-
-typedef struct _GalA11yECell GalA11yECell;
-typedef struct _GalA11yECellClass GalA11yECellClass;
-typedef struct _GalA11yECellPrivate GalA11yECellPrivate;
-
-/* This struct should actually be larger as this isn't what we derive from.
- * The GalA11yECellPrivate comes right after the parent class structure.
- **/
-struct _GalA11yECell {
- AtkObject object;
-
- ETableItem *item;
- ECellView *cell_view;
- AtkObject *parent;
- int model_col;
- int view_col;
- int row;
-};
-
-struct _GalA11yECellClass {
- AtkObjectClass parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_cell_get_type (void);
-AtkObject *gal_a11y_e_cell_new (ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row);
-void gal_a11y_e_cell_construct (AtkObject *object,
- ETableItem *item,
- ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
- int row);
-
-#endif /* ! __GAL_A11Y_E_CELL_H__ */
diff --git a/a11y/e-table/gal-a11y-e-table-factory.c b/a11y/e-table/gal-a11y-e-table-factory.c
deleted file mode 100644
index 14eaca3d19..0000000000
--- a/a11y/e-table/gal-a11y-e-table-factory.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-e-table-factory.h"
-#include "gal-a11y-e-table.h"
-
-#define CS_CLASS(factory) (G_TYPE_INSTANCE_GET_CLASS ((factory), C_TYPE_STREAM, GalA11yETableFactoryClass))
-static AtkObjectFactoryClass *parent_class;
-#define PARENT_TYPE (ATK_TYPE_OBJECT_FACTORY)
-
-/* Static functions */
-
-static GType
-gal_a11y_e_table_factory_get_accessible_type (void)
-{
- return GAL_A11Y_TYPE_E_TABLE;
-}
-
-static AtkObject*
-gal_a11y_e_table_factory_create_accessible (GObject *obj)
-{
- AtkObject *accessible;
-
- accessible = gal_a11y_e_table_new (obj);
-
- return accessible;
-}
-
-static void
-gal_a11y_e_table_factory_class_init (GalA11yETableFactoryClass *klass)
-{
- AtkObjectFactoryClass *factory_class = ATK_OBJECT_FACTORY_CLASS (klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- factory_class->create_accessible = gal_a11y_e_table_factory_create_accessible;
- factory_class->get_accessible_type = gal_a11y_e_table_factory_get_accessible_type;
-}
-
-static void
-gal_a11y_e_table_factory_init (GalA11yETableFactory *factory)
-{
-}
-
-/**
- * gal_a11y_e_table_factory_get_type:
- * @void:
- *
- * Registers the &GalA11yETableFactory class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yETableFactory class.
- **/
-GType
-gal_a11y_e_table_factory_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- GTypeInfo info = {
- sizeof (GalA11yETableFactoryClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) gal_a11y_e_table_factory_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yETableFactory),
- 0,
- (GInstanceInitFunc) gal_a11y_e_table_factory_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (PARENT_TYPE, "GalA11yETableFactory", &info, 0);
- }
-
- return type;
-}
diff --git a/a11y/e-table/gal-a11y-e-table-factory.h b/a11y/e-table/gal-a11y-e-table-factory.h
deleted file mode 100644
index eb8eb55414..0000000000
--- a/a11y/e-table/gal-a11y-e-table-factory.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_E_TABLE_FACTORY_H__
-#define __GAL_A11Y_E_TABLE_FACTORY_H__
-
-#include <glib-object.h>
-#include <atk/atkobjectfactory.h>
-
-#define GAL_A11Y_TYPE_E_TABLE_FACTORY (gal_a11y_e_table_factory_get_type ())
-#define GAL_A11Y_E_TABLE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_TABLE_FACTORY, GalA11yETableFactory))
-#define GAL_A11Y_E_TABLE_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_TABLE_FACTORY, GalA11yETableFactoryClass))
-#define GAL_A11Y_IS_E_TABLE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_TABLE_FACTORY))
-#define GAL_A11Y_IS_E_TABLE_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_TABLE_FACTORY))
-
-typedef struct _GalA11yETableFactory GalA11yETableFactory;
-typedef struct _GalA11yETableFactoryClass GalA11yETableFactoryClass;
-
-struct _GalA11yETableFactory {
- AtkObject object;
-};
-
-struct _GalA11yETableFactoryClass {
- AtkObjectClass parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_table_factory_get_type (void);
-
-#endif /* ! __GAL_A11Y_E_TABLE_FACTORY_H__ */
diff --git a/a11y/e-table/gal-a11y-e-table-item.c b/a11y/e-table/gal-a11y-e-table-item.c
deleted file mode 100644
index 6ee060caba..0000000000
--- a/a11y/e-table/gal-a11y-e-table-item.c
+++ /dev/null
@@ -1,456 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-e-table-item.h"
-#include "gal-a11y-e-cell-registry.h"
-#include "gal-a11y-util.h"
-#include <atk/atkobject.h>
-#include <atk/atktable.h>
-#include <atk/atkcomponent.h>
-#include <atk/atkobjectfactory.h>
-#include <atk/atkregistry.h>
-#include <atk/atkgobjectaccessible.h>
-
-#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yETableItemClass))
-static GObjectClass *parent_class;
-static AtkComponentIface *component_parent_iface;
-static GType parent_type;
-static gint priv_offset;
-static GQuark quark_accessible_object = 0;
-#define GET_PRIVATE(object) ((GalA11yETableItemPrivate *) (((char *) object) + priv_offset))
-#define PARENT_TYPE (parent_type)
-
-struct _GalA11yETableItemPrivate {
- AtkObject *parent;
- gint index_in_parent;
-};
-
-#if 0
-static void
-unref_accessible (gpointer user_data, GObject *obj_loc)
-{
- GalA11yETableItem *a11y = GAL_A11Y_E_TABLE_ITEM (user_data);
- GET_PRIVATE (a11y)->item = NULL;
- g_object_unref (a11y);
-}
-#endif
-
-static void
-eti_dispose (GObject *object)
-{
- GalA11yETableItem *a11y = GAL_A11Y_E_TABLE_ITEM (object);
- GalA11yETableItemPrivate *priv = GET_PRIVATE (a11y);
-
-#if 0
- if (priv->item)
- g_object_weak_unref (G_OBJECT (priv->item), unref_accessible, a11y);
-
- if (priv->parent)
- g_object_unref (priv->parent);
-#endif
- priv->parent = NULL;
-
- if (parent_class->dispose)
- parent_class->dispose (object);
-}
-
-/* Static functions */
-static AtkObject*
-eti_get_parent (AtkObject *accessible)
-{
- GalA11yETableItem *a11y = GAL_A11Y_E_TABLE_ITEM (accessible);
- return GET_PRIVATE (a11y)->parent;
-}
-
-static gint
-eti_get_n_children (AtkObject *accessible)
-{
- return atk_table_get_n_columns (ATK_TABLE (accessible)) *
- atk_table_get_n_rows (ATK_TABLE (accessible));
-}
-
-static AtkObject*
-eti_ref_child (AtkObject *accessible,
- gint i)
-{
- AtkTable *table = ATK_TABLE (accessible);
- ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible)));
-
- int col = i % item->cols;
- int row = i / item->cols;
-
- return atk_table_ref_at (table, row, col);
-}
-
-static gint
-eti_get_index_in_parent (AtkObject *accessible)
-{
- GalA11yETableItem *a11y = GAL_A11Y_E_TABLE_ITEM (accessible);
- return GET_PRIVATE (a11y)->index_in_parent;
-}
-
-static void
-eti_get_extents (AtkComponent *component,
- gint *x,
- gint *y,
- gint *width,
- gint *height,
- AtkCoordType coord_type)
-{
- ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (component)));
- double real_width;
- double real_height;
- int fake_width;
- int fake_height;
-
- if (component_parent_iface &&
- component_parent_iface->get_extents)
- component_parent_iface->get_extents (component,
- x,
- y,
- &fake_width,
- &fake_height,
- coord_type);
-
- gtk_object_get (GTK_OBJECT (item),
- "width", &real_width,
- "height", &real_height,
- NULL);
-
- if (width)
- *width = real_width;
- if (height)
- *height = real_height;
-}
-
-static AtkObject*
-eti_ref_accessible_at_point (AtkComponent *component,
- gint x,
- gint y,
- AtkCoordType coord_type)
-{
- int row = -1;
- int col = -1;
- int x_origin, y_origin;
- ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (component)));
-
- atk_component_get_position (component,
- &x_origin,
- &y_origin,
- coord_type);
- x -= x_origin;
- y -= y_origin;
-
- e_table_item_compute_location (item, &x, &y,
- &row, &col);
-
- if (row != -1 && col != -1) {
- return atk_table_ref_at (ATK_TABLE (component), row, col);
- } else {
- return NULL;
- }
-}
-
-
-/* Table IFace */
-
-static AtkObject*
-eti_ref_at (AtkTable *table,
- gint row,
- gint column)
-{
- AtkObject* accessible = ATK_OBJECT (table);
- ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (table)));
-
- if (column >= 0 &&
- column < item->cols &&
- row >= 0 &&
- row < item->rows &&
- item->cell_views_realized) {
- ECellView *cell_view = item->cell_views[column];
- ETableCol *ecol = e_table_header_get_column (item->header, column);
- return gal_a11y_e_cell_registry_get_object (NULL,
- item,
- cell_view,
- accessible,
- ecol->col_idx,
- column,
- row);
- }
-
- return NULL;
-}
-
-static gint
-eti_get_index_at (AtkTable *table,
- gint row,
- gint column)
-{
- ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (table)));
-
- return column + row * item->cols;
-}
-
-static gint
-eti_get_column_at_index (AtkTable *table,
- gint index)
-{
- ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (table)));
-
- return index % item->cols;
-}
-
-static gint
-eti_get_row_at_index (AtkTable *table,
- gint index)
-{
- ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (table)));
-
- return index / item->cols;
-}
-
-static gint
-eti_get_n_columns (AtkTable *table)
-{
- ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (table)));
-
- return item->cols;
-}
-
-static gint
-eti_get_n_rows (AtkTable *table)
-{
- ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (table)));
-
- return item->rows;
-}
-
-static gint
-eti_get_column_extent_at (AtkTable *table,
- gint row,
- gint column)
-{
- ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (table)));
- int width;
-
- e_table_item_get_cell_geometry (item,
- &row,
- &column,
- NULL,
- NULL,
- &width,
- NULL);
-
- return width;
-}
-
-static gint
-eti_get_row_extent_at (AtkTable *table,
- gint row,
- gint column)
-{
- ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (table)));
- int height;
-
- e_table_item_get_cell_geometry (item,
- &row,
- &column,
- NULL,
- NULL,
- NULL,
- &height);
-
- return height;
-}
-
-static AtkObject *
-eti_get_caption (AtkTable *table)
-{
- /* Unimplemented */
- return NULL;
-}
-
-static G_CONST_RETURN gchar *
-eti_get_column_description (AtkTable *table,
- gint column)
-{
- ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (table)));
- ETableCol *ecol = e_table_header_get_column (item->header, column);
-
- return ecol->text;
-}
-
-static AtkObject *
-eti_get_column_header (AtkTable *table,
- gint column)
-{
- /* Unimplemented */
- return NULL;
-}
-
-static G_CONST_RETURN gchar *
-eti_get_row_description (AtkTable *table,
- gint row)
-{
- /* Unimplemented */
- return NULL;
-}
-
-static AtkObject *
-eti_get_row_header (AtkTable *table,
- gint row)
-{
- /* Unimplemented */
- return NULL;
-}
-
-static AtkObject *
-eti_get_summary (AtkTable *table)
-{
- /* Unimplemented */
- return NULL;
-}
-
-static void
-eti_atk_table_iface_init (AtkTableIface *iface)
-{
- iface->ref_at = eti_ref_at;
- iface->get_index_at = eti_get_index_at;
- iface->get_column_at_index = eti_get_column_at_index;
- iface->get_row_at_index = eti_get_row_at_index;
- iface->get_n_columns = eti_get_n_columns;
- iface->get_n_rows = eti_get_n_rows;
- iface->get_column_extent_at = eti_get_column_extent_at;
- iface->get_row_extent_at = eti_get_row_extent_at;
- iface->get_caption = eti_get_caption;
- iface->get_column_description = eti_get_column_description;
- iface->get_column_header = eti_get_column_header;
- iface->get_row_description = eti_get_row_description;
- iface->get_row_header = eti_get_row_header;
- iface->get_summary = eti_get_summary;
-}
-
-static void
-eti_atk_component_iface_init (AtkComponentIface *iface)
-{
- component_parent_iface = g_type_interface_peek_parent (iface);
-
- iface->ref_accessible_at_point = eti_ref_accessible_at_point;
- iface->get_extents = eti_get_extents;
-}
-
-static void
-eti_class_init (GalA11yETableItemClass *klass)
-{
- AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- quark_accessible_object = g_quark_from_static_string ("gtk-accessible-object");
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- object_class->dispose = eti_dispose;
-
- atk_object_class->get_parent = eti_get_parent;
- atk_object_class->get_n_children = eti_get_n_children;
- atk_object_class->ref_child = eti_ref_child;
- atk_object_class->get_index_in_parent = eti_get_index_in_parent;
-}
-
-static void
-eti_init (GalA11yETableItem *a11y)
-{
- GalA11yETableItemPrivate *priv;
-
- priv = GET_PRIVATE (a11y);
-
- priv->parent = NULL;
- priv->index_in_parent = -1;
-}
-
-/**
- * gal_a11y_e_table_item_get_type:
- * @void:
- *
- * Registers the &GalA11yETableItem class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yETableItem class.
- **/
-GType
-gal_a11y_e_table_item_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- AtkObjectFactory *factory;
-
- GTypeInfo info = {
- sizeof (GalA11yETableItemClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) eti_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yETableItem),
- 0,
- (GInstanceInitFunc) eti_init,
- NULL /* value_table_item */
- };
-
- static const GInterfaceInfo atk_component_info = {
- (GInterfaceInitFunc) eti_atk_component_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
- static const GInterfaceInfo atk_table_info = {
- (GInterfaceInitFunc) eti_atk_table_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- factory = atk_registry_get_factory (atk_get_default_registry (), GNOME_TYPE_CANVAS_ITEM);
- parent_type = atk_object_factory_get_accessible_type (factory);
-
- type = gal_a11y_type_register_static_with_private (PARENT_TYPE, "GalA11yETableItem", &info, 0,
- sizeof (GalA11yETableItemPrivate), &priv_offset);
-
- g_type_add_interface_static (type, ATK_TYPE_COMPONENT, &atk_component_info);
- g_type_add_interface_static (type, ATK_TYPE_TABLE, &atk_table_info);
- }
-
- return type;
-}
-
-AtkObject *
-gal_a11y_e_table_item_new (AtkObject *parent,
- ETableItem *item,
- int index_in_parent)
-{
- GalA11yETableItem *a11y;
-
- a11y = g_object_new (gal_a11y_e_table_item_get_type (), NULL);
-
- atk_object_initialize (ATK_OBJECT (a11y), item);
-
- GET_PRIVATE (a11y)->parent = parent;
- GET_PRIVATE (a11y)->index_in_parent = index_in_parent;
-
- if (parent)
- g_object_ref (parent);
-
-#if 0
- if (item)
- g_object_weak_ref (G_OBJECT (item),
- unref_accessible,
- a11y);
-#endif
-
- return ATK_OBJECT (a11y);
-}
diff --git a/a11y/e-table/gal-a11y-e-table-item.h b/a11y/e-table/gal-a11y-e-table-item.h
deleted file mode 100644
index 795fa64499..0000000000
--- a/a11y/e-table/gal-a11y-e-table-item.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_E_TABLE_ITEM_H__
-#define __GAL_A11Y_E_TABLE_ITEM_H__
-
-#include <glib-object.h>
-#include <gal/e-table/e-table-item.h>
-
-#define GAL_A11Y_TYPE_E_TABLE_ITEM (gal_a11y_e_table_item_get_type ())
-#define GAL_A11Y_E_TABLE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_TABLE_ITEM, GalA11yETableItem))
-#define GAL_A11Y_E_TABLE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_TABLE_ITEM, GalA11yETableItemClass))
-#define GAL_A11Y_IS_E_TABLE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_TABLE_ITEM))
-#define GAL_A11Y_IS_E_TABLE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_TABLE_ITEM))
-
-typedef struct _GalA11yETableItem GalA11yETableItem;
-typedef struct _GalA11yETableItemClass GalA11yETableItemClass;
-typedef struct _GalA11yETableItemPrivate GalA11yETableItemPrivate;
-
-/* This struct should actually be larger as this isn't what we derive from.
- * The GalA11yETableItemPrivate comes right after the parent class structure.
- **/
-struct _GalA11yETableItem {
- AtkObject object;
-};
-
-struct _GalA11yETableItemClass {
- AtkObject parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_table_item_get_type (void);
-AtkObject *gal_a11y_e_table_item_new (AtkObject *parent,
- ETableItem *item,
- int index_in_parent);
-
-#endif /* ! __GAL_A11Y_E_TABLE_ITEM_H__ */
diff --git a/a11y/e-table/gal-a11y-e-table.c b/a11y/e-table/gal-a11y-e-table.c
deleted file mode 100644
index ae166d2c09..0000000000
--- a/a11y/e-table/gal-a11y-e-table.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-e-table.h"
-#include "gal-a11y-e-table-item.h"
-#include "gal-a11y-util.h"
-#include <gal/e-table/e-table.h>
-#include <gal/e-table/e-table-group.h>
-#include <gal/e-table/e-table-group-leaf.h>
-
-#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yETableClass))
-static AtkObjectClass *parent_class;
-static GType parent_type;
-static gint priv_offset;
-#define GET_PRIVATE(object) ((GalA11yETablePrivate *) (((char *) object) + priv_offset))
-#define PARENT_TYPE (parent_type)
-
-struct _GalA11yETablePrivate {
- AtkObject *child_item;
-};
-
-/* Static functions */
-
-static void
-init_child_item (GalA11yETable *a11y)
-{
- GalA11yETablePrivate *priv = GET_PRIVATE (a11y);
- ETable *table = E_TABLE (GTK_ACCESSIBLE (a11y)->widget);
- if (priv->child_item == NULL) {
- priv->child_item = gal_a11y_e_table_item_new (ATK_OBJECT (a11y), E_TABLE_GROUP_LEAF (table->group)->item, 0);
- }
-}
-
-static AtkObject*
-et_ref_accessible_at_point (AtkComponent *component,
- gint x,
- gint y,
- AtkCoordType coord_type)
-{
- GalA11yETable *a11y = GAL_A11Y_E_TABLE (component);
- init_child_item (a11y);
- return GET_PRIVATE (a11y)->child_item;
-}
-
-static gint
-et_get_n_children (AtkObject *accessible)
-{
- return 1;
-}
-
-static AtkObject*
-et_ref_child (AtkObject *accessible,
- gint i)
-{
- GalA11yETable *a11y = GAL_A11Y_E_TABLE (accessible);
- if (i != 0)
- return NULL;
- init_child_item (a11y);
- g_object_ref (GET_PRIVATE (a11y)->child_item);
- return GET_PRIVATE (a11y)->child_item;
-}
-
-static void
-et_class_init (GalA11yETableClass *klass)
-{
- AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- atk_object_class->get_n_children = et_get_n_children;
- atk_object_class->ref_child = et_ref_child;
-}
-
-static void
-et_atk_component_iface_init (AtkComponentIface *iface)
-{
- iface->ref_accessible_at_point = et_ref_accessible_at_point;
-}
-
-static void
-et_init (GalA11yETable *a11y)
-{
- GalA11yETablePrivate *priv;
-
- priv = GET_PRIVATE (a11y);
-
- priv->child_item = NULL;
-}
-
-/**
- * gal_a11y_e_table_get_type:
- * @void:
- *
- * Registers the &GalA11yETable class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yETable class.
- **/
-GType
-gal_a11y_e_table_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- AtkObjectFactory *factory;
-
- GTypeInfo info = {
- sizeof (GalA11yETableClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) et_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yETable),
- 0,
- (GInstanceInitFunc) et_init,
- NULL /* value_table */
- };
-
- static const GInterfaceInfo atk_component_info = {
- (GInterfaceInitFunc) et_atk_component_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- factory = atk_registry_get_factory (atk_get_default_registry (), GTK_TYPE_WIDGET);
- parent_type = atk_object_factory_get_accessible_type (factory);
-
- type = gal_a11y_type_register_static_with_private (PARENT_TYPE, "GalA11yETable", &info, 0,
- sizeof (GalA11yETablePrivate), &priv_offset);
- g_type_add_interface_static (type, ATK_TYPE_COMPONENT, &atk_component_info);
- }
-
- return type;
-}
-
-AtkObject *
-gal_a11y_e_table_new (GObject *widget)
-{
- GalA11yETable *a11y;
- ETable *table;
-
- table = E_TABLE (widget);
-
- a11y = g_object_new (gal_a11y_e_table_get_type (), NULL);
-
- GTK_ACCESSIBLE (a11y)->widget = GTK_WIDGET (widget);
-
- return ATK_OBJECT (a11y);
-}
diff --git a/a11y/e-table/gal-a11y-e-table.h b/a11y/e-table/gal-a11y-e-table.h
deleted file mode 100644
index 0a0901e3bc..0000000000
--- a/a11y/e-table/gal-a11y-e-table.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_E_TABLE_H__
-#define __GAL_A11Y_E_TABLE_H__
-
-#include <glib-object.h>
-#include <atk/atkobject.h>
-#include <atk/atkcomponent.h>
-#include <gtk/gtkaccessible.h>
-
-#define GAL_A11Y_TYPE_E_TABLE (gal_a11y_e_table_get_type ())
-#define GAL_A11Y_E_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_TABLE, GalA11yETable))
-#define GAL_A11Y_E_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_TABLE, GalA11yETableClass))
-#define GAL_A11Y_IS_E_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_TABLE))
-#define GAL_A11Y_IS_E_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_TABLE))
-
-typedef struct _GalA11yETable GalA11yETable;
-typedef struct _GalA11yETableClass GalA11yETableClass;
-typedef struct _GalA11yETablePrivate GalA11yETablePrivate;
-
-/* This struct should actually be larger as this isn't what we derive from.
- * The GalA11yETablePrivate comes right after the parent class structure.
- **/
-struct _GalA11yETable {
- GtkAccessible object;
-};
-
-struct _GalA11yETableClass {
- GtkAccessibleClass parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_table_get_type (void);
-AtkObject *gal_a11y_e_table_new (GObject *table);
-
-#endif /* ! __GAL_A11Y_E_TABLE_H__ */
diff --git a/a11y/e-text/.cvsignore b/a11y/e-text/.cvsignore
deleted file mode 100644
index 5b48d3f593..0000000000
--- a/a11y/e-text/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.libs
-Makefile.in
-Makefile
-*.la
diff --git a/a11y/e-text/gal-a11y-e-text-factory.c b/a11y/e-text/gal-a11y-e-text-factory.c
deleted file mode 100644
index 574315b335..0000000000
--- a/a11y/e-text/gal-a11y-e-text-factory.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal/e-text/e-text.h"
-#include "gal-a11y-e-text-factory.h"
-#include "gal-a11y-e-text.h"
-
-#define CS_CLASS(factory) (G_TYPE_INSTANCE_GET_CLASS ((factory), C_TYPE_STREAM, GalA11yETextFactoryClass))
-static AtkObjectFactoryClass *parent_class;
-#define PARENT_TYPE (ATK_TYPE_OBJECT_FACTORY)
-
-/* Static functions */
-
-static GType
-gal_a11y_e_text_factory_get_accessible_type (void)
-{
- return GAL_A11Y_TYPE_E_TEXT;
-}
-
-static AtkObject*
-gal_a11y_e_text_factory_create_accessible (GObject *obj)
-{
- AtkObject *atk_object;
-
- g_return_val_if_fail (E_IS_TEXT (obj), NULL);
-
- atk_object = g_object_new (GAL_A11Y_TYPE_E_TEXT, NULL);
- atk_object_initialize (atk_object, obj);
- atk_object->role = ATK_ROLE_UNKNOWN;
-
- return atk_object;
-}
-
-static void
-gal_a11y_e_text_factory_class_init (GalA11yETextFactoryClass *klass)
-{
- AtkObjectFactoryClass *factory_class = ATK_OBJECT_FACTORY_CLASS (klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- factory_class->create_accessible = gal_a11y_e_text_factory_create_accessible;
- factory_class->get_accessible_type = gal_a11y_e_text_factory_get_accessible_type;
-}
-
-static void
-gal_a11y_e_text_factory_init (GalA11yETextFactory *factory)
-{
-}
-
-/**
- * gal_a11y_e_text_factory_get_type:
- * @void:
- *
- * Registers the &GalA11yETextFactory class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yETextFactory class.
- **/
-GType
-gal_a11y_e_text_factory_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- GTypeInfo info = {
- sizeof (GalA11yETextFactoryClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) gal_a11y_e_text_factory_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yETextFactory),
- 0,
- (GInstanceInitFunc) gal_a11y_e_text_factory_init,
- NULL /* value_text */
- };
-
- type = g_type_register_static (PARENT_TYPE, "GalA11yETextFactory", &info, 0);
- }
-
- return type;
-}
diff --git a/a11y/e-text/gal-a11y-e-text-factory.h b/a11y/e-text/gal-a11y-e-text-factory.h
deleted file mode 100644
index 56a8d29ab9..0000000000
--- a/a11y/e-text/gal-a11y-e-text-factory.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_E_TEXT_FACTORY_H__
-#define __GAL_A11Y_E_TEXT_FACTORY_H__
-
-#include <glib-object.h>
-#include <atk/atkobjectfactory.h>
-
-#define GAL_A11Y_TYPE_E_TEXT_FACTORY (gal_a11y_e_text_factory_get_type ())
-#define GAL_A11Y_E_TEXT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_TEXT_FACTORY, GalA11yETextFactory))
-#define GAL_A11Y_E_TEXT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_TEXT_FACTORY, GalA11yETextFactoryClass))
-#define GAL_A11Y_IS_E_TEXT_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_TEXT_FACTORY))
-#define GAL_A11Y_IS_E_TEXT_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_TEXT_FACTORY))
-
-typedef struct _GalA11yETextFactory GalA11yETextFactory;
-typedef struct _GalA11yETextFactoryClass GalA11yETextFactoryClass;
-
-struct _GalA11yETextFactory {
- AtkObjectFactory object;
-};
-
-struct _GalA11yETextFactoryClass {
- AtkObjectFactoryClass parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_text_factory_get_type (void);
-
-#endif /* ! __GAL_A11Y_E_TEXT_FACTORY_H__ */
diff --git a/a11y/e-text/gal-a11y-e-text.c b/a11y/e-text/gal-a11y-e-text.c
deleted file mode 100644
index a37726a5a8..0000000000
--- a/a11y/e-text/gal-a11y-e-text.c
+++ /dev/null
@@ -1,648 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-e-text.h"
-#include "gal-a11y-util.h"
-#include <atk/atkobject.h>
-#include <atk/atktable.h>
-#include <atk/atkcomponent.h>
-#include <atk/atkobjectfactory.h>
-#include <atk/atkregistry.h>
-#include <atk/atkgobjectaccessible.h>
-#include "gal/e-text/e-text.h"
-#include <gtk/gtkmain.h>
-
-#define CS_CLASS(a11y) (G_TYPE_INSTANCE_GET_CLASS ((a11y), C_TYPE_STREAM, GalA11yETextClass))
-static GObjectClass *parent_class;
-static AtkComponentIface *component_parent_iface;
-static GType parent_type;
-static gint priv_offset;
-static GQuark quark_accessible_object = 0;
-#define GET_PRIVATE(object) ((GalA11yETextPrivate *) (((char *) object) + priv_offset))
-#define PARENT_TYPE (parent_type)
-
-struct _GalA11yETextPrivate {
- int dummy;
-};
-
-static void
-et_dispose (GObject *object)
-{
- if (parent_class->dispose)
- parent_class->dispose (object);
-}
-
-/* Static functions */
-
-static void
-et_get_extents (AtkComponent *component,
- gint *x,
- gint *y,
- gint *width,
- gint *height,
- AtkCoordType coord_type)
-{
- EText *item = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (component)));
- double real_width;
- double real_height;
- int fake_width;
- int fake_height;
-
- if (component_parent_iface &&
- component_parent_iface->get_extents)
- component_parent_iface->get_extents (component,
- x,
- y,
- &fake_width,
- &fake_height,
- coord_type);
-
- gtk_object_get (GTK_OBJECT (item),
- "text_width", &real_width,
- "text_height", &real_height,
- NULL);
-
- if (width)
- *width = real_width;
- if (height)
- *height = real_height;
-}
-
-static const gchar *
-et_get_full_text (AtkText *text)
-{
- EText *etext = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)));
- ETextModel *model;
- const char *full_text;
-
- gtk_object_get (GTK_OBJECT (etext),
- "model", &model,
- NULL);
-
- full_text = e_text_model_get_text (model);
-
- return full_text;
-}
-
-static void
-et_set_full_text (AtkEditableText *text,
- const char *full_text)
-{
- EText *etext = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)));
- ETextModel *model;
-
- gtk_object_get (GTK_OBJECT (etext),
- "model", &model,
- NULL);
-
- e_text_model_set_text (model, full_text);
-}
-
-static gchar *
-et_get_text (AtkText *text,
- gint start_offset,
- gint end_offset)
-{
- gint start, end, real_start, real_end, len;
- const char *full_text = et_get_full_text (text);
- if (full_text == NULL)
- return;
- len = g_utf8_strlen (full_text, -1);
-
- start = MIN (MAX (0, start_offset), len);
- end = MIN (MAX (-1, end_offset), len);
-
- if (end_offset == -1)
- end = strlen (full_text);
- else
- end = g_utf8_offset_to_pointer (full_text, end) - full_text;
-
- start = g_utf8_offset_to_pointer (full_text, start) - full_text;
-
- real_start = MIN (start, end);
- real_end = MAX (start, end);
-
- return g_strndup (full_text + real_start, real_end - real_start);
-}
-
-static gchar *
-et_get_text_after_offset (AtkText *text,
- gint offset,
- AtkTextBoundary boundary_type,
- gint *start_offset,
- gint *end_offset)
-{
- /* Unimplemented */
- return NULL;
-}
-
-static gchar *
-et_get_text_at_offset (AtkText *text,
- gint offset,
- AtkTextBoundary boundary_type,
- gint *start_offset,
- gint *end_offset)
-{
- /* Unimplemented */
- return NULL;
-}
-
-static gunichar
-et_get_character_at_offset (AtkText *text,
- gint offset)
-{
- const char *full_text = et_get_full_text (text);
- char *at_offset;
-
- at_offset = g_utf8_offset_to_pointer (full_text, offset);
- return g_utf8_get_char_validated (at_offset, -1);
-}
-
-
-static gchar*
-et_get_text_before_offset (AtkText *text,
- gint offset,
- AtkTextBoundary boundary_type,
- gint *start_offset,
- gint *end_offset)
-{
- /* Unimplemented */
- return NULL;
-}
-
-
-static gint
-et_get_caret_offset (AtkText *text)
-{
- GObject *obj;
- EText *etext;
- int offset;
-
- g_return_val_if_fail (ATK_IS_GOBJECT_ACCESSIBLE(text), -1);
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return -1;
-
- g_return_val_if_fail (E_IS_TEXT (obj), -1);
- etext = E_TEXT (obj);
-
- gtk_object_get (GTK_OBJECT (etext),
- "cursor_pos", &offset,
- NULL);
- return offset;
-}
-
-
-static AtkAttributeSet*
-et_get_run_attributes (AtkText *text,
- gint offset,
- gint *start_offset,
- gint *end_offset)
-{
- /* Unimplemented */
- return NULL;
-}
-
-
-static AtkAttributeSet*
-et_get_default_attributes (AtkText *text)
-{
- /* Unimplemented */
- return NULL;
-}
-
-
-static void
-et_get_character_extents (AtkText *text,
- gint offset,
- gint *x,
- gint *y,
- gint *width,
- gint *height,
- AtkCoordType coords)
-{
- /* Unimplemented */
-}
-
-
-static gint
-et_get_character_count (AtkText *text)
-{
- const char *full_text = et_get_full_text (text);
-
- return g_utf8_strlen (full_text, -1);
-}
-
-
-static gint
-et_get_offset_at_point (AtkText *text,
- gint x,
- gint y,
- AtkCoordType coords)
-{
- /* Unimplemented */
- return 0;
-}
-
-
-static gint
-et_get_n_selections (AtkText *text)
-{
- EText *etext = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)));
- if (etext->selection_start !=
- etext->selection_end)
- return 1;
- return 0;
-}
-
-
-static gchar*
-et_get_selection (AtkText *text,
- gint selection_num,
- gint *start_offset,
- gint *end_offset)
-{
- gint start, end, real_start, real_end, len;
- EText *etext;
- if (selection_num == 0) {
- const char *full_text = et_get_full_text (text);
- if (full_text == NULL)
- return NULL;
- len = g_utf8_strlen (full_text, -1);
- etext = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)));
- start = MIN (etext->selection_start, etext->selection_end);
- end = MAX (etext->selection_start, etext->selection_end);
- start = MIN (MAX (0, start), len);
- end = MIN (MAX (0, end), len);
- if (start != end) {
- if (start_offset)
- *start_offset = start;
- if (end_offset)
- *end_offset = end;
- real_start = g_utf8_offset_to_pointer (full_text, start) - full_text;
- real_end = g_utf8_offset_to_pointer (full_text, end) - full_text;
- return g_strndup (full_text + real_start, real_end - real_start);
- }
- }
-
- return NULL;
-}
-
-
-static gboolean
-et_add_selection (AtkText *text,
- gint start_offset,
- gint end_offset)
-{
- GObject *obj;
- EText *etext;
-
- g_return_val_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (text), FALSE);
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return FALSE;
- g_return_val_if_fail (E_IS_TEXT (obj), FALSE);
- etext = E_TEXT (obj);
-
- g_return_val_if_fail (start_offset >= 0, FALSE);
- g_return_val_if_fail (start_offset >= -1, FALSE);
- if (end_offset == -1)
- end_offset = et_get_character_count (text);
-
- if (start_offset != end_offset) {
- gint real_start, real_end;
- real_start = MIN (start_offset, end_offset);
- real_end = MAX (start_offset, end_offset);
- etext->selection_start = real_start;
- etext->selection_end = real_end;
-
- gnome_canvas_item_grab_focus (GNOME_CANVAS_ITEM (etext));
- gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (etext));
-
- g_signal_emit_by_name (ATK_OBJECT (text), "text_selection_changed");
-
- return TRUE;
- }
-
- return FALSE;
-}
-
-
-static gboolean
-et_remove_selection (AtkText *text,
- gint selection_num)
-{
- GObject *obj;
- EText *etext;
-
- g_return_val_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (text), FALSE);
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return FALSE;
- g_return_val_if_fail (E_IS_TEXT (obj), FALSE);
- etext = E_TEXT (obj);
-
- if( selection_num == 0
- && etext->selection_start != etext->selection_end ) {
- etext->selection_end = etext->selection_start;
- g_signal_emit_by_name (ATK_OBJECT(text), "text_selection_changed");
- return TRUE;
- }
-
- return FALSE;
-}
-
-
-static gboolean
-et_set_selection (AtkText *text,
- gint selection_num,
- gint start_offset,
- gint end_offset)
-{
- GObject *obj;
- EText *etext;
- int offset;
-
- g_return_val_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (text), FALSE);
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return FALSE;
- g_return_val_if_fail (E_IS_TEXT (obj), FALSE);
- etext = E_TEXT (obj);
- if (selection_num == 0)
- return et_add_selection (text, start_offset, end_offset);
- return FALSE;
-}
-
-
-static gboolean
-et_set_caret_offset (AtkText *text,
- gint offset)
-{
- GObject *obj;
- EText *etext;
-
- g_return_val_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (text), FALSE);
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return FALSE;
-
- g_return_val_if_fail (E_IS_TEXT (obj), FALSE);
- etext = E_TEXT (obj);
-
- if (offset < -1)
- return FALSE;
- else if (offset == -1)
- gtk_object_set (GTK_OBJECT (etext),
- "cursor_pos", et_get_character_count (text),
- NULL);
- else
- gtk_object_set (GTK_OBJECT (etext),
- "cursor_pos", offset,
- NULL);
- return TRUE;
-}
-
-static gboolean
-et_set_run_attributes (AtkEditableText *text,
- AtkAttributeSet *attrib_set,
- gint start_offset,
- gint end_offset)
-{
- /* Unimplemented */
- return FALSE;
-}
-
-static void
-et_set_text_contents (AtkEditableText *text,
- const gchar *string)
-{
- et_set_full_text (text, string);
-}
-
-static void
-et_insert_text (AtkEditableText *text,
- const gchar *string,
- gint length,
- gint *position)
-{
- /* Utf8 unimplemented */
- char *result;
-
- const char *full_text = et_get_full_text (ATK_TEXT (text));
- if (full_text == NULL)
- return;
-
- result = g_strdup_printf ("%.*s%.*s%s", *position, full_text, length, string, full_text + *position);
-
- et_set_full_text (text, result);
-
- *position += length;
-
- g_free (result);
-}
-
-static void
-et_copy_text (AtkEditableText *text,
- gint start_pos,
- gint end_pos)
-{
- GObject *obj;
- EText *etext;
-
- g_return_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (text));
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return;
-
- g_return_if_fail (E_IS_TEXT (obj));
- etext = E_TEXT (obj);
-
- if (start_pos != end_pos) {
- etext->selection_start = start_pos;
- etext->selection_end = end_pos;
- e_text_copy_clipboard (etext);
- }
-}
-
-static void
-et_delete_text (AtkEditableText *text,
- gint start_pos,
- gint end_pos)
-{
- GObject *obj;
- EText *etext;
-
- g_return_if_fail (ATK_IS_GOBJECT_ACCESSIBLE(text));
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return;
-
- g_return_if_fail (E_IS_TEXT (obj));
- etext = E_TEXT (obj);
-
- etext->selection_start = start_pos;
- etext->selection_end = end_pos;
-
- e_text_delete_selection (etext);
-}
-
-static void
-et_cut_text (AtkEditableText *text,
- gint start_pos,
- gint end_pos)
-{
- et_copy_text (text, start_pos, end_pos);
- et_delete_text (text, start_pos, end_pos);
-}
-
-static void
-et_paste_text (AtkEditableText *text,
- gint position)
-{
- GObject *obj;
- EText *etext;
-
- g_return_if_fail (ATK_IS_GOBJECT_ACCESSIBLE (text));
- obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text));
- if (obj == NULL)
- return;
-
- g_return_if_fail (E_IS_TEXT (obj));
- etext = E_TEXT (obj);
-
- gtk_object_set (GTK_OBJECT (etext),
- "cursor_pos", position,
- NULL);
- e_text_paste_clipboard (etext);
-}
-
-static void
-et_atk_component_iface_init (AtkComponentIface *iface)
-{
- iface->get_extents = et_get_extents;
-}
-
-static void
-et_atk_text_iface_init (AtkTextIface *iface)
-{
- iface->get_text = et_get_text;
- iface->get_text_after_offset = et_get_text_after_offset;
- iface->get_text_at_offset = et_get_text_at_offset;
- iface->get_character_at_offset = et_get_character_at_offset;
- iface->get_text_before_offset = et_get_text_before_offset;
- iface->get_caret_offset = et_get_caret_offset;
- iface->get_run_attributes = et_get_run_attributes;
- iface->get_default_attributes = et_get_default_attributes;
- iface->get_character_extents = et_get_character_extents;
- iface->get_character_count = et_get_character_count;
- iface->get_offset_at_point = et_get_offset_at_point;
- iface->get_n_selections = et_get_n_selections;
- iface->get_selection = et_get_selection;
- iface->add_selection = et_add_selection;
- iface->remove_selection = et_remove_selection;
- iface->set_selection = et_set_selection;
- iface->set_caret_offset = et_set_caret_offset;
-}
-
-static void
-et_atk_editable_text_iface_init (AtkEditableTextIface *iface)
-{
- iface->set_run_attributes = et_set_run_attributes;
- iface->set_text_contents = et_set_text_contents;
- iface->insert_text = et_insert_text;
- iface->copy_text = et_copy_text;
- iface->cut_text = et_cut_text;
- iface->delete_text = et_delete_text;
- iface->paste_text = et_paste_text;
-}
-
-static void
-et_class_init (GalA11yETextClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- quark_accessible_object = g_quark_from_static_string ("gtk-accessible-object");
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- component_parent_iface = g_type_interface_peek(parent_class, ATK_TYPE_COMPONENT);
-
- object_class->dispose = et_dispose;
-}
-
-static void
-et_init (GalA11yEText *a11y)
-{
-#if 0
- GalA11yETextPrivate *priv;
-
- priv = GET_PRIVATE (a11y);
-#endif
-}
-
-/**
- * gal_a11y_e_text_get_type:
- * @void:
- *
- * Registers the &GalA11yEText class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the &GalA11yEText class.
- **/
-GType
-gal_a11y_e_text_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- AtkObjectFactory *factory;
-
- GTypeInfo info = {
- sizeof (GalA11yETextClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) et_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (GalA11yEText),
- 0,
- (GInstanceInitFunc) et_init,
- NULL /* value_text */
- };
-
- static const GInterfaceInfo atk_component_info = {
- (GInterfaceInitFunc) et_atk_component_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
- static const GInterfaceInfo atk_text_info = {
- (GInterfaceInitFunc) et_atk_text_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
- static const GInterfaceInfo atk_editable_text_info = {
- (GInterfaceInitFunc) et_atk_editable_text_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- factory = atk_registry_get_factory (atk_get_default_registry (), GNOME_TYPE_CANVAS_ITEM);
- parent_type = atk_object_factory_get_accessible_type (factory);
-
- type = gal_a11y_type_register_static_with_private (PARENT_TYPE, "GalA11yEText", &info, 0,
- sizeof (GalA11yETextPrivate), &priv_offset);
-
- g_type_add_interface_static (type, ATK_TYPE_COMPONENT, &atk_component_info);
- g_type_add_interface_static (type, ATK_TYPE_TEXT, &atk_text_info);
- g_type_add_interface_static (type, ATK_TYPE_EDITABLE_TEXT, &atk_editable_text_info);
- }
-
- return type;
-}
diff --git a/a11y/e-text/gal-a11y-e-text.h b/a11y/e-text/gal-a11y-e-text.h
deleted file mode 100644
index 66d2d6283b..0000000000
--- a/a11y/e-text/gal-a11y-e-text.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_E_TEXT_H__
-#define __GAL_A11Y_E_TEXT_H__
-
-#include <glib-object.h>
-#include <gal/e-table/e-table-item.h>
-
-#define GAL_A11Y_TYPE_E_TEXT (gal_a11y_e_text_get_type ())
-#define GAL_A11Y_E_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAL_A11Y_TYPE_E_TEXT, GalA11yEText))
-#define GAL_A11Y_E_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAL_A11Y_TYPE_E_TEXT, GalA11yETextClass))
-#define GAL_A11Y_IS_E_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAL_A11Y_TYPE_E_TEXT))
-#define GAL_A11Y_IS_E_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAL_A11Y_TYPE_E_TEXT))
-
-typedef struct _GalA11yEText GalA11yEText;
-typedef struct _GalA11yETextClass GalA11yETextClass;
-typedef struct _GalA11yETextPrivate GalA11yETextPrivate;
-
-/* This struct should actually be larger as this isn't what we derive from.
- * The GalA11yETextPrivate comes right after the parent class structure.
- **/
-struct _GalA11yEText {
- AtkObject object;
-};
-
-struct _GalA11yETextClass {
- AtkObject parent_class;
-};
-
-
-/* Standard Glib function */
-GType gal_a11y_e_text_get_type (void);
-
-#endif /* ! __GAL_A11Y_E_TEXT_H__ */
diff --git a/a11y/ea-factory.h b/a11y/ea-factory.h
deleted file mode 100644
index 06ae612d6f..0000000000
--- a/a11y/ea-factory.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-factory.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-/* Evolution Accessibility
-*/
-
-#ifndef _EA_FACTORY_H__
-#define _EA_FACTORY_H__
-
-#include <glib-object.h>
-#include <atk/atkobject.h>
-
-#define EA_FACTORY_PARTA_GOBJECT(type, type_as_function, opt_create_accessible) \
-static AtkObject* \
-type_as_function ## _factory_create_accessible (GObject *obj) \
-{ \
- AtkObject *accessible; \
- g_return_val_if_fail (G_IS_OBJECT (obj), NULL); \
- accessible = opt_create_accessible (G_OBJECT (obj)); \
- return accessible; \
-}
-
-#define EA_FACTORY_PARTA(type, type_as_function, opt_create_accessible) \
-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; \
-}
-
-#define EA_FACTORY_PARTB(type, type_as_function, opt_create_accessible) \
- \
-static GType \
-type_as_function ## _factory_get_accessible_type (void) \
-{ \
- return type; \
-} \
- \
- \
-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 EA_FACTORY(type, type_as_function, opt_create_accessible) \
- EA_FACTORY_PARTA(type, type_as_function, opt_create_accessible) \
- EA_FACTORY_PARTB(type, type_as_function, opt_create_accessible)
-
-#define EA_FACTORY_GOBJECT(type, type_as_function, opt_create_accessible) \
- EA_FACTORY_PARTA_GOBJECT(type, type_as_function, opt_create_accessible) \
- EA_FACTORY_PARTB(type, type_as_function, opt_create_accessible)
-
-#define EA_SET_FACTORY(obj_type, type_as_function) \
- atk_registry_set_factory_type (atk_get_default_registry (), \
- obj_type, \
- type_as_function ## _factory_get_type ())
-
-#endif /* _EA_FACTORY_H__ */
diff --git a/a11y/gal-a11y-factory.h b/a11y/gal-a11y-factory.h
deleted file mode 100644
index 22da85eca8..0000000000
--- a/a11y/gal-a11y-factory.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* GAL A11Y
- * gal-a11y-factory.h
- *
- * Copyright 2003 Ximian 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.
- *
- * Authors:
- * Gilbert Fang <gilbert.fang@sun.com>, Sun Microsystem Inc. 2003.
- *
- * This file is mainly from the gailfactory.h of GAIL.
- */
-
-#ifndef _GAL_A11Y_FACTORY_H__
-#define _GAL_A11Y_FACTORY_H__
-
-#include <glib-object.h>
-#include <atk/atkobject.h>
-#include <atk/atkobjectfactory.h>
-
-#define GAL_A11Y_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 GAL_A11Y_WIDGET_SET_FACTORY(widget_type, type_as_function) \
- atk_registry_set_factory_type (atk_get_default_registry (), \
- widget_type, \
- type_as_function ## _factory_get_type ())
-
-#endif /* _GAL_A11Y_FACTORY_H__ */
diff --git a/a11y/gal-a11y-util.c b/a11y/gal-a11y-util.c
deleted file mode 100644
index 0cf7c69dbb..0000000000
--- a/a11y/gal-a11y-util.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include "gal-a11y-util.h"
-
-GType
-gal_a11y_type_register_static_with_private (GType parent_type,
- const gchar *type_name,
- GTypeInfo *info,
- GTypeFlags flags,
- gint priv_size,
- gint *priv_offset)
-{
- GTypeQuery query;
-
- g_type_query (parent_type, &query);
-
- info->class_size = query.class_size;
- info->instance_size = query.instance_size + priv_size;
-
- if (priv_offset)
- *priv_offset = query.instance_size;
-
- return g_type_register_static (parent_type, type_name, info, flags);
-}
diff --git a/a11y/gal-a11y-util.h b/a11y/gal-a11y-util.h
deleted file mode 100644
index b7f742b122..0000000000
--- a/a11y/gal-a11y-util.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * Copyright (C) 2001 Chris Lahey
- */
-
-#ifndef __GAL_A11Y_UTIL_H__
-#define __GAL_A11Y_UTIL_H__
-
-#include <glib-object.h>
-
-GType gal_a11y_type_register_static_with_private (GType parent_type,
- const gchar *type_name,
- GTypeInfo *info,
- GTypeFlags flags,
- int priv_size,
- gint *priv_offset);
-
-#endif /* ! __GAL_A11Y_UTIL_H__ */
diff --git a/a11y/widgets/.cvsignore b/a11y/widgets/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/a11y/widgets/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/a11y/widgets/Makefile.am b/a11y/widgets/Makefile.am
deleted file mode 100644
index c6b0ea2221..0000000000
--- a/a11y/widgets/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-
-noinst_LTLIBRARIES = libevolution-widgets-a11y.la
-
-INCLUDES = \
- -DG_LOG_DOMAIN=\"evolution-a11y\" \
- -I$(top_srcdir)/widgets \
- -I$(top_srcdir)/a11y \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
- -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" \
- -DEVOLUTION_GALVIEWSDIR=\""$(viewsdir)"\" \
- -DEVOLUTION_UIDIR=\""$(evolutionuidir)"\" \
- -DG_DISABLE_DEPRECATED \
- -DPREFIX=\""$(prefix)"\" \
- $(A11Y_CFLAGS) \
- $(EVOLUTION_CALENDAR_CFLAGS)
-
-libevolution_widgets_a11y_la_SOURCES = \
- ea-calendar-item.c \
- ea-calendar-item.h \
- ea-widgets.c \
- ea-widgets.h
diff --git a/a11y/widgets/ea-calendar-item.c b/a11y/widgets/ea-calendar-item.c
deleted file mode 100644
index fee92e27d7..0000000000
--- a/a11y/widgets/ea-calendar-item.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-calendar-item.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <libgnomecanvas/gnome-canvas.h>
-#include <glib/gdate.h>
-#include "ea-calendar-item.h"
-
-static void ea_calendar_item_class_init (EaCalendarItemClass *klass);
-
-static G_CONST_RETURN gchar* ea_calendar_item_get_name (AtkObject *accessible);
-static G_CONST_RETURN gchar* ea_calendar_item_get_description (AtkObject *accessible);
-
-static gpointer parent_class = NULL;
-
-GType
-ea_calendar_item_get_type (void)
-{
- static GType type = 0;
- AtkObjectFactory *factory;
- GTypeQuery query;
- GType derived_atk_type;
-
-
- if (!type) {
- static GTypeInfo tinfo = {
- sizeof (EaCalendarItemClass),
- (GBaseInitFunc) NULL, /* base init */
- (GBaseFinalizeFunc) NULL, /* base finalize */
- (GClassInitFunc) ea_calendar_item_class_init, /* class init */
- (GClassFinalizeFunc) NULL, /* class finalize */
- NULL, /* class data */
- sizeof (EaCalendarItem), /* instance size */
- 0, /* nb preallocs */
- (GInstanceInitFunc) NULL, /* instance init */
- NULL /* value table */
- };
-
- /*
- * Figure out the size of the class and instance
- * we are run-time deriving from (GailCanvasItem, in this case)
- */
-
- factory = atk_registry_get_factory (atk_get_default_registry (),
- GNOME_TYPE_CANVAS_ITEM);
- derived_atk_type = atk_object_factory_get_accessible_type (factory);
- g_type_query (derived_atk_type, &query);
-
- tinfo.class_size = query.class_size;
- tinfo.instance_size = query.instance_size;
-
- type = g_type_register_static (derived_atk_type,
- "EaCalendarItem", &tinfo, 0);
- }
-
- return type;
-}
-
-static void
-ea_calendar_item_class_init (EaCalendarItemClass *klass)
-{
- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- class->get_name = ea_calendar_item_get_name;
- class->get_description = ea_calendar_item_get_description;
-}
-
-AtkObject*
-ea_calendar_item_new (GObject *obj)
-{
- gpointer object;
- AtkObject *atk_object;
-
- g_return_val_if_fail (E_IS_CALENDAR_ITEM (obj), NULL);
- object = g_object_new (EA_TYPE_CALENDAR_ITEM, NULL);
- atk_object = ATK_OBJECT (object);
- atk_object_initialize (atk_object, obj);
- atk_object->role = ATK_ROLE_CALENDAR;
-#ifdef ACC_DEBUG
- g_print ("ea_calendar_item created %p\n", atk_object);
-#endif
- return atk_object;
-}
-
-static G_CONST_RETURN gchar*
-ea_calendar_item_get_name (AtkObject *accessible)
-{
- GObject *g_obj;
- ECalendarItem *calitem;
- gint start_year, start_month, start_day;
- gint end_year, end_month, end_day;
- GDate select_start, select_end;
- static gchar new_name[256] = "";
-
- g_return_val_if_fail (EA_IS_CALENDAR_ITEM (accessible), NULL);
-
- if (accessible->name)
- return accessible->name;
-
- g_obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(accessible));
- g_return_val_if_fail (E_IS_CALENDAR_ITEM (g_obj), NULL);
-
- calitem = E_CALENDAR_ITEM (g_obj);
- if (e_calendar_item_get_date_range (calitem,
- &start_year, &start_month, &start_day,
- &end_year, &end_month, &end_day)) {
- ++start_month;
- ++end_month;
- sprintf (new_name, "calendar date range: from %d-%d-%d to %d-%d-%d.",
- start_year, start_month, start_day,
- end_year, end_month, end_day);
- }
- if (e_calendar_item_get_selection (calitem, &select_start, &select_end)) {
- gint year1, year2, month1, month2, day1, day2;
-
- year1 = g_date_get_year (&select_start);
- month1 = g_date_get_month (&select_start);
- day1 = g_date_get_day (&select_start);
-
- year2 = g_date_get_year (&select_end);
- month2 = g_date_get_month (&select_end);
- day2 = g_date_get_day (&select_end);
-
- sprintf (new_name + strlen (new_name),
- "current selection: from %d-%d-%d to %d-%d-%d.",
- year1, month1, day1,
- year2, month2, day2);
- }
-
- return new_name;
-}
-
-static G_CONST_RETURN gchar*
-ea_calendar_item_get_description (AtkObject *accessible)
-{
- if (accessible->description)
- return accessible->description;
-
- return "evolution calendar widget";
-}
diff --git a/a11y/widgets/ea-calendar-item.h b/a11y/widgets/ea-calendar-item.h
deleted file mode 100644
index 675cb4c6e7..0000000000
--- a/a11y/widgets/ea-calendar-item.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-calendar-item.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#ifndef __EA_CALENDAR_ITEM_H__
-#define __EA_CALENDAR_ITEM_H__
-
-#include <atk/atkgobjectaccessible.h>
-#include <misc/e-calendar-item.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define EA_TYPE_CALENDAR_ITEM (ea_calendar_item_get_type ())
-#define EA_CALENDAR_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EA_TYPE_CALENDAR_ITEM, EaCalendarItem))
-#define EA_CALENDAR_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EA_TYPE_CALENDAR_ITEM, EaCalendarItemClass))
-#define EA_IS_CALENDAR_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EA_TYPE_CALENDAR_ITEM))
-#define EA_IS_CALENDAR_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EA_TYPE_CALENDAR_ITEM))
-#define EA_CALENDAR_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EA_TYPE_CALENDAR_ITEM, EaCalendarItemClass))
-
-typedef struct _EaCalendarItem EaCalendarItem;
-typedef struct _EaCalendarItemClass EaCalendarItemClass;
-
-struct _EaCalendarItem
-{
- AtkGObjectAccessible parent;
-};
-
-GType ea_calendar_item_get_type (void);
-
-struct _EaCalendarItemClass
-{
- AtkGObjectAccessibleClass parent_class;
-};
-
-AtkObject *ea_calendar_item_new (GObject *obj);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __EA_CALENDAR_ITEM_H__ */
diff --git a/a11y/widgets/ea-widgets.c b/a11y/widgets/ea-widgets.c
deleted file mode 100644
index 3b288dc669..0000000000
--- a/a11y/widgets/ea-widgets.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-widgets.c
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-#include "ea-factory.h"
-#include "widgets/ea-calendar-item.h"
-#include "ea-widgets.h"
-
-EA_FACTORY_GOBJECT (EA_TYPE_CALENDAR_ITEM, ea_calendar_item, ea_calendar_item_new);
-
-void e_calendar_item_a11y_init (void)
-{
- EA_SET_FACTORY (e_calendar_item_get_type (), ea_calendar_item);
-}
diff --git a/a11y/widgets/ea-widgets.h b/a11y/widgets/ea-widgets.h
deleted file mode 100644
index e9ec9b3ad9..0000000000
--- a/a11y/widgets/ea-widgets.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* vim:expandtab:shiftwidth=8:tabstop=8:
- */
-/* Evolution Accessibility: ea-widgets.h
- *
- * Copyright (C) 2003 Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program 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
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
- *
- */
-
-/* Evolution Accessibility
-*/
-
-#ifndef _EA_WIDGETS_H__
-#define _EA_WIDGETS_H__
-
-void e_calendar_item_a11y_init (void);
-
-#endif /* _EA_WIDGETS_H__ */