michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 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: #ifndef nsIReflowCallback_h___ michael@0: #define nsIReflowCallback_h___ michael@0: michael@0: /** michael@0: * Reflow callback interface. michael@0: * These are not refcounted. Objects must be removed from the presshell michael@0: * callback list before they die. michael@0: * Protocol: objects will either get a ReflowFinished() call when a reflow michael@0: * has finished or a ReflowCallbackCanceled() call if the shell is destroyed, michael@0: * whichever happens first. If the object is explicitly removed from the shell michael@0: * (using nsIPresShell::CancelReflowCallback()) before that occurs then neither michael@0: * of the callback methods are called. michael@0: */ michael@0: class nsIReflowCallback { michael@0: public: michael@0: /** michael@0: * The presshell calls this when reflow has finished. Return true if michael@0: * you need a Flush_Layout to happen after this. michael@0: */ michael@0: virtual bool ReflowFinished() = 0; michael@0: /** michael@0: * The presshell calls this on outstanding callback requests in its michael@0: * Destroy() method. The shell removes the request after calling michael@0: * ReflowCallbackCanceled(). michael@0: */ michael@0: virtual void ReflowCallbackCanceled() = 0; michael@0: }; michael@0: michael@0: #endif /* nsIReflowCallback_h___ */