Bug 1073336 part 12 - Add AnimationPlayer::GetCollection(); r=dbaron
[gecko.git] / widget / nsIWinMetroUtils.idl
blob4cf57e288eacca52232e18b8ebc2c707527e394a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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"
8 /**
9 * Integration with the "Metro"/"Modern" UI environment in Windows 8.
11 * Note: browser/metro/base/content/browser.js contains a stub
12 * implementation of this interface for non-Windows systems, for testing and
13 * development purposes only.
15 [scriptable, uuid(319faae0-82ca-4c2f-8a24-2b2445e5a72a)]
16 interface nsIWinMetroUtils : nsISupports
18 /**
19 * Determine if the current device has the hardware capabilities to run
20 * in metro mode.
22 readonly attribute boolean supported;
24 /**
25 * Determine if the current browser is running in the metro immersive
26 * environment.
28 readonly attribute boolean immersive;
30 /**
31 * Determine the activation URI
33 readonly attribute AString activationURI;
35 /**
36 * Determine the previous execution state. The possible values of this
37 * attribute are exactly those values in the
38 * Windows::ApplicationModel::Activation enumeration.
40 readonly attribute long previousExecutionState;
42 /**
43 * Helper for our restart logic up in the about flyout. We set this
44 * right before we restart for an update so that MetroAppShell can
45 * communicate this to the ceh.
47 attribute boolean updatePending;
50 * Determine if metro firefox is running in the foreground.
52 readonly attribute boolean foreground;
54 /**
55 * Show the settings flyout
57 void showSettingsFlyout();
59 /**
60 * Launches the specified application with the specified arguments and
61 * switches to Desktop mode if in metro mode.
63 void launchInDesktop(in AString aPath, in AString aArguments);
65 /**
66 * Displays a native Windows 8 toast.
68 * @param aAppId Application ID for current application.
69 * If using Metro mode, it can be null string.
71 void showNativeToast(in AString aTitle, in AString aMessage,
72 in AString anImage, in AString aCookie,
73 [optional] in AString aAppId);
75 /**
76 * Secondary tiles are a Windows 8 specific feature for pinning new tiles
77 * to the start screen. Tiles can later be activated whether the browser is
78 * already opened or not.
81 /**
82 * Pins a new tile to the Windows 8 start screen.
84 * @param aTileID An ID which can later be used to remove the tile
85 * ID must only contain valid filesystem characters
86 * @param aShortName A short name for the tile
87 * @param aDiplayName The name that will be displayed on the tile
88 * @param aActivationArgs The arguments to pass to the browser upon
89 * activation of the tile
90 * @param aTileImage An image for the normal tile view
91 * @param aSmallTileImage An image for the small tile view
93 void pinTileAsync(in AString aTileID,
94 in AString aShortName,
95 in AString aDisplayName,
96 in AString aActivationArgs,
97 in AString aTileImage,
98 in AString aSmallTileImage);
101 * Unpins a tile from the Windows 8 start screen.
103 * @param aTileID An existing ID which was previously pinned
104 * ID must only contain valid filesystem characters
106 void unpinTileAsync(in AString aTileID);
109 * Determines if a tile is pinned to the Windows 8 start screen.
111 * @param aTileID An ID which may have been pinned with pinTileAsync
112 * ID must only contain valid filesystem characters
113 * @return true if the tile is pinned
115 bool isTilePinned(in AString aTileID);
118 * Soft keyboard attributes. Used in unison with shown/hidden observer
119 * events sent via FrameworkView.
121 * keyboardVisible - returns true if the soft keyboard is currently
122 * displayed, false otherwise.
123 * keyboardX, keyboardY, keyboardWidth, keyboardHeight - occlude rect
124 * of the keyboard when displayed in device independent pixels.
126 readonly attribute boolean keyboardVisible;
127 readonly attribute unsigned long keyboardX;
128 readonly attribute unsigned long keyboardY;
129 readonly attribute unsigned long keyboardWidth;
130 readonly attribute unsigned long keyboardHeight;
133 * Settings panel links. addSettingsPanelEntry adds an entry to
134 * the settings flyout panel that the user can invoke.
136 * @param aChromePanelId panel id invoked via nsIBrowserDOMWindow's
137 * ShowPanel api. Example: 'prefs-container'
138 * @return a unique identifier that will be passed as "data" in the
139 * "metro-settings-entry-selected" notification when the entry is clicked
141 unsigned long addSettingsPanelEntry(in AString aLabel);
144 * Change the value of the "switch primary and secondary buttons" preference.
145 * See the Windows SwapMouseButton API docs for details.
146 * Included here for use in automated tests (see bug 839460).
148 * @param aSwap true to enable the preference, false to disable it.
149 * @return original value of the preference.
151 bool swapMouseButton(in bool aSwap);