1 /* -*- Mode: Objective-C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /* For documentation of the accessibility architecture,
7 * see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
10 #ifndef _AccessibleWrap_H_
11 #define _AccessibleWrap_H_
13 #include <objc/objc.h>
15 #include "Accessible.h"
29 class AccessibleWrap
: public Accessible
31 public: // construction, destruction
32 AccessibleWrap(nsIContent
* aContent
, DocAccessible
* aDoc
);
33 virtual ~AccessibleWrap();
36 * Get the native Obj-C object (mozAccessible).
38 virtual void GetNativeInterface(void** aOutAccessible
) override
;
41 * The objective-c |Class| type that this accessible's native object
42 * should be instantied with. used on runtime to determine the
43 * right type for this accessible's associated native object.
45 virtual Class
GetNativeType ();
47 virtual void Shutdown () override
;
49 virtual bool InsertChildAt(uint32_t aIdx
, Accessible
* aChild
) override
;
50 virtual bool RemoveChild(Accessible
* aAccessible
) override
;
52 virtual nsresult
HandleAccEvent(AccEvent
* aEvent
) override
;
57 * Return true if the parent doesn't have children to expose to AT.
59 bool AncestorIsFlat();
62 * Get the native object. Create it if needed.
65 mozAccessible
* GetNativeObject();
73 * Our native object. Private because its creation is done lazily.
74 * Don't access it directly. Ever. Unless you are GetNativeObject() or
78 // if we are in Objective-C, we use the actual Obj-C class.
79 mozAccessible
* mNativeObject
;
85 * We have created our native. This does not mean there is one.
86 * This can never go back to false.
87 * We need it because checking whether we need a native object cost time.
93 void FireNativeEvent(mozAccessible
* aNativeAcc
, uint32_t aEventType
);
95 void FireNativeEvent(id aNativeAcc
, uint32_t aEventType
);
98 Class
GetTypeFromRole(roles::Role aRole
);
101 } // namespace mozilla