2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 3; 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
|
|
|
|
|
|
|
#ifndef nsPIWindowRoot_h__
|
|
|
|
#define nsPIWindowRoot_h__
|
|
|
|
|
|
|
|
#include "nsISupports.h"
|
2013-01-29 05:44:01 -08:00
|
|
|
#include "mozilla/dom/EventTarget.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2010-02-20 08:07:03 -08:00
|
|
|
class nsPIDOMWindow;
|
|
|
|
class nsIControllers;
|
|
|
|
class nsIController;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#define NS_IWINDOWROOT_IID \
|
2014-12-09 07:48:27 -08:00
|
|
|
{ 0x728a2682, 0x55c0, 0x4860, \
|
|
|
|
{ 0x82, 0x6b, 0x0c, 0x30, 0x0a, 0xac, 0xaa, 0x60 } }
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-01-29 05:44:01 -08:00
|
|
|
class nsPIWindowRoot : public mozilla::dom::EventTarget
|
2011-06-23 19:17:58 -07:00
|
|
|
{
|
2007-03-22 10:30:00 -07:00
|
|
|
public:
|
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWINDOWROOT_IID)
|
|
|
|
|
2010-02-20 08:07:03 -08:00
|
|
|
virtual nsPIDOMWindow* GetWindow()=0;
|
2007-07-06 06:47:50 -07:00
|
|
|
|
2010-08-09 09:17:19 -07:00
|
|
|
// get and set the node that is the context of a popup menu
|
|
|
|
virtual nsIDOMNode* GetPopupNode() = 0;
|
2010-02-20 08:07:03 -08:00
|
|
|
virtual void SetPopupNode(nsIDOMNode* aNode) = 0;
|
|
|
|
|
|
|
|
virtual nsresult GetControllerForCommand(const char *aCommand,
|
|
|
|
nsIController** aResult) = 0;
|
|
|
|
virtual nsresult GetControllers(nsIControllers** aResult) = 0;
|
2010-02-20 09:05:20 -08:00
|
|
|
|
2014-12-09 07:48:27 -08:00
|
|
|
virtual void GetEnabledDisabledCommands(nsTArray<nsCString>& aEnabledCommands,
|
|
|
|
nsTArray<nsCString>& aDisabledCommands) = 0;
|
|
|
|
|
2013-04-05 17:44:15 -07:00
|
|
|
virtual void SetParentTarget(mozilla::dom::EventTarget* aTarget) = 0;
|
|
|
|
virtual mozilla::dom::EventTarget* GetParentTarget() = 0;
|
2013-05-30 14:46:39 -07:00
|
|
|
virtual nsIDOMWindow* GetOwnerGlobal() MOZ_OVERRIDE = 0;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
NS_DEFINE_STATIC_IID_ACCESSOR(nsPIWindowRoot, NS_IWINDOWROOT_IID)
|
|
|
|
|
|
|
|
#endif // nsPIWindowRoot_h__
|