Bug 1837494 [wpt PR 40457] - Ignore urllib3's warnings when run on LibreSSL, a=testonly
[gecko.git] / widget / nsIAppShell.idl
blobf2ea8ab1665f1117438465c3823edc56f272b152
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"
9 interface nsIRunnable;
10 %{ C++
11 template <class T> struct already_AddRefed;
13 /**
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"
20 /**
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
27 /**
28 * Enter an event loop. Don't leave until exit() is called.
30 void run();
32 /**
33 * Exit the handle event loop
35 void exit();
37 /**
38 * Ask the native event queue notification mechanism to favor Gecko tasks
39 * (instead of native tasks) for a short while. (Content processes always
40 * favor Gecko tasks.)
42 void geckoTaskBurst();
44 /**
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
56 * event loop).
58 void suspendNative();
60 /**
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.
65 void resumeNative();
67 /**
68 * The current event loop nesting level.
70 readonly attribute unsigned long eventloopNestingLevel;