Bug 1753131 - wait for focus before dispatching devicechange events r=jib
[gecko.git] / accessible / xpcom / xpcAccessibleImage.h
blob894c149003a567d90fc71fbbefb517dda577cf4b
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 file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_a11y_xpcAccessibleImage_h_
8 #define mozilla_a11y_xpcAccessibleImage_h_
10 #include "nsIAccessibleImage.h"
12 #include "xpcAccessibleGeneric.h"
14 namespace mozilla {
15 namespace a11y {
17 class xpcAccessibleImage : public xpcAccessibleGeneric,
18 public nsIAccessibleImage {
19 public:
20 explicit xpcAccessibleImage(Accessible* aIntl)
21 : xpcAccessibleGeneric(aIntl) {}
23 NS_DECL_ISUPPORTS_INHERITED
25 NS_IMETHOD GetImagePosition(uint32_t aCoordType, int32_t* aX,
26 int32_t* aY) final;
27 NS_IMETHOD GetImageSize(int32_t* aWidth, int32_t* aHeight) final;
29 protected:
30 virtual ~xpcAccessibleImage() {}
32 private:
33 ImageAccessible* Intl() {
34 return mIntl->IsLocal() ? mIntl->AsLocal()->AsImage() : nullptr;
37 xpcAccessibleImage(const xpcAccessibleImage&) = delete;
38 xpcAccessibleImage& operator=(const xpcAccessibleImage&) = delete;
41 } // namespace a11y
42 } // namespace mozilla
44 #endif