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.10 date: 2021/01/20 14:37:07
user: cg
file: ScreenLock.st directory: libview2
module: stx stc-classLibrary: libview2

Description:


documentation to be added.



[instance variables:]

[class variables:]

copyright

COPYRIGHT (c) 2000 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

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
(comment from inherited method)
not handled here - should be redefined in a concrete subclass

o  buttonMultiPress: button x: x y: y view: aView
(comment from inherited method)
not handled here - should be redefined in a concrete subclass

o  buttonPress: button x: x y: y view: aView
(comment from inherited method)
not handled here - should be redefined in a concrete subclass

o  buttonRelease: button x: x y: y view: aView
(comment from inherited method)
not handled here - should be redefined in a concrete subclass

o  keyPress: key x: x y: y view: aView
(comment from inherited method)
not handled here - should be redefined in a concrete subclass

o  keyRelease: key x: x y: y view: aView
(comment from inherited method)
not handled here - should be redefined in a concrete subclass

o  mouseWheelMotion: state x: x y: y amount: amount deltaTime: dTime view: aView
(comment from inherited method)
not handled here - can be redefined in a concrete subclass

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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:37:26 GMT