Bug 475986. Make text-align:start work on <html:th> correctly. r+sr=dbaron
[mozilla-central.git] / widget / public / nsIAppShell.idl
blobd022783140737c21ea2d86c2bfa9426dcf3550d0
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
16 * The Original Code is the Mozilla browser.
18 * The Initial Developer of the Original Code is
19 * Netscape Communications Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 1999
21 * the Initial Developer. All Rights Reserved.
23 * Contributor(s):
24 * Stuart Parmenter <pavlov@netscape.com>
26 * Alternatively, the contents of this file may be used under the terms of
27 * either the GNU General Public License Version 2 or later (the "GPL"), or
28 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 * in which case the provisions of the GPL or the LGPL are applicable instead
30 * of those above. If you wish to allow use of your version of this file only
31 * under the terms of either the GPL or the LGPL, and not to allow others to
32 * use your version of this file under the terms of the MPL, indicate your
33 * decision by deleting the provisions above and replace them with the notice
34 * and other provisions required by the GPL or the LGPL. If you do not delete
35 * the provisions above, a recipient may use your version of this file under
36 * the terms of any one of the MPL, the GPL or the LGPL.
38 * ***** END LICENSE BLOCK ***** */
40 #include "nsISupports.idl"
42 /**
43 * Interface for the native event system layer. This interface is designed
44 * to be used on the main application thread only.
46 [uuid(501403e9-a091-4780-ba55-cfd1e21287a1)]
47 interface nsIAppShell : nsISupports
49 /**
50 * Enter an event loop. Don't leave until exit() is called.
52 void run();
54 /**
55 * Exit the handle event loop
57 void exit();
59 /**
60 * Give hint to native event queue notification mechanism. If the native
61 * platform needs to tradeoff performance vs. native event starvation this
62 * hint tells the native dispatch code which to favor. The default is to
63 * prevent native event starvation.
65 * Calls to this function may be nested. When the number of calls that pass
66 * PR_TRUE is subtracted from the number of calls that pass PR_FALSE is
67 * greater than 0, performance is given precedence over preventing event
68 * starvation.
70 * The starvationDelay arg is only used when favorPerfOverStarvation is
71 * PR_FALSE. It is the amount of time in milliseconds to wait before the
72 * PR_FALSE actually takes effect.
74 void favorPerformanceHint(in boolean favorPerfOverStarvation,
75 in unsigned long starvationDelay);
77 /**
78 * Suspends the use of additional platform-specific methods (besides the
79 * nsIAppShell->run() event loop) to run Gecko events on the main
80 * application thread. Under some circumstances these "additional methods"
81 * can cause Gecko event handlers to be re-entered, sometimes leading to
82 * hangs and crashes. Calls to suspendNative() and resumeNative() may be
83 * nested. On some platforms (those that don't use any "additional
84 * methods") this will be a no-op. Does not (in itself) stop Gecko events
85 * from being processed on the main application thread. But if the
86 * nsIAppShell->run() event loop is blocked when this call is made, Gecko
87 * events will stop being processed until resumeNative() is called (even
88 * if a plugin or library is temporarily processing events on a nested
89 * event loop).
91 void suspendNative();
93 /**
94 * Resumes the use of additional platform-specific methods to run Gecko
95 * events on the main application thread. Calls to suspendNative() and
96 * resumeNative() may be nested. On some platforms this will be a no-op.
98 void resumeNative();
101 * The current event loop nesting level.
103 readonly attribute unsigned long eventloopNestingLevel;