1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include
"nsISupports.idl"
9 * Represents a task which can be dispatched to a thread for execution.
12 [scriptable
, function
, uuid(4a2abaf0
-6886-11d3
-9382-00104ba0fd40
)]
13 interface nsIRunnable
: nsISupports
16 * The function implementing the task to be run.
21 [scriptable
, uuid(e75aa42a
-80a9
-11e6
-afb5
-e89d87348e2c
)]
22 interface nsIRunnablePriority
: nsISupports
24 const unsigned long PRIORITY_IDLE
= 0;
25 const unsigned long PRIORITY_DEFERRED_TIMERS
= 1;
26 // INPUT_LOW isn't supposed to be used directly.
27 // const unsigned long PRIORITY_INPUT_LOW = 2;
28 const unsigned long PRIORITY_NORMAL
= 3;
29 const unsigned long PRIORITY_MEDIUMHIGH
= 4;
30 const unsigned long PRIORITY_INPUT_HIGH
= 5;
31 const unsigned long PRIORITY_VSYNC
= 6;
32 // INPUT_HIGHEST is InputTaskManager's internal priority
33 //const unsigned long PRIORITY_INPUT_HIGHEST = 7;
34 const unsigned long PRIORITY_RENDER_BLOCKING
= 8;
35 const unsigned long PRIORITY_CONTROL
= 9;
37 readonly attribute
unsigned long priority
;
40 [builtinclass
, uuid(3114c36c
-a482
-4c6e
-9523
-1dcfc6f605b9
)]
41 interface nsIRunnableIPCMessageType
: nsISupports
43 readonly attribute
unsigned long type
;