1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include
"nsISupports.idl"
11 template
<class T
> struct already_AddRefed
;
14 * After the default timezone changes, this topic is notified. Some systems may
15 * not support monitoring timezone.
17 #define DEFAULT_TIMEZONE_CHANGED_OBSERVER_TOPIC
"default-timezone-changed"
21 * Interface for the native event system layer. This interface is designed
22 * to be used on the main application thread only.
24 [uuid(7cd5c71d
-223b
-4afe
-931d
-5eedb1f2b01f
)]
25 interface nsIAppShell
: nsISupports
28 * Enter an event loop. Don't leave until exit() is called.
33 * Exit the handle event loop
38 * Ask the native event queue notification mechanism to favor Gecko tasks
39 * (instead of native tasks) for a short while. (Content processes always
42 void geckoTaskBurst
();
45 * Suspends the use of additional platform-specific methods (besides the
46 * nsIAppShell->run() event loop) to run Gecko events on the main
47 * application thread. Under some circumstances these "additional methods"
48 * can cause Gecko event handlers to be re-entered, sometimes leading to
49 * hangs and crashes. Calls to suspendNative() and resumeNative() may be
50 * nested. On some platforms (those that don't use any "additional
51 * methods") this will be a no-op. Does not (in itself) stop Gecko events
52 * from being processed on the main application thread. But if the
53 * nsIAppShell->run() event loop is blocked when this call is made, Gecko
54 * events will stop being processed until resumeNative() is called (even
55 * if a plugin or library is temporarily processing events on a nested
61 * Resumes the use of additional platform-specific methods to run Gecko
62 * events on the main application thread. Calls to suspendNative() and
63 * resumeNative() may be nested. On some platforms this will be a no-op.
68 * The current event loop nesting level.
70 readonly attribute
unsigned long eventloopNestingLevel
;