summaryrefslogtreecommitdiffstats
path: root/src/gui/accessible/qaccessible.h
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@nokia.com>2012-01-05 18:03:04 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-16 08:55:37 +0100
commitba888bb8c8e6fce76efc855ef81250f2c9426b40 (patch)
tree6ce3941c3203b7e6cdc50ed9d9c5aaeea76b8de1 /src/gui/accessible/qaccessible.h
parent169b9cac648a4c15ae825b815a18236d95d62c6f (diff)
Clean up and extend QAccessible::State.
The state should contain useful and clear information. Some of the old enum/bitfield members were not really clear. Make them follow Qt terminology and shift the burden of interpreting them to the bridge. Apart from the previous commit changing from enum to bitfield, these flags have changed names: unavailable -> disabled mixed -> checkStateMixed protected -> passwordEdit (in the last commit) floating is completely removed, even MSAA documentation states it is unsupported. Some new states have been added. Documentation added. Change-Id: I152256e77a061f28ee5780f527524c80a2c7e333 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/gui/accessible/qaccessible.h')
-rw-r--r--src/gui/accessible/qaccessible.h48
1 files changed, 40 insertions, 8 deletions
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h
index 38f52fb2fd..bafd3a8a6b 100644
--- a/src/gui/accessible/qaccessible.h
+++ b/src/gui/accessible/qaccessible.h
@@ -151,19 +151,21 @@ public:
// 64 bit enums seem hard on some platforms (windows...)
// which makes using a bit field a sensible alternative
struct State {
- quint64 unavailable : 1;
+ // http://msdn.microsoft.com/en-us/library/ms697270.aspx
+ quint64 disabled : 1; // used to be Unavailable
quint64 selected : 1;
+ quint64 focusable : 1;
quint64 focused : 1;
quint64 pressed : 1;
+ quint64 checkable : 1;
quint64 checked : 1;
- quint64 mixed : 1;
+ quint64 checkStateMixed : 1; // used to be Mixed
quint64 readOnly : 1;
quint64 hotTracked : 1;
quint64 defaultButton : 1;
quint64 expanded : 1;
quint64 collapsed : 1;
quint64 busy : 1;
- // quint64 Floating : 1;
quint64 expandable : 1;
quint64 marqueed : 1;
quint64 animated : 1;
@@ -172,24 +174,54 @@ public:
quint64 sizeable : 1;
quint64 movable : 1;
quint64 selfVoicing : 1;
- quint64 focusable : 1;
quint64 selectable : 1;
quint64 linked : 1;
quint64 traversed : 1;
quint64 multiSelectable : 1;
quint64 extSelectable : 1;
- // quint64 alertLow : 1;
- // quint64 alertMedium : 1;
- // quint64 alertHigh : 1;
- quint64 passwordEdit : 1;
+ quint64 passwordEdit : 1; // used to be Protected
quint64 hasPopup : 1;
quint64 modal : 1;
+ // IA2 - we chose to not add some IA2 states for now
+ // Below the ones that seem helpful
+ quint64 active : 1;
+ quint64 invalid : 1; // = defunct
+ quint64 editable : 1;
+ quint64 multiLine : 1;
+ quint64 selectableText : 1;
+ quint64 supportsAutoCompletion : 1;
+
+ // quint64 horizontal : 1;
+ // quint64 vertical : 1;
+ // quint64 invalidEntry : 1;
+ // quint64 managesDescendants : 1;
+ // quint64 singleLine : 1; // we have multi line, this is redundant.
+ // quint64 stale : 1;
+ // quint64 transient : 1;
+ // quint64 pinned : 1;
+
+ // Apple - see http://mattgemmell.com/2010/12/19/accessibility-for-iphone-and-ipad-apps/
+ // quint64 playsSound : 1;
+ // quint64 summaryElement : 1;
+ // quint64 updatesFrequently : 1;
+ // quint64 adjustable : 1;
+ // more and not included here: http://developer.apple.com/library/mac/#documentation/UserExperience/Reference/Accessibility_RoleAttribute_Ref/Attributes.html
+
+ // MSAA
+ // quint64 alertLow : 1;
+ // quint64 alertMedium : 1;
+ // quint64 alertHigh : 1;
+
State() {
qMemSet(this, 0, sizeof(State));
}
};
+
+
+
+
enum Role {
NoRole = 0x00000000,
TitleBar = 0x00000001,