| 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 text; |
| 11 | mod value; |
| 12 | |
| 13 | use crate::atspi::{ObjectId, OwnedObjectAddress}; |
| 14 | use zbus::{fdo, names::UniqueName}; |
| 15 | |
| 16 | fn map_root_error(error: accesskit_atspi_common::Error) -> fdo::Error { |
| 17 | crate::util::map_error(source:ObjectId::Root, error) |
| 18 | } |
| 19 | |
| 20 | fn optional_object_address( |
| 21 | bus_name: &UniqueName, |
| 22 | object_id: Option<ObjectId>, |
| 23 | ) -> (OwnedObjectAddress,) { |
| 24 | match object_id { |
| 25 | Some(id: ObjectId) => (id.to_address(bus_name),), |
| 26 | None => (OwnedObjectAddress::null(),), |
| 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 text::*; |
| 35 | pub(crate) use value::*; |
| 36 | |