75dc3a54fc
On macOS, accessibility is implemented by creating a native NSView for each C++ accessible element. The problem with using an NSView for each element is that NSViews are very slow to add to or remove from an NSWindow once the number of NSViews is more than a thousand or so. Fortunately, Apple added a protocol that allows adding a native accessible element using the lightweight NSAccessiblityElement class. The topmost NSAccessiblityElement elements are connected to the single SalFrameView in each NSWindow but since NSAccessiblityElements are not NSViews, they are not connected to any of NSWindow's event or draw dispatching. This makes NSAccessiblityElements significantly faster to add to or remove from an NSWindow with no apparent loss in functionality. Note: this change is a subset of the LibreOffice 4.4 code changes that I wrote for NeoOffice. Change-Id: I408108d57217db407512dfa3457fe26d2ab455de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152717 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Patrick Luby <plubius@neooffice.org>
36 lines
1.4 KiB
Objective-C
36 lines
1.4 KiB
Objective-C
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
/*
|
|
* This file is part of the LibreOffice project.
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*
|
|
* This file incorporates work covered by the following license notice:
|
|
*
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
* with this work for additional information regarding copyright
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
* except in compliance with the License. You may obtain a copy of
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
*/
|
|
|
|
#ifndef INCLUDED_VCL_OSX_A11YACTIONWRAPPER_H
|
|
#define INCLUDED_VCL_OSX_A11YACTIONWRAPPER_H
|
|
|
|
#include <osx/osxvcltypes.h>
|
|
#include <osx/a11ywrapper.h>
|
|
|
|
@interface AquaA11yActionWrapper : NSObject
|
|
{
|
|
}
|
|
+ (NSArray*)actionNamesForElement:(AquaA11yWrapper*)wrapper;
|
|
+ (void)doAction:(NSString*)action ofElement:(AquaA11yWrapper*)wrapper;
|
|
+ (NSAccessibilityActionName)actionNameForSelector:(SEL)aSelector;
|
|
@end
|
|
|
|
#endif // INCLUDED_VCL_OSX_A11YACTIONWRAPPER_H
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|