1 | use serde::{Deserialize, Serialize}; |
2 | use zvariant::Type; |
3 | |
4 | /// Describes a relationship between one object and another. |
5 | #[derive (Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, Type, Hash)] |
6 | pub enum RelationType { |
7 | /// Not a meaningful relationship; clients should not normally encounter this value. |
8 | Null = 0, |
9 | |
10 | /// Object is a label for one or more other objects. |
11 | LabelFor, |
12 | |
13 | /// Object is labelled by one or more other objects. |
14 | LabelledBy, |
15 | |
16 | /// Object is an interactive object which modifies the state, |
17 | /// onscreen location, or other attributes of one or more target objects. |
18 | ControllerFor, |
19 | |
20 | /// Object state, position, etc. is modified/controlled by user interaction |
21 | /// with one or more other objects. |
22 | /// For instance a viewport or scroll pane may be `ControlledBy` scrollbars. |
23 | ControlledBy, |
24 | |
25 | /// Object has a grouping relationship (e.g. 'same group as') to one or more other objects. |
26 | MemberOf, |
27 | |
28 | /// Object is a tooltip associated with another object. |
29 | TooltipFor, |
30 | |
31 | /// Object is a child of the target. |
32 | NodeChildOf, |
33 | |
34 | /// Object is a parent of the target. |
35 | NodeParentOf, |
36 | |
37 | /// Used to indicate that a relationship exists, but its type is not |
38 | /// specified in the enumeration. |
39 | Extended, |
40 | |
41 | /// Object renders content which flows logically to another object. |
42 | /// For instance, text in a paragraph may flow to another object |
43 | /// which is not the 'next sibling' in the accessibility hierarchy. |
44 | FlowsTo, |
45 | |
46 | /// Reciprocal of `FlowsTo`. |
47 | FlowsFrom, |
48 | |
49 | /// Object is visually and semantically considered a subwindow of another object, |
50 | /// even though it is not the object's child. |
51 | /// Useful when dealing with embedded applications and other cases where the |
52 | /// widget hierarchy does not map cleanly to the onscreen presentation. |
53 | SubwindowOf, |
54 | |
55 | /// Similar to `SubwindowOf`, but specifically used for cross-process embedding. |
56 | Embeds, |
57 | |
58 | /// Reciprocal of `Embeds`. Used to denote content rendered by embedded renderers |
59 | /// that live in a separate process space from the embedding context. |
60 | EmbeddedBy, |
61 | |
62 | ///Denotes that the object is a transient window or frame associated with another |
63 | /// onscreen object. Similar to `TooltipFor`, but more general. |
64 | /// Useful for windows which are technically toplevels but which, for one or more reasons, |
65 | /// do not explicitly cause their associated window to lose 'window focus'. |
66 | /// Creation of an [`crate::Role::Window`] object with the `PopupFor` relation usually requires |
67 | /// some presentation action on the part of assistive technology clients, |
68 | /// even though the previous toplevel [`crate::Role::Frame`] object may still be the active window. |
69 | PopupFor, |
70 | |
71 | /// This is the reciprocal relation to `PopupFor`. |
72 | ParentWindowOf, |
73 | |
74 | /// Reciprocal of `DescribedBy`. Indicates that this object provides descriptive information |
75 | /// about the target object(s). See also `DetailsFor` and `ErrorFor`. |
76 | DescriptionFor, |
77 | |
78 | /// Reciprocal of `DescriptionFor`. |
79 | /// Indicates that one or more target objects provide descriptive information |
80 | /// about this object. This relation type is most appropriate for information |
81 | /// that is not essential as its presentation may be user-configurable and/or |
82 | /// limited to an on-demand mechanism such as an assistive technology command. |
83 | /// For brief, essential information such as can be found in a widget's on-screen |
84 | /// label, use `LabelledBy`. For an on-screen error message, use `ErrorMessage`. |
85 | /// For lengthy extended descriptive information contained in an on-screen object, |
86 | /// consider using `Details` as assistive technologies may provide a means |
87 | /// for the user to navigate to objects containing detailed descriptions so that |
88 | /// their content can be more closely reviewed. |
89 | DescribedBy, |
90 | |
91 | /// Reciprocal of `DetailsFor`. |
92 | /// Indicates that this object has a detailed or extended description, |
93 | /// the contents of which can be found in the target object(s). |
94 | /// This relation type is most appropriate for information that is sufficiently lengthy |
95 | /// as to make navigation to the container of that information desirable. |
96 | /// For less verbose information suitable for announcement only, see `DescribedBy`. |
97 | /// If the detailed information describes an error condition, `ErrorFor` should be used instead. |
98 | /// Included in upstream [AT-SPI2-CORE](https://gitlab.gnome.org/GNOME/at-spi2-core) since 2.26. |
99 | Details, |
100 | |
101 | /// Reciprocal of `Details`. |
102 | /// Indicates that this object provides a detailed or extended description about the target |
103 | /// object(s). See also `DescriptionFor` and `ErrorFor`. |
104 | /// Included in upstream [AT-SPI2-CORE](https://gitlab.gnome.org/GNOME/at-spi2-core) since 2.26. |
105 | DetailsFor, |
106 | |
107 | /// Reciprocal of `ErrorFor`. |
108 | /// Indicates that this object has one or more errors, the nature of which is |
109 | /// described in the contents of the target object(s). Objects that have this |
110 | /// relation type should also contain [`crate::state::State::InvalidEntry`] when their |
111 | /// `GetState` method is called. |
112 | /// Included in upstream [AT-SPI2-CORE](https://gitlab.gnome.org/GNOME/at-spi2-core) since 2.26. |
113 | ErrorMessage, |
114 | |
115 | /// Reciprocal of `ErrorMessage`. |
116 | /// Indicates that this object contains an error message describing an invalid condition |
117 | /// in the target object(s). |
118 | /// Included in upstream [AT-SPI2-CORE](https://gitlab.gnome.org/GNOME/at-spi2-core) since 2.26. |
119 | ErrorFor, |
120 | } |
121 | |