* AT-SPI - Assistive Technology Service Provider Interface
* (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
*
- * Copyright 2001 Sun Microsystems Inc.
+ * Copyright 2001, 2002 Sun Microsystems Inc.,
+ * Copyright 2001, 2002 Ximian, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
BONOBO_TYPE_FUNC_FULL (SpiAction,
Accessibility_Action,
SPI_TYPE_BASE,
- spi_action);
+ spi_action)
static void
spi_action_class_init (SpiActionClass *klass)
{
SpiAction *new_action = g_object_new (SPI_ACTION_TYPE, NULL);
- spi_base_construct (SPI_BASE (new_action), obj);
+ spi_base_construct (SPI_BASE (new_action), G_OBJECT(obj));
return new_action;
}
static AtkAction *
get_action_from_servant (PortableServer_Servant servant)
{
- SpiBase *object = SPI_BASE (servant);
- return ATK_ACTION (object->atko);
+ SpiBase *object = SPI_BASE (bonobo_object_from_servant (servant));
+ g_return_val_if_fail (object != NULL, NULL);
+ /* the convention of making hyperlinks actionable breaks the assertion below */
+ /* g_return_val_if_fail (ATK_IS_OBJECT(object->gobj), NULL); */
+ return ATK_ACTION (object->gobj);
}
static CORBA_long
CORBA_Environment *ev)
{
AtkAction *action = get_action_from_servant (servant);
- return (CORBA_long) atk_action_get_n_actions (action);
+ return atk_action_get_n_actions (action);
}
static CORBA_boolean
const CORBA_long index, CORBA_Environment * ev)
{
AtkAction *action = get_action_from_servant (servant);
- return (CORBA_boolean) atk_action_do_action (action, (gint) index);
+ return atk_action_do_action (action, (gint) index);
}
static CORBA_string
AtkAction *action = get_action_from_servant (servant);
const gchar *rv;
- rv = atk_action_get_description (action, (gint) index);
+ rv = atk_action_get_description (action, index);
if (rv)
return CORBA_string_dup (rv);
else
AtkAction *action = get_action_from_servant (servant);
const gchar *rv;
- rv = atk_action_get_name (action, (gint) index);
+ rv = atk_action_get_name (action, index);
if (rv)
return CORBA_string_dup (rv);
else
AtkAction *action = get_action_from_servant (servant);
const gchar *rv;
- rv = atk_action_get_keybinding (action, (gint) index);
+ rv = atk_action_get_keybinding (action, index);
if (rv)
return CORBA_string_dup (rv);
else