michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set ts=2 et sw=2 tw=80: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef _AtkSocketAccessible_H_ michael@0: #define _AtkSocketAccessible_H_ michael@0: michael@0: #include "AccessibleWrap.h" michael@0: michael@0: // This file gets included by nsAccessibilityService.cpp, which can't include michael@0: // atk.h (or glib.h), so we can't rely on it being included. michael@0: #ifdef __ATK_H__ michael@0: extern "C" typedef void (*AtkSocketEmbedType) (AtkSocket*, gchar*); michael@0: #else michael@0: extern "C" typedef void (*AtkSocketEmbedType) (void*, void*); michael@0: #endif michael@0: michael@0: namespace mozilla { michael@0: namespace a11y { michael@0: michael@0: /** michael@0: * Provides a AccessibleWrap wrapper around AtkSocket for out-of-process michael@0: * accessibles. michael@0: */ michael@0: class AtkSocketAccessible : public AccessibleWrap michael@0: { michael@0: public: michael@0: michael@0: // Soft references to AtkSocket michael@0: static AtkSocketEmbedType g_atk_socket_embed; michael@0: #ifdef __ATK_H__ michael@0: static GType g_atk_socket_type; michael@0: #endif michael@0: static const char* sATKSocketEmbedSymbol; michael@0: static const char* sATKSocketGetTypeSymbol; michael@0: michael@0: /* michael@0: * True if the current Atk version supports AtkSocket and it was correctly michael@0: * loaded. michael@0: */ michael@0: static bool gCanEmbed; michael@0: michael@0: AtkSocketAccessible(nsIContent* aContent, DocAccessible* aDoc, michael@0: const nsCString& aPlugId); michael@0: michael@0: virtual void Shutdown(); michael@0: michael@0: // nsIAccessible michael@0: NS_IMETHODIMP GetNativeInterface(void** aOutAccessible); michael@0: }; michael@0: michael@0: } // namespace a11y michael@0: } // namespace mozilla michael@0: michael@0: #endif