1 /* GAIL - The GNOME Accessibility Implementation Library
3 * Copyright 2001 Sun Microsystems Inc.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
24 #include "gtkcellaccessibleparent.h"
27 _gtk_cell_accessible_parent_get_type (void)
29 static volatile gsize g_define_type_id__volatile = 0;
31 if (g_once_init_enter (&g_define_type_id__volatile))
33 GType g_define_type_id =
34 g_type_register_static_simple (G_TYPE_INTERFACE,
35 "GtkCellAccessibleParent",
36 sizeof (GtkCellAccessibleParentIface),
42 g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
45 return g_define_type_id__volatile;
49 _gtk_cell_accessible_parent_get_cell_extents (GtkCellAccessibleParent *parent,
50 GtkCellAccessible *cell,
55 AtkCoordType coord_type)
57 GtkCellAccessibleParentIface *iface;
59 g_return_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent));
61 iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent);
63 if (iface->get_cell_extents)
64 (iface->get_cell_extents) (parent, cell, x, y, width, height, coord_type);
68 _gtk_cell_accessible_parent_get_cell_area (GtkCellAccessibleParent *parent,
69 GtkCellAccessible *cell,
70 GdkRectangle *cell_rect)
72 GtkCellAccessibleParentIface *iface;
74 g_return_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent));
75 g_return_if_fail (cell_rect);
77 iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent);
79 if (iface->get_cell_area)
80 (iface->get_cell_area) (parent, cell, cell_rect);
84 _gtk_cell_accessible_parent_grab_focus (GtkCellAccessibleParent *parent,
85 GtkCellAccessible *cell)
87 GtkCellAccessibleParentIface *iface;
89 g_return_val_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent), FALSE);
91 iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent);
93 if (iface->grab_focus)
94 return (iface->grab_focus) (parent, cell);
100 _gtk_cell_accessible_parent_get_child_index (GtkCellAccessibleParent *parent,
101 GtkCellAccessible *cell)
103 GtkCellAccessibleParentIface *iface;
105 g_return_val_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent), FALSE);
107 iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent);
109 if (iface->get_child_index)
110 return (iface->get_child_index) (parent, cell);
116 _gtk_cell_accessible_parent_get_renderer_state (GtkCellAccessibleParent *parent,
117 GtkCellAccessible *cell)
119 GtkCellAccessibleParentIface *iface;
121 g_return_val_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent), 0);
122 g_return_val_if_fail (GTK_IS_CELL_ACCESSIBLE (cell), 0);
124 iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent);
126 if (iface->get_renderer_state)
127 return (iface->get_renderer_state) (parent, cell);
133 _gtk_cell_accessible_parent_set_cell_data (GtkCellAccessibleParent *parent,
134 GtkCellAccessible *cell)
136 GtkCellAccessibleParentIface *iface;
138 g_return_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent));
139 g_return_if_fail (GTK_IS_CELL_ACCESSIBLE (cell));
141 iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent);
143 if (iface->set_cell_data)
144 (iface->set_cell_data) (parent, cell);