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/. */
8 /* For documentation of the accessibility architecture,
9 * see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
12 #ifndef _AccessibleWrap_H_
13 #define _AccessibleWrap_H_
15 #include <objc/objc.h>
17 #include "LocalAccessible.h"
18 #include "PlatformExtTypes.h"
33 * Mac specific functionality for an accessibility tree node that originated in
34 * mDoc's content process.
36 class AccessibleWrap
: public LocalAccessible
{
37 public: // construction, destruction
38 AccessibleWrap(nsIContent
* aContent
, DocAccessible
* aDoc
);
39 virtual ~AccessibleWrap();
42 * Get the native Obj-C object (mozAccessible).
44 virtual void GetNativeInterface(void** aOutAccessible
) override
;
47 * The objective-c |Class| type that this accessible's native object
48 * should be instantied with. used on runtime to determine the
49 * right type for this accessible's associated native object.
51 virtual Class
GetNativeType();
53 virtual void Shutdown() override
;
55 virtual nsresult
HandleAccEvent(AccEvent
* aEvent
) override
;
58 friend class xpcAccessibleMacInterface
;
61 * Get the native object. Create it if needed.
64 mozAccessible
* GetNativeObject();
71 * Our native object. Private because its creation is done lazily.
72 * Don't access it directly. Ever. Unless you are GetNativeObject() or
76 // if we are in Objective-C, we use the actual Obj-C class.
77 mozAccessible
* mNativeObject
;
83 * We have created our native. This does not mean there is one.
84 * This can never go back to false.
85 * We need it because checking whether we need a native object cost time.
90 Class
GetTypeFromRole(roles::Role aRole
);
93 } // namespace mozilla