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 "gailcellparent.h"
27 gail_cell_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,
36 sizeof (GailCellParentIface),
42 g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
45 return g_define_type_id__volatile;
49 * gail_cell_parent_get_cell_extents:
50 * @parent: a #GObject instance that implements GailCellParentIface
51 * @cell: a #GailCell whose extents is required
52 * @x: address of #gint to put x coordinate
53 * @y: address of #gint to put y coordinate
54 * @width: address of #gint to put width
55 * @height: address of #gint to put height
56 * @coord_type: specifies whether the coordinates are relative to the screen
57 * or to the components top level window
59 * Gets the rectangle which gives the extent of the @cell.
63 gail_cell_parent_get_cell_extents (GailCellParent *parent,
69 AtkCoordType coord_type)
71 GailCellParentIface *iface;
73 g_return_if_fail (GAIL_IS_CELL_PARENT (parent));
75 iface = GAIL_CELL_PARENT_GET_IFACE (parent);
77 if (iface->get_cell_extents)
78 (iface->get_cell_extents) (parent, cell, x, y, width, height, coord_type);
82 * gail_cell_parent_get_cell_area:
83 * @parent: a #GObject instance that implements GailCellParentIface
84 * @cell: a #GailCell whose area is required
85 * @cell_rect: address of #GdkRectangle to put the cell area
87 * Gets the cell area of the @cell.
91 gail_cell_parent_get_cell_area (GailCellParent *parent,
93 GdkRectangle *cell_rect)
95 GailCellParentIface *iface;
97 g_return_if_fail (GAIL_IS_CELL_PARENT (parent));
98 g_return_if_fail (cell_rect);
100 iface = GAIL_CELL_PARENT_GET_IFACE (parent);
102 if (iface->get_cell_area)
103 (iface->get_cell_area) (parent, cell, cell_rect);
106 * gail_cell_parent_grab_focus:
107 * @parent: a #GObject instance that implements GailCellParentIface
108 * @cell: a #GailCell whose area is required
110 * Puts focus in the specified cell.
114 gail_cell_parent_grab_focus (GailCellParent *parent,
117 GailCellParentIface *iface;
119 g_return_val_if_fail (GAIL_IS_CELL_PARENT (parent), FALSE);
121 iface = GAIL_CELL_PARENT_GET_IFACE (parent);
123 if (iface->grab_focus)
124 return (iface->grab_focus) (parent, cell);