AtkSocketAccessible.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* -*- Mode: 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/. */
  5. #ifndef _AtkSocketAccessible_H_
  6. #define _AtkSocketAccessible_H_
  7. #include "AccessibleWrap.h"
  8. // This file gets included by nsAccessibilityService.cpp, which can't include
  9. // atk.h (or glib.h), so we can't rely on it being included.
  10. #ifdef __ATK_H__
  11. extern "C" typedef void (*AtkSocketEmbedType) (AtkSocket*, gchar*);
  12. #else
  13. extern "C" typedef void (*AtkSocketEmbedType) (void*, void*);
  14. #endif
  15. namespace mozilla {
  16. namespace a11y {
  17. /**
  18. * Provides a AccessibleWrap wrapper around AtkSocket for out-of-process
  19. * accessibles.
  20. */
  21. class AtkSocketAccessible : public AccessibleWrap
  22. {
  23. public:
  24. // Soft references to AtkSocket
  25. static AtkSocketEmbedType g_atk_socket_embed;
  26. #ifdef __ATK_H__
  27. static GType g_atk_socket_type;
  28. #endif
  29. static const char* sATKSocketEmbedSymbol;
  30. static const char* sATKSocketGetTypeSymbol;
  31. /*
  32. * True if the current Atk version supports AtkSocket and it was correctly
  33. * loaded.
  34. */
  35. static bool gCanEmbed;
  36. AtkSocketAccessible(nsIContent* aContent, DocAccessible* aDoc,
  37. const nsCString& aPlugId);
  38. virtual void Shutdown() override;
  39. virtual void GetNativeInterface(void** aOutAccessible) override;
  40. };
  41. } // namespace a11y
  42. } // namespace mozilla
  43. #endif