eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SynchronousWindowSensor':



Class: SynchronousWindowSensor



rev: 1.42 date: 2018/10/12 17:08:25
user: cg
file: SynchronousWindowSensor.st directory: libview
module: stx stc-classLibrary: libview
Claus Gittinger


These sensors are not used with regular views.

In contrast to a regular windowSensor, instances of SynchronousWindowSensor
do NOT put events into a queue and do NOT wakeup any windowGroup process.
Instead, the underlying view is notified synchronously (via a message send)
immediately about the event.

SynchronousWindowSensor are used for only one single situation: 
    when a super-modal debugger is open
(i.e. one that is debugging the scheduler or event-dispatcher).

This debugger's windowGroup is augmented with a synchronous Sensor, in order
to prevent the event handling code from suspending any process 
(you cannot suspend the scheduler; you should not suspend the event dispatcher).

This is pretty tricky and magic - and you don't have to understand this.
(consider this system internal code)

Instance protocol:

dummy event flushing
o  compressKeyPressEventsWithKey: aKey

o  flushEventsFor: aViewOrNil inQueue: anEventQueue where: aCondition

event processing
o  addDamage: aRectangle view: aView wakeup: doWakeup
forward as an expose for some view

o  exposeX: x y: y width: w height: h view: aView
forward an expose for some view

o  graphicsExposeX: x y: y width: w height: h final: final view: aView
forward a graphic expose for some view

o  noExposeView: aView
forward a noExpose event for some view

o  saveAndTerminateView: aView
forward a saveAndTerminate event for some view

o  terminateView: aView
forward a terminate event for some view

event processing-private
o  basicPushEvent: anEvent
dispach the event immediately

o  pushDamageEvent: anEvent
disptach the event immediately

o  pushUserEvent: selector for: anyObject withArguments: argList
disptach the event immediately

event simulation
o  enqueueMessage: selector for: someone arguments: argList
do it synchronously

o  initialize
(comment from inherited method)
initialize the event queues to empty

o  catchExposeFor: aView
start catching noExpose events (must be done BEFORE a bitblt).

o  waitForExposeFor: aView
wait until a graphicsExpose or a noExpose arrives (after a bitblt).

ST/X; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 12 Aug 2022 14:30:57 GMT