Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 83 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions accesskit_consumer/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,10 @@ impl<'a> NodeRef<'a> {
)
}

pub fn is_container(&self) -> bool {
return true;
}

pub fn is_container_with_selectable_children(&self) -> bool {
matches!(
self.role(),
Expand Down
4 changes: 1 addition & 3 deletions accesskit_consumer/src/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1400,9 +1400,7 @@ impl<'a> NodeRef<'a> {
}

pub fn supports_text_ranges(&self) -> bool {
(self.is_text_input()
|| matches!(self.role(), Role::Label | Role::Document | Role::Terminal))
&& self.text_runs().next().is_some()
self.text_runs().next().is_some()
}

fn document_start_inner(&self) -> InnerPosition<'a> {
Expand Down
14 changes: 14 additions & 0 deletions accesskit_consumer/src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,20 @@ impl TreeState {
.get_id(tree_index)
.map(|tree_id| (local_id, tree_id))
}

pub fn lookup_node_by_id_components(&self, tree_index: u32, node_id: NodeId) -> Option<FullNodeId> {
let own_tree_index = self.root_id().to_components().1;
if TreeIndex(tree_index) != own_tree_index {
return None;
}

let as_full_node_id = FullNodeId::new(node_id, own_tree_index);
if self.has_node(as_full_node_id) {
Some(as_full_node_id)
} else {
None
}
}
}

pub trait ChangeHandler {
Expand Down
2 changes: 1 addition & 1 deletion adapters/atspi-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ simplified-api = []
[dependencies]
accesskit = { version = "0.24.1", path = "../../accesskit" }
accesskit_consumer = { version = "0.38.0", path = "../../accesskit_consumer" }
atspi-common = { version = "0.13", default-features = false }
atspi-common = { git = "https://github.com/odilia-app/atspi", rev = "2aec2fc", default-features = false }
phf = { version = "0.13.1", features = ["macros"] }
serde = "1.0"
zvariant = { version = "5.4", default-features = false }
1 change: 1 addition & 0 deletions adapters/atspi-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ mod error;
mod events;
mod filters;
mod node;
mod node_matcher;
mod rect;
#[cfg(feature = "simplified-api")]
pub mod simplified;
Expand Down
Loading