X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=cspi%2Fspi_component.c;h=2d25593e3dd7afdeb9e0f0d2034ca2a6d11e22c6;hb=ef25f6c6de6d39e1b4e4adc4ed9f6d639b04437d;hp=d8b3bcef528b9dd590166582976126826a132b62;hpb=fd46827d0ef868929e7c255334b73adf2e305a85;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/cspi/spi_component.c b/cspi/spi_component.c index d8b3bce..2d25593 100644 --- a/cspi/spi_component.c +++ b/cspi/spi_component.c @@ -15,11 +15,10 @@ * Returns: (no return code implemented yet). * **/ -int +void AccessibleComponent_ref (AccessibleComponent *obj) { cspi_object_ref (obj); - return 0; } /** @@ -31,11 +30,10 @@ AccessibleComponent_ref (AccessibleComponent *obj) * Returns: (no return code implemented yet). * **/ -int +void AccessibleComponent_unref (AccessibleComponent *obj) { cspi_object_unref (obj); - return 0; } /** @@ -57,11 +55,18 @@ AccessibleComponent_contains (AccessibleComponent *obj, 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; } /** @@ -85,11 +90,13 @@ AccessibleComponent_getAccessibleAtPoint (AccessibleComponent *obj, { 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); } @@ -115,14 +122,23 @@ AccessibleComponent_getExtents (AccessibleComponent *obj, 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; + } } /** @@ -142,11 +158,22 @@ AccessibleComponent_getPosition (AccessibleComponent *obj, 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; + } } /** @@ -163,6 +190,8 @@ AccessibleComponent_getSize (AccessibleComponent *obj, long int *width, long int *height) { + cspi_return_if_fail (obj != NULL); + Accessibility_Component_getSize (CSPI_OBJREF (obj), (CORBA_long *) width, (CORBA_long *) height, @@ -181,11 +210,16 @@ AccessibleComponent_getSize (AccessibleComponent *obj, 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 ()); + + cspi_return_val_if_ev ("getLayer", SPI_LAYER_INVALID); + switch (zlayer) { case Accessibility_LAYER_BACKGROUND: @@ -210,6 +244,7 @@ AccessibleComponent_getLayer (AccessibleComponent *obj) retval = SPI_LAYER_INVALID; break; } + return retval; } @@ -226,8 +261,16 @@ AccessibleComponent_getLayer (AccessibleComponent *obj) 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; } /** @@ -236,10 +279,8 @@ AccessibleComponent_getMDIZOrder (AccessibleComponent *obj) * * Attempt to set the keyboard input focus to the specified * #AccessibleComponent. - * **/ void AccessibleComponent_grabFocus (AccessibleComponent *obj) { - ; }