1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/base/nsIReflowCallback.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,33 @@ 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 +#ifndef nsIReflowCallback_h___ 1.9 +#define nsIReflowCallback_h___ 1.10 + 1.11 +/** 1.12 + * Reflow callback interface. 1.13 + * These are not refcounted. Objects must be removed from the presshell 1.14 + * callback list before they die. 1.15 + * Protocol: objects will either get a ReflowFinished() call when a reflow 1.16 + * has finished or a ReflowCallbackCanceled() call if the shell is destroyed, 1.17 + * whichever happens first. If the object is explicitly removed from the shell 1.18 + * (using nsIPresShell::CancelReflowCallback()) before that occurs then neither 1.19 + * of the callback methods are called. 1.20 + */ 1.21 +class nsIReflowCallback { 1.22 +public: 1.23 + /** 1.24 + * The presshell calls this when reflow has finished. Return true if 1.25 + * you need a Flush_Layout to happen after this. 1.26 + */ 1.27 + virtual bool ReflowFinished() = 0; 1.28 + /** 1.29 + * The presshell calls this on outstanding callback requests in its 1.30 + * Destroy() method. The shell removes the request after calling 1.31 + * ReflowCallbackCanceled(). 1.32 + */ 1.33 + virtual void ReflowCallbackCanceled() = 0; 1.34 +}; 1.35 + 1.36 +#endif /* nsIReflowCallback_h___ */