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