Browse Source

Added macOS events for expand & collapse events (#21043)

* Added macOS events for expand & collapse events

* Fix CFString bridging to NSString

* Don't use ExpandCollapseProvider functions when event was not for ExpandCollapseProvider

---------

Co-authored-by: Adam Demasi <adam@hbang.com.au>
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
pull/21394/head
Melissa 5 months ago
committed by GitHub
parent
commit
108f1af812
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      native/Avalonia.Native/src/OSX/automation.mm

6
native/Avalonia.Native/src/OSX/automation.mm

@ -509,8 +509,14 @@
NSAccessibilityPostNotification(self, NSAccessibilitySelectedChildrenChangedNotification);
break;
case ToggleProvider_ToggleState:
NSAccessibilityPostNotification(self, NSAccessibilityValueChangedNotification);
break;
case ExpandCollapseProvider_ExpandCollapseState:
NSAccessibilityPostNotification(self, NSAccessibilityValueChangedNotification);
if (_peer->ExpandCollapseProvider_GetIsExpanded())
NSAccessibilityPostNotification(self, (__bridge NSString *)kAXRowExpandedNotification);
else
NSAccessibilityPostNotification(self, (__bridge NSString *)kAXRowCollapsedNotification);
break;
default:
break;

Loading…
Cancel
Save