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