X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=cspi%2Fspi_action.c;h=7136b45fb7f6f32678aa66adfa151591aaa5b8dc;hb=4946775a4aa19df13d8950f0c5e0fb438546bc84;hp=cce5af74fbb76a004b974e6dfa3206e76e14b955;hpb=540a6e92e306a7e5c52de9b90ca3785f3feee402;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/cspi/spi_action.c b/cspi/spi_action.c index cce5af7..7136b45 100644 --- a/cspi/spi_action.c +++ b/cspi/spi_action.c @@ -2,7 +2,8 @@ * 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 @@ -57,12 +58,11 @@ AccessibleAction_unref (AccessibleAction *obj) long AccessibleAction_getNActions (AccessibleAction *obj) { - long retval; + dbus_int32_t retval; cspi_return_val_if_fail (obj != NULL, -1); - retval = - Accessibility_Action__get_nActions (CSPI_OBJREF (obj), cspi_ev ()); + cspi_dbus_get_property (obj, spi_interface_action, "nActions", NULL, "i", &retval); cspi_return_val_if_ev ("getNActions", -1); @@ -83,13 +83,11 @@ char * AccessibleAction_getDescription (AccessibleAction *obj, long int i) { + dbus_int32_t d_i = i; char *retval; cspi_return_val_if_fail (obj != NULL, NULL); - retval = - Accessibility_Action_getDescription (CSPI_OBJREF (obj), - i, - cspi_ev ()); + cspi_dbus_call (obj, spi_interface_action, "getDescription", NULL, "i=>s", d_i, &retval); cspi_return_val_if_ev ("getDescription", NULL); @@ -103,6 +101,25 @@ AccessibleAction_getDescription (AccessibleAction *obj, * * Get the keybindings for the @i-th action invokable on an * object implementing #AccessibleAction, if any are defined. + * The keybindings string format is as follows: + * there are multiple parts to a keybinding string (typically 3). + * They are delimited with ";". The first is the action's + * keybinding which is usable if the object implementing the action + * is currently posted to the screen, e.g. if a menu is posted + * then these keybindings for the corresponding menu-items are + * available. The second keybinding substring is the full key sequence + * necessary to post the action's widget and activate it, e.g. for + * a menu item such as "File->Open" it would both post the menu and + * activate the item. Thus the second keybinding string is available + * during the lifetime of the containing toplevel window as a whole, + * whereas the first keybinding string only works while the object + * implementing AtkAction is posted. The third (and optional) + * keybinding string is the "keyboard shortcut" which invokes the + * action without posting any menus. + * Meta-keys are indicated by the conventional strings + * "", "", "", "", + * etc. (we use the same string as gtk_accelerator_name() in + * gtk+-2.X. * * Returns: a UTF-8 string which can be parsed to determine the @i-th * invokable action's keybindings. @@ -111,14 +128,11 @@ char * AccessibleAction_getKeyBinding (AccessibleAction *obj, long int i) { + dbus_int32_t d_i = i; char *retval; - cspi_return_val_if_fail (obj != NULL, NULL); - retval = - Accessibility_Action_getKeyBinding (CSPI_OBJREF (obj), - i, - cspi_ev ()); + cspi_dbus_call (obj, spi_interface_action, "getKeyBinding", NULL, "i=>s", d_i, &retval); cspi_return_val_if_ev ("getKeyBinding", NULL); @@ -139,14 +153,11 @@ char * AccessibleAction_getName (AccessibleAction *obj, long int i) { + dbus_int32_t d_i = i; char *retval; - cspi_return_val_if_fail (obj != NULL, NULL); - retval = - Accessibility_Action_getName (CSPI_OBJREF (obj), - i, - cspi_ev ()); + cspi_dbus_call (obj, spi_interface_action, "getName", NULL, "i=>s", d_i, &retval); cspi_return_val_if_ev ("getName", NULL); @@ -166,13 +177,12 @@ SPIBoolean AccessibleAction_doAction (AccessibleAction *obj, long int i) { - SPIBoolean retval; + dbus_int32_t d_i = i; + dbus_bool_t retval; cspi_return_val_if_fail (obj != NULL, FALSE); - retval = Accessibility_Action_doAction (CSPI_OBJREF (obj), - i, - cspi_ev ()); + cspi_dbus_call (obj, spi_interface_action, "doAction", NULL, "i=>b", d_i, &retval); cspi_return_val_if_ev ("doAction", FALSE);