Options
All
  • Public
  • Public/Protected
  • All
Menu

External module scripts/bg/ss_controller

Controller for the screensaver

Index

Events

onChromeMessage

  • onChromeMessage(request: IMsgType, sender: MessageSender, response: ChromeMsg.ResponseCB): boolean

onIdleStateChanged

  • onIdleStateChanged(state: string): Promise<void>
  • Fired when the system changes to an active, idle or locked state. The event fires with "locked" if the screen is locked or the [built in] screensaver activates, "idle" if the system is unlocked and the user has not generated any input for a specified number of seconds, and "active" when the user generates input on an idle system.

    link

    https://developer.chrome.com/extensions/idle#event-onStateChanged

    Parameters

    • state: string

      current state of computer

    Returns Promise<void>

Variables

Const ERR_SHOW

ERR_SHOW: string = ChromeLocale.localize('err_show_ss')

Error showing Screensaver

Const SS_URL

SS_URL: "/html/screensaver.html" = "/html/screensaver.html"

Screensaver URL

Const chromep

chromep: ChromePromise = new ChromePromise()

Functions

close

  • close(): void

display

  • display(single: boolean): Promise<void>
  • Display the screensaver(s)

    remarks

    Important: Always request screensaver through this call

    Parameters

    • single: boolean

      if true, only show on main display

    Returns Promise<void>

hasFullscreen

  • hasFullscreen(disp?: chrome.system.display.DisplayInfo): Promise<boolean>
  • Determine if there is a full screen chrome window running on a display

    Parameters

    • Optional disp: chrome.system.display.DisplayInfo

      an optional connected display, otherwise the main display

    Returns Promise<boolean>

    true if there is a full screen window on the display

isActive

  • isActive(): boolean

isShowing

  • isShowing(): Promise<boolean>

open

  • open(disp?: chrome.system.display.DisplayInfo): Promise<void>
  • Open a screensaver window on the given display

    Parameters

    • Optional disp: chrome.system.display.DisplayInfo

      an optional connected display, otherwise the main display

    Returns Promise<void>

openOnAllDisplays

  • openOnAllDisplays(): Promise<void>

Generated using TypeDoc