1 /* -*- Mode: 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/. */
7 #ifndef __NS_ACCESSIBLE_WRAP_H__
8 #define __NS_ACCESSIBLE_WRAP_H__
11 #include "LocalAccessible.h"
14 typedef struct _AtkObject AtkObject
;
17 PROP_0
, // gobject convention
20 PROP_PARENT
, // ancestry has changed
25 PROP_TABLE_COLUMN_DESCRIPTION
,
26 PROP_TABLE_COLUMN_HEADER
,
27 PROP_TABLE_ROW_DESCRIPTION
,
28 PROP_TABLE_ROW_HEADER
,
30 PROP_LAST
// gobject convention
33 struct AtkPropertyChange
{
34 int32_t type
; // property type as listed above
45 * Atk specific functionality for an accessibility tree node that originated in
46 * mDoc's content process.
48 * AccessibleWrap, and its descendents in atk directory provide the
49 * implementation of AtkObject.
51 class AccessibleWrap
: public LocalAccessible
{
53 AccessibleWrap(nsIContent
* aContent
, DocAccessible
* aDoc
);
54 virtual ~AccessibleWrap();
55 void ShutdownAtkObject();
57 virtual void Shutdown() override
;
59 // return the atk object for this AccessibleWrap
60 virtual void GetNativeInterface(void** aOutAccessible
) override
;
62 AtkObject
* GetAtkObject(void);
63 static AtkObject
* GetAtkObject(LocalAccessible
* aAccessible
);
67 static const char* ReturnString(nsAString
& aString
) {
68 static nsCString returnedString
;
69 CopyUTF16toUTF8(aString
, returnedString
);
70 return returnedString
.get();
73 static void GetKeyBinding(Accessible
* aAccessible
, nsAString
& aResult
);
75 static Accessible
* GetColumnHeader(TableAccessible
* aAccessible
,
77 static Accessible
* GetRowHeader(TableAccessible
* aAccessible
,
81 nsresult
FireAtkStateChangeEvent(AccEvent
* aEvent
, AtkObject
* aObject
);
82 nsresult
FireAtkTextChangedEvent(AccEvent
* aEvent
, AtkObject
* aObject
);
84 AtkObject
* mAtkObject
;
87 uint16_t CreateMaiInterfaces();
91 } // namespace mozilla
93 #endif /* __NS_ACCESSIBLE_WRAP_H__ */