summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_atspi_adaptor_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_atspi_adaptor_common.h')
-rw-r--r--src/lib/elementary/elm_atspi_adaptor_common.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_atspi_adaptor_common.h b/src/lib/elementary/elm_atspi_adaptor_common.h
new file mode 100644
index 0000000..2d92468
--- /dev/null
+++ b/src/lib/elementary/elm_atspi_adaptor_common.h
@@ -0,0 +1,35 @@
1
2#define ELM_ACCESS_OBJECT_PATH_PREFIX2 "/org/a11y/atspi/accessible"
3
4#define ELM_ATSPI_PROPERTY_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, class, msg, error) \
5 if (!(obj) || !efl_isa(obj, class)) \
6 { \
7 *(error) = _dbus_invalid_ref_error_new(msg); \
8 return EINA_FALSE; \
9 }
10
11#define ELM_ATSPI_PROPERTY_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, class, msg, error) \
12 if (!(obj) || !efl_isa(obj, class)) \
13 { \
14 *(error) = _dbus_invalid_ref_error_new(msg); \
15 return EINA_FALSE; \
16 }
17
18#define ELM_ATSPI_OBJ_CHECK_OR_RETURN_DBUS_ERROR(obj, class, msg) \
19 if (!(obj) || !efl_isa(obj, class)) \
20 return _dbus_invalid_ref_error_new(msg);
21
22static inline Eldbus_Message *_dbus_invalid_ref_error_new(const Eldbus_Message *msg)
23{
24 return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.UnknownObject", "Path is not valid accessible object reference.");
25}
26
27Efl_Access* efl_access_unmarshal(const Eldbus_Message *msg);
28
29void efl_access_marshal(Efl_Access *obj, Eldbus_Message_Iter *iter);
30
31void eldbus_message_iter_efl_access_reference_append(Eldbus_Message_Iter *iter, Eldbus_Connection *conn, Efl_Access *obj);
32
33void eldbus_message_iter_efl_access_interfaces_append(Eldbus_Message_Iter *iter, Efl_Access *obj);
34
35void eldbus_message_iter_efl_access_reference_array_append(Eldbus_Message_Iter *iter, Eldbus_Connection *conn, Eina_List *obj);