|
Class: ScreenLock
Object
|
+--EventListener
|
+--ScreenLock
- Package:
- stx:libview2
- Category:
- Interface-Support
- Version:
- rev:
1.9
date: 2017/11/28 18:19:53
- user: cg
- file: ScreenLock.st directory: libview2
- module: stx stc-classLibrary: libview2
- Author:
- Stefan Vogel (stefan@nilpferd)
documentation to be added.
[instance variables:]
[class variables:]
instance creation
-
forDevice: aWorkstation
-
accessing
-
lockAfterSeconds
-
return the value of the instance variable 'lockAfterSeconds' (automatically generated)
-
lockAfterSeconds: something
-
set the value of the instance variable 'lockAfterSeconds' (automatically generated)
-
processor
-
return the value of the instance variable 'processor' (automatically generated)
-
processor: something
-
set the value of the instance variable 'processor' (automatically generated)
-
workstation
-
return the value of the instance variable 'workstation' (automatically generated)
-
workstation: something
-
set the value of the instance variable 'workstation' (automatically generated)
accessing-channels
-
lockChannel
-
-
lockChannel: something
-
-
lockChannelOut
-
-
lockChannelOut: something
-
set the value of the instance variable 'lockChannelOut' (automatically generated)
change & update
-
update: aspect with: param from: anObject
-
lockChannel is a value holder
events
-
buttonMotion: state x: x y: y view: aView
-
-
buttonMultiPress: button x: x y: y view: aView
-
-
buttonPress: button x: x y: y view: aView
-
-
buttonRelease: button x: x y: y view: aView
-
-
keyPress: key x: x y: y view: aView
-
-
keyRelease: key x: x y: y view: aView
-
-
mouseWheelMotion: state x: x y: y amount: amount deltaTime: dTime view: aView
-
lock interface
-
checkTime
-
-
lock
-
trigger locking of screen
-
unlisten
-
do not listen for events any longer.
This must be called when a screen lock is detached from a
screen.
-
unlock
-
trigger unlocking of screen
private
-
gotEventForView: v
-
got an event.
Reset the inactive timer.
If locked, eat all user events (for security)
-
initializeForDevice: aWorkstation
-
-
lockScreen
-
lock the screen
-
unlockScreen
-
don't try to restore views that have been closed while
being invisible
queries
-
isLocked
-
|screenLock|
screenLock := ScreenLock forDevice:Screen current.
screenLock lock.
Delay waitForSeconds:3.
screenLock unlock.
screenLock unlisten.
|
|screenLock|
screenLock := ScreenLock forDevice:Screen current.
Delay waitForSeconds:1.
screenLock checkTime.
Delay waitForSeconds:12.
screenLock checkTime.
Delay waitForSeconds:3.
screenLock unlock.
screenLock unlisten.
|
|screenLock channel running|
screenLock := ScreenLock forDevice:Screen current.
screenLock lockAfterSeconds:4.
[
channel := false asValue.
channel onChangeEvaluate:[
channel value ifTrue:[
self information:'Application is locked\\Hit ok to unlock' withCRs.
channel value:false.
].
].
screenLock lockChannel:channel.
[
Delay waitForSeconds:2.
screenLock checkTime.
] loop.
] valueNowOrOnUnwindDo:[
screenLock unlisten.
].
|
|