mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 634829 - Remove nsIAccessibleWin32Object interface, r=surkov
This commit is contained in:
parent
1898bff99a
commit
69b76a336f
@ -49,7 +49,6 @@ DEFFILE = $(win_srcdir)/AccessibleMarshal.def
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
XPIDLSRCS = \
|
||||
nsIAccessibleWin32Object.idl \
|
||||
nsIWinAccessNode.idl \
|
||||
$(NULL)
|
||||
|
||||
|
@ -1,46 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(ca7a3a93-822f-4cdf-8cb4-c52d16b9afc7)]
|
||||
interface nsIAccessibleWin32Object : nsISupports
|
||||
{
|
||||
/** handle to the external window implementing IAccessible */
|
||||
[noscript] readonly attribute voidPtr hwnd;
|
||||
};
|
@ -50,7 +50,6 @@
|
||||
|
||||
#include "nsIAccessibleEvent.h"
|
||||
#include "nsIAccessibleRelation.h"
|
||||
#include "nsIAccessibleWin32Object.h"
|
||||
|
||||
#include "Accessible2_i.c"
|
||||
#include "AccessibleStates.h"
|
||||
@ -1684,29 +1683,16 @@ nsAccessibleWrap::ConvertToIA2Attributes(nsIPersistentProperties *aAttributes,
|
||||
return *aIA2Attributes ? S_OK : E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
IDispatch *nsAccessibleWrap::NativeAccessible(nsIAccessible *aXPAccessible)
|
||||
IDispatch*
|
||||
nsAccessibleWrap::NativeAccessible(nsIAccessible* aAccessible)
|
||||
{
|
||||
if (!aXPAccessible) {
|
||||
NS_WARNING("Not passing in an aXPAccessible");
|
||||
if (!aAccessible) {
|
||||
NS_WARNING("Not passing in an aAccessible");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIAccessibleWin32Object> accObject(do_QueryInterface(aXPAccessible));
|
||||
if (accObject) {
|
||||
void* hwnd = nsnull;
|
||||
accObject->GetHwnd(&hwnd);
|
||||
if (hwnd) {
|
||||
IDispatch *retval = nsnull;
|
||||
::AccessibleObjectFromWindow(reinterpret_cast<HWND>(hwnd),
|
||||
OBJID_WINDOW, IID_IAccessible,
|
||||
(void **) &retval);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
IAccessible *msaaAccessible;
|
||||
aXPAccessible->GetNativeInterface((void**)&msaaAccessible);
|
||||
|
||||
IAccessible* msaaAccessible = nsnull;
|
||||
aAccessible->GetNativeInterface(reinterpret_cast<void**>(&msaaAccessible));
|
||||
return static_cast<IDispatch*>(msaaAccessible);
|
||||
}
|
||||
|
||||
|
@ -114,11 +114,16 @@ nsLeafAccessible(nsnull, nsnull)
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLWin32ObjectAccessible, nsAccessible, nsIAccessibleWin32Object)
|
||||
NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLWin32ObjectAccessible, nsAccessible)
|
||||
|
||||
NS_IMETHODIMP nsHTMLWin32ObjectAccessible::GetHwnd(void **aHwnd)
|
||||
NS_IMETHODIMP
|
||||
nsHTMLWin32ObjectAccessible::GetNativeInterface(void** aNativeAccessible)
|
||||
{
|
||||
*aHwnd = mHwnd;
|
||||
if (mHwnd) {
|
||||
::AccessibleObjectFromWindow(static_cast<HWND>(mHwnd),
|
||||
OBJID_WINDOW, IID_IAccessible,
|
||||
aNativeAccessible);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,6 @@
|
||||
#ifndef _nsHTMLWin32ObjectAccessible_H_
|
||||
#define _nsHTMLWin32ObjectAccessible_H_
|
||||
|
||||
#include "nsIAccessibleWin32Object.h"
|
||||
#include "nsBaseWidgetAccessible.h"
|
||||
|
||||
struct IAccessible;
|
||||
@ -82,8 +81,7 @@ protected:
|
||||
* object returned by us in Accessible::NewAccessible() that gets the IAccessible
|
||||
* from the windows system from the window handle.
|
||||
*/
|
||||
class nsHTMLWin32ObjectAccessible : public nsLeafAccessible,
|
||||
public nsIAccessibleWin32Object
|
||||
class nsHTMLWin32ObjectAccessible : public nsLeafAccessible
|
||||
{
|
||||
public:
|
||||
|
||||
@ -91,7 +89,8 @@ public:
|
||||
virtual ~nsHTMLWin32ObjectAccessible() {}
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIACCESSIBLEWIN32OBJECT
|
||||
|
||||
NS_IMETHOD GetNativeInterface(void** aNativeAccessible) MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
void* mHwnd;
|
||||
|
Loading…
Reference in New Issue
Block a user