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
6mod accessible;
7mod action;
8mod application;
9mod component;
10mod value;
11
12use crate::atspi::{ObjectId, OwnedObjectAddress};
13use zbus::{fdo, names::OwnedUniqueName};
14
15fn map_root_error(error: accesskit_atspi_common::Error) -> fdo::Error {
16 crate::util::map_error(source:ObjectId::Root, error)
17}
18
19fn 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
30pub(crate) use accessible::*;
31pub(crate) use action::*;
32pub(crate) use application::*;
33pub(crate) use component::*;
34pub(crate) use value::*;
35