diff options
author | Yuedong Du <yuedong.du@sun.com> | 2003-10-11 11:00:59 +0800 |
---|---|---|
committer | Yuedong Du <york@src.gnome.org> | 2003-10-11 11:00:59 +0800 |
commit | 5bbde1a63071c17b11f01132030ac15a8e803755 (patch) | |
tree | a5a191f48cf597bc82b766f4e2a33b25fcc5386e /a11y/e-table/gal-a11y-e-tree-factory.c | |
parent | 49b3179c746b0157119d4dcd750e1338f65c6438 (diff) | |
download | gsoc2013-evolution-5bbde1a63071c17b11f01132030ac15a8e803755.tar.gz gsoc2013-evolution-5bbde1a63071c17b11f01132030ac15a8e803755.tar.zst gsoc2013-evolution-5bbde1a63071c17b11f01132030ac15a8e803755.zip |
add new files. set the right role. new file.
2003-10-11 Yuedong Du <yuedong.du@sun.com>
* gal/a11y/e-table/Makefile.am: add new files.
* gal/a11y/e-table/gal-a11y-e-cell.c: (gal_a11y_e_cell_construct):
set the right role.
* gal/a11y/e-table/gal-a11y-e-table-item-factory.c: new file.
(gal_a11y_e_table_item_factory_get_accessible_type),
(gal_a11y_e_table_item_factory_create_accessible),
(gal_a11y_e_table_item_factory_class_init),
(gal_a11y_e_table_item_factory_init),
(gal_a11y_e_table_item_factory_get_type): factory for the table item
a11y object. in create_accessible, we judge the type of widget
then set correct role.
* gal/a11y/e-table/gal-a11y-e-table-item-factory.h: ditto.
* gal/a11y/e-table/gal-a11y-e-tree-factory.c: new file.
(gal_a11y_e_tree_factory_get_accessible_type),
(gal_a11y_e_tree_factory_create_accessible),
(gal_a11y_e_tree_factory_class_init),
(gal_a11y_e_tree_factory_init), (gal_a11y_e_tree_factory_get_type):
factory for a11y object of etree. Mostly copyed from
gal-a11y-e-table-factory.c.
* gal/a11y/e-table/gal-a11y-e-tree-factory.h: ditto
* gal/a11y/e-table/gal-a11y-e-tree.c: (init_child_item),
(et_ref_accessible_at_point), (et_get_n_children), (et_ref_child),
(et_class_init), (et_atk_component_iface_init), (et_init),
(gal_a11y_e_tree_get_type), (gal_a11y_e_tree_new):a11y object for
etree object, mostly copied from gal-a11y-e-table.c. init_child_item
set correct role for the table item.
* gal/a11y/e-table/gal-a11y-e-tree.h: ditto.
* gal/e-table/e-table-item.c: (eti_class_init): register factory
for table item a11y object.
* gal/e-table/e-tree.c: (e_tree_get_item), (e_tree_class_init):
add new access fuction to get the table item of etree.
* gal/e-table/e-tree.h: ditto
svn path=/trunk/; revision=22867
Diffstat (limited to 'a11y/e-table/gal-a11y-e-tree-factory.c')
-rw-r--r-- | a11y/e-table/gal-a11y-e-tree-factory.c | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/a11y/e-table/gal-a11y-e-tree-factory.c b/a11y/e-table/gal-a11y-e-tree-factory.c new file mode 100644 index 0000000000..2fa34c5fbc --- /dev/null +++ b/a11y/e-table/gal-a11y-e-tree-factory.c @@ -0,0 +1,81 @@ +/* + * Authors: Yuedong Du <yuedong.du@sun.com> + * + * Copyright (C) 2003 Ximian, Inc. + */ + +#include <config.h> +#include "gal-a11y-e-tree-factory.h" +#include "gal-a11y-e-tree.h" + +#define CS_CLASS(factory) (G_TYPE_INSTANCE_GET_CLASS ((factory), C_TYPE_STREAM, GalA11yETreeFactoryClass)) +static AtkObjectFactoryClass *parent_class; +#define PARENT_TYPE (ATK_TYPE_OBJECT_FACTORY) + +/* Static functions */ + +static GType +gal_a11y_e_tree_factory_get_accessible_type (void) +{ + return GAL_A11Y_TYPE_E_TREE; +} + +static AtkObject* +gal_a11y_e_tree_factory_create_accessible (GObject *obj) +{ + AtkObject *accessible; + + accessible = gal_a11y_e_tree_new (obj); + + return accessible; +} + +static void +gal_a11y_e_tree_factory_class_init (GalA11yETreeFactoryClass *klass) +{ + AtkObjectFactoryClass *factory_class = ATK_OBJECT_FACTORY_CLASS (klass); + + parent_class = g_type_class_ref (PARENT_TYPE); + + factory_class->create_accessible = gal_a11y_e_tree_factory_create_accessible; + factory_class->get_accessible_type = gal_a11y_e_tree_factory_get_accessible_type; +} + +static void +gal_a11y_e_tree_factory_init (GalA11yETreeFactory *factory) +{ +} + +/** + * gal_a11y_e_tree_factory_get_type: + * @void: + * + * Registers the &GalA11yETreeFactory class if necessary, and returns the type ID + * associated to it. + * + * Return value: The type ID of the &GalA11yETreeFactory class. + **/ +GType +gal_a11y_e_tree_factory_get_type (void) +{ + static GType type = 0; + + if (!type) { + GTypeInfo info = { + sizeof (GalA11yETreeFactoryClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) gal_a11y_e_tree_factory_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (GalA11yETreeFactory), + 0, + (GInstanceInitFunc) gal_a11y_e_tree_factory_init, + NULL /* value_tree */ + }; + + type = g_type_register_static (PARENT_TYPE, "GalA11yETreeFactory", &info, 0); + } + + return type; +} |