mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Accessibility: Added InternalAccessibilityEvent::elementMovedOrResized
This commit is contained in:
parent
cdf3b619d8
commit
d1b669e6ae
4 changed files with 16 additions and 9 deletions
|
|
@ -34,6 +34,7 @@ enum class InternalAccessibilityEvent
|
|||
{
|
||||
elementCreated,
|
||||
elementDestroyed,
|
||||
elementMovedOrResized,
|
||||
focusChanged,
|
||||
windowOpened,
|
||||
windowClosed
|
||||
|
|
|
|||
|
|
@ -1202,6 +1202,10 @@ void Component::sendMovedResizedMessages (bool wasMoved, bool wasResized)
|
|||
l.componentMovedOrResized (*this, wasMoved, wasResized);
|
||||
});
|
||||
}
|
||||
|
||||
if (wasMoved || wasResized)
|
||||
if (auto* handler = getAccessibilityHandler())
|
||||
notifyAccessibilityEventInternal (*handler, InternalAccessibilityEvent::elementMovedOrResized);
|
||||
}
|
||||
|
||||
void Component::setSize (int w, int h) { setBounds (getX(), getY(), w, h); }
|
||||
|
|
|
|||
|
|
@ -1069,11 +1069,12 @@ void notifyAccessibilityEventInternal (const AccessibilityHandler& handler, Inte
|
|||
{
|
||||
switch (eventType)
|
||||
{
|
||||
case InternalAccessibilityEvent::elementCreated: return NSAccessibilityCreatedNotification;
|
||||
case InternalAccessibilityEvent::elementDestroyed: return NSAccessibilityUIElementDestroyedNotification;
|
||||
case InternalAccessibilityEvent::focusChanged: return NSAccessibilityFocusedUIElementChangedNotification;
|
||||
case InternalAccessibilityEvent::windowOpened: return NSAccessibilityWindowCreatedNotification;
|
||||
case InternalAccessibilityEvent::windowClosed: break;
|
||||
case InternalAccessibilityEvent::elementCreated: return NSAccessibilityCreatedNotification;
|
||||
case InternalAccessibilityEvent::elementDestroyed: return NSAccessibilityUIElementDestroyedNotification;
|
||||
case InternalAccessibilityEvent::elementMovedOrResized: return NSAccessibilityLayoutChangedNotification;
|
||||
case InternalAccessibilityEvent::focusChanged: return NSAccessibilityFocusedUIElementChangedNotification;
|
||||
case InternalAccessibilityEvent::windowOpened: return NSAccessibilityWindowCreatedNotification;
|
||||
case InternalAccessibilityEvent::windowClosed: break;
|
||||
}
|
||||
|
||||
return NSAccessibilityNotificationName{};
|
||||
|
|
|
|||
|
|
@ -168,11 +168,12 @@ void notifyAccessibilityEventInternal (const AccessibilityHandler& handler, Inte
|
|||
{
|
||||
switch (eventType)
|
||||
{
|
||||
case InternalAccessibilityEvent::focusChanged: return UIA_AutomationFocusChangedEventId;
|
||||
case InternalAccessibilityEvent::windowOpened: return UIA_Window_WindowOpenedEventId;
|
||||
case InternalAccessibilityEvent::windowClosed: return UIA_Window_WindowClosedEventId;
|
||||
case InternalAccessibilityEvent::focusChanged: return UIA_AutomationFocusChangedEventId;
|
||||
case InternalAccessibilityEvent::windowOpened: return UIA_Window_WindowOpenedEventId;
|
||||
case InternalAccessibilityEvent::windowClosed: return UIA_Window_WindowClosedEventId;
|
||||
case InternalAccessibilityEvent::elementCreated:
|
||||
case InternalAccessibilityEvent::elementDestroyed: break;
|
||||
case InternalAccessibilityEvent::elementDestroyed:
|
||||
case InternalAccessibilityEvent::elementMovedOrResized: break;
|
||||
}
|
||||
|
||||
return {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue