X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=cspi%2Fspi_action.c;h=4a5fa29cb26aefa1a6fa1267565ea20503e1094b;hb=7b24d9fcc3d6f82195a5e7a95af9f60a833cf79f;hp=03260280267a52c0115b5048759f3fc6e30fb33c;hpb=d809d79f978308b8e2039e7958e6b5773950ed69;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/cspi/spi_action.c b/cspi/spi_action.c index 0326028..4a5fa29 100644 --- a/cspi/spi_action.c +++ b/cspi/spi_action.c @@ -1,83 +1,159 @@ -int -AccessibleAction_ref ( - AccessibleAction *obj) +#include + +/** + * AccessibleAction_ref: + * @obj: a pointer to the #AccessibleAction on which to operate. + * + * Increment the reference count for an #AccessibleAction. + **/ +void +AccessibleAction_ref (AccessibleAction *obj) { - Accessibility_Action_ref (*obj, &ev); - return 0; + cspi_object_ref (obj); } -int +/** + * AccessibleAction_unref: + * @obj: a pointer to the #AccessibleAction on which to operate. + * + * Decrement the reference count for an #AccessibleAction. + **/ +void AccessibleAction_unref (AccessibleAction *obj) { - Accessibility_Action_unref (*obj, &ev); - return 0; + cspi_object_unref (obj); } - - +/** + * AccessibleAction_getNActions: + * @obj: a pointer to the #AccessibleAction to query. + * + * Get the number of actions invokable on an #AccessibleAction implementor. + * + * Returns: a #long integer indicatin the number of invokable actions. + **/ long AccessibleAction_getNActions (AccessibleAction *obj) { - return (long) - Accessibility_Action__get_nActions (*obj, &ev); -} + long retval; + + cspi_return_val_if_fail (obj != NULL, -1); + + retval = + Accessibility_Action__get_nActions (CSPI_OBJREF (obj), cspi_ev ()); + cspi_return_val_if_ev ("getNActions", -1); + + return retval; +} /** * AccessibleAction_getDescription: - * @obj: a pointer to the #AccessibleAction to query. + * @obj: a pointer to the #AccessibleAction implementor to query. + * @i: a long integer indicating which action to query. * - * Get the description of 'i-th' action invokable on an + * Get the description of '@i-th' action invokable on an * object implementing #AccessibleAction. * - * Not Yet Implemented. - * - * Returns: a UTF-8 string describing the 'i-th' invokable action. - * + * Returns: a UTF-8 string describing the '@i-th' invokable action. **/ char * AccessibleAction_getDescription (AccessibleAction *obj, - long index) + long int i) { - return (char *) - Accessibility_Action_getDescription (*obj, - (CORBA_long) index, - &ev); -} + char *retval; + cspi_return_val_if_fail (obj != NULL, NULL); + retval = + Accessibility_Action_getDescription (CSPI_OBJREF (obj), + (CORBA_long) i, + cspi_ev ()); + cspi_return_val_if_ev ("getDescription", NULL); + return retval; +} + +/** + * AccessibleAction_getKeyBinding: + * @obj: a pointer to the #AccessibleAction implementor to query. + * @i: a long integer indicating which action to query. + * + * Get the keybindings for the @i-th action invokable on an + * object implementing #AccessibleAction, if any are defined. + * + * Returns: a UTF-8 string which can be parsed to determine the @i-th + * invokable action's keybindings. + **/ char * AccessibleAction_getKeyBinding (AccessibleAction *obj, - long index) + long int i) { - return (char *) - Accessibility_Action_getKeyBinding (*obj, - (CORBA_long) index, - &ev); -} + char *retval; + cspi_return_val_if_fail (obj != NULL, NULL); + retval = + Accessibility_Action_getKeyBinding (CSPI_OBJREF (obj), + (CORBA_long) i, + cspi_ev ()); + + cspi_return_val_if_ev ("getKeyBinding", NULL); + + return retval; +} +/** + * AccessibleAction_getName: + * @obj: a pointer to the #AccessibleAction implementor to query. + * @i: a long integer indicating which action to query. + * + * Get the name of the '@i-th' action invokable on an + * object implementing #AccessibleAction. + * + * Returns: the 'event type' name of the action, as a UTF-8 string. + **/ char * AccessibleAction_getName (AccessibleAction *obj, - long index) + long int i) { - return (char *) - Accessibility_Action_getName (*obj, - (CORBA_long) index, - &ev); -} + char *retval; + cspi_return_val_if_fail (obj != NULL, NULL); -boolean + retval = + Accessibility_Action_getName (CSPI_OBJREF (obj), + (CORBA_long) i, + cspi_ev ()); + + cspi_return_val_if_ev ("getName", NULL); + + return retval; +} + +/** + * AccessibleAction_doAction: + * @obj: a pointer to the #AccessibleAction to query. + * @i: an integer specifying which action to invoke. + * + * Invoke the action indicated by #index. + * + * Returns: #TRUE if the action is successfully invoked, otherwise #FALSE. + **/ +SPIBoolean AccessibleAction_doAction (AccessibleAction *obj, - long index) + long int i) { - return (boolean) - Accessibility_Action_doAction (*obj, - (CORBA_long) index, - &ev); -} + SPIBoolean retval; + cspi_return_val_if_fail (obj != NULL, FALSE); + retval = (SPIBoolean) + Accessibility_Action_doAction (CSPI_OBJREF (obj), + (CORBA_long) i, + cspi_ev ()); + + cspi_return_val_if_ev ("doAction", FALSE); + + return retval; +}