evolution-3.6.4/a11y/gal-a11y-util.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-util.h"
29 
30 GType
31 gal_a11y_type_register_static_with_private (GType parent_type,
32                                             const gchar *type_name,
33                                             GTypeInfo *info,
34                                             GTypeFlags flags,
35                                             gint priv_size,
36                                             gint *priv_offset)
37 {
38 	GTypeQuery query;
39 
40 	g_type_query (parent_type, &query);
41 
42 	info->class_size = query.class_size;
43 	info->instance_size = query.instance_size + priv_size;
44 
45 	if (priv_offset)
46 		*priv_offset = query.instance_size;
47 
48 	return g_type_register_static (parent_type, type_name, info, flags);
49 }