|
Class: XWorkstation
Object
|
+--GraphicsDevice
|
+--HostGraphicsDevice
|
+--DeviceWorkstation
|
+--XWorkstation
|
+--GLXWorkstation
- Package:
- stx:libview
- Category:
- Interface-Graphics
- Version:
- rev:
1.745
date: 2023/07/05 07:11:08
- user: cg
- file: XWorkstation.st directory: libview
- module: stx stc-classLibrary: libview
this class provides the interface to X11. It redefines all required methods
from DeviceWorkstation.
Notice, that in Smalltalk/X you are not technically limited to one display;
in theory (and in our practice), you can create Views on many displays
simultaneously. However, the default setup is for one display only.
To support multiple displays, you will have to start another event dispatcher
process for the other display(s) and create the other views with a slightly
different protocol (ApplicationModel openOnDevice:) or by temporarily answering
the other device to the currentScreen query.
Therefore, 'normal' applications do not have to care for all of this, as the currentScreen
query is answered by the launcher when opening its applications.
Timeouts:
sometimes, X-connections are lost and, as the Xlib is blocking and synchronous by
default, this would lead to a locked ST/X system.
Therefore, this class defines a timeOut, whenever doing an Xlib call.
The default for this timeout is 30seconds.
This may be a problem with windowmanagers which show a rubber-band rectangle
when creating windows.
If the user does not specify the rectangle within 30 seconds, the device assumes
a timeout and closes the connection.
As a (kludgy) workaround, a second timeout value is used for window-creation.
This secondary timeout value defaults to 60*5 seconds (5 minutes).
See more documentation in my superclass, DeviceWorkstation.
copyrightCOPYRIGHT (c) 1989 by 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-display capabilities
-
hasXCursorLibrary
-
Display hasXCursorLibrary
-
hasXftLibrary
-
Display hasXftLibrary
class initialization
-
initialize
-
ConservativeSync is required for some Xlib implementation,
error handling
-
debug: aBoolean
-
-
debugResources
-
XWorkstation debugResources
-
errorStringOfLastError
-
-
getConnectionTimeOut
-
returns the default connectionTimeOut (seconds)
-
getConnectionTimeOutForWindowCreation
-
returns the default connectionTimeOut (seconds)
-
lastErrorString
-
return the last X-error string -
when buffering is on, this may be
an error for a long-ago operation
Usage example(s):
-
minorCodeOfLastError
-
-
requestCodeOfLastError
-
-
resourceIdOfLastError
-
Screen resourceIdOfLastError
-
setConnectionTimeOut: seconds
-
set the default connection timeout (seconds)
-
setConnectionTimeOutForWindowCreation: seconds
-
set the default connection timeout (seconds)
queries
-
isX11Platform
-
-
platformName
-
ST-80 compatibility.
Return a string describing the display systems platform.
XWorkstation always returns #X11.
Signal constants
-
deviceIOTimeoutErrorSignal
-
return the per-device signal, which is raised when a timeout
IO error (i.e. broken connection) occurs.
accessing
-
displayIdOrErrorIfBroken
-
-
displayIdOrNilIfBroken
-
-
maxOperationsUntilFlush
-
-
maxOperationsUntilFlush: anIntegerOrNil
-
if not nil, after anInteger number of draw operations
a flush is performed.
This is to work around a drawing problem which occurs on
Ubuntu 12.04 64bit running on a VMware player (2013-11).
accessing & queries
-
activateOnClick: aBoolean
-
set/clear the activateOnClick behavior.
If on, a click into a window raises and activates
the (top) window.
Windows users typically enable this;
in contrast, those used to the X-Window system typically prefer
it disabled.
Returns the previous setting.
Usage example(s):
Display class activateOnClick:true
Display class activateOnClick:false
|
-
anyButtonMotionMask
-
return the state-mask for any button in motion events' state-field.
This is the devices mask.
-
asPseudoDeviceWithoutXFTSupport
-
return a pseudo device to be used when drawing into pixmaps
on a device where xft-drawing into pixmaps is broken.
This is a temporary hack, to be removed when that problem is fixed in xft;
then, we should return self here.
-
blackpixel
-
return the colornumber of black
-
button1MotionMask
-
return the state-mask for button1 in motion events' state-field.
For backward compatibility.
Usage example(s):
Display button1MotionMask
|
-
button2MotionMask
-
return the state-mask for button2 in motion events' state-field
For backward compatibility.
-
button3MotionMask
-
return the state-mask for button3 in motion events' state-field
For backward compatibility.
-
buttonMotionMask: aButtonNr
-
return the state-mask for button<n> in motion events state-field.
This is the devices mask.
-
controlMask
-
return the state-mask for the CTRL modified in motion events' state-field.
-
displayFileDescriptor
-
return the displays fileNumber - for select
-
displayName
-
return the X-connections display name.
This is (currently) nil for the default display,
something like foo:0 for any other remote display.
Future versions may return non-nil strings for the default display as well.
-
displayName: something
-
-
protocolVersion
-
return the X-servers protocol version - should normally not be of
any interest
Usage example(s):
-
serverVendor
-
return the X-server vendor string - this should normally not be of
any interest, but can be for special cases
(to avoid bugs in certain implementations)
Usage example(s):
Display serverVendor
Display platformName
|
-
shiftMask
-
return the state-mask for the SHIFT modified in motion events' state-field.
-
translatePoint: aPoint from: windowId1 to: windowId2
-
given a point in window1, return the coordinate in window2.
This expects a device coordinate (relative to the first views origin)
in aPoint and returns a device coordinate relative to the 2nd views origin.
- use to xlate points from a window to rootwindow
-
vendorRelease
-
return the X-servers vendor release - should normally not be of
any interest, but can be for special cases.
(to avoid bugs in certain implementations)
Usage example(s):
-
viewIdFromPoint: aPoint in: windowId
-
given a point in rootWindow, return the viewId of the subview of windowId
hit by this coordinate. Return nil if no view was hit.
The returned id may be the id of a non ST view.
- used to find the window to drop objects after a cross-view drag.
Usage example(s):
Display viewIdFromPoint:100@100 in:Display realRootWindowId
|
-
virtualExtent
-
return the virtual extent of the display (in pixels).
On most systems, this is the same as the physical width;
except, if a window manager with a virtual desktop like olvwm
(simulating a bigger screen) is running.
Usage example(s):
Display virtualExtent
Display extent
|
-
whitepixel
-
return the colornumber of white
-
xlibTimeout
-
-
xlibTimeout: seconds
-
-
xlibTimeoutForWindowCreation
-
-
xlibTimeoutForWindowCreation: seconds
-
accessing-display capabilities
-
extentOfResizeHandle
-
if the window system needs any area for a window resize handle (such as on MACOS-X),
this area's extent is returned here. It is assumed, that this handle is located at the lower-right
of the window.
0@0 is returned for systems which locate the resize handles outside the client area.
This may be used by the UI painter or programmatically to reserve some client area.
This method must be redefined for displays which need it (i.e. X11 on osx)
-
hasCursorExtension
-
return true, if this workstation supports the X cursor extension.
This extension allows for deep cursors (depth > 1)
Usage example(s):
Display hasCursorExtension
|
-
hasDPS
-
return true, if this workstation supports display postscript.
Both the server must support it, and the feature must have been
enabled in the smalltalk system, for true to be returned.
Usage example(s):
-
hasExtension: extensionString
-
query for an X extension. The argument, extensionString
should be the name of the extension (i.e. 'SHAPE', 'XInputExtension' etc).
Return true, if that extension is available in the server.
(which does not imply, that there is support in smalltalk for it.
Usage example(s):
Display hasExtension:'XVideo'
Display hasExtension:'Input'
Display hasExtension:'GLX'
Display hasExtension:'X3D-PEX'
Display hasExtension:'XInputExtension'
Display hasExtension:'SHAPE'
Display hasExtension:'MIT-SHM'
Display hasExtension:'SGIFullScreenStereo'
XQuartz supports the following:
Apple-DRI
Apple-WM
BIG-REQUESTS
DAMAGE
DOUBLE-BUFFER
GLX
Generic Event Extension
MIT-SCREEN-SAVER
MIT-SHM
Present
RANDR
RENDER
SECURITY
SGI-GLX
SHAPE
SYNC
X-Resource
XC-MISC
XFIXES
XINERAMA
XInputExtension
XKEYBOARD
XVideo
|
-
hasImageExtension
-
return true, if this workstation supports the X image extension.
Both the server must support it, and the feature must have been
enabled in the smalltalk system, for true to be returned.
Usage example(s):
Display hasImageExtension
|
-
hasInputExtension
-
return true, if this workstation supports the X input extension.
Both the server must support it, and the feature must have been
enabled in the smalltalk system, for true to be returned.
Usage example(s):
Display hasInputExtension
|
-
hasMultibuffer
-
return true, if this workstation supports the multibuffer extension.
Both the server must support it, and the feature must have been
enabled in the smalltalk system, for true to be returned.
Usage example(s):
-
hasPEX
-
return true, if this workstation supports PEX 3D graphics.
Both the server must support it, and the feature must have been
enabled in the smalltalk system, for true to be returned.
Usage example(s):
-
hasRenderExtension
-
return true, if this workstation supports the X render extension.
Usage example(s):
Display hasRenderExtension
|
-
hasSaveUnder: aBoolean
-
if the argument is false, a popup view's saveUnder will not be used
- this can be used on servers where saveUnder is
very slow or is broken (can be put into display-rc-file)
Usage example(s):
Screen current hasSaveUnder:false
|
-
hasShm
-
return true, if this workstation supports the shared pixmap extension.
Both the server must support it, and the feature must have been
enabled in the smalltalk system, for true to be returned.
Usage example(s):
-
hasXTestExtension
-
return true, if this workstation supports the X cursor extension.
This extension allows for deep cursors (depth > 1)
Usage example(s):
Display hasExtension:'XTEST'
Display hasXTestExtension
|
-
hasXVideo
-
return true, if this workstation supports the XVideo extension.
Both the server must support it, and the feature must have been
enabled in the smalltalk system, for true to be returned.
Usage example(s):
-
iconSizes
-
Get the preferred/supported icon sizes. These are set by the window manager.
We return nil (if not set) or an OrderedCollection of iconSize specs.
Usage example(s):
-
ignoreBackingStore: aBoolean
-
if the argument is true, the view's backingStore setting will be ignored, and
no backing store used - this can be used on servers where backing store is
very slow or is broken (can be put into display-rc-file)
-
monitorBounds
-
ask the X server via the Xinerama extension about the available monitors.
The first monitor returned is the primary monitor
Usage example(s):
-
pointsAreOnSameMonitor: point1 and: point2
-
are the two points on the same (multi-screen) monitors?
-
preferredIconSize
-
return the display's preferred size for icons.
Redefined to return a special value on SGI servers.
-
scrollsAsynchronous
-
return true, if this display asynchronously sends expose events after a
scroll operation. False otherwise. Asynchronous expose events are an X
speciality, which affects a few methods outside of the display class (sorry)
-
smallestMonitorHeight
-
returns the usable height of the smallest monitor in a mult-monito setup
Usage example(s):
Display smallestMonitorHeight
|
-
supportedClipboards
-
answer a collection of symbols with the supported clipboards.
X11 additionaly supports a buffer containing the currently selected text
(in xterm) - the PRIMARY selection
-
supportedImageFormats
-
return an array with supported image formats;
each array entry is an attribute dictionary, consisting of
depth, bitsPerPixel and padding values.
Usage example(s):
Display supportedImageFormats
|
-
supportsAnyViewBackgroundPixmaps
-
return true, if the device allows pixmaps as viewBackground.
-
supportsArbitraryShapedViews
-
return true, if this workstation supports arbitrary shaped windows.
Both the server must support it (the shape-extension),
and the feature must have been enabled in the smalltalk system,
for true to be returned.
Usage example(s):
Display supportsArbitraryShapedViews
|
-
supportsIconViews
-
return true, if this device supports views as icons.
These can be drawn into like any other regular view, and therefore be easily animated.
Only Xservers (currently) support this.
Usage example(s):
Display supportsIconViews
|
-
supportsMaskedDrawingWith: aForm
-
return true, if the device allows the given form pixmap
to be used as paint color.
True returned here - X has no trouble with any mask.
-
supportsMaskedDrawingWithOffset: aForm
-
return true, if the device allows the given form pixmap
to be used as paint color with a mask offset.
True returned here - X has no trouble with any mask.
-
supportsScreenReading
-
return true, if the device allows reading the screen pixels
True returned here - X can do it
Usage example(s):
Display serverVendor
Display supportsScreenReading
|
-
supportsVariableHeightFonts
-
are fonts with variable height supported?
-
supportsViewBackgroundPixmap: aForm
-
return true, if the device allows the given pixmap as viewBackground.
True returned here - X supports any size.
Other device types (windows) may restrict this to certain sizes.
-
supportsViewGravity
-
return true, if this device supports gravity attributes.
We do not depend on it being implemented, but some resizing operations
are faster, if they are.
-
supportsXCursor
-
return true, if the XCursor extension (deep cursors ) are supported
on this display.
Both Smalltalk has to be compiled to support it (as client),
and the display we are connected to must support it,
to return true here.
Usage example(s):
Display supportsXCursor
Display hasCursorExtension
Display class hasXCursorLibrary
|
-
supportsXftFonts
-
return true, if XftFonts (nice looking truetype fonts)
are supported on this display.
Both Smalltalk has to be compiled to support it (as client),
and the display we are connected to must support it,
to return true here.
Usage example(s):
Display supportsXftFonts
Display hasRenderExtension
Display class hasXftLibrary
|
-
supportsXftFontsInBitmaps
-
return true, if XftFonts (nice looking truetype fonts)
are supported when drawing into bitmaps on this display.
Currently, this does not work, so xft drawing must be disabled when
rendering into bitmaps
Usage example(s):
Display supportsXftFontsInBitmaps
Display hasRenderExtension
Display class hasXftLibrary
|
-
suppressShadowViews
-
return true, if this device wants to suppress shadow views
(i.e. shadows under popups and modalBoxes).
Some (slow) devices may want to return true here.
Also, with XQuartz, it does not work, because we cannot readout the screen...
-
usableHeightAt: aPoint
-
returns the usable height of the display (in pixels) at a given point
Normally, the same as height, but may be smaller, in
case some menu space is taken up by the window manager (windows).
On multi-display systems with different sized screens, this should care for
which display is at the given x-position
Usage example(s):
Screen current usableHeightAt:(0@0)
Screen current usableHeightAt:(1500@0)
Screen current usableHeightAt:(3000@0)
Screen current usableHeightAt:(9000@0)
Screen current usableHeightAt:(Display pointFromUser)
|
bitmap/window creation
-
createBitmapFromArray: anArray width: w height: h
-
create a monochrome, depth1 bitmap from a given (byte-)array.
The rows are aligned to a multiple of 8
-
createBitmapFromFile: aString for: aForm
-
-
createBitmapWidth: w height: h
-
allocate a bitmap on the Xserver, the contents is undefined
(i.e. random). Return a bitmap id or nil
-
createPixmapWidth: w height: h depth: d
-
allocate a pixmap on the Xserver, the contents is undefined
(i.e. random). Return a bitmap id or nil
-
createWindowFor: aView type: typeSymbol origin: origin extent: extent minExtent: minExt maxExtent: maxExt borderWidth: bWidth subViewOf: wsuperView style: wStyle inputOnly: winputOnly label: wlabel owner: wowner icon: wicon iconMask: wiconMask iconView: wiconView
-
(wStyle ~= nil and:[wStyle ~= #normal]) ifTrue:[
-
destroyGC: aGCId
-
(comment from inherited method)
destroy a GC
-
destroyPixmap: aDrawableId
-
-
destroyView: aViewOrNil withId: aWindowId
-
-
dpsContextFor: aDrawableId and: aGCId
-
-
gcFor: aDrawableId
-
(comment from inherited method)
create a GC for drawing into aDrawable
-
gcForBitmap: aDrawableId
-
with X, this is the same as a normal gc
-
primCreateBitmapFromArray: anArray width: w height: h
-
-
primCreateWindowType: t origin: o extent: e minExtent: minE maxExtent: maxE borderWidth: bw superViewId: sv style: st inputOnly: i label: l ownerId: oId iconId: ic iconMaskId: im iconViewId: iv
-
for rel5 only
-
primDestroyViewWithId: aWindowId
-
clipboard
-
getPrimaryBuffer
-
Returns the contents of PRIMARY selection buffer
-
primaryBufferAsString
-
return my current selection as a string
-
setPrimaryBuffer: aString
-
Sets the contents of PRIMARY selection.
-
setPrimaryText: aString ownerView: aView
-
Set the PRIMARY selection - both the local one, and tell the display
that we have changed it (i.e. place it into the PRIMARY).
color stuff
-
colorCell
-
allocate a color cell - return the color index (i.e. colorID).
This method will return nil for StaticGrey, StaticGrey and TrueColor displays.
-
colorNamed: aString
-
allocate a color with color name - return the color index (i.e. colorID).
On trueColor displays, nothing is actually allocated,
and the returned colorID is formed by simply packing the RGB values.
Don't use this method, colornames are mostly X specific.
-
colorScaledRed: r scaledGreen: g scaledBlue: b
-
allocate a color with rgb values (0..16rFFFF)
- return the color index (i.e. colorID).
On trueColor displays, nothing is actually allocated,
and the returned colorID is formed by simply packing the RGB values.
-
deviceColorValueToPercent: aDeviceValue
-
given a color-component value in percent (0..65k), return the corresponding
x-component value (0..100)
Usage example(s):
Display deviceColorValueToPercent:0
Display deviceColorValueToPercent:16r8000
Display deviceColorValueToPercent:16rFFFF
|
-
freeColor: colorIndex
-
free a display color when its no longer needed
-
getScaledRGBFrom: index
-
get rgb components (0 .. 16rFFFF) of color in map at:index,
and return a 3-element array containing them
-
getScaledRGBFromName: colorName
-
get rgb components (0..16rFFFF) of color named colorName,
and return a 3-element array containing them
Usage example(s):
Screen current getScaledRGBFromName:'red'
Screen current getScaledRGBFromName:'orange'
|
-
listOfAvailableColors
-
return a list of all available colornames.
This should not be used, since colornames are very
display-specific (here X-specific).
Usage example(s):
Screen current listOfAvailableColors
|
-
percentToDeviceColorValue: aPercentage
-
given a color-component value in percent (0..100), return the corresponding
x-component value (0..65k) as an integer
-
setColor: index scaledRed: sred scaledGreen: sgreen scaledBlue: sblue
-
change color in map at:index to rgb (0..16rFFFF).
This method is a noop for StaticGrey, StaticGrey and TrueColor displays.
cursor stuff
-
builtInCursorShapes
-
return a collection of standard cursor names.
Those are built into the XServer and need not be created as
user cursors.
(actually, there are more than those below ...)
-
colorCursor: aCursorId foreground: fgColor background: bgColor
-
change a cursors colors
-
createCursorShape: aShape
-
create a cursor given a shape-symbol. This only works
for a few standard cursors, and returns nil if no such cursor exists.
Senders must always care for a fallBack, in case of a nil return.
-
createCursorSourceForm: sourceForm maskForm: maskForm hotX: hx hotY: hy width: w height: h
-
create a cursor given 2 bitmaps (source, mask) and a hotspot
-
destroyCursor: aCursorId
-
release a cursor - frees any device resources
-
needDeviceFormsForCursor
-
-
primCreateCursorShapeNumber: aShapeNumber
-
create a cursor given a shape-number.
-
primCreateCursorSourceFormId: sourceId maskFormId: maskId hotX: hx hotY: hy width: w height: h
-
create a cursor given 2 bitmaps (source, mask) and a hotspot
-
shapeNumberFromSymbol: shape
-
given a shape-symbol, return the corresponding cursor-number,
or nil if no such standard cursor exists.
drag & drop
-
dndDrop: dropObjects inWindowID: destinationId position: destinationPoint rootPosition: rootPoint
-
drop something in some alien view, using the DND protocol.
Returns false, if the drop could not be performed.
THE DND PROTOCOL IS NO LONGER SUPPORTED ON CURRENT X11 SYSTEMES!
-
dndDropTypes
-
return the dropTypes as supported by DND
-
dndMessage: event data: data view: targetView
-
handle a drag&drop protocol message
-
drop: aCollectionOfDropObjects inWindowID: destinationId position: destinationPoint rootPosition: rootPoint
-
drop something in some alien view.
Returns false, if the drop could not be performed.
TODO: Switch to XDND!
drag & drop - xdnd
-
initializeXdnd
-
Xdnd is an alternative protocol for drag and drop
(both modern and standard now).
https://freedesktop.org/wiki/Specifications/XDND/
Usage example(s):
-
setXdndAwarePropertyFor: aWindowOrWindowID
-
announce that this window supports the Xdnd (drag & drop) protocol
Usage example(s):
Display setXdndAwarePropertyFor:Transcript
Display getProperty:#'XdndAware' from:Transcript delete:false
|
-
xdndDrop: data view: targetView
-
handle a xdnd drag&drop protocol message.
Ignored for now
-
xdndEnter: data view: targetView
-
handle a xdnd drag&drop protocol message.
Ignored for now
-
xdndLeave: data view: targetView
-
handle a xdnd drag&drop protocol message.
Ignored for now
-
xdndPosition: data view: targetView
-
handle a xdnd drag&drop protocol message.
Ignored for now
drawing
-
_displayLineFromX: x0 y: y0 toX: x1 y: y1 in: aDrawableId with: aGCId
-
draw a line. If the coordinates are not integers, an error is triggered.
-
_fillRectangleX: x y: y width: width height: height in: aDrawableId with: aGCId
-
fill a rectangle.
If any coordinate is not integer, an error is triggered.
-
clearRectangleX: x y: y width: width height: height in: aDrawableId with: aGCId
-
clear (fill with background) a rectangle. If any coordinate is not integer, an error is triggered.
-
copyFromId: sourceId x: srcX y: srcY gc: srcGCId to: destId x: dstX y: dstY gc: dstGCId width: w height: h
-
do a bit-blt; copy bits from the rectangle defined by
srcX/srcY and w/h from the sourceId drawable to the rectangle
below dstX/dstY in the destId drawable. Trigger an error if any
argument is not integer.
-
copyFromPixmapId: sourceId x: srcX y: srcY gc: srcGCId to: destId x: dstX y: dstY gc: dstGCId width: w height: h
-
do a bit-blt from a pix- or bitmap; copy bits from the rectangle defined by
srcX/srcY and w/h from the sourceId drawable to the rectangle
below dstX/dstY in the destId drawable. Trigger an error if any
argument is not integer.
This is basically the same as copyFromId:..., but does not generate expose events.
-
copyPlaneFromId: sourceId x: srcX y: srcY gc: srcGCId to: destId x: dstX y: dstY gc: dstGCId width: w height: h
-
do a bit-blt, but only copy the low-bit plane;
copy bits from the rectangle defined by
srcX/srcY and w/h from the sourceId drawable to the rectangle
below dstX/dstY in the destId drawable. Trigger an error if any
argument is not integer.
-
copyPlaneFromPixmapId: sourceId x: srcX y: srcY gc: srcGCId to: destId x: dstX y: dstY gc: dstGCId width: w height: h
-
do a bit-blt from a pix- or bitmap, but only copy the low-bit plane;
copy bits from the rectangle defined by
srcX/srcY and w/h from the sourceId drawable to the rectangle
below dstX/dstY in the destId drawable. Trigger an error if any
argument is not integer.
This is the same as copyPlaneFromId:..., but does not generate graphics exposes
-
displayArcX: x y: y width: width height: height from: startAngle angle: angle in: aDrawableId with: aGCId
-
draw an arc. If any of x,y, w or h is not an integer, an error is triggered.
The angles may be floats or integer - they are given in degrees.
-
displayLineFromX: x0 y: y0 toX: x1 y: y1 in: aDrawableId with: aGCId
-
draw a line. If the coordinates are not integers, an error is triggered.
-
displayLinesFromX: startX step: stepX yValues: yValues scaleY: scaleY transY: transY in: aDrawableId with: aGCId
-
draw a polygon starting at x; the y values derives from the collection yValues.
The associated x is a multiple of step. Each y value will be scaled and translated
-
displayPointX: x y: y in: aDrawableId with: aGCId
-
draw a point. If x/y are not integers, an error is triggered.
-
displayPointsX: xColl y: yColl in: aDrawableId with: aGCId
-
draw a collection of points. Each element of xColl/yCollmust be integer,
otherwise, an error is triggered.
-
displayPolygon: aPolygon in: aDrawableId with: aGCId
-
draw a polygon, the argument aPolygon is a Collection of individual points, which
define the polygon.
If any coordinate is not integer, an error is triggered.
-
displayRectangleX: x y: y width: width height: height in: aDrawableId with: aGCId
-
draw a rectangle. If the coordinates are not integers, an error is triggered.
-
displayString: aString from: index1 to: index2 x: x y: y in: aDrawableId with: aGCId opaque: opaque
-
draw a sub-string - if opaque is false, draw foreground only; otherwise, draw both
foreground and background characters.
If the coordinates are not integers, an error is triggered.
-
displayString: aString x: x y: y in: aDrawableId with: aGCId opaque: opaque
-
draw a string - if opaque is false, draw foreground only; otherwise, draw both
foreground and background characters.
If the coordinates are not integers, an error is triggered.
-
drawBits: givenBits bitsPerPixel: bitsPerPixel depth: imageDepth padding: givenPadding width: imageWidth height: imageHeight x: srcx y: srcy into: aDrawableId x: dstx y: dsty width: w height: h with: aGCId
-
draw a bitImage which has depth id, width iw and height ih into
the drawable. draw a region of w/h pixels from srcx/srcy to dstx/dsty.
Individual source pixels have bitsPerPixel bits, allowing to draw
depth and pixel-units to be different.
It has to be checked elsewhere, that the server can do it with the given
depth - otherwise, primitive failure will be signalled.
Also it is assumed, that the colormap is setup correctly and the
colors are allocated - otherwise the colors may be wrong.
-
drawBits: bits msb: msb bitsPerPixel: bitsPerPixel depth: imageDepth padding: padding width: imageWidth height: imageHeight x: srcx y: srcy into: aDrawableId x: dstx y: dsty width: w height: h with: aGCId
-
draw a bitImage which has depth id, width iw and height ih into
the drawable. draw a region of w/h pixels from srcx/srcy to dstx/dsty.
Individual source pixels have bitsPerPixel bits, allowing to draw
depth and pixel-units to be different.
It has to be checked elsewhere, that the server can do it with the given
depth - otherwise, primitive failure will be signalled.
Also it is assumed, that the colormap is setup correctly and the
colors are allocated - otherwise the colors may be wrong.
-
fillArcX: x y: y width: width height: height from: startAngle angle: angle in: aDrawableId with: aGCId
-
fill an arc. If any coordinate is not integer, an error is triggered.
The angles may be floats or integer - they are given in degrees.
-
fillPolygon: aPolygon in: aDrawableId with: aGCId
-
fill a polygon given by its points.
If any coordinate is not integer, an error is triggered.
-
fillRectangleX: x y: y width: width height: height in: aDrawableId with: aGCId
-
fill a rectangle.
If any coordinate is not integer, an error is triggered.
-
primDrawBits: imageBits bitsPerPixel: bitsPerPixel depth: imageDepth msb: msb masks: maskArray padding: bitPadding extent: imageExtent sourceOrigin: srcOrg into: aDrawableId destinationOrigin: dstOrg extent: dstExtent with: aGCId
-
since XPutImage may allocate huge amount of stack space
(some implementations use alloca), this must run with unlimited stack.
-
primDrawBits: imageBits bitsPerPixel: bitsPerPixel depth: imageDepth msb: msb padding: bitPadding width: imageWidth height: imageHeight x: srcx y: srcy into: aDrawableId x: dstx y: dsty width: w height: h with: aGCId
-
since XPutImage may allocate huge amount of stack space
(some implementations use alloca), this must run with unlimited stack.
event forwarding
-
buttonMotion: view state: state x: x y: y rootX: rX rootY: rY time: time
-
forward a buttonMotion event for some view
-
buttonPress: view button: button state: state x: x y: y rootX: rX rootY: rY time: time
-
forward a buttonPress event for some view
-
buttonRelease: view button: button state: state x: x y: y rootX: rX rootY: rY time: time
-
forward a buttonPress event for some view
-
clientMessage: targetView type: typeAtom format: format data: data
-
targetView is gone? Anyway, cannot do anything with this event...
-
configure: view relativeTo: anotherViewId x: x y: y width: w height: h borderWidth: borderWidth above: aboveViewId overrideRedirect: overrideBool
-
forward a size-change event for some view
-
createWindow: view x: x y: y width: w height: h
-
event arrived, after I destroyed it myself
-
expose: view x: x y: y width: w height: h count: count
-
forward an expose event for some view
-
focusIn: view mode: mode detail: detail
-
a view got the keyboard focus
-
focusOut: view mode: mode detail: detail
-
a view lost the keyboard focus
-
graphicsExpose: view x: x y: y width: w height: h count: count
-
forward a graphics-expose event for some view
-
keyPress: view key: key code: keyCode state: state x: x y: y rootX: rX rootY: rY time: time
-
forward a key-press event for some view
-
keyRelease: view key: key code: keyCode state: state x: x y: y rootX: rX rootY: rY time: time
-
forward a key-release event for some view
-
mappingNotify: view request: what event: eB
-
One of Keyboard-, Modifier- or PointerMap has changed, probably by xmodmap.
Tell xlib about the fact.
-
pointerEnter: view x: x y: y rootX: rX rootY: rY state: state mode: mode detail: detail time: time
-
forward a pointer enter event for some view
-
pointerLeave: view x: x y: y rootX: rX rootY: rY state: state mode: mode detail: detail time: time
-
forward a pointer leave event for some view
-
propertyChange: aView property: propertyId state: aSymbol time: time
-
sent when an X property changes.
This is a very X-specific mechanism.
Usage example(s):
aView propertyChange:atom state:aSymbol.
|
-
selectionClear: aView selection: selectionID time: time
-
sent when another X-client has created a selection.
This is a very X-specific mechanism.
-
selectionNotify: aView selection: selectionID target: targetID property: propertyID requestor: requestorID time: time
-
This event is sent by the selection owner as a response to our request for a selection.
This is a very X-specific mechanism.
-
selectionRequest: aView requestor: requestorID selection: selectionID target: targetID property: propertyID time: time
-
sent by some other X-client to ask for the selection.
This is a very X-specific mechanism.
-
visibilityNotify: aView state: how
-
event forwarding-ignored events
-
circulateNotify: aView place: aSymbol
-
sent, when the stacking order changes.
ignored for now.
-
circulateRequest: aView place: aSymbol
-
sent, when the stacking order is about to change.
ignored for now.
-
colorMapNotify: aView state: aBoolean
-
sent, when another colormap is installed.
This is a very X-specific mechanism.
-
configureRequest: view x: x y: y width: w height: h above: above detail: detail
-
ignored for now
-
gravityNotify: aView x: x y: y
-
ignored for now
-
keymapNotify: aView
-
ignore for now
-
mapRequest: aView
-
ignored for now
-
reparentedView: aView parentId: parentId x: x y: y
-
ignored for now
-
resizeRequest: aView width: width height: height
-
ignored for now
event handling
-
defaultEventMask
-
return a mask to enable some events by default.
-
dispatchEvent: evArray
-
a raw event array as coming from the low level C code is converted
to a message send here.
Also, the windowID from the event array is mapped to a view object.
-
dispatchEventFor: aViewIdOrNil withMask: eventMask
-
central event handling method:
get next event and send appropriate message to the sensor or view.
If the argument aViewIdOrNil is nil, events for any view are processed,
otherwise only events for the view with given id are processed.
If the argument aMask is nonNil, only events for this eventMask are
handled.
WARNING: this may block to wait for an event - you better check for a
pending event before calling this.
-
dispatchExposeEventFor: aViewIdOrNil
-
get next expose event and send appropriate message to the sensor or view.
If the argument aViewIdOrNil is nil, events for any view are processed,
otherwise only events for the view with given id are processed.
WARNING: this may block to wait for an event - you better check for a
pending event before calling this.
-
dispatchLoop
-
(comment from inherited method)
the actual event dispatching loop.
-
dispatchPendingEvents
-
central event handling method for modal operation.
(i.e. this is now only used in the modal debugger)
Dispatch any pending events; return when no more are pending.
This code is somewhat special, since X has a concept of graphic
expose events (which are sent after a bitblt). After such a bitblt,
we only handle exposes until the graphicsExpose arrives.
Other systems may not need such a kludge
-
disposeEventsWithMask: aMask for: aWindowIdOrNil
-
dispose (throw away) specific events. If aWindowId is nil,
events matching the mask are thrown away regardless of which
view they are for. Otherwise, only matching events for that
view are flushed.
-
eventMaskFor: anEventSymbol
-
return the eventMask bit-constant corresponding to an event symbol
-
eventPending
-
return true, if any event is pending.
This looks for both the internal queue and the display connection.
Usage example(s):
where eventPending returns wrong if we do not flush the buffer.
|
-
eventPending: anEventSymbol for: aWindowIdOrNil
-
return true, if a specific event is pending
-
eventPending: anEventMask for: aWindowIdOrNil withSync: doSync
-
return true, if any of the masked events is pending
-
eventPendingWithSync: doSync
-
return true, if any event is pending.
If doSync is true, do a sync output buffer (i.e. send all to the display and wait until its processed)
before checking.
-
eventQueued
-
return true, if any event is queued
-
eventQueuedAlready
-
return true, if any event is queued internally.
(i.e. in X's internal event queue, which is both filled by explicit
nextEvent calls AND whenever drawing is done and events are pending on
the display connection).
-
exposeEventPendingFor: aWindowIdOrNil withSync: doSync
-
return true, if any expose event is pending for a specific view,
or any view (if the arg is nil).
This is an X specific, only required after a scroll operation.
-
getEventFor: aViewIdOrNil withMask: eventMask into: anEventArray
-
read next event if there is one and put event's data into anEventArray.
If aViewIdOrNil is nil, events for any view are fetched;
otherwise only events for that specific view will be fetched.
Returns true, if there was an event, false otherwise.
This method may block - so you better check for pending events
before calling for it.
The event fields are placed into anEventArray (must be at least size 13):
the fields are:
1: windowID
2: eventType-ID
3: eventTypeSymbol
4.. args
Sorry I had to split dispatch into this fetch method and a separate
handler method to allow UNLIMITEDSTACK here.
(some Xlibs do a big alloca there which cannot be done in
#dispatchEvent:, since it dispatches out into ST-methods).
-
handleAllEvents
-
from now on, handle any kind of event
-
handleExposeOnlyFor: aView
-
from now on, handle expose events only
-
registerHotKeyForWindow: aDrawableId withId: anId modifiers: aModifier virtualKeyCode: aVirtualKeyCode
-
Defines a system-wide hotkey.
-
setEventMask: aMask in: aWindowId
-
tell X that we are only interested in events from aMask, which
is the bitwise or of the eventMask bits (see 'eventMaskFor:')
-
startDispatch
-
redefined to clear dispatchingExpose, which is a special X feature
-
unregisterHotKeyForWindow: aDrawableId withId: anId
-
Release a system-wide hotkey.
-
viewIsRelevantInCheckForEndOfDispatch: aView
-
(comment from inherited method)
return true, if the argument is not to be treated as a user view.
These, if any of them is still present, will prevent the endOfDispatch if the
exitOnLastClose flag is set.
event sending
-
sendClientEvent: msgType format: msgFormat to: targetWindowID propagate: propagate eventMask: eventMask window: windowID data1: d1 data2: d2 data3: d3 data4: d4 data5: d5
-
send a ClientMessage to some other (possibly: non-ST/X) view.
The client message gets message_type and msgFormat as specified by
the arguments. The additional data arguments specify up to
5 longWords of user data; each may be an integer or nil.
It is passed transparently in the events data field.
See XProtocol specification for more details.
-
sendKeyOrButtonEvent: typeSymbol x: xPos y: yPos keyOrButton: keySymCodeOrButtonNr state: stateMask toViewId: targetId
-
(comment from inherited method)
send a keyPress/Release or buttonPress/Release event to some (possibly alien) view.
TypeSymbol must be one of: #keyPress, #keyRelease, #buttonPress , #buttonRelease.
For buttonEvents, the keySymCodeOrButtonNr must be the buttons number (1, 2 ...);
for key events, it can be either a symbol (as listen in X's keySyms)
or a numeric keysym code. If state is nil, the modifier bits (shift & control)
are computed from the keyboardMap - if non-nil, these are passed as modifierbits.
The non-nil case is the lowlevel entry, where state must include any shift/ctrl information
(not very user friendly)
-
sendKeyOrButtonEvent: typeSymbol x: xPos y: yPos keyOrButton: keySymCodeOrButtonNr state: stateMask toViewId: targetId useXTest: useXTestBoolean
-
send a keyPress/Release or buttonPress/Release/Motion event to some (possibly alien) view.
TypeSymbol must be one of:
#keyPress, #keyRelease,
#buttonPress , #buttonRelease,
#motionNotify.
For buttonEvents, the keySymCodeOrButtonNr must be the buttons number (1, 2 ...);
for key events, it can be either a symbol (as listed in X's keySyms)
or a numeric keysym code;
for motion events, it must be the buttonStateMask.
If state is nil, the modifier bits (shift & control)
are computed from the keyboardMap - if non-nil, these are passed as modifierbits.
The non-nil case is the lowlevel entry, where state must include any shift/ctrl information
(not very user friendly)
font stuff
-
createFontFor: aFontName
-
a basic method for X-font allocation; this method allows
any font to be acquired (even those not conforming to
standard naming conventions, such as cursor, fixed or k14)
-
decomposeXFontName: aString into: aBlock
-
extract family, face, style and size from an
X-font name
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
-brand-family-face-style-moreStyle- -height-size-resX-resY-??-??-registry-encoding;
evaluate aBlock with these
-
encodingOf: aFontId
-
the font's encoding - if the font does not provide that info,
return nil (and assume #ascii, which is a subset of #iso8859-1).
Usage example(s):
Screen current encodingOf:(Screen current getDefaultFontWithEncoding:#'iso10646-1')
|
-
extentsOf: aString from: index1 to: index2 inFont: aFontId into: anArray
-
|result|
result := Array new:8.
Screen current
extentsOf:'hello World' from:1 to:11
inFont:(Screen current getFontWithFoundry:'*'
family:'courier new'
weight:'medium'
slant:'r'
spacing:nil
pixelSize:nil
size:10
encoding:#'iso10646-1'
)
into:result.
result
-
extractEncodingFromRegistry: registry encoding: encoding charSetCollections: charSetCollections
-
given registry and encoding as returned by X11,
generate a single symbol naming the ST/X encoding.
I.e. from registry='ISO8859' and encoding='1', generate #'iso8859-1'.
This is pure magic ...
-
flushListOfAvailableFonts
-
flush the cached list of all available fonts on this display.
Required if new fonts have been added on the display server.
Usage example(s):
Display flushListOfAvailableFonts.
Display listOfAvailableFonts
|
-
fontDescriptionFromXFontName: aFontNameString
-
extract family, face, style and size from an
X-font name
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
-brand-family-face-style-moreStyle- -pxlSize-size-resX-resY-??-??-registry-encoding;
evaluate aBlock with these
Usage example(s):
Screen current fontDescriptionFromXFontName:'-arabic-newspaper-medium-r-normal--32-246-100-100-p-137-iso10646-1'
|
-
fontMetricsOf: fontId
-
return a fonts metrics info object
Usage example(s):
Screen current fontMetricsOf:(View defaultFont onDevice:Screen current) fontId
CharacterSetView openOn:(View defaultFont onDevice:Screen current)
Screen current fontMetricsOf:(MenuView defaultFont onDevice:Screen current) fontId
CharacterSetView openOn:(MenuView defaultFont onDevice:Screen current)
|
-
fontProperties: propertyNames of: aFontId
-
Answer an array with selected property values of a font.
This is X11-Specific.
PropertyNames is an array with property names (symbols or strings).
Nonexistent properties are returned as nil
Usage example(s):
Screen current
fontProperties:#(#'PIXEL_SIZE' #'POINT_SIZE' RESOLUTION notExistent)
of:(Screen current getDefaultFontWithEncoding:#'iso10646-1')
|
-
fontPropertiesOf: aFontId
-
Answer an array with all the properties of a font.
This is X11-Specific.
Odd indices contain the property name (atom)
Even indices contain the property value (atom)
Answer nil, if there are no properties
Usage example(s):
Screen current fontPropertiesOf:(Screen current getDefaultFontWithEncoding:#'iso10646-1')
Dictionary withKeysAndValues:(Screen current fontPropertiesOf:(Screen current getDefaultFontWithEncoding:#'iso10646-1'))
|d|
d := Dictionary new.
(Screen current fontPropertiesOf:(Screen current getDefaultFontWithEncoding:#'iso10646-1')) keysAndValuesDo:[:name :value|
d at:name put:((Screen current atomName:value) ? value)
].
d
|
-
fontResolutionOf: fontId
-
return the resolution (as dpiX @ dpiY) of the font - this is usually the display's resolution,
but due to errors in some XServer installations, some use 75dpi fonts on higher
resolution displays and vice/versa.
Usage example(s):
Screen current fontResolutionOf:(Screen current getDefaultFontWithEncoding:#'iso10646-1')
|
-
fullFontNameOf: aFontId
-
the font's fullName - this is very device specific and should only be
used for user feed-back (for example: in the fontPanel).
If the display/font does not provide that info, return nil.
Usage example(s):
Screen current fullFontNameOf:(Screen current getDefaultFontWithEncoding:#'iso10646-1')
|
-
getAvailableFontsMatching: pattern
-
return an Array filled with font names matching aPattern
Usage example(s):
Screen current getAvailableFontsMatching:'*'
|
-
getDefaultFontWithEncoding: encoding
-
return a default font id - used when class Font cannot
find anything usable
Usage example(s):
Screen current getDefaultFontWithEncoding:#'iso10646-1'
|
-
getFontWithFamily: familyString face: faceString style: styleArgString size: sizeArgOrNil sizeUnit: sizeUnit encoding: encoding
-
try to get the specified font, if not available, try next smaller
font. Access to X-fonts by name is possible, by passing the X font name
as family and the other parameters as nil. For example, the cursor font
can be acquired that way.
-
getFontWithFoundry: foundry family: family weight: weight slant: slant spacing: spc pixelSize: pSize size: size encoding: encoding
-
get the specified font, if not available, return nil.
Individual attributes can be left empty (i.e. '') or nil to match any.
foundry: 'adobe', 'misc', 'dec', 'schumacher' ... usually '*'
family: 'helvetica' 'courier' 'times' ...
weight: 'bold' 'medium' 'demi' ...
slant: 'r(oman)' 'i(talic)' 'o(blique)'
spacing: 'narrow' 'normal' semicondensed' ... usually '*'
pixelSize: 16,18 ... usually left empty
size: size in point (1/72th of an inch)
encoding: iso8859-*, iso8859-1, iso10646-1 ... '*'
Usage example(s):
Display
getFontWithFoundry:'*'
family:'courier'
weight:'medium'
slant:'r'
spacing:nil
pixelSize:nil
size:13
encoding:#'iso8859-1'.
Display
getFontWithFoundry:'*'
family:'courier'
weight:'medium'
slant:'r'
spacing:nil
pixelSize:nil
size:13
encoding:#'iso10646-1'
|
-
heightOf: aString from: index1 to: index2 inFont: aFontId
-
Screen current
heightOf:'hello world' from:1 to:10
inFont:(Screen current getFontWithFoundry:'*'
family:'courier new'
weight:'medium'
slant:'r'
spacing:nil
pixelSize:nil
size:13
encoding:#'iso10646-1'
).
Screen current
heightOf:'hello World gggÖÜ' from:1 to:15
inFont:(Screen current getDefaultFontWithEncoding:#'iso10646-1')
-
listOfAvailableFonts
-
return a list with all available fonts on this display.
Since this takes some time, keep the result of the query for the
next time. The elements of the returned collection are instances of
FontDescription.
Usage example(s):
Display flushListOfAvailableFonts.
Display listOfAvailableFonts.
Display getAvailableFontsMatching:'*'.
Display getAvailableFontsMatching:'fixed'.
Display fontsInFamily:'fixed' filtering:nil.
|
-
pixelSizesInFamily: aFamilyName face: aFaceName style: aStyleName filtering: filter
-
return a set of all available font sizes in aFamily/aFace/aStyle
on this display.
Redefined to handle X's special case of 0-size (which stands for any)
Usage example(s):
Display pixelSizesInFamily:'courier' face:'bold' style:'roman' filtering:nil
|
-
releaseFont: aFontId
-
(comment from inherited method)
free a font
-
sizesInFamily: aFamilyName face: aFaceName style: aStyleName filtering: filter
-
return a set of all available font sizes in aFamily/aFace/aStyle
on this display.
Redefined to handle X's special case of 0-size (which stands for any)
Usage example(s):
Display sizesInFamily:'courier' face:'bold' style:'roman' filtering:nil
|
-
widthOf: aString from: index1 to: index2 inFont: aFontId
-
Modified (format): / 14-10-2020 / 19:54:17 / Stefan Vogel
grabbing
-
allowEvents: mode
-
-
grabKeyboardIn: aWindowId
-
grab the keyboard
-
grabPointerIn: aWindowId withCursor: aCursorId eventMask: eventMask pointerMode: pMode keyboardMode: kMode confineTo: confineId
-
grap the pointer - return true if ok
-
grabPointerIn: aWindowId withCursor: aCursorId pointerMode: pMode keyboardMode: kMode confineTo: confineId
-
grap the pointer - return true if ok
-
primUngrabKeyboard
-
release the keyboard
-
primUngrabPointer
-
release the pointer
-
ungrabKeyboard
-
release the keyboard
-
ungrabPointer
-
release the pointer
grabbing-keys
-
grabKey: keySymCodeOrChar modifier: modifierMaskOrNil grabModeKeyboard: modeKbd grabModePointer: modePtr window: aWindowIdOrNil
-
internal basic entry to grab a single key either for an individual window
or the whole screen (if aWindowIdOrNil is nil).
The keySymCodeOrChar argument may be a keySym (name of a key) or an integer (the keySymCode)
or a character.
The modifierMaskOrNil is as mask as returned by altModifierMask, ctrlModifierMask, etc.
if nil, the key is grabbed with AnyModifier.
ModeKbd and modePtr are symbols GrabModeAsync or GrabModeSync.
After that, this key-event will no longer be sent to the window/screen.
Use with care: the only useful application is to define a special hotKey
to start/stop event recorders without a need for a click or focus change.
Once grabbed, those key events will be exclusively reported to me.
Use GrabModeSync with big care - you can easily lock up your Xserver,
and have to kill ST/X or force an ungrab from a remote login if you have.
-
grabKey: keySymCodeOrChar modifier: modifierMaskOrNil window: aWindowIdOrNil
-
grab a single key either for an individual window
or the whole screen (if aWindowIdOrNil is nil).
The keySymCodeOrChar argument may be a keySym (name of a key) or an integer (the keySymCode)
or a character.
The modifierMaskOrNil is as mask as returned by altModifierMask, ctrlModifierMask, etc.
if nil, the key is grabbed with AnyModifier.
Only the key is passed to myself - no permanent grab is installed.
(GrabModeAsync).
While the grab is active, key events for this key will be sent to
the DisplayRootWindow
Usage example(s):
Display grabKey:#Escape modifier:nil window:nil.
Delay waitForSeconds:15.
Display ungrabKey:#Escape modifier:nil window:nil.
|
-
ungrabKey: keySymCodeOrChar modifier: modifierMaskOrNil window: aWindowIdOrNil
-
ungrab a single key as previously grabbed via grabKey:
Read the comment there.
graphic context stuff
-
noClipIn: aDrawableId gc: aGCId
-
disable clipping rectangle
-
setBackground: bgColorIndex in: aGCId
-
set background color to be drawn with
-
setBitmapMask: aBitmapId in: aGCId
-
set or clear the drawing mask - a bitmap mask using current fg/bg
-
setClipByChildren: aBool in: aDrawableId gc: aGCId
-
enable/disable drawing into child views
-
setClipX: clipX y: clipY width: clipWidth height: clipHeight in: drawableId gc: aGCId
-
clip to a rectangle
-
setDashes: dashList dashOffset: offset in: aGCId
-
set line attributes
-
setFont: aFontId in: aGCId
-
set font to be drawn in
-
setForeground: fgColorIndex background: bgColorIndex in: aGCId
-
set foreground and background colors to be drawn with
-
setForeground: fgColorIndex in: aGCId
-
set foreground color to be drawn with
-
setFunction: aFunctionSymbol in: aGCId
-
set alu function to be drawn with
-
setGraphicsExposures: aBoolean in: aGCId
-
set or clear the graphics exposures flag
-
setLineWidth: aNumber style: lineStyle cap: capStyle join: joinStyle in: aGCId
-
set line attributes;
lineStyle must be one of #solid, #dashed or #doubleDashed;
capStyle one of: #notLast, #butt, #round or #projecting;
joinStyle one of: #miter, #bevel or #round.
-
setMaskOriginX: orgX y: orgY in: aGCid
-
set the mask origin
-
setPixmapMask: aPixmapId in: aGCId
-
set or clear the drawing mask - a pixmap mask providing full color
-
setPlaneMask: bits in: aGCId
-
set foreground color to be drawn with
initialization & release
-
closeConnection
-
close down the connection to the X-server
-
emergencyCloseConnection
-
low level close of the display's connection
(without sending any buffered requests to the display).
Only used in case of emergency (brokenConnection)
-
eventBufferSize
-
-
getWindowGroupWindow
-
Creates a fake WindowGroup view. This window is used
in XWMHints & _NET_WM_LEADER properties to define
application window group
-
initializeDefaultValues
-
JV@2012: On X11, mouse buttons are: left=1, middle=2, right=3
Even on 2-button mouse (button 2 is simply not reported).
Here the middle button is mapped to button #paste (which in EditTextView
pastes the PRIMARY selection). 128 is here to make clear that this
is somewhat special value.
This remapping kludge is here to have all the widget's code backward/windows
compatible while still having X11's middle button behavior.
Also note that buttonTranslation is overwritten in display.rc,
the code is here just for a case display.rc is not read/available
and for documentation (symbol references does not search .rc files).
-
initializeDeviceSignals
-
-
initializeFor: aDisplayName
-
initialize the receiver for a connection to an X-Server;
the argument, aDisplayName may be nil (for the default server from
DISPLAY-variable or command line argument) or the name of the server
as hostname:number
-
initializeModifierMappings
-
initialize keyboard modifiers.
We assume that mod1 are the META modifiers and mod2 are the ALT modifiers,
but if any of them contains the Num_Lock key, it is disregarded.
Usage example(s):
Display initializeModifierMappings
|
-
initializeScreenBounds
-
queries answer nil if not open
Usage example(s):
Display initializeScreenBounds
|
-
initializeScreenProperties
-
utf8StringAtom := self atomIDOf:#UTF8_STRING.
-
initializeSpecialFlags
-
perform additional special server implementation flags
-
initializeUniqueID
-
-
initializeVisual
-
-
invalidateConnection
-
the new display may support a different set of fonts
-
openConnectionTo: dpyName
-
open a connection to some display;
return the displayId if ok, nil of not ok
-
queryBlackPixel
-
Display queryBlackPixel
-
queryCells
-
Display queryCells
-
queryDefaultScreen
-
Display queryDefaultScreen
-
queryDefaultVisual
-
Display queryDefaultVisual
-
queryDefaultVisualType
-
Display queryDefaultVisualType
-
queryDepth
-
Display queryDepth
-
queryHeight
-
Display queryHeight
-
queryHeightMM
-
Display queryHeightMM
-
queryRGBMasks
-
Display queryRGBMasks
-
queryUsableExtent
-
Screen current queryUsableExtent
-
queryWhitePixel
-
Display queryWhitePixel
-
queryWidth
-
Display queryWidth
-
queryWidthMM
-
Display queryWidthMM
-
reinitialize
-
(comment from inherited method)
historic leftover (old subclasses call super reinitialize)
-
releaseDeviceResources
-
(comment from inherited method)
release any cached device resources.
This is invoked when closed or when the display connection is broken
(i.e. be prepared to not be able to release resources regularily)
keyboard mapping
-
altModifierMask
-
return the mask (in motionEvents) for the alt-key modifier.
Notice: ST/X may use the left ALT key as CMD/Meta key,
therefore return a variable here, which can be changed during startup.
-
altModifierMask: aSmallInteger
-
define which key takes the role of an alt-key.
By default, this is X's modifier1, which is the ALT key on
most keyboards. However, there may be exceptions to this,
and the setting can be changed with:
Display altModifierMask:(Display modifier2Mask)
Setting the mask to 0 disables the ALT key (in ST/X) altogether.
-
appleAltModifierMask
-
return the Xlib mask bit for the ALT modifier key on OS-X.
Nil returned for other displays
-
appleCmdModifierMask
-
return the Xlib mask bit for the CMD modifier key on OS-X.
Nil returned for other displays
-
ctrlModifierMask
-
return the Xlib mask bit for the control modifier key
-
metaModifierMask
-
return the mask (in motionEvents) for the meta-key modifier.
Notice: ST/X may use the left ALT key as CMD/Meta key,
therefore return a variable here, which can be changed during startup.
-
metaModifierMask: aSmallInteger
-
define which key takes the role of a meta key.
By default, this is X's modifier2, which is the 2nd ALT key on
most keyboards (if present at all).
However, there may be exceptions to this, and the setting can
be changed with:
Display metaModifierMask:(Display modifier1Mask)
Setting the mask to 0 disables the META key (in ST/X) altogether.
As reported, some Xservers place the Meta-key onto NumLock,
and having NumLock enabled makes ST/X think, that meta is pressed
all the time. On those, you should disable the meta key by setting
the mask to 0.
-
modifier1Mask
-
return the Xlib mask bit for the 1st modifier key.
See comment in altModifierMask: / metaModifierMask: for what
this could be used.
-
modifier2Mask
-
return the Xlib mask bit for the 2nd modifier key.
See comment in altModifierMask: / metaModifierMask: for what
this could be used.
-
modifier3Mask
-
return the Xlib mask bit for the 3rd modifier key.
See comment in altModifierMask: / metaModifierMask: for what
this could be used.
-
modifier4Mask
-
return the Xlib mask bit for the 4th modifier key.
See comment in altModifierMask: / metaModifierMask: for what
this could be used.
-
modifier5Mask
-
return the Xlib mask bit for the 5th modifier key.
See comment in altModifierMask: / metaModifierMask: for what
this could be used.
-
modifierMapping
-
Get the Modifier Mapping.
We return an array of arrays of keycodes
Usage example(s):
Usage example(s):
|mapping|
mapping := Display modifierMapping.
^ mapping collect:[:eachRow |
eachRow notNil ifTrue:[
eachRow collect:[ :key | Display stringFromKeycode:key ].
] ifFalse:[
nil
]
].
|
-
rawKeySymTranslation
-
Get the raw keyboard mapping (maps some special X-keySyms to STX-internal names
and can also be used to untranslate a stupid x-mapping (as on hpux).
Usage example(s):
Display rawKeySymTranslation
|
-
rawModifierMapping
-
Get the raw Modifier Mapping.
Usage example(s):
Display rawModifierMapping
|
-
shiftModifierMask
-
return the Xlib mask bit for the shift modifier key
-
superModifierMask
-
return the Xlib mask bit for the super modifier key
-
symbolFromKeycode: code
-
Get a KeySymbol (a smalltalk symbol) from the keycode.
Usage example(s):
Display symbolFromKeycode:50
|
misc
-
beep
-
output an audible beep or bell
Usage example(s):
-
beep: aSymbolOrInteger volume: volumeInPercent
-
output an audible beep. aSymbolOrInteger determines the sound, but is ignored here
(kept for comaptibilty with WinWorkstation).
-
buffered
-
buffer drawing - do not send it immediately to the display.
This is the default anyway.
See #unBuffered for additional info.
Usage example(s):
-
flush
-
send all buffered drawing to the display.
This may be required to make certain, that all previous operations
are really sent to the display before continuing. For example,
after a cursor-change with a followup long computation.
(otherwise, the cursor change request may still be in the output buffer)
See also #sync, which even waits until the request has been processed.
-
flushDpsContext: aDPSContext
-
-
flushIfAppropriate
-
flush the device, if necessary
-
primSync
-
send all buffered drawing to the display AND wait until the display
has finished drawing it.
This is almost never needed, except if you are about to read previously
drawn pixels back from the display screen, or you want to wait for a beep
to be finished. See also #flush.
-
refreshKeyboardMapping: eB
-
-
roundTripTime
-
answer the round trip time in milliSeconds.
May be used to detect slow X11 connections
Usage example(s):
Screen current roundTripTime
|
-
setInputFocusTo: aWindowId
-
set the focus to the view as defined by aWindowId.
When released, return the focus to the root window
Usage example(s):
self setInputFocusTo:aWindowId revertTo:#parent
|
-
setInputFocusTo: aWindowId revertTo: revertSymbol
-
set the focus to the view as defined by aWindowId.
Passing nil set the focus to no window and lets the display discard all
input until a new focus is set.
RevertSymbol specifies what should happen if the view becomes invisible;
passing one of #parent, #root or nil specifies that the focus should be
given to the parent view, the root view or no view.
-
sync
-
send all buffered drawing to the display AND wait until the display
has finished drawing it.
This is almost never needed, except if you are about to read previously
drawn pixels back from the display screen, or you want to wait for a beep
to be finished. See also #flush.
-
unBuffered
-
make all drawing be sent immediately to the display.
This makes all graphics synchronous and turns off any buffering
(i.e. each individual draw-request is sent immediately without
packing multiple requests into a larger message buffer).
Be prepared, that this slows down graphics considerably.
However, it allows display errors to be handled immediately and
may be useful if you get Xdisplay errors and want to find the request
which was responsible for it. See also #buffered.
Usage example(s):
pointer stuff
-
anyButtonStateMask
-
return an integer for masking out any button from a
buttonStates value.
-
buttonStates
-
return an integer representing the state of the pointer buttons;
a one-bit in positions 0.. represent a pressed button.
See the button1Mask/button2Mask/button3Mask,
shiftMask/controlMask and modifierMask methods for the meaning of the bits.
Usage example(s):
Usage example(s):
is the control-key pressed ?
Display buttonStates bitTest:(Display controlMask)
|
Usage example(s):
is the alt/meta-key pressed ?
Display buttonStates bitTest:(Display altModifierMask)
Display buttonStates bitTest:(Display metaModifierMask)
|
-
leftButtonStateMask
-
return an integer for masking out the left button from a
buttonStates value
-
middleButtonStateMask
-
return an integer for masking out the middle button from a
buttonStates value
-
pointerPosition
-
return the current pointer position in (virtual) root-window coordinates
-
rightButtonStateMask
-
return an integer for masking out the right button from a
buttonStates value
-
rootPositionOfLastEvent
-
return the position in root-window coordinates
of the last button, key or pointer event
-
setPointerPosition: newPosition in: aWindowId
-
change the pointer position to a new position relative to the
given windows origin (which may be the rootWindow).
Be careful with this - its usually not very ergonomically
to change the mousePointer position.
This interface is provided for special applications (presentation
playback) and should not be used in normal applications.
Usage example(s):
Display setPointerPosition:1000@1000
Display setPointerPosition:0@0
|
private
-
addSelectionHandler: someone
-
register someone to be notified when the selection changes
-
findSelectionFetcher: aDrawableId
-
find the SelectionFetcher that receives selection events for aDrawableId.
Answer nil, if there is none
-
registerSelectionFetcher: aSelectionFetcher
-
register a SelectionFetcher that receives selection events for aDrawableId
-
removeSelectionHandler: someone
-
no longer tell someone about selection changes
-
unregisterSelectionFetcher: aSelectionFetcher
-
unregister a SelectionFetcher that received selection events for aDrawableId
properties
-
deleteProperty: propertyID for: aWindowID
-
delete a property in the XServer
-
getPropertiesFrom: aWindowOrWindowIDOrNil
-
get all properties as a dictionary mapping names to values
Usage example(s):
Display getPropertiesFrom:nil
Display getProperty:'_NET_ACTIVE_WINDOW' from:nil delete:false
Display getPropertiesFrom:Transcript
Display getProperty:'_NET_CLIENT_LIST' from:nil delete:false
Display getProperty:'_NET_SUPPORTED' from:nil delete:false
Display getProperty:'_NET_SUPPORTING_WM_CHECK' from:nil delete:false
Display getProperty:'_NET_CLIENT_LIST' from:Transcript delete:false
Display getPropertiesFrom:Transcript
|
-
getProperty: propertySymbolOrAtomID from: aWindowOrWindowIDOrNil delete: doDelete
-
get a property as an association propertyType->propertyValue;
ATTENTION:
IFF the property is UTF8 encoded, it is decoded here
(needed because otherwise we could not DND utf8 encoded filenames
Usage example(s):
Display
getProperty:#'_NET_DESKTOP_NAMES'
from:nil
delete:false
Display
getProperty:#'_NET_CURRENT_DESKTOP'
from:nil
delete:false
Display
getProperty:#'_NET_WM_ALLOWED_ACTIONS'
from:Transcript
delete:false
Display
getProperty:#'_NET_WM_NAME'
from:Transcript
delete:false
Display
getProperty:#'WM_NAME'
from:Transcript
delete:false
Display
getProperty:#'_NET_FRAME_EXTENTS'
from:Transcript
delete:false
Display
getProperty:#'_NET_SUPPORTED'
from:nil
delete:false
Transcript showCR:(
(Display
getProperty:#'_NET_SUPPORTED'
from:nil
delete:false) value
collect:[:eachID | Display atomName:eachID])
|
-
primGetProperty: propertyAtomID from: aWindowIDOrNil delete: doDelete
-
get a property as an association propertyType->propertyValue
-
primGetPropertyNamesFrom: aWindowIDOrNil
-
get names of all properties as a collection
-
primSetProperty: propertyID type: typeID value: anObject for: aWindowID
-
set a property in the XServer
-
propertiesOf: aWindowOrWindowIDOrNil
-
return a collection of all properties' atomIDs of a window.
Returns the rootWindows props for a nil window argument.
Usage example(s):
Display propertiesOf:nil
Display propertiesOf:Transcript id
(Display propertiesOf:nil) collect:[:eachID | Display atomName:eachID]
(Display propertiesOf:Transcript id) collect:[:eachID | Display atomName:eachID]
|
-
setIcon: anIcon for: aWindowOrWindowID
-
Display setIcon:0 for:Transcript
-
setProperty: propertySymbolOrAtomID type: typeSymbolOrAtomID value: anObject for: aWindowOrWindowIDOrNil
-
set a property in the XServer.
Answer true or false.
queries
-
defaultExtentForTopViews
-
redefined, to define the default extent for the default monitor
-
isOpen
-
answer true, if device can be used
-
isXineramaActive
-
Display isXineramaActive
-
screenImagePixelOffset
-
on OS X (and maybe on other systems), XQuartz has a problem with
absolute screen positions:
it uses coordnates relative to the top system menu
(i.e. negative offset of the menu's height).
This may affect things like screenshots (which might be taken outside of X),
or window coordinates we pass to or get from outside systems.
Its a pity, that XQuartz does not itself somehow compensate for that (sigh).
This method determines that delta by looking at the mouse position both
with an X call and a non-X call.
For now: only used with OS X.
Usage example(s):
Display screenImagePixelOffset.
|
resources
-
atomIDOf: aStringOrSymbol
-
return an X11 atom's ID.
This is highly X specific and only for local use (with selections).
The default is to create the atom, if it does not exist, in order to
speed up future lookups
Usage example(s):
Display atomIDOf:#'FACE_NAME'
Display atomIDOf:#'FULL_NAME'
Display atomIDOf:#DndProtocol
Display atomIDOf:#DndSelection
|
-
atomIDOf: aStringOrSymbol create: create
-
return an Atom's ID, given its name.
If it already exists, return its ID.
If not and the create argument is true, it is created.
Otherwise, nil is returned.
This is highly X specific and only for local use (with selections).
Usage example(s):
Display atomIDOf:#'VT_SELECTION' create:false
Display atomIDOf:#CLIPBOARD create:false
Display atomIDOf:'STRING' create:false
Display atomIDOf:'PRIMARY' create:false
Display atomIDOf:'blabla' create:false
|
-
atomName: anAtomID
-
given an AtomID, return its name.
This is highly X specific and only for local use (with selections).
Usage example(s):
Display atomName:1 'PRIMARY'
Display atomName:130 '_DEC_DEVICE_FONTNAMES'
Display atomName:132 'FONTNAME_REGISTRY'
Display atomName:135 'FOUNDRY'
Display atomName:150 'CHARSET_REGISTRY'
Display atomName:151 'ISO8859'
Display atomName:152 'CHARSET_ENCODING'
Display atomName:154
|
-
getResource: name class: cls
-
access the displays resource database for a default value
of name in a resource class.
This is highly X specific and currently not used.
Notice:
we do not plan to use X's resources for ST/X's defaults,
styles or resources. This would make porting of applications
to different platforms much more difficult (Windows has no resource
database). If you stay within ST/X's resource files, these can be
easily transported to other platforms.
This method is provided for special applications which want to access
existing X resources and are not planned to be ever ported to other
platforms.
-
primAtomIDOf: aStringOrSymbol create: create
-
return an Atoms ID; if create is true, create it if not already present.
This is highly X specific and only for local use (with selections).
Usage example(s):
Display primAtomIDOf:'VT_SELECTION' create:false
Display primAtomIDOf:'CUT_BUFFER0' create:false
Display primAtomIDOf:'STRING' create:false
Display primAtomIDOf:'PRIMARY' create:false
|
retrieving pixels
-
getBitsFromId: aDrawableId x: srcx y: srcy width: w height: h into: imageBits
-
get bits from a drawable into the imageBits. The storage for the bits
must be big enough for the data to fit. If ok, returns an array with some
info and the bits in imageBits. The info contains the depth, bitOrder and
number of bytes per scanline. The number of bytes per scanline is not known
in advance, since the X-server is free to return whatever it thinks is a good padding.
-
getPixelX: x y: y from: aDrawableId with: dummyGCId
-
return the pixel value at x/y; coordinates start at 0/0 for the upper left.
Nil is returned for invalid coordinates or if any other problem arises.
-
primGetBitsFrom: aDrawableId x: srcx y: srcy width: w height: h into: imageBits infoInto: info
-
since XGetImage may allocate huge amount of stack space
(some implementations use alloca), this must run with unlimited stack.
selection fetching
-
getClipboardObjectFor: drawableId
-
get the object selection.
Returns nil, if no selection is available.
Smalltalk puts ST_OBJECT only into the CLIPBOARD
Usage example(s):
Display getClipboardObjectFor:Transcript drawableId
|
-
getClipboardText: selectionBufferSymbol for: drawableId
-
get the text selection.
Returns nil, if no selection is available
Usage example(s):
Display getClipboardText:#clipboard for:Transcript drawableId
Display getClipboardText:#selection for:Transcript drawableId
|
selection sending
-
selectionBuffer: bufferGetSelector as: aTargetAtomID
-
convert the current selection to the format defined by aTargetAtom.
Answer an association with the type of converted selection (an atomID)
and the converted selection
Usage example(s):
('selectionBuffer: unsupported targetAtomID: ',(aTargetAtomID printString)) infoPrintCR.
|
-
setClipboardObject: anObject owner: aWindowId
-
set the object selection, and make aWindowId be the owner.
This can be used by other Smalltalk(X) applications only.
We set only the CLIPBOARD selection
-
setClipboardText: aString owner: aWindowId
-
set the text selection, and make aWindowId be the owner.
This can be used by any other X application.
We set both the PRIMARY and CLIPBOARD, so that you can paste
into xterm.
BUT: only if setPrimarySelectionOnSelet is enabled, because
XQuartz has a bug, setting the CLIPBOARD then,
which makes copy - paste-onto-selected-text impossible
-
setPrimaryText: aString owner: aWindowId
-
set the PRIMARY selection, and make aWindowId be the owner.
This can be used by any other X application when middle-click
pasting. X Window specific.
-
supportedTargetAtoms
-
answer an integer array containing the list of supported targets
i.e. supported clipboard formats
selections-basic
-
getSelectionOwnerOf: selectionAtomSymbolOrID
-
get the owner of a selection, aDrawableID.
Answer nil, if there is no owner
-
requestSelection: selectionID type: typeID for: aWindowId intoProperty: propertyID
-
ask the server to send us the selection - the view with id aWindowID
will later receive a SelectionNotify event for it (once the Xserver replies
with the selections value).
Usage example(s):
Display
requestSelection:(Display atomIDOf:'PRIMARY')
property:(Display atomIDOf:'VT_SELECTION')
type:(Display atomIDOf:'STRING')
for:Transcript id
|
Usage example(s):
Display
requestSelection:(Display atomIDOf:'PRIMARY')
property:(Display atomIDOf:'VT_SELECTION')
type:(Display atomIDOf:'C_STRING')
for:Transcript id
|
-
sendNotifySelection: selectionID property: propertyID target: targetID time: aTime to: requestorID
-
send a selectionNotify back from a SelectionRequest.
PropertyID should be the same as requested or nil, if the selection
could not be converted.
TargetId should be the same as requested.
Time should be the time when the selection has been acquired
-
setSelectionOwner: aWindowId of: selectionAtomSymbolOrID time: anIntegerTimestamp
-
set the owner of a selection; return false if failed
window queries
-
allChildIdsOf: aWindowId
-
return all children-ids of the given window.
Allows for all windows to be enumerated, if we start at the root.
Usage example(s):
Display allChildIdsOf:(Display rootWindowId)
|
Usage example(s):
|deviceIDAtom uuidAtom|
deviceIDAtom := (Display atomIDOf:#'STX_DEVICE_ID').
uuidAtom := (Display atomIDOf:#'UUID').
(Display allChildIdsOf:(Display rootWindowId))
select:[:id |
|uuid|
Display
getProperty:deviceIDAtom
from:id
delete:false
into:[:type :value |
type == uuidAtom ifTrue:[
uuid := UUID fromBytes:value.
].
].
uuid notNil.
]
|
-
childIdsOf: aWindowId
-
return all children-ids of the given window. Allows for all windows to be
enumerated, if we start at the root.
Usage example(s):
Display childIdsOf:(Display rootWindowId)
|
-
realRootWindowId
-
return the id of the real root window.
This may not be the window you see as background,
since some window managers install a virtual root window on top
of it. Except for very special cases, use #rootWindowId, which takes
care of any virtual root.
Usage example(s):
Display rootWindowId
Display realRootWindowId
|
-
rootWindowId
-
return the id of the root window.
This is the window you see as background,
however, it may or may not be the real physical root window,
since some window managers install a virtual root window on top
of the real one. If this is the case, that views id is returned here.
Usage example(s):
window stuff
-
clearRectangleX: x y: y width: width height: height in: aWindowId
-
clear a rectangular area to viewbackground
-
clearWindow: aWindowId
-
clear a window to viewbackground
-
configureWindow: aWindowId sibling: siblingId stackMode: modeSymbol
-
configure stacking operation of aWindowId w.r.t siblingId
-
getGeometryOf: aWindowId
-
get a windows geometry.
NOTICE: X-WindowManagers usually do wrap client topViews into their own
decoration views (top label, resize boundaries etc.).
Thus, the numbers returned here for topViews are the physical (real) dimensions
relative to such a wrapper.
In contrast, the values found in the view's instance variables are virtual dimensions
(i.e. ST/X makes this decoration view transparent to the program.
Usage example(s):
Transcript topView device
getGeometryOf:(Transcript id)
|
Usage example(s):
Transcript topView device
getGeometryOf:(Transcript topView id)
|
Usage example(s):
Display
getGeometryOf:(Display viewIdFromUser)
|
Usage example(s):
|d|
d := Transcript topView device.
d getGeometryOf:(d parentWindowIdOf:Transcript topView id)
|
-
iconify: aView id: aWindowId
-
iconify a window.
-
isValidWindowId: aWindowId
-
return true, if the given window ID is (still) valid.
Especially useful, if the passed windowID is
an alien (external) windows id.
Usage example(s):
|v aWindowId ok|
v := StandardSystemView new.
v label:'hello'.
v openAndWaitUntilVisible.
aWindowId := v id.
ok := Display isValidWindowId:aWindowId.
Transcript showCR:'ok is: ' , ok printString.
Delay waitForSeconds:1.
v destroy.
ok := Display isValidWindowId:aWindowId.
Transcript showCR:'ok is: ' , ok printString.
|
-
lowerWindow: aWindowId
-
bring a window to back
-
mapView: aView id: aWindowId iconified: aBoolean atX: xPos y: yPos width: w height: h minExtent: minExt maxExtent: maxExt
-
make a window visible - either as icon or as a real view
in addition, allow change of extend, position, minExtend and maxExtent.
Needed for restart, to allow recreating a view as iconified,
and to collaps/expand windows.
-
mapWindow: aWindowId
-
make a window visible
-
moveResizeWindow: aWindowId x: x y: y width: w height: h
-
move and resize a window
-
moveWindow: aWindowId x: x y: y
-
move a window
-
newGraphicsContextFor: aGraphicsMedium
-
Redefined to use my own device specific graphics context
-
parentWindowIdOf: aWindowId
-
return a windows parent-window id.
Useful with getGeometryOf:, to compute information about the decoration.
Usage example(s):
|id|
id := Transcript device parentWindowIdOf:(Transcript id).
self assert: ( Transcript container id = id ).
|
-
raiseWindow: aWindowId
-
bring a window to front
-
reparentWindow: windowId to: newParentWindowId
-
change a windows parent (an optional interface)
-
resizeWindow: aWindowId width: w height: h
-
resize a window
-
setBackingStore: how in: aWindowId
-
turn on/off backing-store for a window
-
setBitGravity: how in: aWindowId
-
set bit gravity for a window
-
setCursor: aCursorId in: aWindowId
-
define a windows cursor
-
setForegroundWindow: aWindowId
-
bring a window to front.
Send a specific message to the WindowManager
-
setIconName: aString in: aWindowId
-
define a windows iconname
-
setSaveUnder: yesOrNo in: aWindowId
-
turn on/off save-under for a window
-
setTransient: aWindowId for: aMainWindowId
-
set aWindowId to be a transient of aMainWindow
-
setWindowBackground: aColorIndex in: aWindowId
-
set the windows background color. This is the color with which
the view is filled whenever exposed. Do not confuse this with
the background drawing color, which is used with opaque drawing.
-
setWindowBackgroundPixmap: aPixmapId in: aWindowId
-
set the windows background pattern to be a form.
This is the pattern with which the view is filled whenever exposed.
Do not confuse this with the background drawing color, which is used
with opaque drawing.
-
setWindowBorderColor: aColorIndex in: aWindowId
-
set the windows border color
-
setWindowBorderPixmap: aPixmapId in: aWindowId
-
set the windows border pattern
-
setWindowBorderShape: aPixmapId in: aWindowId
-
set the windows border shape
-
setWindowBorderWidth: aNumber in: aWindowId
-
set the windows border width
-
setWindowClass: wClass name: wName in: aWindowId
-
define class and name of a window.
This may be used by the window manager to
select client specific resources.
-
setWindowGravity: how in: aWindowId
-
set window gravity for a window
-
setWindowIcon: aForm in: aWindowId
-
define a bitmap to be used as icon
-
setWindowIcon: aForm mask: aMaskForm in: aWindowId
-
define a windows icon and (optional) iconMask.
-
setWindowIconWindow: aView in: aWindowId
-
define a window to be used as icon
-
setWindowMinExtentX: minW y: minH maxExtentX: maxW y: maxH in: aWindowId
-
set a windows minimum & max extents.
nil arguments are ignored.
-
setWindowName: aString in: aWindowId
-
define a windows name
-
setWindowPid: anIntegerOrNil in: aWindowId
-
Sets the _NET_WM_PID property for the window.
This may be used by the window manager to group windows.
If anIntegerOrNil is nil, then PID of currently running
Smalltalk is used
-
setWindowShape: aPixmapId in: aWindowId
-
set the windows shape.
Returns false, if the display does not support the
X shape extension.
-
setWindowState: aSymbol in: aWindowId
-
tell the window type to the window manager.
Send a specific message to the WindowManager
Usage example(s):
|v|
v := TopView new create.
Display setWindowState:#'_NET_WM_STATE_ABOVE' in:v id.
v open.
|
-
setWindowType: aSymbol in: aWindowOrWindowId
-
Tell the window type to the window manager.
See Extended Window Manager Hints 1.3,
chapter 'Application Window Properties'
http://standards.freedesktop.org/wm-spec/1.3/
It also helps to fix super-annoying problem with window autoraiser
on X11 in a proper way - window manager should manage top-level
window stacking, that's why it is called a 'window manager' :-)
-
unmapWindow: aWindowId
-
make a window invisible
-
windowIsIconified: aWindowId
-
return true, if some window is iconified.
The passed windowID may be an alien windows id.
PseudoDeviceWithoutXFTSupport
SelectionFetcher
WindowGroupWindow
|