Bug 1735097 - Geolocation: use EpochTimeStamp instead of DOMTimeStamp r=saschanaz...
[gecko.git] / accessible / atk / AccessibleWrap.h
blobba77bffc0402b21af3de4901e56ead221f87454d
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__
10 #include "nsCOMPtr.h"
11 #include "LocalAccessible.h"
13 struct _AtkObject;
14 typedef struct _AtkObject AtkObject;
16 enum AtkProperty {
17 PROP_0, // gobject convention
18 PROP_NAME,
19 PROP_DESCRIPTION,
20 PROP_PARENT, // ancestry has changed
21 PROP_ROLE,
22 PROP_LAYER,
23 PROP_MDI_ZORDER,
24 PROP_TABLE_CAPTION,
25 PROP_TABLE_COLUMN_DESCRIPTION,
26 PROP_TABLE_COLUMN_HEADER,
27 PROP_TABLE_ROW_DESCRIPTION,
28 PROP_TABLE_ROW_HEADER,
29 PROP_TABLE_SUMMARY,
30 PROP_LAST // gobject convention
33 struct AtkPropertyChange {
34 int32_t type; // property type as listed above
35 void* oldvalue;
36 void* newvalue;
39 namespace mozilla {
40 namespace a11y {
42 class MaiHyperlink;
44 /**
45 * AccessibleWrap, and its descendents in atk directory provide the
46 * implementation of AtkObject.
48 class AccessibleWrap : public LocalAccessible {
49 public:
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);
63 bool IsValidObject();
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,
74 int32_t aColIdx);
75 static LocalAccessible* GetRowHeader(TableAccessible* aAccessible,
76 int32_t aRowIdx);
78 protected:
79 nsresult FireAtkStateChangeEvent(AccEvent* aEvent, AtkObject* aObject);
80 nsresult FireAtkTextChangedEvent(AccEvent* aEvent, AtkObject* aObject);
82 AtkObject* mAtkObject;
84 private:
85 uint16_t CreateMaiInterfaces();
88 } // namespace a11y
89 } // namespace mozilla
91 #endif /* __NS_ACCESSIBLE_WRAP_H__ */