Liking cljdoc? Tell your friends :D

chromex.app.idle

clj

Use the chrome.idle API to detect when the machine's idle state changes.

Use the chrome.idle API to detect when the machine's idle state changes.

* available since Chrome 36
* https://developer.chrome.com/apps/idle
raw docstring

api-tableclj

source

gen-callclj

source

gen-wrapclj/smacro

(gen-wrap kind item-id config & args)
source

get-auto-lock-delayclj/smacro

(get-auto-lock-delay)

Gets the time, in seconds, it takes until the screen is locked automatically while idle. Returns a zero duration if the screen is never locked automatically. Currently supported on Chrome OS only.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [delay] where:

|delay| - Time, in seconds, until the screen is locked automatically while idle. This is zero if the screen never locks automatically.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/idle#method-getAutoLockDelay.

Gets the time, in seconds, it takes until the screen is locked automatically while idle. Returns a zero duration if the
screen is never locked automatically. Currently supported on Chrome OS only.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [delay] where:

  |delay| - Time, in seconds, until the screen is locked automatically while idle. This is zero if the screen never locks
            automatically.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/idle#method-getAutoLockDelay.
sourceraw docstring

get-auto-lock-delay*cljs

(get-auto-lock-delay* config)
source

on-state-changed*cljs

(on-state-changed* config channel & args)
source

query-stateclj/smacro

(query-state detection-interval-in-seconds)

Returns 'locked' if the system is locked, 'idle' if the user has not generated any input for a specified number of seconds, or 'active' otherwise.

|detection-interval-in-seconds| - The system is considered idle if detectionIntervalInSeconds seconds have elapsed since the last user input detected.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [new-state] where:

|new-state| - https://developer.chrome.com/apps/idle#property-callback-newState.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/idle#method-queryState.

Returns 'locked' if the system is locked, 'idle' if the user has not generated any input for a specified number of seconds,
or 'active' otherwise.

  |detection-interval-in-seconds| - The system is considered idle if detectionIntervalInSeconds seconds have elapsed
                                    since the last user input detected.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [new-state] where:

  |new-state| - https://developer.chrome.com/apps/idle#property-callback-newState.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/idle#method-queryState.
sourceraw docstring

query-state*cljs

(query-state* config detection-interval-in-seconds)
source

set-detection-intervalclj/smacro

(set-detection-interval interval-in-seconds)

Sets the interval, in seconds, used to determine when the system is in an idle state for onStateChanged events. The default interval is 60 seconds.

|interval-in-seconds| - Threshold, in seconds, used to determine when the system is in an idle state.

https://developer.chrome.com/apps/idle#method-setDetectionInterval.

Sets the interval, in seconds, used to determine when the system is in an idle state for onStateChanged events. The default
interval is 60 seconds.

  |interval-in-seconds| - Threshold, in seconds, used to determine when the system is in an idle state.

https://developer.chrome.com/apps/idle#method-setDetectionInterval.
sourceraw docstring

set-detection-interval*cljs

(set-detection-interval* config interval-in-seconds)
source

tap-all-eventsclj/smacro

(tap-all-events chan)

Taps all valid non-deprecated events in chromex.app.idle namespace.

Taps all valid non-deprecated events in chromex.app.idle namespace.
sourceraw docstring

tap-on-state-changed-eventsclj/smacro

(tap-on-state-changed-events channel & args)

Fired when the system changes to an active, idle or locked state. The event fires with 'locked' if the screen is locked or the 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.

Events will be put on the |channel| with signature [::on-state-changed [new-state]] where:

|new-state| - https://developer.chrome.com/apps/idle#property-onStateChanged-newState.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

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

Fired when the system changes to an active, idle or locked state. The event fires with 'locked' if the screen is locked or
the 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.

Events will be put on the |channel| with signature [::on-state-changed [new-state]] where:

  |new-state| - https://developer.chrome.com/apps/idle#property-onStateChanged-newState.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/apps/idle#event-onStateChanged.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close