* @obj: a pointer to an object implementing #AccessibleComponent on which to operate.
*
* Increment the reference count for an #AccessibleComponent.
- *
- * Returns: (no return code implemented yet).
- *
**/
-int
+void
AccessibleComponent_ref (AccessibleComponent *obj)
{
cspi_object_ref (obj);
- return 0;
}
/**
* @obj: a pointer to the object implementing #AccessibleComponent on which to operate.
*
* Decrement the reference count for an #AccessibleComponent.
- *
- * Returns: (no return code implemented yet).
- *
**/
-int
+void
AccessibleComponent_unref (AccessibleComponent *obj)
{
cspi_object_unref (obj);
- return 0;
}
/**
long int y,
AccessibleCoordType ctype)
{
- return Accessibility_Component_contains (CSPI_OBJREF (obj),
- (CORBA_long) x,
- (CORBA_long) y,
- ctype,
- cspi_ev ());
+ SPIBoolean retval;
+
+ cspi_return_val_if_fail (obj != NULL, FALSE);
+
+ retval = Accessibility_Component_contains (CSPI_OBJREF (obj),
+ (CORBA_long) x,
+ (CORBA_long) y,
+ ctype,
+ cspi_ev ());
+ cspi_return_val_if_ev ("contains", FALSE);
+
+ return retval;
}
/**
{
Accessibility_Accessible child;
- child = Accessibility_Component_getAccessibleAtPoint(CSPI_OBJREF (obj),
- (CORBA_long) x,
- (CORBA_long) y,
- ctype,
- cspi_ev ());
+ cspi_return_val_if_fail (obj != NULL, NULL);
+
+ child = Accessibility_Component_getAccessibleAtPoint (CSPI_OBJREF (obj),
+ (CORBA_long) x,
+ (CORBA_long) y,
+ ctype,
+ cspi_ev ());
return cspi_object_add (child);
}
AccessibleCoordType ctype)
{
Accessibility_BoundingBox bbox;
+
+ cspi_return_if_fail (obj != NULL);
+
bbox = Accessibility_Component_getExtents (CSPI_OBJREF (obj),
ctype,
cspi_ev ());
- cspi_warn_ev (cspi_ev (), "AccessibleComponent_getExtents");
- *x = bbox.x;
- *y = bbox.y;
- *width = bbox.width;
- *height = bbox.height;
+ if (!cspi_check_ev ("AccessibleComponent_getExtents"))
+ {
+ *x = *y = *width = *height = 0;
+ }
+ else
+ {
+ *x = bbox.x;
+ *y = bbox.y;
+ *width = bbox.width;
+ *height = bbox.height;
+ }
}
/**
long int *y,
AccessibleCoordType ctype)
{
+ CORBA_long cx, cy;
+
+ cspi_return_if_fail (obj != NULL);
+
Accessibility_Component_getPosition (CSPI_OBJREF (obj),
- (CORBA_long *) x,
- (CORBA_long *) y,
- ctype,
- cspi_ev ());
+ &cx, &cy, ctype, cspi_ev ());
+
+ if (!cspi_check_ev ("getPosition"))
+ {
+ *x = *y = 0;
+ }
+ else
+ {
+ *x = cx;
+ *y = cy;
+ }
}
/**
long int *width,
long int *height)
{
+ cspi_return_if_fail (obj != NULL);
+
Accessibility_Component_getSize (CSPI_OBJREF (obj),
(CORBA_long *) width,
(CORBA_long *) height,
AccessibleComponentLayer
AccessibleComponent_getLayer (AccessibleComponent *obj)
{
+ AccessibleComponentLayer retval;
Accessibility_ComponentLayer zlayer;
- AccessibleComponentLayer retval;
-
+
+ cspi_return_val_if_fail (obj != NULL, FALSE);
+
zlayer = Accessibility_Component_getLayer (CSPI_OBJREF (obj),
- cspi_ev ());
- switch (retval)
+ cspi_ev ());
+
+ cspi_return_val_if_ev ("getLayer", SPI_LAYER_INVALID);
+
+ switch (zlayer)
{
case Accessibility_LAYER_BACKGROUND:
retval = SPI_LAYER_BACKGROUND;
break;
default:
retval = SPI_LAYER_INVALID;
+ break;
}
+
return retval;
}
short
AccessibleComponent_getMDIZOrder (AccessibleComponent *obj)
{
- return (short) Accessibility_Component_getMDIZOrder (CSPI_OBJREF (obj),
- cspi_ev ());
+ short retval;
+
+ cspi_return_val_if_fail (obj != NULL, FALSE);
+
+ retval = Accessibility_Component_getMDIZOrder (CSPI_OBJREF (obj),
+ cspi_ev ());
+
+ cspi_return_val_if_ev ("getMDIZOrder", FALSE);
+
+ return retval;
}
/**
*
* Attempt to set the keyboard input focus to the specified
* #AccessibleComponent.
- *
**/
void
AccessibleComponent_grabFocus (AccessibleComponent *obj)
{
- ;
}