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 * AccessibleWrap, and its descendents in atk directory provide the
46 * implementation of AtkObject.
48 class AccessibleWrap
: public LocalAccessible
{
50 AccessibleWrap(nsIContent
* aContent
, DocAccessible
* aDoc
);
51 virtual ~AccessibleWrap();
52 void ShutdownAtkObject();
54 virtual void Shutdown() override
;
56 // return the atk object for this AccessibleWrap
57 virtual void GetNativeInterface(void** aOutAccessible
) override
;
58 virtual nsresult
HandleAccEvent(AccEvent
* aEvent
) override
;
60 AtkObject
* GetAtkObject(void);
61 static AtkObject
* GetAtkObject(LocalAccessible
* aAccessible
);
65 static const char* ReturnString(nsAString
& aString
) {
66 static nsCString returnedString
;
67 CopyUTF16toUTF8(aString
, returnedString
);
68 return returnedString
.get();
71 static void GetKeyBinding(LocalAccessible
* aAccessible
, nsAString
& aResult
);
73 static LocalAccessible
* GetColumnHeader(TableAccessible
* aAccessible
,
75 static LocalAccessible
* GetRowHeader(TableAccessible
* aAccessible
,
79 nsresult
FireAtkStateChangeEvent(AccEvent
* aEvent
, AtkObject
* aObject
);
80 nsresult
FireAtkTextChangedEvent(AccEvent
* aEvent
, AtkObject
* aObject
);
82 AtkObject
* mAtkObject
;
85 uint16_t CreateMaiInterfaces();
89 } // namespace mozilla
91 #endif /* __NS_ACCESSIBLE_WRAP_H__ */