Julien Lebosquain
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
19 additions and
3 deletions
-
native/Avalonia.Native/src/OSX/automation.mm
-
src/Avalonia.Controls/Automation/Provider/IRangeValueProvider.cs
-
src/Avalonia.Controls/Automation/Provider/IValueProvider.cs
-
src/Avalonia.Native/avn.idl
|
|
|
@ -216,6 +216,22 @@ |
|
|
|
return [super accessibilityValue]; |
|
|
|
} |
|
|
|
|
|
|
|
- (void)setAccessibilityValue:(id)newValue |
|
|
|
{ |
|
|
|
if (_peer->IsValueProvider()) |
|
|
|
{ |
|
|
|
if (newValue == nil) |
|
|
|
_peer->ValueProvider_SetValue(nil); |
|
|
|
else if ([newValue isKindOfClass:[NSString class]]) |
|
|
|
_peer->ValueProvider_SetValue([(NSString*)newValue UTF8String]); |
|
|
|
} |
|
|
|
else if (_peer->IsRangeValueProvider()) |
|
|
|
{ |
|
|
|
if ([newValue isKindOfClass:[NSNumber class]]) |
|
|
|
_peer->RangeValueProvider_SetValue([(NSNumber*)newValue doubleValue]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
- (id)accessibilityMinValue |
|
|
|
{ |
|
|
|
if (_peer->IsRangeValueProvider()) |
|
|
|
|
|
|
|
@ -127,7 +127,7 @@ |
|
|
|
/// <item>
|
|
|
|
/// <term>macOS</term>
|
|
|
|
/// <description>
|
|
|
|
/// <c>NSAccessibilityProtocol.setAccessibilityValue</c> (not implemented)
|
|
|
|
/// <c>NSAccessibilityProtocol.setAccessibilityValue</c>
|
|
|
|
/// </description>
|
|
|
|
/// </item>
|
|
|
|
/// </list>
|
|
|
|
|
|
|
|
@ -57,7 +57,7 @@ |
|
|
|
/// <item>
|
|
|
|
/// <term>macOS</term>
|
|
|
|
/// <description>
|
|
|
|
/// <c>NSAccessibilityProtocol.setAccessibilityValue</c> (not implemented)
|
|
|
|
/// <c>NSAccessibilityProtocol.setAccessibilityValue</c>
|
|
|
|
/// </description>
|
|
|
|
/// </item>
|
|
|
|
/// </list>
|
|
|
|
|
|
|
|
@ -1317,7 +1317,7 @@ interface IAvnAutomationPeer : IUnknown |
|
|
|
|
|
|
|
bool IsValueProvider(); |
|
|
|
IAvnString* ValueProvider_GetValue(); |
|
|
|
void ValueProvider_SetValue(char* value); |
|
|
|
void ValueProvider_SetValue([const] char* value); |
|
|
|
|
|
|
|
IAvnString* GetHelpText(); |
|
|
|
|
|
|
|
|