diff options
author | Vsevolod Kukol <sevoku@microsoft.com> | 2019-11-26 17:53:22 +0300 |
---|---|---|
committer | monojenkins <jo.shields+jenkins@xamarin.com> | 2019-11-26 18:03:24 +0300 |
commit | 842bc43ef03a532dc8baa13275b3eb6a491ace34 (patch) | |
tree | bf0bd61d5ede9ec4ba19068a4bec631713f0cca4 /main | |
parent | 1cd9905f28898d0e7de9122ed14807a3385d995f (diff) |
[Ide][AtkCocoa] Add support for Subroles and Value objects
Diffstat (limited to 'main')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs | 1 | ||||
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelperMac.cs | 17 |
2 files changed, 17 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs index 251fcfe677..9a70e6979d 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs @@ -152,6 +152,7 @@ namespace MonoDevelop.Components.AtkCocoaHelper public enum SubRoles { AXCloseButton, + AXTabButton, }; public struct Range diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelperMac.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelperMac.cs index 62981cfc3e..97a4060dcf 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelperMac.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelperMac.cs @@ -214,12 +214,22 @@ namespace MonoDevelop.Components.AtkCocoaHelper public static void SetValue (this Atk.Object o, string stringValue) { + SetValue (o, (NSObject) new NSString (stringValue)); + } + + public static void SetValue (this Atk.Object o, object value) + { + SetValue (o, NSObject.FromObject (value)); + } + + static void SetValue (this Atk.Object o, NSObject value) + { var nsa = GetNSAccessibilityElement (o); if (nsa == null) { return; } - nsa.AccessibilityValue = new NSString (stringValue); + nsa.AccessibilityValue = value; } public static void SetUrl (this Atk.Object o, string url) @@ -261,6 +271,11 @@ namespace MonoDevelop.Components.AtkCocoaHelper nsa.AccessibilitySubrole = subrole; } + public static void SetSubRole (this Atk.Object o, AtkCocoa.SubRoles subrole) + { + o.SetSubRole (subrole.ToString ()); + } + public static void SetTitleUIElement (this Atk.Object o, Atk.Object title) { var nsa = GetNSAccessibilityElement (o); |