eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ScreenLock':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: ScreenLock


Inheritance:

   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)

Description:


documentation to be added.



[instance variables:]

[class variables:]


Related information:



Class protocol:

instance creation
o  forDevice: aWorkstation


Instance protocol:

accessing
o  lockAfterSeconds
return the value of the instance variable 'lockAfterSeconds' (automatically generated)

o  lockAfterSeconds: something
set the value of the instance variable 'lockAfterSeconds' (automatically generated)

o  processor
return the value of the instance variable 'processor' (automatically generated)

o  processor: something
set the value of the instance variable 'processor' (automatically generated)

o  workstation
return the value of the instance variable 'workstation' (automatically generated)

o  workstation: something
set the value of the instance variable 'workstation' (automatically generated)

accessing-channels
o  lockChannel

o  lockChannel: something

o  lockChannelOut

o  lockChannelOut: something
set the value of the instance variable 'lockChannelOut' (automatically generated)

change & update
o  update: aspect with: param from: anObject
lockChannel is a value holder

events
o  buttonMotion: state x: x y: y view: aView

o  buttonMultiPress: button x: x y: y view: aView

o  buttonPress: button x: x y: y view: aView

o  buttonRelease: button x: x y: y view: aView

o  keyPress: key x: x y: y view: aView

o  keyRelease: key x: x y: y view: aView

o  mouseWheelMotion: state x: x y: y amount: amount deltaTime: dTime view: aView

lock interface
o  checkTime

o  lock
trigger locking of screen

o  unlisten
do not listen for events any longer.
This must be called when a screen lock is detached from a
screen.

o  unlock
trigger unlocking of screen

private
o  gotEventForView: v
got an event.
Reset the inactive timer.
If locked, eat all user events (for security)

o  initializeForDevice: aWorkstation

o  lockScreen
lock the screen

o  unlockScreen
don't try to restore views that have been closed while
being invisible

queries
o  isLocked


Examples:


    |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.
    ].


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 19 Apr 2024 18:54:02 GMT