Replies: 1 comment 1 reply
-
On the first point, maybe the documentation could be clearer. All nodes that are built with the same class set and have the same role, actions, and set of properties (i.e. which properties are set, not the actual values of those properties) have the same class. Node classes are a way of optimizing memory usage. They're not visible to the platform adapters. The lcass is an attribute of a given version of a node. So for the same node ID, it's fine for the class to change from one tree update to the next. Nodes with different actions belong to different classes. But again, this doesn't matter to the platform adapters. I could have made the node classes completely invisible, but then AccessKit would force the usage of a global data structure behind a mutex. That won't be an option when we eventually add no-std support, and in any case, it didn't seem appropriate for a library targeting a systems language like Rust to impose such a restriction. Many (most?) GUI toolkits will build all their nodes on one thread, so it's desirable for them to use a single Then again, for greater efficiency, we could more fully expose node classes, let you create the classes you need, then let you explicitly create nodes with those classes. Looking up a class in the set from the role, actions, and property set does add some performance cost. I had already thought about making this more explicit, but hadn't prioritized it yet. |
Beta Was this translation helpful? Give feedback.
-
I feel like I don't properly understand the purpose of this feature from the documentation.
Node
definitions?Beta Was this translation helpful? Give feedback.
All reactions