1 | // Copyright 2022 The AccessKit Authors. All rights reserved. |
2 | // Licensed under the Apache License, Version 2.0 (found in |
3 | // the LICENSE-APACHE file) or the MIT license (found in |
4 | // the LICENSE-MIT file), at your option. |
5 | |
6 | mod accessible; |
7 | mod action; |
8 | mod application; |
9 | mod component; |
10 | mod value; |
11 | |
12 | use crate::atspi::{ObjectId, OwnedObjectAddress}; |
13 | use zbus::{fdo, names::OwnedUniqueName}; |
14 | |
15 | fn map_root_error(error: accesskit_atspi_common::Error) -> fdo::Error { |
16 | crate::util::map_error(source:ObjectId::Root, error) |
17 | } |
18 | |
19 | fn optional_object_address( |
20 | bus_name: &OwnedUniqueName, |
21 | object_id: Option<ObjectId>, |
22 | ) -> (OwnedObjectAddress,) { |
23 | let bus_name: OwnedUniqueName = bus_name.clone(); |
24 | match object_id { |
25 | Some(id: ObjectId) => (id.to_address(bus_name),), |
26 | None => (OwnedObjectAddress::null(bus_name),), |
27 | } |
28 | } |
29 | |
30 | pub(crate) use accessible::*; |
31 | pub(crate) use action::*; |
32 | pub(crate) use application::*; |
33 | pub(crate) use component::*; |
34 | pub(crate) use value::*; |
35 | |