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 "Accessible.h"
31 class AccessibleWrap
: public Accessible
{
32 public: // construction, destruction
33 AccessibleWrap(nsIContent
* aContent
, DocAccessible
* aDoc
);
34 virtual ~AccessibleWrap();
37 * Get the native Obj-C object (mozAccessible).
39 virtual void GetNativeInterface(void** aOutAccessible
) override
;
42 * The objective-c |Class| type that this accessible's native object
43 * should be instantied with. used on runtime to determine the
44 * right type for this accessible's associated native object.
46 virtual Class
GetNativeType();
48 virtual void Shutdown() override
;
50 virtual nsresult
HandleAccEvent(AccEvent
* aEvent
) override
;
53 friend class xpcAccessibleMacInterface
;
56 * Get the native object. Create it if needed.
59 mozAccessible
* GetNativeObject();
66 * Our native object. Private because its creation is done lazily.
67 * Don't access it directly. Ever. Unless you are GetNativeObject() or
71 // if we are in Objective-C, we use the actual Obj-C class.
72 mozAccessible
* mNativeObject
;
78 * We have created our native. This does not mean there is one.
79 * This can never go back to false.
80 * We need it because checking whether we need a native object cost time.
85 Class
GetTypeFromRole(roles::Role aRole
);
88 } // namespace mozilla