eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'GraphicsDevice':

Home

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

Class: GraphicsDevice


Inheritance:

   Object
   |
   +--GraphicsDevice
      |
      +--HostGraphicsDevice

Package:
stx:libview
Category:
Interface-Graphics
Version:
rev: 1.40 date: 2022/10/11 14:39:57
user: cg
file: GraphicsDevice.st directory: libview
module: stx stc-classLibrary: libview

Description:


this abstract class was inserted to provide a home for ST-80 classes
(previously, DeviceWorkstation was directly under Object).

In ST/X, this is mostly dummy.

[instance variables:]
  displayId       <Handle>            the device handle
  screen          any                 another some device specific id
  eventListeners  <Collection> | nil  bunch of objects interested in events (block or responds to #processEvent:).
  deviceType      <Symbol>             some arbitrary symbol, used to choose windowSpecs.

copyright

COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger 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.

Instance protocol:

accessing
o  displayId

o  screen

accessing & queries
o  bePDA

o  deviceType

o  deviceType: aSymbol

o  isPDA

o  isWebServiceDevice
I am not a WebService pseudo-device

o  literalArrayEncoding
(comment from inherited method)
generate a literalArrayEncoding array for myself.
This uses #literalArrayEncodingSlotOrder which defines the slots and
order and #skippedInLiteralEncoding which defines slots to skip.
In addition, an object may define virtualSlotsInLiteralEncoding for slots
which are not really instvars, but should be fetched via getters.
For most subclasses, there is no need to redefine those.

o  supportsAlphaChannel
return true, if this device supports alpha information.
Currently none does

o  supportsJPGImages
return true, if this device directly supports jpg images.
Currently none does (except browser windows)

Usage example(s):

     Display supportsJPGImages

o  supportsNativeImages
return true, if this device directly supports images (png, jpg, tiff, etc.).
If true is returned, the concrete image format to use must be negotiated further.
Currently none does (except browser windows and electron)

o  supportsPNGImages
return true, if this device directly supports png images.
Currently none does (except browser windows)

Usage example(s):

     Display supportsPNGImages

o  supportsTIFFImages
return true, if this device directly supports tiff images.
Currently none does (except browser windows)

Usage example(s):

     Display supportsTIFFImages

creating graphics contexts
o  newGraphicsContextFor: aGraphicsMedium
create a new graphics context.
The default is to use the inherited graphics context.
Subclasses may redefine this to use their own graphics context

event processing
o  addEventListener: aListenerOrBlock
add a local eventListener (either a block or someone with protocol - #processEvent:)
This one gets a chance to intercept all events for this device.
Warning: the listener gets invoked synchronously, directly from the
display event dispatcher. It shall not terminate or block the system for long.

o  notifyEventListenersAbout: anEvent
notify all eventHandlers about an incoming event.
If any returns true, it is assumed to be eaten by the handler and not
enqueued (i.e. not passed to the windowGroup process)

o  removeEventListener: aListener
remove a local eventListener
(which is a block or something understanding #processEvent:)

misc
o  flush
send all buffered drawing to the display.
This used to be called #synchronizeOutput, but has been renamed
for ST-80 compatibility.

o  roundTripTime
answer the round trip time in milliseconds.
May be used to detect slow device connections.
Subclasses redefine this. Assume a fast Diplay connection
and answer 0 here

Usage example(s):

     Screen current roundTripTime


Private classes:

    GraphicResourceAllocationFailure


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Wed, 08 May 2024 05:06:39 GMT