Window Utility constants, functions and objects that are common to all windows. More...
Go to the source code of this file.
Functions | |
| Components utils | import ("resource://app/jsmodules/StringUtils.jsm") |
| if (typeof(Cc)=="undefined") window.Cc | |
| function | sbScreenRect (inWidth, inHeight, inX, inY) |
| function | getCurMaxScreenRect () |
| function | sbMacWindowZoomController () |
| function | SB_LOG (scopeStr, msg) |
| function | getPref (aFunc, aPreference, aDefaultValue) |
| Get a preference. Adapted from nsUpdateService.js.in. Need to replace with dataremotes. More... | |
| function | setPref (aFunc, aPreference, aValue) |
| Set a preference. More... | |
| function | onMinimize () |
| onMinimize handler, minimizes the window in the current context. More... | |
| function | onMaximize (aMaximize) |
| onMaximize handler, maximizes the window in the current context. More... | |
| function | isMaximized () |
| Is the window in the current context maximized? More... | |
| function | isMinimized () |
| Is the window in the current context minimized? More... | |
| function | onExit (skipSave) |
| onExit handler, saves window size and position before closing the window. More... | |
| function | onHide () |
| onHide handler, handles hiding the window in the current context. More... | |
| function | onWindowResizeComplete () |
| Handles completion of resizing of the window in the current context. More... | |
| function | onWindowDragComplete () |
| Handles completion of dragging of the window in the current context. More... | |
| function | windowFocus () |
| Focus the window in the current context. More... | |
| function | delayedActivate () |
| Delayed focus of the window in the current context. More... | |
| function | windowPlacementSanityChecks () |
| See if a window needs to be somehow "fixed" after it is opened. More... | |
Variables | |
| var | CORE_WINDOWTYPE = "Songbird:Core" |
| The Songbird Core Window Type. More... | |
| var | STATE_MAXIMIZED = Ci.nsIDOMChromeWindow.STATE_MAXIMIZED |
| Maximized State value. More... | |
| var | STATE_MINIMIZED = Ci.nsIDOMChromeWindow.STATE_MINIMIZED |
| Minimized State value. More... | |
| var | gMM |
| var | gPrompt |
| var | gPrefs |
| var | gConsole |
| var | gTypeSniffer |
| sbMacWindowZoomController | prototype |
| var | macZoomWindowController = null |
| var | theSongbirdStrings = document.getElementById( "songbird_strings" ) |
| var | PREFS_SERVICE_CONTRACTID = "@mozilla.org/preferences-service;1" |
| var | nsIPrefBranch2 = Components.interfaces.nsIPrefBranch2 |
Window Utility constants, functions and objects that are common to all windows.
Note: This file is dependent on chrome://global/content/globalOverlay.js
Definition in file windowUtils.js.
| function delayedActivate | ( | ) |
Delayed focus of the window in the current context.
Definition at line 442 of file windowUtils.js.
| function getCurMaxScreenRect | ( | ) |
Get the current maximum available screen rect based on which screen the window is currently on.
Definition at line 92 of file windowUtils.js.
| function getPref | ( | aFunc, | |
| aPreference, | |||
| aDefaultValue | |||
| ) |
Get a preference. Adapted from nsUpdateService.js.in. Need to replace with dataremotes.
| aFunc | Function to used to retrieve the pref. |
| aPreference | The name of the pref to retrieve. |
| aDefaultValue | The default value to return if it is impossible to read the pref or it does not exist. |
Definition at line 262 of file windowUtils.js.
| if | ( | typeof(Cc) | = ="undefined" | ) |
Debug Wrapper. Subclasses and replaces DateRemote to keep track of how many dataremotes are alive, and for which keys.
Definition at line 524 of file sbDataRemote.js.
| Components utils import | ( | "resource://app/jsmodules/StringUtils.jsm" | ) |
| function isMaximized | ( | ) |
Is the window in the current context maximized?
Definition at line 329 of file windowUtils.js.
| function isMinimized | ( | ) |
Is the window in the current context minimized?
Definition at line 338 of file windowUtils.js.
| function onExit | ( | skipSave | ) |
onExit handler, saves window size and position before closing the window.
Definition at line 355 of file windowUtils.js.
| function onHide | ( | ) |
onHide handler, handles hiding the window in the current context.
Definition at line 364 of file windowUtils.js.
| function onMaximize | ( | aMaximize | ) |
onMaximize handler, maximizes the window in the current context.
Definition at line 299 of file windowUtils.js.
| function onMinimize | ( | ) |
onMinimize handler, minimizes the window in the current context.
Definition at line 290 of file windowUtils.js.
| function onWindowDragComplete | ( | ) |
Handles completion of dragging of the window in the current context.
Definition at line 414 of file windowUtils.js.
| function onWindowResizeComplete | ( | ) |
Handles completion of resizing of the window in the current context.
Definition at line 404 of file windowUtils.js.
| function SB_LOG | ( | scopeStr, | |
| msg | |||
| ) |
| function sbMacWindowZoomController | ( | ) |
Since the Mac doesn't technically "maximize" - it "zooms", this controller recreates that functionality for mac windows.
KREEGER: This functionality is also affected by mozbug 407405 and will make zoom to the secondary monitor work properly once that bug is fixed.
Definition at line 116 of file windowUtils.js.
| function sbScreenRect | ( | inWidth, | |
| inHeight, | |||
| inX, | |||
| inY | |||
| ) |
Simple JS container that holds rectangle information for (x, y) and (width, height).
Definition at line 79 of file windowUtils.js.
| function setPref | ( | aFunc, | |
| aPreference, | |||
| aValue | |||
| ) |
Set a preference.
| aFunc | Function to used to set the pref. |
| aPreference | The name of the pref to set. |
| aValue | The value of the pref. |
Definition at line 280 of file windowUtils.js.
| function windowFocus | ( | ) |
Focus the window in the current context.
Definition at line 424 of file windowUtils.js.
| function windowPlacementSanityChecks | ( | ) |
See if a window needs to be somehow "fixed" after it is opened.
In addition to loading the size and position (if stored), we also perform some sanity checks. The window must be:
Get a style property from an element in the window in the current context.
| el | The element. |
| styleProp | The style property. |
| defaultValue | [optional] the default value to return; 0 if not supplied |
Definition at line 457 of file windowUtils.js.
| var CORE_WINDOWTYPE = "Songbird:Core" |
The Songbird Core Window Type.
Definition at line 50 of file windowUtils.js.
| var gConsole |
Definition at line 68 of file windowUtils.js.
| var gMM |
Definition at line 62 of file windowUtils.js.
| var gPrefs |
Definition at line 66 of file windowUtils.js.
| var gPrompt |
Definition at line 64 of file windowUtils.js.
| var gTypeSniffer |
Definition at line 71 of file windowUtils.js.
| var macZoomWindowController = null |
Definition at line 235 of file windowUtils.js.
| var nsIPrefBranch2 = Components.interfaces.nsIPrefBranch2 |
Definition at line 253 of file windowUtils.js.
| var PREFS_SERVICE_CONTRACTID = "@mozilla.org/preferences-service;1" |
Definition at line 252 of file windowUtils.js.
| sbMacWindowZoomController prototype |
Definition at line 120 of file windowUtils.js.
| var STATE_MAXIMIZED = Ci.nsIDOMChromeWindow.STATE_MAXIMIZED |
Maximized State value.
Definition at line 55 of file windowUtils.js.
| var STATE_MINIMIZED = Ci.nsIDOMChromeWindow.STATE_MINIMIZED |
Minimized State value.
Definition at line 60 of file windowUtils.js.
| var theSongbirdStrings = document.getElementById( "songbird_strings" ) |
Definition at line 241 of file windowUtils.js.