2 /* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
11 #include "nsStringFwd.h"
20 // convert an array of Gecko accessibles to an NSArray of native accessibles
21 template <typename AccArray
>
22 NSArray
<mozAccessible
*>* ConvertToNSArray(AccArray
& aArray
) {
23 NSMutableArray
* nativeArray
= [[[NSMutableArray alloc
] init
] autorelease
];
25 // iterate through the list, and get each native accessible.
26 for (Accessible
* curAccessible
: aArray
) {
27 mozAccessible
* curNative
= GetNativeFromGeckoAccessible(curAccessible
);
29 [nativeArray addObject
:GetObjectOrRepresentedView(curNative
)];
36 * Get a localized string from the string bundle.
37 * Return nil if not found.
39 NSString
* LocalizedString(const nsString
& aString
);
42 * Gets an accessible atttribute from the mozAccessible's associated
43 * accessible wrapper or proxy, and returns the value as an NSString.
44 * nil if no attribute is found.
46 NSString
* GetAccAttr(mozAccessible
* aNativeAccessible
, nsAtom
* aAttrName
);