XlShmPixmaps.mesa
Copyright Ó 1990, 1991 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, January 31, 1990
Christian Jacobi, February 5, 1990
Christian Jacobi, August 14, 1991 10:54 am PDT
DIRECTORY
SF USING [Box],
ImagerSample USING [BitsPerSample, RasterSampleMap, SampleMap],
Xl USING [Connection, Drawable, nullDrawable, Pixmap];
XlShmPixmaps: CEDAR DEFINITIONS
~ BEGIN
NewSharedSampleMap: PROC [box: SF.Box, bitsPerSample: ImagerSample.BitsPerSample ¬ 1] RETURNS [ImagerSample.RasterSampleMap];
Creates new sample map in shared memory.
May return NIL if not enough shared memory is available.
Supports only few bitsPerSample values known to work for X Pixmaps.
The created sample map may be slightly larger to fit machine dependent alignment conditions.
SampleMapSupportsThis: PROC [sm: ImagerSample.SampleMap] RETURNS [BOOL];
Returns whether sample map is allocated in shared memory using NewSharedSampleMap
UnsafeCreatePixmap: PROC [c: Xl.Connection, drawable: Xl.Drawable ¬ Xl.nullDrawable, sm: ImagerSample.RasterSampleMap] RETURNS [Xl.Pixmap];
Unsafe because X server might keep referencing SampleMap after it has been garbage collected.
Samplemap must have been created with NewSharedSampleMap.
Does synch; errors raised inline..
ConnectionSupportsThis: PROC [c: Xl.Connection] RETURNS [BOOL];
Returns whether the connection supports shared memory with the caller.
If c=NIL, returns whether shared memory is available in general.
ConnectionSupportsPixmaps: PROC [c: Xl.Connection] RETURNS [BOOL];
Returns whether the connection supports shared memory pixmaps with the caller
END.