evolution-3.6.4/widgets/table/gal-a11y-e-table-factory.c

No issues found

  1 /*
  2  *
  3  * This program is free software; you can redistribute it and/or
  4  * modify it under the terms of the GNU Lesser General Public
  5  * License as published by the Free Software Foundation; either
  6  * version 2 of the License, or (at your option) version 3.
  7  *
  8  * This program is distributed in the hope that it will be useful,
  9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 11  * Lesser General Public License for more details.
 12  *
 13  * You should have received a copy of the GNU Lesser General Public
 14  * License along with the program; if not, see <http://www.gnu.org/licenses/>
 15  *
 16  *
 17  * Authors:
 18  *		Christopher James Lahey <clahey@ximian.com>
 19  *
 20  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
 21  *
 22  */
 23 
 24 #ifdef HAVE_CONFIG_H
 25 #include <config.h>
 26 #endif
 27 
 28 #include "gal-a11y-e-table.h"
 29 #include "gal-a11y-e-table-factory.h"
 30 
 31 static AtkObjectFactoryClass *parent_class;
 32 #define PARENT_TYPE (ATK_TYPE_OBJECT_FACTORY)
 33 
 34 /* Static functions */
 35 
 36 static GType
 37 gal_a11y_e_table_factory_get_accessible_type (void)
 38 {
 39 	return GAL_A11Y_TYPE_E_TABLE;
 40 }
 41 
 42 static AtkObject *
 43 gal_a11y_e_table_factory_create_accessible (GObject *obj)
 44 {
 45 	AtkObject *accessible;
 46 
 47 	accessible = gal_a11y_e_table_new (obj);
 48 
 49 	return accessible;
 50 }
 51 
 52 static void
 53 gal_a11y_e_table_factory_class_init (GalA11yETableFactoryClass *class)
 54 {
 55 	AtkObjectFactoryClass *factory_class = ATK_OBJECT_FACTORY_CLASS (class);
 56 
 57 	parent_class = g_type_class_ref (PARENT_TYPE);
 58 
 59 	factory_class->create_accessible   = gal_a11y_e_table_factory_create_accessible;
 60 	factory_class->get_accessible_type = gal_a11y_e_table_factory_get_accessible_type;
 61 }
 62 
 63 static void
 64 gal_a11y_e_table_factory_init (GalA11yETableFactory *factory)
 65 {
 66 }
 67 
 68 /**
 69  * gal_a11y_e_table_factory_get_type:
 70  * @void:
 71  *
 72  * Registers the &GalA11yETableFactory class if necessary, and returns the type ID
 73  * associated to it.
 74  *
 75  * Return value: The type ID of the &GalA11yETableFactory class.
 76  **/
 77 GType
 78 gal_a11y_e_table_factory_get_type (void)
 79 {
 80 	static GType type = 0;
 81 
 82 	if (!type) {
 83 		GTypeInfo info = {
 84 			sizeof (GalA11yETableFactoryClass),
 85 			(GBaseInitFunc) NULL,
 86 			(GBaseFinalizeFunc) NULL,
 87 			(GClassInitFunc) gal_a11y_e_table_factory_class_init,
 88 			(GClassFinalizeFunc) NULL,
 89 			NULL, /* class_data */
 90 			sizeof (GalA11yETableFactory),
 91 			0,
 92 			(GInstanceInitFunc) gal_a11y_e_table_factory_init,
 93 			NULL /* value_table */
 94 		};
 95 
 96 		type = g_type_register_static (
 97 			PARENT_TYPE, "GalA11yETableFactory", &info, 0);
 98 	}
 99 
100 	return type;
101 }