mirror of
https://github.com/ZuneDev/MicrosoftIris.git
synced 2026-07-27 13:13:29 -07:00
Add project files.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Microsoft.Iris.Accessibility.AccChildID
|
||||
// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
|
||||
// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11
|
||||
// Assembly location: C:\Program Files\Zune\UIX.dll
|
||||
|
||||
namespace Microsoft.Iris.Accessibility
|
||||
{
|
||||
internal enum AccChildID
|
||||
{
|
||||
Self,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Microsoft.Iris.Accessibility.AccEvents
|
||||
// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
|
||||
// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11
|
||||
// Assembly location: C:\Program Files\Zune\UIX.dll
|
||||
|
||||
namespace Microsoft.Iris.Accessibility
|
||||
{
|
||||
internal enum AccEvents
|
||||
{
|
||||
None = 0,
|
||||
SystemSound = 1,
|
||||
SystemAlert = 2,
|
||||
SystemForeground = 3,
|
||||
SystemMenuStart = 4,
|
||||
SystemMenuEnd = 5,
|
||||
SystemMenuPopupStart = 6,
|
||||
SystemMenuPopupEnd = 7,
|
||||
SystemCaptureStart = 8,
|
||||
SystemCaptureEnd = 9,
|
||||
SystemMoveSizeStart = 10, // 0x0000000A
|
||||
SystemMoveSizeEnd = 11, // 0x0000000B
|
||||
SystemContextHelpStart = 12, // 0x0000000C
|
||||
SystemContextHelpEnd = 13, // 0x0000000D
|
||||
SystemDragDropStart = 14, // 0x0000000E
|
||||
SystemDragDropEnd = 15, // 0x0000000F
|
||||
SystemDialogStart = 16, // 0x00000010
|
||||
SystemDialogEnd = 17, // 0x00000011
|
||||
SystemScrollingStart = 18, // 0x00000012
|
||||
SystemScrollingEnd = 19, // 0x00000013
|
||||
SystemSwitchStart = 20, // 0x00000014
|
||||
SystemSwitchEnd = 21, // 0x00000015
|
||||
SystemMinimizeStart = 22, // 0x00000016
|
||||
SystemMinimizeEnd = 23, // 0x00000017
|
||||
ObjectCreate = 32768, // 0x00008000
|
||||
ObjectDestroy = 32769, // 0x00008001
|
||||
ObjectShow = 32770, // 0x00008002
|
||||
ObjectHide = 32771, // 0x00008003
|
||||
ObjectReorder = 32772, // 0x00008004
|
||||
ObjectFocus = 32773, // 0x00008005
|
||||
ObjectSelection = 32774, // 0x00008006
|
||||
ObjectSelectionAdd = 32775, // 0x00008007
|
||||
ObjectSelectionRemove = 32776, // 0x00008008
|
||||
ObjectSelectionWithin = 32777, // 0x00008009
|
||||
ObjectStateChange = 32778, // 0x0000800A
|
||||
ObjectLocationChange = 32779, // 0x0000800B
|
||||
ObjectNameChange = 32780, // 0x0000800C
|
||||
ObjectDescriptionChange = 32781, // 0x0000800D
|
||||
ObjectValueChange = 32782, // 0x0000800E
|
||||
ObjectParentChange = 32783, // 0x0000800F
|
||||
ObjectHelpChange = 32784, // 0x00008010
|
||||
ObjectDefaultActionChange = 32785, // 0x00008011
|
||||
ObjectAcceleratorChange = 32786, // 0x00008012
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Microsoft.Iris.Accessibility.AccNavDirs
|
||||
// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
|
||||
// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11
|
||||
// Assembly location: C:\Program Files\Zune\UIX.dll
|
||||
|
||||
namespace Microsoft.Iris.Accessibility
|
||||
{
|
||||
internal enum AccNavDirs
|
||||
{
|
||||
Min,
|
||||
Up,
|
||||
Down,
|
||||
Left,
|
||||
Right,
|
||||
Next,
|
||||
Previous,
|
||||
FirstChild,
|
||||
LastChild,
|
||||
Max,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Microsoft.Iris.Accessibility.AccObjectID
|
||||
// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
|
||||
// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11
|
||||
// Assembly location: C:\Program Files\Zune\UIX.dll
|
||||
|
||||
namespace Microsoft.Iris.Accessibility
|
||||
{
|
||||
internal enum AccObjectID
|
||||
{
|
||||
Sound = -11, // 0xFFFFFFF5
|
||||
Alert = -10, // 0xFFFFFFF6
|
||||
Cursor = -9, // 0xFFFFFFF7
|
||||
Caret = -8, // 0xFFFFFFF8
|
||||
SizeGrip = -7, // 0xFFFFFFF9
|
||||
HScroll = -6, // 0xFFFFFFFA
|
||||
VScroll = -5, // 0xFFFFFFFB
|
||||
Client = -4, // 0xFFFFFFFC
|
||||
Menu = -3, // 0xFFFFFFFD
|
||||
TitleBar = -2, // 0xFFFFFFFE
|
||||
SysMenu = -1, // 0xFFFFFFFF
|
||||
Window = 0,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Microsoft.Iris.Accessibility.AccRole
|
||||
// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
|
||||
// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11
|
||||
// Assembly location: C:\Program Files\Zune\UIX.dll
|
||||
|
||||
namespace Microsoft.Iris.Accessibility
|
||||
{
|
||||
internal enum AccRole
|
||||
{
|
||||
None,
|
||||
TitleBar,
|
||||
MenuBar,
|
||||
ScrollBar,
|
||||
Grip,
|
||||
Sound,
|
||||
Cursor,
|
||||
Caret,
|
||||
Alert,
|
||||
Window,
|
||||
Client,
|
||||
MenuPopup,
|
||||
MenuItem,
|
||||
ToolTip,
|
||||
Application,
|
||||
Document,
|
||||
Pane,
|
||||
Chart,
|
||||
Dialog,
|
||||
Border,
|
||||
Grouping,
|
||||
Separator,
|
||||
ToolBar,
|
||||
StatusBar,
|
||||
Table,
|
||||
ColumnHeader,
|
||||
RowHeader,
|
||||
Column,
|
||||
Row,
|
||||
Cell,
|
||||
Link,
|
||||
HelpBalloon,
|
||||
Character,
|
||||
List,
|
||||
ListItem,
|
||||
Outline,
|
||||
OutlineItem,
|
||||
PageTab,
|
||||
PropertyPage,
|
||||
Indicator,
|
||||
Graphic,
|
||||
StaticText,
|
||||
Text,
|
||||
PushButton,
|
||||
CheckButton,
|
||||
RadioButton,
|
||||
ComboBox,
|
||||
DropList,
|
||||
ProgressBar,
|
||||
Dial,
|
||||
HotkeyField,
|
||||
Slider,
|
||||
SpinButton,
|
||||
Diagram,
|
||||
Animation,
|
||||
Equation,
|
||||
ButtonDropDown,
|
||||
ButtonMenu,
|
||||
ButtonDropDownGrid,
|
||||
Whitespace,
|
||||
PageTabList,
|
||||
Clock,
|
||||
SplitButton,
|
||||
IPAddress,
|
||||
OutlineButton,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Microsoft.Iris.Accessibility.AccSelFlags
|
||||
// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
|
||||
// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11
|
||||
// Assembly location: C:\Program Files\Zune\UIX.dll
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Iris.Accessibility
|
||||
{
|
||||
[Flags]
|
||||
internal enum AccSelFlags
|
||||
{
|
||||
None = 0,
|
||||
TakeFocus = 1,
|
||||
TakeSelection = 2,
|
||||
ExtendSelection = 4,
|
||||
AddSelection = 8,
|
||||
RemoveSelection = 16, // 0x00000010
|
||||
Valid = RemoveSelection | AddSelection | ExtendSelection | TakeSelection | TakeFocus, // 0x0000001F
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Microsoft.Iris.Accessibility.AccStates
|
||||
// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
|
||||
// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11
|
||||
// Assembly location: C:\Program Files\Zune\UIX.dll
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Iris.Accessibility
|
||||
{
|
||||
[Flags]
|
||||
internal enum AccStates
|
||||
{
|
||||
None = 0,
|
||||
Unavailable = 1,
|
||||
Selected = 2,
|
||||
Focused = 4,
|
||||
Pressed = 8,
|
||||
Checked = 16, // 0x00000010
|
||||
Mixed = 32, // 0x00000020
|
||||
Indeterminate = Mixed, // 0x00000020
|
||||
ReadOnly = 64, // 0x00000040
|
||||
HotTracked = 128, // 0x00000080
|
||||
Default = 256, // 0x00000100
|
||||
Expanded = 512, // 0x00000200
|
||||
Collapsed = 1024, // 0x00000400
|
||||
Busy = 2048, // 0x00000800
|
||||
Floating = 4096, // 0x00001000
|
||||
Marquee = 8192, // 0x00002000
|
||||
Animated = 16384, // 0x00004000
|
||||
Invisible = 32768, // 0x00008000
|
||||
OffScreen = 65536, // 0x00010000
|
||||
Sizeable = 131072, // 0x00020000
|
||||
Moveable = 262144, // 0x00040000
|
||||
SelfVoicing = 524288, // 0x00080000
|
||||
Focusable = 1048576, // 0x00100000
|
||||
Selectable = 2097152, // 0x00200000
|
||||
Linked = 4194304, // 0x00400000
|
||||
Traversed = 8388608, // 0x00800000
|
||||
MultiSelectable = 16777216, // 0x01000000
|
||||
ExtSelectable = 33554432, // 0x02000000
|
||||
Alert_Low = 67108864, // 0x04000000
|
||||
Alert_Medium = 134217728, // 0x08000000
|
||||
Alert_High = 268435456, // 0x10000000
|
||||
Protected = 536870912, // 0x20000000
|
||||
HasPopup = 1073741824, // 0x40000000
|
||||
Valid = HasPopup | Protected | Alert_High | Alert_Medium | Alert_Low | ExtSelectable | MultiSelectable | Traversed | Linked | Selectable | Focusable | SelfVoicing | Moveable | Sizeable | OffScreen | Invisible | Animated | Marquee | Floating | Busy | Collapsed | Expanded | Default | HotTracked | ReadOnly | Indeterminate | Checked | Pressed | Focused | Selected | Unavailable, // 0x7FFFFFFF
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,478 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Microsoft.Iris.Accessibility.Accessible
|
||||
// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
|
||||
// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11
|
||||
// Assembly location: C:\Program Files\Zune\UIX.dll
|
||||
|
||||
using Microsoft.Iris.Library;
|
||||
using Microsoft.Iris.Markup;
|
||||
using Microsoft.Iris.ModelItems;
|
||||
using Microsoft.Iris.Session;
|
||||
|
||||
namespace Microsoft.Iris.Accessibility
|
||||
{
|
||||
internal class Accessible : NotifyObjectBase
|
||||
{
|
||||
private DynamicData _dataMap;
|
||||
private AccessibleProxy _proxy;
|
||||
private static readonly DataCookie s_descriptionSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_defaultActionSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_defaultActionCommandSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_helpSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_helpTopicSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_keyboardShortcutSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_nameSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_roleSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_valueSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_animatedStateSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_unavailableStateSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_selectedStateSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_busyStateSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_pressedStateSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_checkedStateSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_collapsedStateSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_defaultStateSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_marqueeStateSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_mixedStateSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_expandedStateSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_traversedStateSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_selectableStateSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_protectedStateSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_popupStateSlot = DataCookie.ReserveSlot();
|
||||
private static readonly DataCookie s_multiSelectableStateSlot = DataCookie.ReserveSlot();
|
||||
|
||||
public Accessible() => SetData(s_roleSlot, AccRole.Client);
|
||||
|
||||
public void Attach(AccessibleProxy proxy)
|
||||
{
|
||||
_proxy = proxy;
|
||||
FireNotification(NotificationID.Enabled);
|
||||
}
|
||||
|
||||
public void Detach()
|
||||
{
|
||||
SetData(s_defaultActionCommandSlot, null);
|
||||
_proxy = null;
|
||||
}
|
||||
|
||||
public bool Enabled => _proxy != null;
|
||||
|
||||
public string Description
|
||||
{
|
||||
get => (string)GetData(s_descriptionSlot);
|
||||
set
|
||||
{
|
||||
string description = Description;
|
||||
if (!(value != description))
|
||||
return;
|
||||
SetData(s_descriptionSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.Description, AccessibleProperty.Description);
|
||||
}
|
||||
}
|
||||
|
||||
public string DefaultAction
|
||||
{
|
||||
get => (string)GetData(s_defaultActionSlot);
|
||||
set
|
||||
{
|
||||
string defaultAction = DefaultAction;
|
||||
if (!(value != defaultAction))
|
||||
return;
|
||||
SetData(s_defaultActionSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.DefaultAction, AccessibleProperty.DefaultAction);
|
||||
}
|
||||
}
|
||||
|
||||
public IUICommand DefaultActionCommand
|
||||
{
|
||||
get => (IUICommand)GetData(s_defaultActionCommandSlot);
|
||||
set
|
||||
{
|
||||
IUICommand defaultActionCommand = DefaultActionCommand;
|
||||
if (value == defaultActionCommand)
|
||||
return;
|
||||
SetData(s_defaultActionCommandSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.DefaultActionCommand, AccessibleProperty.DefaultActionCommand);
|
||||
}
|
||||
}
|
||||
|
||||
public string Help
|
||||
{
|
||||
get => (string)GetData(s_helpSlot);
|
||||
set
|
||||
{
|
||||
string help = Help;
|
||||
if (!(value != help))
|
||||
return;
|
||||
SetData(s_helpSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.Help, AccessibleProperty.Help);
|
||||
}
|
||||
}
|
||||
|
||||
public int HelpTopic
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_helpTopicSlot);
|
||||
return data != null ? (int)data : -1;
|
||||
}
|
||||
set
|
||||
{
|
||||
int helpTopic = HelpTopic;
|
||||
if (value == helpTopic)
|
||||
return;
|
||||
SetData(s_helpTopicSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.HelpTopic, AccessibleProperty.HelpTopic);
|
||||
}
|
||||
}
|
||||
|
||||
public string KeyboardShortcut
|
||||
{
|
||||
get => (string)GetData(s_keyboardShortcutSlot);
|
||||
set
|
||||
{
|
||||
string keyboardShortcut = KeyboardShortcut;
|
||||
if (!(value != keyboardShortcut))
|
||||
return;
|
||||
SetData(s_keyboardShortcutSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.KeyboardShortcut, AccessibleProperty.KeyboardShortcut);
|
||||
}
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get => (string)GetData(s_nameSlot);
|
||||
set
|
||||
{
|
||||
string name = Name;
|
||||
if (!(value != name))
|
||||
return;
|
||||
SetData(s_nameSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.Name, AccessibleProperty.Name);
|
||||
}
|
||||
}
|
||||
|
||||
public AccRole Role
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_roleSlot);
|
||||
return data != null ? (AccRole)data : AccRole.None;
|
||||
}
|
||||
set
|
||||
{
|
||||
AccRole role = Role;
|
||||
if (value == role)
|
||||
return;
|
||||
SetData(s_roleSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.Role, AccessibleProperty.Role);
|
||||
}
|
||||
}
|
||||
|
||||
public string Value
|
||||
{
|
||||
get => (string)GetData(s_valueSlot);
|
||||
set
|
||||
{
|
||||
string str = Value;
|
||||
if (!(value != str))
|
||||
return;
|
||||
SetData(s_valueSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.Value, AccessibleProperty.Value);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsAnimated
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_animatedStateSlot);
|
||||
return data != null && (bool)data;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool isAnimated = IsAnimated;
|
||||
if (value == isAnimated)
|
||||
return;
|
||||
SetData(s_animatedStateSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.IsAnimated, AccessibleProperty.IsAnimated);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsUnavailable
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_unavailableStateSlot);
|
||||
return data != null && (bool)data;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool isUnavailable = IsUnavailable;
|
||||
if (value == isUnavailable)
|
||||
return;
|
||||
SetData(s_unavailableStateSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.IsUnavailable, AccessibleProperty.IsUnavailable);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSelected
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_selectedStateSlot);
|
||||
return data != null && (bool)data;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool isSelected = IsSelected;
|
||||
if (value == isSelected)
|
||||
return;
|
||||
SetData(s_selectedStateSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.IsSelected, AccessibleProperty.IsSelected);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsBusy
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_busyStateSlot);
|
||||
return data != null && (bool)data;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool isBusy = IsBusy;
|
||||
if (value == isBusy)
|
||||
return;
|
||||
SetData(s_busyStateSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.IsBusy, AccessibleProperty.IsBusy);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsPressed
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_pressedStateSlot);
|
||||
return data != null && (bool)data;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool isPressed = IsPressed;
|
||||
if (value == isPressed)
|
||||
return;
|
||||
SetData(s_pressedStateSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.IsPressed, AccessibleProperty.IsPressed);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsChecked
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_checkedStateSlot);
|
||||
return data != null && (bool)data;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool isChecked = IsChecked;
|
||||
if (value == isChecked)
|
||||
return;
|
||||
SetData(s_checkedStateSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.IsChecked, AccessibleProperty.IsChecked);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsCollapsed
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_collapsedStateSlot);
|
||||
return data != null && (bool)data;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool isCollapsed = IsCollapsed;
|
||||
if (value == isCollapsed)
|
||||
return;
|
||||
SetData(s_collapsedStateSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.IsCollapsed, AccessibleProperty.IsCollapsed);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsDefault
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_defaultStateSlot);
|
||||
return data != null && (bool)data;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool isDefault = IsDefault;
|
||||
if (value == isDefault)
|
||||
return;
|
||||
SetData(s_defaultStateSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.IsDefault, AccessibleProperty.IsDefault);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsMarquee
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_marqueeStateSlot);
|
||||
return data != null && (bool)data;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool isMarquee = IsMarquee;
|
||||
if (value == isMarquee)
|
||||
return;
|
||||
SetData(s_marqueeStateSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.IsMarquee, AccessibleProperty.IsMarquee);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsMixed
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_mixedStateSlot);
|
||||
return data != null && (bool)data;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool isMixed = IsMixed;
|
||||
if (value == isMixed)
|
||||
return;
|
||||
SetData(s_mixedStateSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.IsMixed, AccessibleProperty.IsMixed);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsExpanded
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_expandedStateSlot);
|
||||
return data != null && (bool)data;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool isExpanded = IsExpanded;
|
||||
if (value == isExpanded)
|
||||
return;
|
||||
SetData(s_expandedStateSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.IsExpanded, AccessibleProperty.IsExpanded);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsTraversed
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_traversedStateSlot);
|
||||
return data != null && (bool)data;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool isTraversed = IsTraversed;
|
||||
if (value == isTraversed)
|
||||
return;
|
||||
SetData(s_traversedStateSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.IsTraversed, AccessibleProperty.IsTraversed);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSelectable
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_selectableStateSlot);
|
||||
return data != null && (bool)data;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool isSelectable = IsSelectable;
|
||||
if (value == isSelectable)
|
||||
return;
|
||||
SetData(s_selectableStateSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.IsSelectable, AccessibleProperty.IsSelectable);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsMultiSelectable
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_multiSelectableStateSlot);
|
||||
return data != null && (bool)data;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool isMultiSelectable = IsMultiSelectable;
|
||||
if (value == isMultiSelectable)
|
||||
return;
|
||||
SetData(s_multiSelectableStateSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.IsMultiSelectable, AccessibleProperty.IsMultiSelectable);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsProtected
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_protectedStateSlot);
|
||||
return data != null && (bool)data;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool isProtected = IsProtected;
|
||||
if (value == isProtected)
|
||||
return;
|
||||
SetData(s_protectedStateSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.IsProtected, AccessibleProperty.IsProtected);
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasPopup
|
||||
{
|
||||
get
|
||||
{
|
||||
object data = GetData(s_popupStateSlot);
|
||||
return data != null && (bool)data;
|
||||
}
|
||||
set
|
||||
{
|
||||
bool hasPopup = HasPopup;
|
||||
if (value == hasPopup)
|
||||
return;
|
||||
SetData(s_popupStateSlot, value);
|
||||
FireAccessiblePropertyChanged(NotificationID.HasPopup, AccessibleProperty.HasPopup);
|
||||
}
|
||||
}
|
||||
|
||||
protected void FireAccessiblePropertyChanged(
|
||||
string propertyName,
|
||||
AccessibleProperty accessibleProperty)
|
||||
{
|
||||
FireNotification(propertyName);
|
||||
if (_proxy != null)
|
||||
{
|
||||
_proxy.NotifyAccessiblePropertyChanged(accessibleProperty);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (accessibleProperty == AccessibleProperty.Name)
|
||||
return;
|
||||
ErrorManager.ReportWarning("Accessibility: Script modifications to the 'Accessible' object ('{0}' property) detected even though an Accessibility client is not is use. Use 'if (Accessible.Enabled) {{ ... }}' to bypass Accessible property access in this case", propertyName);
|
||||
}
|
||||
}
|
||||
|
||||
protected object GetData(DataCookie cookie) => _dataMap.GetData(cookie);
|
||||
|
||||
protected void SetData(DataCookie cookie, object value) => _dataMap.SetData(cookie, value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Microsoft.Iris.Accessibility.AccessibleChildren
|
||||
// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
|
||||
// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11
|
||||
// Assembly location: C:\Program Files\Zune\UIX.dll
|
||||
|
||||
using Microsoft.Iris.Session;
|
||||
using Microsoft.Iris.UI;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices.ComTypes;
|
||||
|
||||
namespace Microsoft.Iris.Accessibility
|
||||
{
|
||||
[ComVisible(true)]
|
||||
public class AccessibleChildren : IEnumVARIANT
|
||||
{
|
||||
private AccessibleProxy _proxy;
|
||||
private int _current;
|
||||
|
||||
internal AccessibleChildren(AccessibleProxy proxy)
|
||||
: this(proxy, -1)
|
||||
{
|
||||
}
|
||||
|
||||
internal AccessibleChildren(AccessibleProxy proxy, int position)
|
||||
{
|
||||
_proxy = proxy;
|
||||
_current = position;
|
||||
}
|
||||
|
||||
internal IEnumVARIANT Clone() => new AccessibleChildren(_proxy, _current);
|
||||
|
||||
internal int Next(int count, object[] children)
|
||||
{
|
||||
int index = 0;
|
||||
do
|
||||
{
|
||||
++_current;
|
||||
if (_current >= _proxy.UI.Children.Count)
|
||||
{
|
||||
_current = _proxy.UI.Children.Count;
|
||||
break;
|
||||
}
|
||||
UIClass child = (UIClass)_proxy.UI.Children[_current];
|
||||
children[index] = child.AccessibleProxy;
|
||||
++index;
|
||||
}
|
||||
while (index < count);
|
||||
return index;
|
||||
}
|
||||
|
||||
internal void Reset() => _current = -1;
|
||||
|
||||
internal bool Skip(int count)
|
||||
{
|
||||
_current += count;
|
||||
if (_current < _proxy.UI.Children.Count)
|
||||
return true;
|
||||
_current = _proxy.UI.Children.Count;
|
||||
return false;
|
||||
}
|
||||
|
||||
IEnumVARIANT IEnumVARIANT.Clone()
|
||||
{
|
||||
VerifyEnumeratorAccess();
|
||||
return Clone();
|
||||
}
|
||||
|
||||
unsafe int IEnumVARIANT.Next(int celt, object[] rgVar, IntPtr pceltFetched)
|
||||
{
|
||||
VerifyEnumeratorAccess();
|
||||
int num = Next(celt, rgVar);
|
||||
*(int*)(void*)pceltFetched = num;
|
||||
return num != celt ? 1 : 0;
|
||||
}
|
||||
|
||||
int IEnumVARIANT.Reset()
|
||||
{
|
||||
VerifyEnumeratorAccess();
|
||||
Reset();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int IEnumVARIANT.Skip(int celt)
|
||||
{
|
||||
VerifyEnumeratorAccess();
|
||||
return !Skip(celt) ? 1 : 0;
|
||||
}
|
||||
|
||||
private void VerifyEnumeratorAccess()
|
||||
{
|
||||
if (_proxy.UI != null && UIDispatcher.IsUIThread)
|
||||
return;
|
||||
Marshal.ThrowExceptionForHR(-2147467259);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Microsoft.Iris.Accessibility.AccessibleProperty
|
||||
// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
|
||||
// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11
|
||||
// Assembly location: C:\Program Files\Zune\UIX.dll
|
||||
|
||||
namespace Microsoft.Iris.Accessibility
|
||||
{
|
||||
internal enum AccessibleProperty
|
||||
{
|
||||
DefaultAction,
|
||||
DefaultActionCommand,
|
||||
Description,
|
||||
HasPopup,
|
||||
Help,
|
||||
HelpTopic,
|
||||
IsAnimated,
|
||||
IsBusy,
|
||||
IsChecked,
|
||||
IsCollapsed,
|
||||
IsDefault,
|
||||
IsExpanded,
|
||||
IsMarquee,
|
||||
IsMixed,
|
||||
IsMultiSelectable,
|
||||
IsPressed,
|
||||
IsProtected,
|
||||
IsSelectable,
|
||||
IsSelected,
|
||||
IsTraversed,
|
||||
IsUnavailable,
|
||||
KeyboardShortcut,
|
||||
Name,
|
||||
Role,
|
||||
Value,
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,53 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Microsoft.Iris.Accessibility.RootAccessibleProxy
|
||||
// Assembly: UIX, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
|
||||
// MVID: A56C6C9D-B7F6-46A9-8BDE-B3D9B8D60B11
|
||||
// Assembly location: C:\Program Files\Zune\UIX.dll
|
||||
|
||||
using Accessibility;
|
||||
using Microsoft.Iris.Session;
|
||||
using Microsoft.Iris.UI;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.Iris.Accessibility
|
||||
{
|
||||
[ComVisible(true)]
|
||||
public class RootAccessibleProxy : AccessibleProxy
|
||||
{
|
||||
private IAccessible _clientBridge;
|
||||
|
||||
internal RootAccessibleProxy(UIClass ui, Accessible data)
|
||||
: base(ui, data)
|
||||
{
|
||||
}
|
||||
|
||||
internal override IAccessible Parent => (IAccessible)_clientBridge.accParent;
|
||||
|
||||
internal override IAccessible Navigate(AccNavDirs navDir)
|
||||
{
|
||||
IAccessible accessible = null;
|
||||
switch (navDir)
|
||||
{
|
||||
case AccNavDirs.Up:
|
||||
case AccNavDirs.Down:
|
||||
case AccNavDirs.Left:
|
||||
case AccNavDirs.Right:
|
||||
case AccNavDirs.Next:
|
||||
case AccNavDirs.Previous:
|
||||
accessible = (IAccessible)_clientBridge.accNavigate((int)navDir, 0);
|
||||
break;
|
||||
case AccNavDirs.FirstChild:
|
||||
case AccNavDirs.LastChild:
|
||||
accessible = base.Navigate(navDir);
|
||||
break;
|
||||
}
|
||||
return accessible;
|
||||
}
|
||||
|
||||
internal override string Name => UIApplication.ApplicationName;
|
||||
|
||||
internal IAccessible ClientBridge => _clientBridge;
|
||||
|
||||
internal void AttachClientBridge(IAccessible clientBridge) => _clientBridge = clientBridge;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user