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"
32 class AccessibleWrap
: public LocalAccessible
{
33 public: // construction, destruction
34 AccessibleWrap(nsIContent
* aContent
, DocAccessible
* aDoc
);
35 virtual ~AccessibleWrap();
38 * Get the native Obj-C object (mozAccessible).
40 virtual void GetNativeInterface(void** aOutAccessible
) override
;
43 * The objective-c |Class| type that this accessible's native object
44 * should be instantied with. used on runtime to determine the
45 * right type for this accessible's associated native object.
47 virtual Class
GetNativeType();
49 virtual void Shutdown() override
;
51 virtual nsresult
HandleAccEvent(AccEvent
* aEvent
) override
;
53 bool ApplyPostFilter(const EWhichPostFilter
& aSearchKey
,
54 const nsString
& aSearchText
);
57 friend class xpcAccessibleMacInterface
;
60 * Get the native object. Create it if needed.
63 mozAccessible
* GetNativeObject();
70 * Our native object. Private because its creation is done lazily.
71 * Don't access it directly. Ever. Unless you are GetNativeObject() or
75 // if we are in Objective-C, we use the actual Obj-C class.
76 mozAccessible
* mNativeObject
;
82 * We have created our native. This does not mean there is one.
83 * This can never go back to false.
84 * We need it because checking whether we need a native object cost time.
89 Class
GetTypeFromRole(roles::Role aRole
);
92 } // namespace mozilla