Documentation fixes for ref/unref methods that no longer return ints.
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_action.c
1 #include <cspi/spi-private.h>
2
3 /**
4  * AccessibleAction_ref:
5  * @obj: a pointer to the #AccessibleAction on which to operate.
6  *
7  * Increment the reference count for an #AccessibleAction.
8  *
9  **/
10 void
11 AccessibleAction_ref (AccessibleAction *obj)
12 {
13   cspi_object_ref (obj);
14 }
15
16 /**
17  * AccessibleAction_unref:
18  * @obj: a pointer to the #AccessibleAction on which to operate.
19  *
20  * Decrement the reference count for an #AccessibleAction.
21  *
22  **/
23 void
24 AccessibleAction_unref (AccessibleAction *obj)
25 {
26   cspi_object_unref (obj);
27 }
28
29 /**
30  * AccessibleAction_getNActions:
31  * @obj: a pointer to the #AccessibleAction to query.
32  *
33  * Get the number of actions invokable on an #AccessibleAction implementor.
34  *
35  * Returns: a #long integer indicatin the number of invokable actions.
36  **/
37 long
38 AccessibleAction_getNActions (AccessibleAction *obj)
39 {
40   long retval;
41
42   cspi_return_val_if_fail (obj != NULL, -1);
43
44   retval =
45     Accessibility_Action__get_nActions (CSPI_OBJREF (obj), cspi_ev ());
46
47   cspi_return_val_if_ev ("getNActions", -1);
48
49   return retval;
50 }
51
52 /**
53  * AccessibleAction_getDescription:
54  * @obj: a pointer to the #AccessibleAction implementor to query.
55  * @i: a long integer indicating which action to query.
56  *
57  * Get the description of '@i-th' action invokable on an
58  *      object implementing #AccessibleAction.
59  *
60  * Returns: a UTF-8 string describing the '@i-th' invokable action.
61  **/
62 char *
63 AccessibleAction_getDescription (AccessibleAction *obj,
64                                  long int          i)
65 {
66   char *retval;
67   cspi_return_val_if_fail (obj != NULL, NULL);
68
69   retval =
70     Accessibility_Action_getDescription (CSPI_OBJREF (obj),
71                                          (CORBA_long) i,
72                                          cspi_ev ());
73
74   cspi_return_val_if_ev ("getDescription", NULL);
75
76   return retval;
77 }
78
79 /**
80  * AccessibleAction_getKeyBinding:
81  * @obj: a pointer to the #AccessibleAction implementor to query.
82  * @i: a long integer indicating which action to query.
83  *
84  * Get the keybindings for the @i-th action invokable on an
85  *      object implementing #AccessibleAction, if any are defined.
86  *
87  * Returns: a UTF-8 string which can be parsed to determine the @i-th
88  *       invokable action's keybindings.
89  **/
90 char *
91 AccessibleAction_getKeyBinding (AccessibleAction *obj,
92                                 long int          i)
93 {
94   char *retval;
95
96   cspi_return_val_if_fail (obj != NULL, NULL);
97
98   retval =
99     Accessibility_Action_getKeyBinding (CSPI_OBJREF (obj),
100        (CORBA_long) i,
101        cspi_ev ());
102
103   cspi_return_val_if_ev ("getKeyBinding", NULL);
104
105   return retval;
106 }
107
108 /**
109  * AccessibleAction_getName:
110  * @obj: a pointer to the #AccessibleAction implementor to query.
111  * @i: a long integer indicating which action to query.
112  *
113  * Get the name of the '@i-th' action invokable on an
114  *      object implementing #AccessibleAction.
115  *
116  * Returns: the 'event type' name of the action, as a UTF-8 string.
117  **/
118 char *
119 AccessibleAction_getName (AccessibleAction *obj,
120                           long int          i)
121 {
122   char *retval;
123
124   cspi_return_val_if_fail (obj != NULL, NULL);
125
126   retval =
127    Accessibility_Action_getName (CSPI_OBJREF (obj),
128                                  (CORBA_long) i,
129                                  cspi_ev ());
130
131   cspi_return_val_if_ev ("getName", NULL);
132
133   return retval;
134 }
135
136 /**
137  * AccessibleAction_doAction:
138  * @obj: a pointer to the #AccessibleAction to query.
139  * @i: an integer specifying which action to invoke.
140  *
141  * Invoke the action indicated by #index.
142  *
143  * Returns: #TRUE if the action is successfully invoked, otherwise #FALSE.
144  **/
145 SPIBoolean
146 AccessibleAction_doAction (AccessibleAction *obj,
147                            long int i)
148 {
149   SPIBoolean retval;
150
151   cspi_return_val_if_fail (obj != NULL, FALSE);
152
153   retval = (SPIBoolean)
154     Accessibility_Action_doAction (CSPI_OBJREF (obj),
155                                    (CORBA_long) i,
156                                    cspi_ev ());
157
158   cspi_return_val_if_ev ("doAction", FALSE);
159
160   return retval;
161 }