1 /* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 
7 #ifndef _MacUtils_H_
8 #define _MacUtils_H_
9 
10 #include "nsStringFwd.h"
11 
12 @class NSString;
13 
14 namespace mozilla {
15 namespace a11y {
16 namespace utils {
17 
18 // convert an array of Gecko accessibles to an NSArray of native accessibles
19 static inline NSMutableArray* ConvertToNSArray(nsTArray<Accessible*>& aArray);
20 
21 // convert an array of Gecko proxy accessibles to an NSArray of native accessibles
22 static inline NSMutableArray* ConvertToNSArray(nsTArray<ProxyAccessible*>& aArray);
23 
24 /**
25  * Get a localized string from the string bundle.
26  * Return nil if not found.
27  */
28 NSString* LocalizedString(const nsString& aString);
29 
30 /**
31  * Gets an accessible atttribute from the mozAccessible's associated
32  * accessible wrapper or proxy, and returns the value as an NSString.
33  * nil if no attribute is found.
34  */
35 NSString* GetAccAttr(mozAccessible* aNativeAccessible, const char* aAttrName);
36 }
37 }
38 }
39 
40 #endif
41