accessible/src/windows/msaa/HTMLWin32ObjectAccessible.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/src/windows/msaa/HTMLWin32ObjectAccessible.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,67 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef mozilla_a11y_HTMLWin32ObjectAccessible_h_
    1.10 +#define mozilla_a11y_HTMLWin32ObjectAccessible_h_
    1.11 +
    1.12 +#include "BaseAccessibles.h"
    1.13 +
    1.14 +struct IAccessible;
    1.15 +
    1.16 +namespace mozilla {
    1.17 +namespace a11y {
    1.18 +
    1.19 +class HTMLWin32ObjectOwnerAccessible : public AccessibleWrap
    1.20 +{
    1.21 +public:
    1.22 +  // This will own the HTMLWin32ObjectAccessible. We create this where the
    1.23 +  // <object> or <embed> exists in the tree, so that get_accNextSibling() etc.
    1.24 +  // will still point to Gecko accessible sibling content. This is necessary
    1.25 +  // because the native plugin accessible doesn't know where it exists in the
    1.26 +  // Mozilla tree, and returns null for previous and next sibling. This would
    1.27 +  // have the effect of cutting off all content after the plugin.
    1.28 +  HTMLWin32ObjectOwnerAccessible(nsIContent* aContent,
    1.29 +                                   DocAccessible* aDoc, void* aHwnd);
    1.30 +  virtual ~HTMLWin32ObjectOwnerAccessible() {}
    1.31 +
    1.32 +  // Accessible
    1.33 +  virtual void Shutdown();
    1.34 +  virtual mozilla::a11y::role NativeRole();
    1.35 +  virtual bool NativelyUnavailable() const;
    1.36 +
    1.37 +protected:
    1.38 +
    1.39 +  // Accessible
    1.40 +  virtual void CacheChildren();
    1.41 +
    1.42 +  void* mHwnd;
    1.43 +  nsRefPtr<Accessible> mNativeAccessible;
    1.44 +};
    1.45 +
    1.46 +/**
    1.47 +  * This class is used only internally, we never! send out an IAccessible linked
    1.48 +  *   back to this object. This class is used to represent a plugin object when
    1.49 +  *   referenced as a child or sibling of another Accessible node. We need only
    1.50 +  *   a limited portion of the nsIAccessible interface implemented here. The
    1.51 +  *   in depth accessible information will be returned by the actual IAccessible
    1.52 +  *   object returned by us in Accessible::NewAccessible() that gets the IAccessible
    1.53 +  *   from the windows system from the window handle.
    1.54 +  */
    1.55 +class HTMLWin32ObjectAccessible : public DummyAccessible
    1.56 +{
    1.57 +public:
    1.58 +  HTMLWin32ObjectAccessible(void* aHwnd);
    1.59 +  virtual ~HTMLWin32ObjectAccessible() {}
    1.60 +
    1.61 +  NS_IMETHOD GetNativeInterface(void** aNativeAccessible) MOZ_OVERRIDE;
    1.62 +
    1.63 +protected:
    1.64 +  void* mHwnd;
    1.65 +};
    1.66 +
    1.67 +} // namespace a11y
    1.68 +} // namespace mozilla
    1.69 +
    1.70 +#endif

mercurial