1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/src/atk/AtkSocketAccessible.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,57 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* vim: set ts=2 et sw=2 tw=80: */ 1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#ifndef _AtkSocketAccessible_H_ 1.11 +#define _AtkSocketAccessible_H_ 1.12 + 1.13 +#include "AccessibleWrap.h" 1.14 + 1.15 +// This file gets included by nsAccessibilityService.cpp, which can't include 1.16 +// atk.h (or glib.h), so we can't rely on it being included. 1.17 +#ifdef __ATK_H__ 1.18 +extern "C" typedef void (*AtkSocketEmbedType) (AtkSocket*, gchar*); 1.19 +#else 1.20 +extern "C" typedef void (*AtkSocketEmbedType) (void*, void*); 1.21 +#endif 1.22 + 1.23 +namespace mozilla { 1.24 +namespace a11y { 1.25 + 1.26 +/** 1.27 + * Provides a AccessibleWrap wrapper around AtkSocket for out-of-process 1.28 + * accessibles. 1.29 + */ 1.30 +class AtkSocketAccessible : public AccessibleWrap 1.31 +{ 1.32 +public: 1.33 + 1.34 + // Soft references to AtkSocket 1.35 + static AtkSocketEmbedType g_atk_socket_embed; 1.36 +#ifdef __ATK_H__ 1.37 + static GType g_atk_socket_type; 1.38 +#endif 1.39 + static const char* sATKSocketEmbedSymbol; 1.40 + static const char* sATKSocketGetTypeSymbol; 1.41 + 1.42 + /* 1.43 + * True if the current Atk version supports AtkSocket and it was correctly 1.44 + * loaded. 1.45 + */ 1.46 + static bool gCanEmbed; 1.47 + 1.48 + AtkSocketAccessible(nsIContent* aContent, DocAccessible* aDoc, 1.49 + const nsCString& aPlugId); 1.50 + 1.51 + virtual void Shutdown(); 1.52 + 1.53 + // nsIAccessible 1.54 + NS_IMETHODIMP GetNativeInterface(void** aOutAccessible); 1.55 +}; 1.56 + 1.57 +} // namespace a11y 1.58 +} // namespace mozilla 1.59 + 1.60 +#endif