[Mwinapi-commits] SF.net SVN: mwinapi:[142] trunk/ManagedWinapi/Accessibility/ SystemAccessibleObje
Status: Beta
Brought to you by:
schierlm
From: <zi...@us...> - 2017-11-23 17:34:29
|
Revision: 142 http://sourceforge.net/p/mwinapi/code/142 Author: ziewer Date: 2017-11-23 17:34:27 +0000 (Thu, 23 Nov 2017) Log Message: ----------- Fixed SystemAccessibleObject.Visible to report state STATE_SYSTEM_OFFSCREEN also as invisible (e.g. for Firefox Quantum v.57) Added enum AccStates with constants for MSAA accessibility states from oleacc.h/WinUser.h Modified Paths: -------------- trunk/ManagedWinapi/Accessibility/SystemAccessibleObject.cs Modified: trunk/ManagedWinapi/Accessibility/SystemAccessibleObject.cs =================================================================== --- trunk/ManagedWinapi/Accessibility/SystemAccessibleObject.cs 2016-01-26 19:02:16 UTC (rev 141) +++ trunk/ManagedWinapi/Accessibility/SystemAccessibleObject.cs 2017-11-23 17:34:27 UTC (rev 142) @@ -348,7 +348,8 @@ { get { - return (State & 0x8000) == 0; + return (State & (int)AccStates.STATE_SYSTEM_INVISIBLE) == 0 + && (State & (int)AccStates.STATE_SYSTEM_OFFSCREEN) == 0; } } @@ -1115,4 +1116,51 @@ /// </summary> ROLE_SYSTEM_WINDOW = 9 } + + /// <summary> + /// This enumeration lists all kinds of accessible states as returned by IAccessible::get_accState() + /// Constants for MSAA accessibility roles from oleacc.h/WinUser.h + /// </summary> + public enum AccStates + { + // From oleacc.h: +#pragma warning disable CS1591 // Fehledes XML-Kommentar f\xFCr \xF6ffentlich sichtbaren Typ oder Element + STATE_SYSTEM_NORMAL = 0x0, + STATE_SYSTEM_HASPOPUP = 0x40000000, + + // From WinUser.h: + STATE_SYSTEM_UNAVAILABLE = 0x1, // Disabled + STATE_SYSTEM_SELECTED = 0x2, + STATE_SYSTEM_FOCUSED = 0x4, + STATE_SYSTEM_PRESSED = 0x8, + STATE_SYSTEM_CHECKED = 0x10, + STATE_SYSTEM_MIXED = 0x20, //3-state checkbox or toolbar button + STATE_SYSTEM_INDETERMINATE = STATE_SYSTEM_MIXED, + STATE_SYSTEM_READONLY = 0x40, + STATE_SYSTEM_HOTTRACKED = 0x80, + STATE_SYSTEM_DEFAULT = 0x100, + STATE_SYSTEM_EXPANDED = 0x200, + STATE_SYSTEM_COLLAPSED = 0x400, + STATE_SYSTEM_BUSY = 0x800, + STATE_SYSTEM_FLOATING = 0x1000, // Children "owned" not "contained" by parent + STATE_SYSTEM_MARQUEED = 0x2000, + STATE_SYSTEM_ANIMATED = 0x4000, + STATE_SYSTEM_INVISIBLE = 0x8000, + STATE_SYSTEM_OFFSCREEN = 0x10000, + STATE_SYSTEM_SIZEABLE = 0x20000, + STATE_SYSTEM_MOVEABLE = 0x40000, + STATE_SYSTEM_SELFVOICING = 0x80000, + STATE_SYSTEM_FOCUSABLE = 0x100000, + STATE_SYSTEM_SELECTABLE = 0x200000, + STATE_SYSTEM_LINKED = 0x400000, + STATE_SYSTEM_TRAVERSED = 0x800000, + STATE_SYSTEM_MULTISELECTABLE = 0x1000000, // Supports multiple selection + STATE_SYSTEM_EXTSELECTABLE = 0x2000000, // Supports extended selection + STATE_SYSTEM_ALERT_LOW = 0x4000000, // This information is of low priority + STATE_SYSTEM_ALERT_MEDIUM = 0x8000000, // This information is of medium priority + STATE_SYSTEM_ALERT_HIGH = 0x10000000, // This information is of high priority + STATE_SYSTEM_PROTECTED = 0x20000000, // access to this is restricted + STATE_SYSTEM_VALID = 0x3FFFFFFF +#pragma warning restore CS1591 // Fehledes XML-Kommentar f\xFCr \xF6ffentlich sichtbaren Typ oder Element + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |