michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef __inLayoutUtils_h__ michael@0: #define __inLayoutUtils_h__ michael@0: michael@0: class nsIDocument; michael@0: class nsIDOMDocument; michael@0: class nsIDOMElement; michael@0: class nsIDOMNode; michael@0: class nsIDOMWindow; michael@0: class nsIFrame; michael@0: class nsIPresShell; michael@0: class nsISupports; michael@0: michael@0: namespace mozilla { michael@0: class EventStateManager; michael@0: } michael@0: michael@0: class inLayoutUtils michael@0: { michael@0: public: michael@0: static nsIDOMWindow* GetWindowFor(nsIDOMNode* aNode); michael@0: static nsIDOMWindow* GetWindowFor(nsIDOMDocument* aDoc); michael@0: static nsIPresShell* GetPresShellFor(nsISupports* aThing); michael@0: static nsIFrame* GetFrameFor(nsIDOMElement* aElement); michael@0: static mozilla::EventStateManager* michael@0: GetEventStateManagerFor(nsIDOMElement *aElement); michael@0: static nsIDOMDocument* GetSubDocumentFor(nsIDOMNode* aNode); michael@0: static nsIDOMNode* GetContainerFor(const nsIDocument& aDoc); michael@0: }; michael@0: michael@0: #endif // __inLayoutUtils_h__