2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-10-12 23:34:21 -07:00
|
|
|
#ifndef mozilla_a11y_HTMLWin32ObjectAccessible_h_
|
|
|
|
#define mozilla_a11y_HTMLWin32ObjectAccessible_h_
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-06-04 05:32:29 -07:00
|
|
|
#include "BaseAccessibles.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
struct IAccessible;
|
|
|
|
|
2012-10-12 23:34:21 -07:00
|
|
|
namespace mozilla {
|
|
|
|
namespace a11y {
|
|
|
|
|
|
|
|
class HTMLWin32ObjectOwnerAccessible : public AccessibleWrap
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
2012-10-12 23:34:21 -07:00
|
|
|
// This will own the HTMLWin32ObjectAccessible. We create this where the
|
2007-03-22 10:30:00 -07:00
|
|
|
// <object> or <embed> exists in the tree, so that get_accNextSibling() etc.
|
|
|
|
// will still point to Gecko accessible sibling content. This is necessary
|
|
|
|
// because the native plugin accessible doesn't know where it exists in the
|
|
|
|
// Mozilla tree, and returns null for previous and next sibling. This would
|
|
|
|
// have the effect of cutting off all content after the plugin.
|
2012-10-12 23:34:21 -07:00
|
|
|
HTMLWin32ObjectOwnerAccessible(nsIContent* aContent,
|
2012-05-27 02:01:40 -07:00
|
|
|
DocAccessible* aDoc, void* aHwnd);
|
2012-10-12 23:34:21 -07:00
|
|
|
virtual ~HTMLWin32ObjectOwnerAccessible() {}
|
2008-10-31 20:58:07 -07:00
|
|
|
|
2012-05-28 18:18:45 -07:00
|
|
|
// Accessible
|
2013-10-28 20:30:55 -07:00
|
|
|
virtual void Shutdown();
|
2012-01-11 19:07:35 -08:00
|
|
|
virtual mozilla::a11y::role NativeRole();
|
2012-06-03 22:41:06 -07:00
|
|
|
virtual bool NativelyUnavailable() const;
|
2009-10-14 20:53:08 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
protected:
|
2009-12-10 11:12:19 -08:00
|
|
|
|
2012-05-28 18:18:45 -07:00
|
|
|
// Accessible
|
2009-12-10 11:12:19 -08:00
|
|
|
virtual void CacheChildren();
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
void* mHwnd;
|
2012-05-28 18:18:45 -07:00
|
|
|
nsRefPtr<Accessible> mNativeAccessible;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This class is used only internally, we never! send out an IAccessible linked
|
|
|
|
* back to this object. This class is used to represent a plugin object when
|
2012-05-28 18:18:45 -07:00
|
|
|
* referenced as a child or sibling of another Accessible node. We need only
|
2007-03-22 10:30:00 -07:00
|
|
|
* a limited portion of the nsIAccessible interface implemented here. The
|
|
|
|
* in depth accessible information will be returned by the actual IAccessible
|
|
|
|
* object returned by us in Accessible::NewAccessible() that gets the IAccessible
|
|
|
|
* from the windows system from the window handle.
|
|
|
|
*/
|
2012-10-12 23:34:21 -07:00
|
|
|
class HTMLWin32ObjectAccessible : public DummyAccessible
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
2012-10-12 23:34:21 -07:00
|
|
|
HTMLWin32ObjectAccessible(void* aHwnd);
|
|
|
|
virtual ~HTMLWin32ObjectAccessible() {}
|
2012-02-10 23:45:10 -08:00
|
|
|
|
|
|
|
NS_IMETHOD GetNativeInterface(void** aNativeAccessible) MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void* mHwnd;
|
|
|
|
};
|
|
|
|
|
2012-10-12 23:34:21 -07:00
|
|
|
} // namespace a11y
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|