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