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