2007-12-18 13:51:12 +00:00
|
|
|
/* GAIL - The GNOME Accessibility Implementation Library
|
|
|
|
|
|
|
|
* Copyright 2001 Sun Microsystems Inc.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2008-06-22 14:28:52 +00:00
|
|
|
#include "config.h"
|
2007-12-23 12:27:33 +00:00
|
|
|
|
2008-05-28 12:59:48 +00:00
|
|
|
#include <gtk/gtk.h>
|
2011-07-10 03:56:42 +00:00
|
|
|
#include "gtkcellaccessibleparent.h"
|
2007-12-18 13:51:12 +00:00
|
|
|
|
|
|
|
GType
|
2011-07-10 03:56:42 +00:00
|
|
|
_gtk_cell_accessible_parent_get_type (void)
|
2007-12-18 13:51:12 +00:00
|
|
|
{
|
2007-12-23 12:24:59 +00:00
|
|
|
static volatile gsize g_define_type_id__volatile = 0;
|
2007-12-18 13:51:12 +00:00
|
|
|
|
2007-12-23 12:24:59 +00:00
|
|
|
if (g_once_init_enter (&g_define_type_id__volatile))
|
2007-12-18 13:51:12 +00:00
|
|
|
{
|
2007-12-23 12:24:59 +00:00
|
|
|
GType g_define_type_id =
|
|
|
|
g_type_register_static_simple (G_TYPE_INTERFACE,
|
2011-07-10 03:56:42 +00:00
|
|
|
"GtkCellAccessibleParent",
|
|
|
|
sizeof (GtkCellAccessibleParentIface),
|
2007-12-23 12:24:59 +00:00
|
|
|
NULL,
|
|
|
|
0,
|
|
|
|
NULL,
|
|
|
|
0);
|
|
|
|
|
|
|
|
g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
|
2007-12-18 13:51:12 +00:00
|
|
|
}
|
|
|
|
|
2007-12-23 12:24:59 +00:00
|
|
|
return g_define_type_id__volatile;
|
2007-12-18 13:51:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2011-07-10 03:56:42 +00:00
|
|
|
_gtk_cell_accessible_parent_get_cell_extents (GtkCellAccessibleParent *parent,
|
|
|
|
GtkCellAccessible *cell,
|
|
|
|
gint *x,
|
|
|
|
gint *y,
|
|
|
|
gint *width,
|
|
|
|
gint *height,
|
|
|
|
AtkCoordType coord_type)
|
2007-12-18 13:51:12 +00:00
|
|
|
{
|
2011-07-10 03:56:42 +00:00
|
|
|
GtkCellAccessibleParentIface *iface;
|
2007-12-18 13:51:12 +00:00
|
|
|
|
2011-07-10 03:56:42 +00:00
|
|
|
g_return_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent));
|
2007-12-18 13:51:12 +00:00
|
|
|
|
2011-07-10 03:56:42 +00:00
|
|
|
iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent);
|
2007-12-18 13:51:12 +00:00
|
|
|
|
|
|
|
if (iface->get_cell_extents)
|
|
|
|
(iface->get_cell_extents) (parent, cell, x, y, width, height, coord_type);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2011-07-10 03:56:42 +00:00
|
|
|
_gtk_cell_accessible_parent_get_cell_area (GtkCellAccessibleParent *parent,
|
|
|
|
GtkCellAccessible *cell,
|
|
|
|
GdkRectangle *cell_rect)
|
2007-12-18 13:51:12 +00:00
|
|
|
{
|
2011-07-10 03:56:42 +00:00
|
|
|
GtkCellAccessibleParentIface *iface;
|
2007-12-18 13:51:12 +00:00
|
|
|
|
2011-07-10 03:56:42 +00:00
|
|
|
g_return_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent));
|
2007-12-18 13:51:12 +00:00
|
|
|
g_return_if_fail (cell_rect);
|
|
|
|
|
2011-07-10 03:56:42 +00:00
|
|
|
iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent);
|
2007-12-18 13:51:12 +00:00
|
|
|
|
|
|
|
if (iface->get_cell_area)
|
|
|
|
(iface->get_cell_area) (parent, cell, cell_rect);
|
|
|
|
}
|
2011-07-09 22:30:59 +00:00
|
|
|
|
2007-12-18 13:51:12 +00:00
|
|
|
gboolean
|
2011-07-10 03:56:42 +00:00
|
|
|
_gtk_cell_accessible_parent_grab_focus (GtkCellAccessibleParent *parent,
|
|
|
|
GtkCellAccessible *cell)
|
2007-12-18 13:51:12 +00:00
|
|
|
{
|
2011-07-10 03:56:42 +00:00
|
|
|
GtkCellAccessibleParentIface *iface;
|
2007-12-18 13:51:12 +00:00
|
|
|
|
2011-07-10 03:56:42 +00:00
|
|
|
g_return_val_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent), FALSE);
|
2007-12-18 13:51:12 +00:00
|
|
|
|
2011-07-10 03:56:42 +00:00
|
|
|
iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent);
|
2007-12-18 13:51:12 +00:00
|
|
|
|
|
|
|
if (iface->grab_focus)
|
|
|
|
return (iface->grab_focus) (parent, cell);
|
|
|
|
else
|
|
|
|
return FALSE;
|
|
|
|
}
|