Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/platformsupport/linuxaccessibility/constant_mappings.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | QHash <QAccessible::Role, RoleNames> qSpiRoleMapping; | - | ||||||||||||
5 | - | |||||||||||||
6 | quint64 spiStatesFromQState(QAccessible::State state) | - | ||||||||||||
7 | { | - | ||||||||||||
8 | quint64 spiState = 0; | - | ||||||||||||
9 | - | |||||||||||||
10 | if (state.active
| 0 | ||||||||||||
11 | setSpiStateBit(&spiState, ATSPI_STATE_ACTIVE); never executed: setSpiStateBit(&spiState, ATSPI_STATE_ACTIVE); | 0 | ||||||||||||
12 | if (state.editable
| 0 | ||||||||||||
13 | setSpiStateBit(&spiState, ATSPI_STATE_EDITABLE); never executed: setSpiStateBit(&spiState, ATSPI_STATE_EDITABLE); | 0 | ||||||||||||
14 | if (!state.disabled
| 0 | ||||||||||||
15 | setSpiStateBit(&spiState, ATSPI_STATE_ENABLED); | - | ||||||||||||
16 | setSpiStateBit(&spiState, ATSPI_STATE_SENSITIVE); | - | ||||||||||||
17 | } never executed: end of block | 0 | ||||||||||||
18 | if (state.selected
| 0 | ||||||||||||
19 | setSpiStateBit(&spiState, ATSPI_STATE_SELECTED); never executed: setSpiStateBit(&spiState, ATSPI_STATE_SELECTED); | 0 | ||||||||||||
20 | if (state.focused
| 0 | ||||||||||||
21 | setSpiStateBit(&spiState, ATSPI_STATE_FOCUSED); never executed: setSpiStateBit(&spiState, ATSPI_STATE_FOCUSED); | 0 | ||||||||||||
22 | if (state.pressed
| 0 | ||||||||||||
23 | setSpiStateBit(&spiState, ATSPI_STATE_PRESSED); never executed: setSpiStateBit(&spiState, ATSPI_STATE_PRESSED); | 0 | ||||||||||||
24 | if (state.checked
| 0 | ||||||||||||
25 | setSpiStateBit(&spiState, ATSPI_STATE_CHECKED); never executed: setSpiStateBit(&spiState, ATSPI_STATE_CHECKED); | 0 | ||||||||||||
26 | if (state.checkStateMixed
| 0 | ||||||||||||
27 | setSpiStateBit(&spiState, ATSPI_STATE_INDETERMINATE); never executed: setSpiStateBit(&spiState, ATSPI_STATE_INDETERMINATE); | 0 | ||||||||||||
28 | if (state.readOnly
| 0 | ||||||||||||
29 | unsetSpiStateBit(&spiState, ATSPI_STATE_EDITABLE); never executed: unsetSpiStateBit(&spiState, ATSPI_STATE_EDITABLE); | 0 | ||||||||||||
30 | - | |||||||||||||
31 | if (state.defaultButton
| 0 | ||||||||||||
32 | setSpiStateBit(&spiState, ATSPI_STATE_IS_DEFAULT); never executed: setSpiStateBit(&spiState, ATSPI_STATE_IS_DEFAULT); | 0 | ||||||||||||
33 | if (state.expanded
| 0 | ||||||||||||
34 | setSpiStateBit(&spiState, ATSPI_STATE_EXPANDED); never executed: setSpiStateBit(&spiState, ATSPI_STATE_EXPANDED); | 0 | ||||||||||||
35 | if (state.collapsed
| 0 | ||||||||||||
36 | setSpiStateBit(&spiState, ATSPI_STATE_COLLAPSED); never executed: setSpiStateBit(&spiState, ATSPI_STATE_COLLAPSED); | 0 | ||||||||||||
37 | if (state.busy
| 0 | ||||||||||||
38 | setSpiStateBit(&spiState, ATSPI_STATE_BUSY); never executed: setSpiStateBit(&spiState, ATSPI_STATE_BUSY); | 0 | ||||||||||||
39 | if (state.marqueed
| 0 | ||||||||||||
40 | setSpiStateBit(&spiState, ATSPI_STATE_ANIMATED); never executed: setSpiStateBit(&spiState, ATSPI_STATE_ANIMATED); | 0 | ||||||||||||
41 | if (!state.invisible
| 0 | ||||||||||||
42 | setSpiStateBit(&spiState, ATSPI_STATE_SHOWING); | - | ||||||||||||
43 | setSpiStateBit(&spiState, ATSPI_STATE_VISIBLE); | - | ||||||||||||
44 | } never executed: end of block | 0 | ||||||||||||
45 | if (state.sizeable
| 0 | ||||||||||||
46 | setSpiStateBit(&spiState, ATSPI_STATE_RESIZABLE); never executed: setSpiStateBit(&spiState, ATSPI_STATE_RESIZABLE); | 0 | ||||||||||||
47 | - | |||||||||||||
48 | - | |||||||||||||
49 | if (state.focusable
| 0 | ||||||||||||
50 | setSpiStateBit(&spiState, ATSPI_STATE_FOCUSABLE); never executed: setSpiStateBit(&spiState, ATSPI_STATE_FOCUSABLE); | 0 | ||||||||||||
51 | if (state.selectable
| 0 | ||||||||||||
52 | setSpiStateBit(&spiState, ATSPI_STATE_SELECTABLE); never executed: setSpiStateBit(&spiState, ATSPI_STATE_SELECTABLE); | 0 | ||||||||||||
53 | - | |||||||||||||
54 | if (state.traversed
| 0 | ||||||||||||
55 | setSpiStateBit(&spiState, ATSPI_STATE_VISITED); never executed: setSpiStateBit(&spiState, ATSPI_STATE_VISITED); | 0 | ||||||||||||
56 | if (state.multiSelectable
| 0 | ||||||||||||
57 | setSpiStateBit(&spiState, ATSPI_STATE_MULTISELECTABLE); never executed: setSpiStateBit(&spiState, ATSPI_STATE_MULTISELECTABLE); | 0 | ||||||||||||
58 | if (state.extSelectable
| 0 | ||||||||||||
59 | setSpiStateBit(&spiState, ATSPI_STATE_SELECTABLE); never executed: setSpiStateBit(&spiState, ATSPI_STATE_SELECTABLE); | 0 | ||||||||||||
60 | - | |||||||||||||
61 | - | |||||||||||||
62 | if (state.modal
| 0 | ||||||||||||
63 | setSpiStateBit(&spiState, ATSPI_STATE_MODAL); never executed: setSpiStateBit(&spiState, ATSPI_STATE_MODAL); | 0 | ||||||||||||
64 | if (state.multiLine
| 0 | ||||||||||||
65 | setSpiStateBit(&spiState, ATSPI_STATE_MULTI_LINE); never executed: setSpiStateBit(&spiState, ATSPI_STATE_MULTI_LINE); | 0 | ||||||||||||
66 | - | |||||||||||||
67 | return never executed: spiState;return spiState; never executed: return spiState; | 0 | ||||||||||||
68 | } | - | ||||||||||||
69 | - | |||||||||||||
70 | QSpiUIntList spiStateSetFromSpiStates(quint64 states) | - | ||||||||||||
71 | { | - | ||||||||||||
72 | uint low = states & 0xFFFFFFFF; | - | ||||||||||||
73 | uint high = (states >> 32) & 0xFFFFFFFF; | - | ||||||||||||
74 | - | |||||||||||||
75 | QSpiUIntList stateList; | - | ||||||||||||
76 | stateList.append(low); | - | ||||||||||||
77 | stateList.append(high); | - | ||||||||||||
78 | return never executed: stateList;return stateList; never executed: return stateList; | 0 | ||||||||||||
79 | } | - | ||||||||||||
80 | - | |||||||||||||
81 | AtspiRelationType qAccessibleRelationToAtSpiRelation(QAccessible::Relation relation) | - | ||||||||||||
82 | { | - | ||||||||||||
83 | switch (relation) { | - | ||||||||||||
84 | case never executed: QAccessible::Label:case QAccessible::Label: never executed: case QAccessible::Label: | 0 | ||||||||||||
85 | return never executed: ATSPI_RELATION_LABELLED_BY;return ATSPI_RELATION_LABELLED_BY; never executed: return ATSPI_RELATION_LABELLED_BY; | 0 | ||||||||||||
86 | case never executed: QAccessible::Labelled:case QAccessible::Labelled: never executed: case QAccessible::Labelled: | 0 | ||||||||||||
87 | return never executed: ATSPI_RELATION_LABEL_FOR;return ATSPI_RELATION_LABEL_FOR; never executed: return ATSPI_RELATION_LABEL_FOR; | 0 | ||||||||||||
88 | case never executed: QAccessible::Controller:case QAccessible::Controller: never executed: case QAccessible::Controller: | 0 | ||||||||||||
89 | return never executed: ATSPI_RELATION_CONTROLLED_BY;return ATSPI_RELATION_CONTROLLED_BY; never executed: return ATSPI_RELATION_CONTROLLED_BY; | 0 | ||||||||||||
90 | case never executed: QAccessible::Controlled:case QAccessible::Controlled: never executed: case QAccessible::Controlled: | 0 | ||||||||||||
91 | return never executed: ATSPI_RELATION_CONTROLLER_FOR;return ATSPI_RELATION_CONTROLLER_FOR; never executed: return ATSPI_RELATION_CONTROLLER_FOR; | 0 | ||||||||||||
92 | default never executed: :default: never executed: default: | 0 | ||||||||||||
93 | QMessageLogger(__FILE__, 146, __PRETTY_FUNCTION__).warning() << "Cannot return AT-SPI relation for:" << relation; | - | ||||||||||||
94 | } never executed: end of block | 0 | ||||||||||||
95 | return never executed: ATSPI_RELATION_NULL;return ATSPI_RELATION_NULL; never executed: return ATSPI_RELATION_NULL; | 0 | ||||||||||||
96 | } | - | ||||||||||||
97 | - | |||||||||||||
98 | - | |||||||||||||
Switch to Source code | Preprocessed file |