summaryrefslogtreecommitdiff
path: root/apps/mail/components/activity/nsIActivityManagerUI.idl
blob: 15e37b2cfe91accaf047575b3a075ba4e6e5f8f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"

interface nsIInterfaceRequestor;

[scriptable, uuid(ae7853b0-2e1f-4dc1-89cd-f8bbfb745d4d)]
interface nsIActivityManagerUI : nsISupports {
  /**
   * The reason that should be passed when the user requests to show the
   * activity manager's UI.
   */
  const short REASON_USER_INTERACTED = 0;

  /**
   * The reason that should be passed to the show method when we are displaying
   * the UI because a new activity is being added to it.
   */
  const short REASON_NEW_ACTIVITY = 1;

 /**
  * Shows the Activity Manager's UI to the user.
  *
  * @param [optional] aWindowContext
  *        The parent window context to show the UI.
  * @param [optional] aID
  *        The id of the activity to be preselected upon opening.
  * @param [optional] aReason
  *        The reason to show the activity manager's UI.  This defaults to
  *        REASON_USER_INTERACTED, and should be one of the previously listed
  *        constants.
  */
  void show([optional] in nsIInterfaceRequestor aWindowContext,
            [optional] in unsigned long aID,
            [optional] in short aReason);

 /**
  * Indicates if the UI is visible or not.
  */
  readonly attribute boolean visible;

 /**
  * Brings attention to the UI if it is already visible
  *
  * @throws NS_ERROR_UNEXPECTED if the UI is not visible.
  */
  void getAttention();
};