|
Class: GraphicsDevice
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
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.
copyrightCOPYRIGHT (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.
accessing
-
displayId
-
-
screen
-
accessing & queries
-
bePDA
-
-
deviceType
-
-
deviceType: aSymbol
-
-
isPDA
-
-
isWebServiceDevice
-
I am not a WebService pseudo-device
-
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.
-
supportsAlphaChannel
-
return true, if this device supports alpha information.
Currently none does
-
supportsJPGImages
-
return true, if this device directly supports jpg images.
Currently none does (except browser windows)
Usage example(s):
Display supportsJPGImages
|
-
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)
-
supportsPNGImages
-
return true, if this device directly supports png images.
Currently none does (except browser windows)
Usage example(s):
Display supportsPNGImages
|
-
supportsTIFFImages
-
return true, if this device directly supports tiff images.
Currently none does (except browser windows)
Usage example(s):
Display supportsTIFFImages
|
creating graphics contexts
-
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
-
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.
-
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)
-
removeEventListener: aListener
-
remove a local eventListener
(which is a block or something understanding #processEvent:)
misc
-
flush
-
send all buffered drawing to the display.
This used to be called #synchronizeOutput, but has been renamed
for ST-80 compatibility.
-
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
|
GraphicResourceAllocationFailure
|