accesskit_unix/atspi/interfaces/
mod.rs

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
// Copyright 2022 The AccessKit Authors. All rights reserved.
// Licensed under the Apache License, Version 2.0 (found in
// the LICENSE-APACHE file) or the MIT license (found in
// the LICENSE-MIT file), at your option.

mod accessible;
mod action;
mod application;
mod component;
mod text;
mod value;

use crate::atspi::{ObjectId, OwnedObjectAddress};
use zbus::{fdo, names::OwnedUniqueName};

fn map_root_error(error: accesskit_atspi_common::Error) -> fdo::Error {
    crate::util::map_error(ObjectId::Root, error)
}

fn optional_object_address(
    bus_name: &OwnedUniqueName,
    object_id: Option<ObjectId>,
) -> (OwnedObjectAddress,) {
    let bus_name = bus_name.clone();
    match object_id {
        Some(id) => (id.to_address(bus_name),),
        None => (OwnedObjectAddress::null(bus_name),),
    }
}

pub(crate) use accessible::*;
pub(crate) use action::*;
pub(crate) use application::*;
pub(crate) use component::*;
pub(crate) use text::*;
pub(crate) use value::*;