fffb0684c47fd02b79318d7a7bb619b63eb0e610
[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  * Returns: 0 (no return code implemented yet).
10  *
11  **/
12 int
13 AccessibleAction_ref (AccessibleAction *obj)
14 {
15   cspi_object_ref (obj);
16   return 0;
17 }
18
19 /**
20  * AccessibleAction_unref:
21  * @obj: a pointer to the #AccessibleAction on which to operate.
22  *
23  * Decrement the reference count for an #AccessibleAction.
24  *
25  * Returns: 0 (no return code implemented yet).
26  *
27  **/
28 int
29 AccessibleAction_unref (AccessibleAction *obj)
30 {
31   cspi_object_unref (obj);
32   return 0;
33 }
34
35
36
37 /**
38  * AccessibleAction_getNActions:
39  * @obj: a pointer to the #AccessibleAction to query.
40  *
41  * Get the number of actions invokable on an #AccessibleAction implementor.
42  *
43  * Returns: a #long integer indicatin the number of invokable actions.
44  *
45  **/
46 long
47 AccessibleAction_getNActions (AccessibleAction *obj)
48 {
49   return (long)
50     Accessibility_Action__get_nActions (CSPI_OBJREF (obj), cspi_ev ());
51 }
52
53
54 /**
55  * AccessibleAction_getDescription:
56  * @obj: a pointer to the #AccessibleAction implementor to query.
57  * @i: a long integer indicating which action to query.
58  *
59  * Get the description of '@i-th' action invokable on an
60  *      object implementing #AccessibleAction.
61  *
62  * Returns: a UTF-8 string describing the '@i-th' invokable action.
63  *
64  **/
65 char *
66 AccessibleAction_getDescription (AccessibleAction *obj,
67                                  long int i)
68 {
69   return (char *)
70     Accessibility_Action_getDescription (CSPI_OBJREF (obj),
71                                          (CORBA_long) i,
72                                          cspi_ev ());
73 }
74
75 /**
76  * AccessibleAction_getKeyBinding:
77  * @obj: a pointer to the #AccessibleAction implementor to query.
78  * @i: a long integer indicating which action to query.
79  *
80  * Get the keybindings for the @i-th action invokable on an
81  *      object implementing #AccessibleAction, if any are defined.
82  *
83  * Returns: a UTF-8 string which can be parsed to determine the @i-th
84  *       invokable action's keybindings.
85  *
86  **/
87 char *
88 AccessibleAction_getKeyBinding (AccessibleAction *obj,
89                                 long int i)
90 {
91   return (char *) 
92     Accessibility_Action_getKeyBinding (CSPI_OBJREF (obj),
93        (CORBA_long) i,
94        cspi_ev ());
95 }
96
97
98
99 /**
100  * AccessibleAction_getName:
101  * @obj: a pointer to the #AccessibleAction implementor to query.
102  * @i: a long integer indicating which action to query.
103  *
104  * Get the name of the '@i-th' action invokable on an
105  *      object implementing #AccessibleAction.
106  *
107  * Returns: the 'event type' name of the action, as a UTF-8 string.
108  *
109  **/
110 char *
111 AccessibleAction_getName (AccessibleAction *obj,
112                           long int i)
113 {
114   return (char *)
115    Accessibility_Action_getName (CSPI_OBJREF (obj),
116                                  (CORBA_long) i,
117                                  cspi_ev ());
118 }
119
120
121 /**
122  * AccessibleAction_doAction:
123  * @obj: a pointer to the #AccessibleAction to query.
124  * @i: an integer specifying which action to invoke.
125  *
126  * Invoke the action indicated by #index.
127  *
128  * Returns: #TRUE if the action is successfully invoked, otherwise #FALSE.
129  *
130  **/
131 SPIBoolean
132 AccessibleAction_doAction (AccessibleAction *obj,
133                            long int i)
134 {
135   return (SPIBoolean)
136     Accessibility_Action_doAction (CSPI_OBJREF (obj),
137                                    (CORBA_long) i,
138                                    cspi_ev ());
139 }
140
141