summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_interface_atspi_accessible.h
blob: 929216bd89a12080f1a1134a6948458765562904 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#ifndef ELM_INTERFACE_ATSPI_ACCESSIBLE_H
#define ELM_INTERFACE_ATSPI_ACCESSIBLE_H

#ifdef EFL_BETA_API_SUPPORT

#ifdef EFL_EO_API_SUPPORT
#include "elm_interface_atspi_accessible.eo.h"
#endif
#ifndef EFL_NOLEGACY_API_SUPPORT
#include "elm_interface_atspi_accessible.eo.legacy.h"
#endif

/*
 * Sets a particilar state type for given state set.
 */
#define STATE_TYPE_SET(state_set, type)   (state_set|= (1L << type))

/**
 * Unsets a particilar state type for given state set.
 */
#define STATE_TYPE_UNSET(state_set, type) (state_set &= ~(1L << type))

/**
 * Gets value of a particilar state type for given state set.
 */
#define STATE_TYPE_GET(state_set, type)   (state_set & (1L << type))

/**
 * Free Elm_Atspi_Attributes_List
 */
EAPI void elm_atspi_attributes_list_free(Eina_List *list);

/**
 * Frees relation.
 */
EAPI void elm_atspi_relation_free(Elm_Atspi_Relation *relation);

/**
 * Clones relation.
 */
EAPI Elm_Atspi_Relation * elm_atspi_relation_clone(const Elm_Atspi_Relation *relation);

/**
 * Appends relation to relation set
 */
EAPI Eina_Bool elm_atspi_relation_set_relation_append(Elm_Atspi_Relation_Set *set, Elm_Atspi_Relation_Type type, const Eo *rel_obj);

/**
 * Removes relation from relation set
 */
EAPI void elm_atspi_relation_set_relation_remove(Elm_Atspi_Relation_Set *set, Elm_Atspi_Relation_Type type, const Eo *rel_obj);

/**
 * Removes all relation from relation set of a given type
 */
EAPI void elm_atspi_relation_set_relation_type_remove(Elm_Atspi_Relation_Set *set, Elm_Atspi_Relation_Type type);

/**
 * Frees Elm_Atspi_Relation_Set
 */
EAPI void elm_atspi_relation_set_free(Elm_Atspi_Relation_Set set);

/**
 * Clones Elm_Atspi_Relation_Set
 */
EAPI Elm_Atspi_Relation_Set elm_atspi_relation_set_clone(const Elm_Atspi_Relation_Set set);

#ifdef EFL_EO_API_SUPPORT

/**
 * Emits ATSPI 'StateChanged' dbus signal.
 */
#define elm_interface_atspi_accessible_state_changed_signal_emit(obj, tp, nvl) \
   { do { \
      Elm_Atspi_Event_State_Changed_Data evinfo; \
      evinfo.type = (tp); \
      evinfo.new_value = (nvl); \
      elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_STATE_CHANGED, (void*)&evinfo); \
   } while(0); }

/**
 * Emits ATSPI 'BoundsChanged' dbus signal.
 */
#define elm_interface_atspi_accessible_bounds_changed_signal_emit(obj, x, y, width, height) \
   do { \
         Elm_Atspi_Event_Geometry_Changed_Data evinfo = { x, y, width, height }; \
         elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_BOUNDS_CHANGED, (void*)&evinfo); \
   } while(0);

/**
 * Emits ATSPI 'PropertyChanged' dbus signal for 'Name' property.
 */
#define elm_interface_atspi_accessible_name_changed_signal_emit(obj) \
   elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, "name");

/**
 * Emits ATSPI 'PropertyChanged' dbus signal for 'Description' property.
 */
#define elm_interface_atspi_accessible_description_changed_signal_emit(obj) \
   elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, "description");

/**
 * Emits ATSPI 'PropertyChanged' dbus signal for 'Parent' property.
 */
#define elm_interface_atspi_accessible_parent_changed_signal_emit(obj) \
   elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, "parent");

/**
 * Emits ATSPI 'PropertyChanged' dbus signal for 'Role' property.
 */
#define elm_interface_atspi_accessible_role_changed_signal_emit(obj) \
   elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, "role");

/**
 * Emits ATSPI 'PropertyChanged' dbus signal for 'Value' property.
 */
#define elm_interface_atspi_accessible_value_changed_signal_emit(obj) \
   elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_PROPERTY_CHANGED, "value");

/**
 * Emits ATSPI 'ChildrenChanged' dbus signal with added child as argument.
 */
#define elm_interface_atspi_accessible_children_changed_added_signal_emit(obj, child) \
   do { \
      Elm_Atspi_Event_Children_Changed_Data atspi_data = { EINA_TRUE, child }; \
   elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_CHILDREN_CHANGED, &atspi_data); \
   } while(0);

/**
 * Emits ATSPI 'ChildrenChanged' dbus signal with deleted child as argument.
 */
#define elm_interface_atspi_accessible_children_changed_del_signal_emit(obj, child) \
   do { \
      Elm_Atspi_Event_Children_Changed_Data atspi_data = { EINA_FALSE, child }; \
      elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_CHILDREN_CHANGED, &atspi_data); \
   } while(0);

/**
 * Emits ATSPI 'ActiveDescendantChanged' dbus signal.
 */
#define elm_interface_atspi_accessible_active_descendant_changed_signal_emit(obj, child) \
   elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_ACTIVE_DESCENDANT_CHANGED, child);

/**
 * Emits ATSPI 'VisibleDataChanged' dbus signal.
 */
#define elm_interface_atspi_accessible_visible_data_changed_signal_emit(obj) \
   elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_VISIBLE_DATA_CHANGED, NULL);

/**
 * Emits ATSPI 'AddAccessible' dbus signal.
 */
#define elm_interface_atspi_accessible_added(obj) \
   elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_ADDED, NULL);

/**
 * Emits ATSPI 'RemoveAccessible' dbus signal.
 */
#define elm_interface_atspi_accessible_removed(obj) \
   elm_interface_atspi_accessible_event_emit(ELM_INTERFACE_ATSPI_ACCESSIBLE_MIXIN, obj, ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_REMOVED, NULL);

#endif

#endif
#endif