--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgautomerge Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,24 @@
+[automerge]
+# Automatically merge pulled changes from specified mercurial branch (if exists)
+# to specified mercurial branch (if exists). The syntax is
+#
+# automerge = <from-branch>:<to branch>.
+#
+# The example below will merge changed from branch `default` to branch `jv`.
+# If merge fails, issue a warning but proceed. Optional.
+#
+# automerge = default:jv
+automerge = default:jv
+#
+# If defined and if merge succeeds (there are no unresolved conflicts),
+# check the merged working copy using given command. The command is executed
+# with CWD set to repository root. `#{dir}` in the command string will be
+# expanded to actuall repository path.
+# Following commands are built-in:
+#
+# * internal:make - run `make`
+#
+# A command line option --check overrides this setting. See `hg-automerge --help`.
+#
+# checkcmd = internal:make
+checkcmd = internal:make
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,16 @@
+
+syntax: glob
+*Init.c
+makefile
+*.so
+*.H
+*.o
+*.STH
+*.sc
+objbc
+objvc
+*.class
+java/libs/*.jar
+java/libs-src/*.jar
+*-Test.xml
+st.chg
--- a/AlphaMask.st Tue Jan 03 14:45:53 2017 +0100
+++ b/AlphaMask.st Thu Jan 05 21:04:46 2017 +0000
@@ -9,8 +9,7 @@
other person. No title to or ownership of the software is
hereby transferred.
"
-
-
+"{ Package: 'stx:libview' }"
Depth8Image subclass:#AlphaMask
instanceVariableNames:''
@@ -80,3 +79,4 @@
version
^ '$Header: /cvs/stx/stx/libview/AlphaMask.st,v 1.1 1997-04-22 12:17:09 cg Exp $'
! !
+
--- a/ControllerWithMenu.st Tue Jan 03 14:45:53 2017 +0100
+++ b/ControllerWithMenu.st Thu Jan 05 21:04:46 2017 +0000
@@ -9,7 +9,6 @@
other person. No title to or ownership of the software is
hereby transferred.
"
-
"{ Package: 'stx:libview' }"
Controller subclass:#ControllerWithMenu
@@ -97,3 +96,4 @@
version
^ '$Header: /cvs/stx/stx/libview/ControllerWithMenu.st,v 1.9 2005-04-18 16:29:58 cg Exp $'
! !
+
--- a/Depth32Image.st Tue Jan 03 14:45:53 2017 +0100
+++ b/Depth32Image.st Thu Jan 05 21:04:46 2017 +0000
@@ -15,7 +15,8 @@
Image subclass:#Depth32Image
instanceVariableNames:''
- classVariableNames:''
+ classVariableNames:'RGBA_R_OFFSET_NET RGBA_G_OFFSET_NET RGBA_B_OFFSET_NET
+ RGBA_A_OFFSET_NET'
poolDictionaries:''
category:'Graphics-Images'
!
@@ -53,6 +54,18 @@
"
! !
+!Depth32Image class methodsFor:'initialization'!
+
+initialize
+ RGBA_A_OFFSET_NET := 4.
+ RGBA_B_OFFSET_NET := 3.
+ RGBA_G_OFFSET_NET := 2.
+ RGBA_R_OFFSET_NET := 1.
+
+ "Created: / 28-02-2016 / 11:29:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 28-02-2016 / 14:36:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!Depth32Image class methodsFor:'queries'!
defaultPhotometric
@@ -74,6 +87,61 @@
"Created: 24.4.1997 / 19:00:28 / cg"
! !
+!Depth32Image methodsFor:'accessing'!
+
+bitsARGB32Into: buffer startingAt: first stride: stride
+ "Store each pixel is a 32-bit quantity, with alpha in the upper
+ 8 bits, then red, then green, then blue. The 32-bit quantities are
+ stored native-endian. Pre-multiplied alpha is used. (That is, 50%
+ transparent red is 0x80800000, not 0x80ff0000.)
+
+ IMPORTANT: The following code assumes that the data (`bytes` instvar)
+ are stored in network byte order with NON-premultiplied alpha. This is
+ true for PNG data.
+
+ NOTE: This is a good candidate for C-level optimization.
+ "
+
+ | base pixelIndex bufferIndex a r g b |
+
+ pixelFunction isNil ifTrue:[
+ photometric == #rgba ifTrue:[
+ bitsPerSample = #(8 8 8 8) ifTrue:[
+ 1 to: height do:[:y |
+ base := ((y - 1) * stride) + first - 1.
+ 1 to: width do:[:x |
+ pixelIndex := ((((y - 1) * width) + (x - 1)) * 4).
+ "/ Extract components...
+ a := bytes at: pixelIndex + RGBA_A_OFFSET_NET.
+ r := bytes at: pixelIndex + RGBA_R_OFFSET_NET.
+ g := bytes at: pixelIndex + RGBA_G_OFFSET_NET.
+ b := bytes at: pixelIndex + RGBA_B_OFFSET_NET.
+ "/ Pre-multiply
+ r := (r * a) // 255.
+ g := (g * a) // 255.
+ b := (b * a) // 255.
+ "/ Assemble pixel
+ bufferIndex := base + ((x - 1) * 4).
+ buffer at: bufferIndex + ARGB_A_OFFSET_MACHINE put: a.
+ buffer at: bufferIndex + ARGB_R_OFFSET_MACHINE put: r.
+ buffer at: bufferIndex + ARGB_G_OFFSET_MACHINE put: g.
+ buffer at: bufferIndex + ARGB_B_OFFSET_MACHINE put: b.
+ ]
+ ].
+ ^ self.
+ ].
+ ].
+ photometric == #argb ifTrue:[
+ self notYetImplemented.
+ ^ self.
+ ].
+ ].
+ ^ super bitsARGB32Into: buffer startingAt: first stride: stride
+
+ "Created: / 28-02-2016 / 06:54:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 28-02-2016 / 14:44:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!Depth32Image methodsFor:'accessing-pixels'!
colorAtX:x y:y
@@ -1074,3 +1142,5 @@
^ '$Header$'
! !
+
+Depth32Image initialize!
--- a/DeviceGraphicsContext.st Tue Jan 03 14:45:53 2017 +0100
+++ b/DeviceGraphicsContext.st Thu Jan 05 21:04:46 2017 +0000
@@ -227,9 +227,28 @@
!
basicFont:aFont
- "compatibility with GraphicsMedium"
-
- self font:aFont.
+ "set the font for drawing if it has changed.
+ This is a low level entry, which is not to be redefined
+ (i.e. it must not imply a redraw operation)"
+
+ |id|
+
+ (aFont notNil and:[aFont ~~ font]) ifTrue:[
+ font := aFont.
+ device notNil ifTrue:[
+ font := font onDevice:device.
+ gcId notNil ifTrue:[
+ id := font fontId.
+ id notNil ifTrue:[
+ deviceFont := font.
+ device setFont:id in:gcId
+ ]
+ ]
+ ]
+ ]
+
+ "Created: / 23-02-1996 / 17:16:51 / cg"
+ "Modified: / 22-10-2006 / 14:11:37 / cg"
!
capStyle:aSymbol
@@ -444,9 +463,10 @@
!
drawableId
- "return the id of the drawable on the device"
-
^ drawableId
+
+ "Created: / 10-07-2008 / 10:20:04 / Jan Vrany <vranyj1@fel.cvut.cz>"
+ "Modified (format): / 26-04-2016 / 07:11:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
font
@@ -460,28 +480,13 @@
!
font:aFont
- "set the font for drawing if it has changed.
- This is a low level entry, which is not to be redefined
- (i.e. it must not imply a redraw operation)"
-
- |id|
-
- (aFont notNil and:[aFont ~~ font]) ifTrue:[
- font := aFont.
- device notNil ifTrue:[
- font := font onDevice:device.
- gcId notNil ifTrue:[
- id := font fontId.
- id notNil ifTrue:[
- deviceFont := font.
- device setFont:id in:gcId
- ]
- ]
- ]
+ "set the font for drawing if it has changed."
+
+ (aFont ~~ font) ifTrue:[
+ self basicFont:aFont.
]
- "Created: / 23-02-1996 / 17:16:51 / cg"
- "Modified: / 22-10-2006 / 14:11:37 / cg"
+ "Modified: 6.3.1996 / 18:17:40 / cg"
!
function:aSymbol
@@ -723,7 +728,7 @@
!
setClippingBounds:aRectangleOrNil
- "set the clipping rectangle for drawing (in logical coordinates).
+ "set the clipping rectangle for drawing (in physical coordinates.
Only set the variable, do not change the gc"
clipRect := aRectangleOrNil
@@ -1409,7 +1414,7 @@
Assuming that device can only draw in device colors, we have to handle
the case where paint and/or bgPaint are dithered colors"
- self displayString:aString from:index1 to:index2 x:x y:y opaque:true
+ self displayString:aString from:index1 to:index2 x:x y:y opaque:true maxWidth:nil
!
displayOpaqueString:aString x:x y:y
@@ -3429,6 +3434,12 @@
DeviceGraphicContexts have their own Registry"
^ device graphicsContexts
+!
+
+registerChange
+ "register a change with the finalizationLobby"
+
+ Lobby registerChange:self.
! !
!DeviceGraphicsContext methodsFor:'initialization & release'!
@@ -3460,14 +3471,11 @@
destroy
|id|
- id := gcId.
- id notNil ifTrue:[
- gcId := nil.
- device destroyGC:id.
- ].
-
+
+ self destroyGC .
id := drawableId.
id notNil ifTrue:[
+ self changed:#aboutToDestroy.
drawableId := nil.
drawableType == #window ifTrue:[
device destroyView:nil withId:id.
@@ -3478,6 +3486,16 @@
].
!
+destroyGC
+ |id|
+
+ id := gcId.
+ id notNil ifTrue:[
+ gcId := nil.
+ device destroyGC:id.
+ ].
+!
+
initGC
"since we do not need a gc-object for the drawable until something is
really drawn, none is created.
@@ -3745,6 +3763,27 @@
drawableId := aDrawableId
"Created: / 6.2.1998 / 12:44:45 / cg"
+!
+
+subViewChangedSizeOrOrigin
+ "Internal. Called whenever one of the owner's
+ subview changes size or origin (i.e., when moved)
+ See SimpleView>>pixelOrigin:extent:.
+ Can be used to adjust internal state."
+
+ "/ Nothing by default
+
+ "Created: / 02-04-2016 / 15:35:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+width: width height: height
+ "Internal. Called by SimpleView when resized.
+ See SimpleView>>pixelOrigin:extent:.
+ Can be used to adjust internal state."
+
+ "/ Nothing by default
+
+ "Created: / 02-04-2016 / 14:34:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!DeviceGraphicsContext methodsFor:'queries'!
@@ -3831,7 +3870,7 @@
drawableId := device createPixmapWidth:w height:h depth:d.
drawableId isNil ifTrue:[
"/ creation failed
- ('[GC] warning: pixmap creation failed: ',((OperatingSystem lastErrorString) ? 'unknown error')) errorPrintCR.
+ Logger warning: 'pixmap creation failed: ' with: ((OperatingSystem lastErrorString) ? 'unknown error').
^ GraphicsDevice::GraphicResourceAllocationFailure query
].
drawableType := #pixmap.
@@ -4056,5 +4095,10 @@
version_CVS
^ '$Header$'
+!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
! !
--- a/DeviceHandle.st Tue Jan 03 14:45:53 2017 +0100
+++ b/DeviceHandle.st Thu Jan 05 21:04:46 2017 +0000
@@ -11,6 +11,8 @@
"
"{ Package: 'stx:libview' }"
+"{ NameSpace: Smalltalk }"
+
Object subclass:#DeviceHandle
instanceVariableNames:'device drawableId gcId'
classVariableNames:''
--- a/DeviceWorkstation.st Tue Jan 03 14:45:53 2017 +0100
+++ b/DeviceWorkstation.st Thu Jan 05 21:04:46 2017 +0000
@@ -3010,12 +3010,6 @@
!DeviceWorkstation methodsFor:'accessing-misc'!
-asPseudoDeviceWithoutXFTSupport
- "hack - see XWorkstation"
-
- ^ self
-!
-
defaultEventMask
"return a mask to enable some events by default."
--- a/DisplayRootView.st Tue Jan 03 14:45:53 2017 +0100
+++ b/DisplayRootView.st Thu Jan 05 21:04:46 2017 +0000
@@ -11,8 +11,6 @@
"
"{ Package: 'stx:libview' }"
-"{ NameSpace: Smalltalk }"
-
DisplaySurface subclass:#DisplayRootView
instanceVariableNames:''
classVariableNames:''
@@ -39,19 +37,19 @@
documentation
"
this class describes the rootWindow (which is the background window or
- desktop and can be used for drawing outside of Views
+ desktop and can be used for drawing outside of Views
i.e. for dragging between Views).
- For historic and compatibility reasons, there is a global variable
+ For historic and compatibility reasons, there is a global variable
called 'RootView', which is bound to the default displays ('Display')
rootview. We recommend, not to access this variable, instead, get a
displays rootView via the #rootView message (sent to the device).
Otherwise, your application will not work in a multiScreen environment.
- Instances of myself (i.e. these rootViews) are light-weight views;
+ Instances of myself (i.e. these rootViews) are light-weight views;
they do not support events, models etc.
They are pure drawing canvases and should be only used for special
- applications (i.e. dragging).
+ applications (i.e. dragging).
There may be display systems in which rootViews are not
supported/allowed implemented. So be VERY careful when using them.
@@ -86,7 +84,7 @@
[author:]
Claus Gittinger
"
-! !
+!
!DisplayRootView class methodsFor:'instance creation'!
@@ -169,7 +167,7 @@
altModifierMask etc.) or nil, so the key is always treated as a hotkey"
self sensor addEventListener:handler.
- device
+ self device
grabKey:aKey
modifier:optionalModifierMaskOrNil
window:self.
@@ -199,7 +197,7 @@
altModifierMask etc.) or nil, so the key is always treated as a hotkey"
self sensor removeEventListener:handler.
- device
+ self device
ungrabKey:aKey
modifier:optionalModifierMaskOrNil
window:self.
@@ -236,7 +234,7 @@
canDropObjects:aCollectionOfDropObjects
"return true, if aCollectionOfDropObjects can be
- dropped in the receiver.
+ dropped in the receiver.
False is returned here, since nothing can be dropped on the desktop.
(for now - actually some systems do allow dropping things on the desktop
and this query should be forwarded to my display device)"
--- a/DisplaySurface.st Tue Jan 03 14:45:53 2017 +0100
+++ b/DisplaySurface.st Thu Jan 05 21:04:46 2017 +0000
@@ -230,13 +230,13 @@
self drawableId notNil ifTrue:[
viewBackground isColor ifTrue:[
- viewBackground := viewBackground onDevice:self graphicsDevice.
+ viewBackground := viewBackground onDevice:device.
id := viewBackground colorId.
"
a real color (i.e. one supported by the device) ?
"
id notNil ifTrue:[
- self graphicsDevice setWindowBackground:id in:self drawableId.
+ device setWindowBackground:id in:self drawableId.
^ self
].
"
@@ -254,7 +254,7 @@
"
assume, it can convert itself to a form
"
- bgPixmap := viewBackground asFormOn:self graphicsDevice.
+ bgPixmap := viewBackground asFormOn:device.
bgPixmap isNil ifTrue:[
"/ assume it knows how to draw itself
^ self
@@ -279,13 +279,13 @@
"/ (in contrast, the pixmap filling is done by the
"/ window itself in its expose event handler)
- (self graphicsDevice supportsViewBackgroundPixmap:bgPixmap) ifFalse:[
+ (device supportsViewBackgroundPixmap:bgPixmap) ifFalse:[
defBG := View defaultViewBackgroundColor.
defBG isColor ifTrue:[
- defBG := defBG onDevice:self graphicsDevice.
+ defBG := defBG onDevice:device.
id := defBG colorId.
id notNil ifTrue:[
- self graphicsDevice setWindowBackground:id in:self drawableId.
+ device setWindowBackground:id in:self drawableId.
].
].
^ self
@@ -307,7 +307,7 @@
convert it into a deep form
"
colorMap := bgPixmap colorMap.
- devBgPixmap := Form width:w height:h depth:deviceDepth onDevice:self graphicsDevice.
+ devBgPixmap := Form width:w height:h depth:deviceDepth onDevice:device.
devBgPixmap isNil ifTrue:[
'DisplaySurface [warning]: could not create a device form for viewBackground' infoPrintCR.
^ self
@@ -325,12 +325,12 @@
colormap, which is not always the same as blackpixel/whitepixel ...
"
colorMap := bgPixmap colorMap.
- (colorMap at:1) colorId == self graphicsDevice whitepixel ifTrue:[
- (colorMap at:2) colorId == self graphicsDevice blackpixel ifTrue:[
+ (colorMap at:1) colorId == device whitepixel ifTrue:[
+ (colorMap at:2) colorId == device blackpixel ifTrue:[
"
ok, can use it
"
- self graphicsDevice setWindowBackgroundPixmap:(bgPixmap drawableId) in:self drawableId.
+ device setWindowBackgroundPixmap:(bgPixmap id) in:self drawableId.
^ self
]
].
@@ -338,13 +338,13 @@
"
no, must invert it
"
- devBgPixmap := Form width:w height:h depth:deviceDepth onDevice:self graphicsDevice.
+ devBgPixmap := Form width:w height:h depth:deviceDepth onDevice:device.
devBgPixmap paint:(colorMap at:2) on:(colorMap at:1).
devBgPixmap copyPlaneFrom:bgPixmap x:0 y:0 toX:0 y:0 width:w height:h.
bgPixmap := devBgPixmap.
]
].
- self graphicsDevice setWindowBackgroundPixmap:(bgPixmap drawableId) in:self drawableId.
+ device setWindowBackgroundPixmap:(bgPixmap id) in:self drawableId.
]
"Modified: / 23-01-2011 / 01:44:38 / cg"
@@ -698,7 +698,7 @@
"tell the Display to assign keyboard focus to the receiver"
self shown ifTrue:[
- device setInputFocusTo:self drawableId.
+ device setInputFocusTo:self drawableId.
].
"Modified: / 15.3.1999 / 08:25:10 / cg"
@@ -758,8 +758,8 @@
device setPointerPosition:aRelativePoint in:self drawableId.
"
- Transcript setPointerPosition:Transcript extent // 2.
- Screen current rootView setPointerPosition:100@100.
+ Transcript setPointerPosition:Transcript extent // 2.
+ Screen current rootView setPointerPosition:100@100.
"
! !
@@ -943,9 +943,9 @@
getClipboardText:selectionBufferSymbol
"return the text selection - either the local one, or one of the displays
clipBoard buffers determined by selectionBufferSymbol, which should be one of:
- #clipboard
+ #clipboard
or:
- #selection.
+ #selection.
Return aString or nil if there is no selection"
@@ -1104,9 +1104,7 @@
!
fillDeviceRectangleWithPattern:aPixmap x:xIn y:yIn width:wIn height:hIn patternOffset:pattOffs
- "fill a rectangular area with some pattern.
- A helper for devices which do not support pixmap drawing (i.e. win95).
- This is never invoked with X11 or Win-NT/XP/Vista systems.
+ "Fill a rectangular area with some pattern.
Caller must ensure that aPixmap is really a form.
CG: mhm it seems that XQuartz has a bug and also has problems doing this.
therefore it is actually not obsolete."
@@ -1138,7 +1136,7 @@
pW := aPixmap width.
pH := aPixmap height.
- oldClip := self deviceClippingBoundsOrNil.
+ oldClip := gc deviceClippingBoundsOrNil.
oldClip notNil ifTrue:[
x := x max:oldClip left.
y := y max:oldClip top.
@@ -1196,17 +1194,16 @@
oldFg notNil ifTrue:[
gc foreground:oldFg background:oldBg.
].
- self deviceClippingBounds:oldClip.
-
- "Created: / 6.9.1998 / 14:00:50 / cg"
- "Modified: / 4.5.1999 / 20:38:07 / ps"
- "Modified: / 4.5.1999 / 20:40:12 / cg"
+ gc deviceClippingBoundsOrNil:oldClip.
+
+ "Created: / 06-09-1998 / 14:00:50 / cg"
+ "Modified: / 04-05-1999 / 20:38:07 / ps"
+ "Modified: / 04-05-1999 / 20:40:12 / cg"
+ "Modified: / 25-04-2016 / 20:50:47 / jv"
!
fillRectangleWithPattern:aPixmap x:x y:y width:w height:h patternOffset:pattOffs
- "fill a rectangular area with aPixmap.
- A helper for devices which do not support pixmap filling (i.e. win95 screens).
- This is never invoked with X11 or Win-NT/XP/Vista systems.
+ "Fill a rectangular area with aPixmap.
Caller must ensure that the aPixmap is really a form.
CG: mhm it seems that XQuartz has a bug and also has problems doing this.
therefore it is actually not obsolete."
@@ -1306,9 +1303,9 @@
this is a private (internal) method not to be used externally.
for a list of allowed event symbols see Workstation class"
- eventMask := eventMask bitAnd:(self graphicsDevice eventMaskFor:anEventSymbol) bitInvert.
+ eventMask := eventMask bitAnd:(device eventMaskFor:anEventSymbol) bitInvert.
self drawableId notNil ifTrue:[
- self graphicsDevice setEventMask:eventMask in:self drawableId
+ device setEventMask:eventMask in:self drawableId
]
!
@@ -1367,9 +1364,9 @@
this is a private (internal) method not to be used externally.
for a list of allowed event symbols see Workstation class"
- eventMask := (eventMask ? 0) bitOr:(self graphicsDevice eventMaskFor:anEventSymbol).
+ eventMask := (eventMask ? 0) bitOr:(device eventMaskFor:anEventSymbol).
self drawableId notNil ifTrue:[
- self graphicsDevice setEventMask:eventMask in:self drawableId
+ device setEventMask:eventMask in:self drawableId
]
!
@@ -1665,11 +1662,11 @@
"
selector := type.
- (isKeyEvent
- or:[isButtonEvent
- or:[isMouseWheelEvent
- or:[isPointerEvent
- or:[isExposeEvent]]]]) ifTrue:[
+ (isKeyEvent
+ or:[isButtonEvent
+ or:[isMouseWheelEvent
+ or:[isPointerEvent
+ or:[isExposeEvent]]]]) ifTrue:[
gc transformation notNil ifTrue:[
selector := deviceMessage
]
@@ -2259,9 +2256,9 @@
|id|
(id := self drawableId) notNil ifTrue:[
- gc setId:nil.
- self graphicsDevice removeKnownView:self withId:id.
- realized := false.
+ self setId:nil.
+ device removeKnownView:self withId:id.
+ realized := false.
].
self destroy
@@ -2368,7 +2365,7 @@
"return true, if a button motion event is pending.
Normally, you don't want to use this, since no polling is needed
(not even for mouse-tracking).
- Also, don't use it, since it does not honor the windowGroup,
+ Also, don't use it, since it does not honor the windowGroup,
but goes directly to the device instead.
Actually, its a historical leftover"
@@ -2522,6 +2519,11 @@
version_CVS
^ '$Header$'
+!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
! !
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/FcConstants.st Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,186 @@
+"{ Package: 'stx:libview' }"
+
+"{ NameSpace: Smalltalk }"
+
+SharedPool subclass:#FcConstants
+ instanceVariableNames:''
+ classVariableNames:'FC_FAMILY FC_STYLE FC_SLANT FC_WEIGHT FC_SIZE FC_ASPECT
+ FC_PIXEL_SIZE FC_SPACING FC_FOUNDRY FC_ANTIALIAS FC_HINTING
+ FC_HINT_STYLE FC_VERTICAL_LAYOUT FC_AUTOHINT FC_WIDTH FC_FILE
+ FC_INDEX FC_FT_FACE FC_RASTERIZER FC_OUTLINE FC_SCALABLE FC_SCALE
+ FC_DPI FC_RGBA FC_MINSPACE FC_SOURCE FC_CHARSET FC_LANG
+ FC_FONTVERSION FC_FULLNAME FC_FAMILYLANG FC_STYLELANG
+ FC_FULLNAMELANG FC_CAPABILITY FC_FONTFORMAT FC_EMBOLDEN
+ FC_EMBEDDED_BITMAP FC_DECORATIVE FC_LCD_FILTER FC_NAMELANG
+ FC_CHAR_WIDTH FC_CHAR_HEIGHT FC_MATRIX FC_WEIGHT_THIN
+ FC_WEIGHT_EXTRALIGHT FC_WEIGHT_ULTRALIGHT FC_WEIGHT_LIGHT
+ FC_WEIGHT_BOOK FC_WEIGHT_REGULAR FC_WEIGHT_NORMAL
+ FC_WEIGHT_MEDIUM FC_WEIGHT_DEMIBOLD FC_WEIGHT_SEMIBOLD
+ FC_WEIGHT_BOLD FC_WEIGHT_EXTRABOLD FC_WEIGHT_ULTRABOLD
+ FC_WEIGHT_BLACK FC_WEIGHT_HEAVY FC_WEIGHT_EXTRABLACK
+ FC_WEIGHT_ULTRABLACK FC_SLANT_ROMAN FC_SLANT_ITALIC
+ FC_SLANT_OBLIQUE FC_WIDTH_ULTRACONDENSED FC_WIDTH_EXTRACONDENSED
+ FC_WIDTH_CONDENSED FC_WIDTH_SEMICONDENSED FC_WIDTH_NORMAL
+ FC_WIDTH_SEMIEXPANDED FC_WIDTH_EXPANDED FC_WIDTH_EXTRAEXPANDED
+ FC_WIDTH_ULTRAEXPANDED FC_PROPORTIONAL FC_DUAL FC_MONO
+ FC_CHARCELL FC_RGBA_UNKNOWN FC_RGBA_RGB FC_RGBA_BGR FC_RGBA_VRGB
+ FC_RGBA_VBGR FC_RGBA_NONE FC_HINT_NONE FC_HINT_SLIGHT
+ FC_HINT_MEDIUM FC_HINT_FULL FC_LCD_NONE FC_LCD_DEFAULT
+ FC_LCD_LIGHT FC_LCD_LEGACY StXFace2FCWeightMap
+ StXStyle2FCSlantMap'
+ poolDictionaries:''
+ category:'Graphics-Support-FontConfig'
+!
+
+
+!FcConstants class methodsFor:'class initialization'!
+
+initialize
+
+ " Taken from fontconfig,h "
+ FC_FAMILY := 'family'. "/* String */
+ FC_STYLE := 'style'. "/* String */
+ FC_SLANT := 'slant'. "/* Int */
+ FC_WEIGHT := 'weight'. "/* Int */
+ FC_SIZE := 'size'. "/* Double */
+ FC_ASPECT := 'aspect'. "/* Double */
+ FC_PIXEL_SIZE := 'pixelsize'. "/* Double */
+ FC_SPACING := 'spacing'. "/* Int */
+ FC_FOUNDRY := 'foundry'. "/* String */
+ FC_ANTIALIAS := 'antialias'. "/* Bool (depends) */
+ FC_HINTING := 'hinting'. "/* Bool (true) */
+ FC_HINT_STYLE := 'hintstyle'. "/* Int */
+ FC_VERTICAL_LAYOUT := 'verticallayout'. "/* Bool (false) */
+ FC_AUTOHINT := 'autohint'. "/* Bool (false) */
+ FC_WIDTH := 'width'. "/* Int */
+ FC_FILE := 'file'. "/* String */
+ FC_INDEX := 'index'. "/* Int */
+ FC_FT_FACE := 'ftface'. "/* FT_Face */
+ FC_RASTERIZER := 'rasterizer'. "/* String */
+ FC_OUTLINE := 'outline'. "/* Bool */
+ FC_SCALABLE := 'scalable'. "/* Bool */
+ FC_SCALE := 'scale'. "/* double */
+ FC_DPI := 'dpi'. "/* double */
+ FC_RGBA := 'rgba'. "/* Int */
+ FC_MINSPACE := 'minspace'. "/* Bool use minimum line spacing */
+ FC_SOURCE := 'source'. "/* String (deprecated) */
+ FC_CHARSET := 'charset'. "/* CharSet */
+ FC_LANG := 'lang'. "/* String RFC 3066 langs */
+ FC_FONTVERSION := 'fontversion'. "/* Int from 'head'.table */
+ FC_FULLNAME := 'fullname'. "/* String */
+ FC_FAMILYLANG := 'familylang'. "/* String RFC 3066 langs */
+ FC_STYLELANG := 'stylelang'. "/* String RFC 3066 langs */
+ FC_FULLNAMELANG := 'fullnamelang'. "/* String RFC 3066 langs */
+ FC_CAPABILITY := 'capability'. "/* String */
+ FC_FONTFORMAT := 'fontformat'. "/* String */
+ FC_EMBOLDEN := 'embolden'. "/* Bool - true if emboldening needed*/
+ FC_EMBEDDED_BITMAP := 'embeddedbitmap'."/* Bool - true to enable embedded bitmaps */
+ FC_DECORATIVE := 'decorative'. "/* Bool - true if style is a decorative variant */
+ FC_LCD_FILTER := 'lcdfilter'. "/* Int */
+ FC_NAMELANG := 'namelang'. "/* String RFC 3866 langs */
+
+
+ "Adjust outline rasterizer"
+ FC_CHAR_WIDTH := 'charwidth'."/* Int */
+ FC_CHAR_HEIGHT := 'charheight'."/* Int */
+ FC_MATRIX := 'matrix'. "/* FcMatrix */
+
+ FC_WEIGHT_THIN := 0.
+ FC_WEIGHT_EXTRALIGHT := 40.
+ FC_WEIGHT_ULTRALIGHT := FC_WEIGHT_EXTRALIGHT.
+ FC_WEIGHT_LIGHT := 50.
+ FC_WEIGHT_BOOK := 75.
+ FC_WEIGHT_REGULAR := 80.
+ FC_WEIGHT_NORMAL := FC_WEIGHT_REGULAR.
+ FC_WEIGHT_MEDIUM := 100.
+ FC_WEIGHT_DEMIBOLD := 180.
+ FC_WEIGHT_SEMIBOLD := FC_WEIGHT_DEMIBOLD.
+ FC_WEIGHT_BOLD := 200.
+ FC_WEIGHT_EXTRABOLD := 205.
+ FC_WEIGHT_ULTRABOLD := FC_WEIGHT_EXTRABOLD.
+ FC_WEIGHT_BLACK := 210.
+ FC_WEIGHT_HEAVY := FC_WEIGHT_BLACK.
+ FC_WEIGHT_EXTRABLACK := 215.
+ FC_WEIGHT_ULTRABLACK := FC_WEIGHT_EXTRABLACK.
+
+ FC_SLANT_ROMAN := 0.
+ FC_SLANT_ITALIC := 100.
+ FC_SLANT_OBLIQUE := 110.
+
+ FC_WIDTH_ULTRACONDENSED := 50.
+ FC_WIDTH_EXTRACONDENSED := 63.
+ FC_WIDTH_CONDENSED := 75.
+ FC_WIDTH_SEMICONDENSED := 87.
+ FC_WIDTH_NORMAL := 100.
+ FC_WIDTH_SEMIEXPANDED := 113.
+ FC_WIDTH_EXPANDED := 125.
+ FC_WIDTH_EXTRAEXPANDED := 150.
+ FC_WIDTH_ULTRAEXPANDED := 200.
+
+ FC_PROPORTIONAL := 0.
+ FC_DUAL := 90.
+ FC_MONO := 100.
+ FC_CHARCELL := 110.
+
+ "sub-pixel order"
+ FC_RGBA_UNKNOWN := 0.
+ FC_RGBA_RGB := 1.
+ FC_RGBA_BGR := 2.
+ FC_RGBA_VRGB := 3.
+ FC_RGBA_VBGR := 4.
+ FC_RGBA_NONE := 5.
+
+ "hinting style"
+ FC_HINT_NONE := 0.
+ FC_HINT_SLIGHT := 1.
+ FC_HINT_MEDIUM := 2.
+ FC_HINT_FULL := 3.
+
+ "LCD filter"
+ FC_LCD_NONE := 0.
+ FC_LCD_DEFAULT := 1.
+ FC_LCD_LIGHT := 2.
+ FC_LCD_LEGACY := 3.
+
+ StXFace2FCWeightMap := Dictionary withKeysAndValues:{
+ nil . FC_WEIGHT_NORMAL .
+ '' . FC_WEIGHT_NORMAL .
+ 'thin'. FC_WEIGHT_THIN.
+ 'extralight'. FC_WEIGHT_EXTRALIGHT.
+ 'ultralight'. FC_WEIGHT_ULTRALIGHT.
+ 'light'. FC_WEIGHT_LIGHT.
+ 'book'. FC_WEIGHT_BOOK.
+ 'regular'. FC_WEIGHT_REGULAR.
+ 'normal'. FC_WEIGHT_NORMAL.
+ 'medium'. FC_WEIGHT_MEDIUM.
+ 'demibold'. FC_WEIGHT_DEMIBOLD.
+ 'semibold'. FC_WEIGHT_SEMIBOLD.
+ 'bold'. FC_WEIGHT_BOLD.
+ 'extrabold'. FC_WEIGHT_EXTRABOLD.
+ 'ultrabold'. FC_WEIGHT_ULTRABOLD.
+ 'black'. FC_WEIGHT_BLACK.
+ 'heavy'. FC_WEIGHT_HEAVY.
+ 'extrablack'. FC_WEIGHT_EXTRABLACK.
+ 'ultrablack'. FC_WEIGHT_ULTRABLACK.
+ }.
+ StXStyle2FCSlantMap := Dictionary withKeysAndValues:{
+ nil . FC_SLANT_ROMAN .
+ ''. FC_SLANT_ROMAN .
+ 'roman'. FC_SLANT_ROMAN.
+ 'italic'. FC_SLANT_ITALIC.
+ 'oblique'. FC_SLANT_OBLIQUE.
+ }.
+
+ "Created: / 17-02-2016 / 10:49:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 29-02-2016 / 07:45:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!FcConstants class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+
+
+FcConstants initialize!
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/FcPattern.st Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,544 @@
+"{ Package: 'stx:libview' }"
+
+"{ NameSpace: Smalltalk }"
+
+ExternalAddress subclass:#FcPattern
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:'FcConstants'
+ category:'Graphics-Support-FontConfig'
+!
+
+!FcPattern primitiveDefinitions!
+%{
+#ifdef HAVE_FONTCONFIG
+/*
+ * includes, defines, structure definitions
+ * and typedefs come here.
+ */
+#undef FcPattern
+#undef True
+#undef False
+#undef Time
+
+#include <stdlib.h>
+#include <fontconfig/fontconfig.h>
+
+#define FC_PATTERN_VAL(x) ((FcPattern*)__externalAddressVal(x))
+#endif
+%}
+! !
+
+!FcPattern class methodsFor:'documentation'!
+
+documentation
+"
+ See https://www.freedesktop.org/software/fontconfig/fontconfig-devel/x19.html
+
+ FONT PROPERTIES
+
+ While font patterns may contain essentially any properties, there are some
+ well known properties with associated types. Fontconfig uses some of these
+ properties for font matching and font completion. Others are provided as a
+ convenience for the application's rendering mechanism.
+
+ Property C Preprocessor Symbol Type Description
+ ----------------------------------------------------
+ family FC_FAMILY String Font family names
+ familylang FC_FAMILYLANG String Language corresponding to
+ each family name
+ style FC_STYLE String Font style. Overrides weight
+ and slant
+ stylelang FC_STYLELANG String Language corresponding to
+ each style name
+ fullname FC_FULLNAME String Font face full name where
+ different from family and
+ family + style
+ fullnamelang FC_FULLNAMELANG String Language corresponding to
+ each fullname
+ slant FC_SLANT Int Italic, oblique or roman
+ weight FC_WEIGHT Int Light, medium, demibold,
+ bold or black
+ size FC_SIZE Double Point size
+ width FC_WIDTH Int Condensed, normal or expanded
+ aspect FC_ASPECT Double Stretches glyphs horizontally
+ before hinting
+ pixelsize FC_PIXEL_SIZE Double Pixel size
+ spacing FC_SPACING Int Proportional, dual-width,
+ monospace or charcell
+ foundry FC_FOUNDRY String Font foundry name
+ antialias FC_ANTIALIAS Bool Whether glyphs can be
+ antialiased
+ hinting FC_HINTING Bool Whether the rasterizer should
+ use hinting
+ hintstyle FC_HINT_STYLE Int Automatic hinting style
+ verticallayout FC_VERTICAL_LAYOUT Bool Use vertical layout
+ autohint FC_AUTOHINT Bool Use autohinter instead of
+ normal hinter
+ globaladvance FC_GLOBAL_ADVANCE Bool Use font global advance data (deprecated)
+ file FC_FILE String The filename holding the font
+ index FC_INDEX Int The index of the font within
+ the file
+ ftface FC_FT_FACE FT_Face Use the specified FreeType
+ face object
+ rasterizer FC_RASTERIZER String Which rasterizer is in use (deprecated)
+ outline FC_OUTLINE Bool Whether the glyphs are outlines
+ scalable FC_SCALABLE Bool Whether glyphs can be scaled
+ scale FC_SCALE Double Scale factor for point->pixel
+ conversions (deprecated)
+ symbol FC_SYMBOL Bool Whether font uses MS symbol-font encoding
+ color FC_COLOR Bool Whether any glyphs have color
+ dpi FC_DPI Double Target dots per inch
+ rgba FC_RGBA Int unknown, rgb, bgr, vrgb,
+ vbgr, none - subpixel geometry
+ lcdfilter FC_LCD_FILTER Int Type of LCD filter
+ minspace FC_MINSPACE Bool Eliminate leading from line
+ spacing
+ charset FC_CHARSET CharSet Unicode chars encoded by
+ the font
+ lang FC_LANG LangSet Set of RFC-3066-style
+ languages this font supports
+ fontversion FC_FONTVERSION Int Version number of the font
+ capability FC_CAPABILITY String List of layout capabilities in
+ the font
+ fontformat FC_FONTFORMAT String String name of the font format
+ embolden FC_EMBOLDEN Bool Rasterizer should
+ synthetically embolden the font
+ embeddedbitmap FC_EMBEDDED_BITMAP Bool Use the embedded bitmap instead
+ of the outline
+ decorative FC_DECORATIVE Bool Whether the style is a decorative
+ variant
+ fontfeatures FC_FONT_FEATURES String List of extra feature tags in
+ OpenType to be enabled
+ namelang FC_NAMELANG String Language name to be used for the
+ default value of familylang,
+ stylelang and fullnamelang
+ prgname FC_PRGNAME String Name of the running program
+ hash FC_HASH String SHA256 hash value of the font data
+ with 'sha256:' prefix (deprecated)
+ postscriptname FC_POSTSCRIPT_NAME String Font name in PostScript
+
+ [author:]
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+
+"
+! !
+
+!FcPattern class methodsFor:'initialization'!
+
+initialize
+
+ "Created: / 17-02-2016 / 17:18:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!FcPattern class methodsFor:'instance creation'!
+
+fromFontDescription: aFontDescription
+ | family size psize weight slant pattern |
+
+ family := aFontDescription family.
+ size := aFontDescription size.
+ psize := aFontDescription pixelSize.
+ weight := (StXFace2FCWeightMap at: (aFontDescription face ? 'regular')).
+ slant := (StXStyle2FCSlantMap at: (aFontDescription style ? 'roman') ifAbsent:[StXStyle2FCSlantMap at: (aFontDescription style ? 'roman') asLowercase]).
+ pattern := self new.
+ pattern at: FC_FAMILY put: family.
+ psize notNil ifTrue:[
+ pattern at: FC_PIXEL_SIZE put: psize.
+ ] ifFalse:[
+ pattern at: FC_SIZE put: size.
+ ].
+ pattern at: FC_WEIGHT put: weight.
+ pattern at: FC_SLANT put: slant.
+
+ ^ pattern
+
+ "
+ FcPattern fromFontDescription: SimpleView defaultFont
+ FcPattern fromFontDescription: CodeView defaultFont
+
+ "
+
+ "Created: / 17-02-2016 / 17:19:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+fromString: aString
+ ^self basicNew initializeFromString: aString
+
+!
+
+new
+ ^self basicNew initialize
+
+! !
+
+!FcPattern methodsFor:'accessing'!
+
+at: attribute
+ "Return a value of the specified pattern element. If there are multiple values,
+ return them as an OrderedCollection. Throw an error if `attribute` does not exist"
+
+ ^ self at: attribute ifAbsent:[ self errorKeyNotFound: attribute ]
+
+ "Created: / 17-02-2016 / 14:33:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+at: attribute add: value
+ "Add a value to the specified pattern element. Value is added after existing values"
+
+ ^ self at: attribute add: value append: true
+
+ "Created: / 17-02-2016 / 14:23:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+at: attribute add: value append: append
+ "Add a value to the specified pattern element. If 'append' is true, the value
+ is added after existing values, otherwise it is added before them."
+
+ | error |
+
+%{ /* STACK: 64000 */
+#ifdef HAVE_FONTCONFIG
+ FcValue v;
+ FcBool b;
+
+ if ( ! __externalAddressVal ( self ) ) {
+ error = @symbol(Released);
+ goto err;
+ }
+ if ( ! __isStringLike ( attribute ) ) {
+ error = @symbol(BadArg1);
+ goto err;
+ }
+ if ( append != true && append != false ) {
+ error = @symbol(BadArg3);
+ goto err;
+ }
+ if ( __isStringLike ( value ) ) {
+ v.type = FcTypeString;
+ /* Passing pointer inside Smalltalk should be safe,
+ * FontConfig library seem to allocate and store
+ * a __copy__ of the string (if I understood the code correctly)
+ */
+ v.u.s = __stringVal( value);
+ } else if ( __isSmallInteger( value ) ) {
+ v.type = FcTypeInteger;
+ v.u.i = (int)__intVal( value );
+ } else if ( value == true || value == false ) {
+ v.type = FcTypeBool;
+ v.u.b = value == true ? FcTrue : FcFalse;
+ } else if ( __isFloat ( value ) ) {
+ v.type = FcTypeDouble;
+ v.u.d = __floatVal( value );
+ } else if ( value == nil ) {
+ v.type = FcTypeVoid;
+ v.u.f = NULL;
+ } else {
+ error = @symbol(BadArg2);
+ goto err;
+ }
+ b = FcPatternAdd( FC_PATTERN_VAL(self), __stringVal(attribute), v, append == true ? FcTrue : FcFalse );
+ RETURN ( b == FcTrue ? true : false );
+
+ err:;
+#endif
+%}.
+ self primitiveFailed: error
+
+ "Created: / 20-12-2013 / 21:50:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+at: attribute ifAbsent: block
+ "Return a value of the specified pattern element. If there are multiple values,
+ return them as an OrderedCollection. If attribute does not exist, evaluate `block`"
+
+ | value values |
+
+ value := self at: attribute index: 1.
+ value isNil ifTrue:[ ^ block value ].
+ values := value.
+ value := self at: attribute index: 2.
+ value notNil ifTrue:[
+ | i |
+
+ values := Array with: values with: value.
+ i := 3.
+ [ (value := self at: attribute index: i) notNil ] whileTrue:[
+ values := values copyWith: value.
+ i := i + 1.
+ ].
+ ].
+ ^ values
+
+ "Created: / 17-02-2016 / 14:32:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+at: attribute index: index
+ "Return a value from the specified element -- multiple values can be indexed
+ with 'index' starting at one."
+
+ | error |
+
+%{ /* STACK: 64000 */
+#ifdef HAVE_FONTCONFIG
+ FcValue v;
+ FcResult r;
+
+ if ( ! __externalAddressVal ( self ) ) {
+ error = @symbol(Released);
+ goto err;
+ }
+ if ( ! __isStringLike ( attribute ) ) {
+ error = @symbol(BadArg2);
+ goto err;
+ }
+ if ( ! __isSmallInteger( index ) ) {
+ error = @symbol(BadArg3);
+ goto err;
+ }
+ r = FcPatternGet(FC_PATTERN_VAL(self), __stringVal( attribute ), __intVal( index ) - 1, &v);
+ if ( r != FcResultMatch) {
+ RETURN ( nil );
+ }
+ if ( v.type == FcTypeString) {
+ RETURN ( __MKSTRING(v.u.s) );
+ } else if ( v.type == FcTypeInteger ) {
+ RETURN ( __MKINT (v.u.i) );
+ } else if ( v.type == FcTypeBool ) {
+ RETURN ( v.u.b == FcTrue ? true : false );
+ } else if ( v.type == FcTypeDouble ) {
+ RETURN ( __MKFLOAT (v.u.d) );
+ } else if ( v.type == FcTypeVoid ) {
+ RETURN ( nil );
+ } else {
+ error = @symbol(UnssuportedTypeValue);
+ goto err;
+ }
+ err:;
+#endif
+%}.
+ self primitiveFailed: error
+
+!
+
+at: attribute put: value
+ "Add a value to the specified pattern element. All existing values are removed.
+ If `value` is a collection, all elements of that collection are added"
+
+ self removeKey: attribute.
+ (value isCollection and:[ value isString not ]) ifTrue:[
+ value do:[:each |
+ self at: attribute add: value append: true.
+ ].
+ ] ifFalse:[
+ self at: attribute add: value append: true.
+ ].
+ ^ value
+
+ "Created: / 17-02-2016 / 14:26:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+removeKey: attribute
+ | error |
+%{ /* STACK: 64000 */
+#ifdef HAVE_FONTCONFIG
+ if ( ! __externalAddressVal ( self ) ) {
+ error = @symbol(Released);
+ goto err;
+ }
+ if ( ! __isStringLike ( attribute ) ) {
+ error = @symbol(BadArg1);
+ goto err;
+ }
+ FcPatternDel( FC_PATTERN_VAL(self), __stringVal ( attribute ) );
+ RETURN ( self );
+ err:;
+#endif
+%}.
+ self primitiveFailed: error
+
+! !
+
+!FcPattern methodsFor:'comparing'!
+
+= another
+ self class == another class ifFalse:[ ^ false ].
+%{ /* STACK: 64000 */
+#ifdef HAVE_FONTCONFIG
+ FcPattern* pa = FC_PATTERN_VAL(self);
+ FcPattern* pb = FC_PATTERN_VAL(another);
+ if (pa != NULL && pb != NULL) {
+ RETURN ( FcPatternEqual(pa, pb) == FcTrue ? true : false );
+ }
+#endif
+%}.
+ ^ false
+
+ "Created: / 17-02-2016 / 11:01:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+hash
+
+%{ /* STACK: 64000 */
+#ifdef HAVE_FONTCONFIG
+ unsigned int h = 0;
+ if (__externalAddressVal(self) != NULL) {
+ h = FcPatternHash(FC_PATTERN_VAL(self));
+ h &= 0x7FFFFFFFU;
+ }
+ RETURN ( __MKSMALLINT( h ) );
+#endif
+%}.
+ ^self primitiveFailed
+
+ "Created: / 17-02-2016 / 10:59:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!FcPattern methodsFor:'conversion'!
+
+asString
+%{ /* STACK: 64000 */
+#ifdef HAVE_FONTCONFIG
+ char *_s;
+ OBJ s;
+ if (__externalAddressVal(self) != NULL) {
+ _s = (char*)FcNameUnparse(FC_PATTERN_VAL(self));
+ s = __MKSTRING(_s);
+ free(_s);
+ RETURN ( s );
+ }
+#endif
+%}.
+ self primitiveFailed
+
+ "Created: / 17-02-2016 / 10:55:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!FcPattern methodsFor:'copying'!
+
+postCopy
+%{ /* STACK: 64000 */
+#ifdef HAVE_FONTCONFIG
+ __externalAddressVal(self) = (void*)FcPatternDuplicate(FC_PATTERN_VAL(self));
+#endif
+%}.
+ self registerForFinalization
+
+ "Created: / 17-02-2016 / 10:58:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!FcPattern methodsFor:'error handling'!
+
+primitiveFailed
+ <resource: #skipInDebuggersWalkBack>
+
+ (ConfigurableFeatures hasFontConfig) ifFalse:[
+ super primitiveFailed: 'FontConfig support not compiled in. Recompile with -DHAVE_FONTCONFIG'.
+ ].
+ ^ super primitiveFailed
+
+ "Created: / 22-02-2016 / 08:12:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+primitiveFailed: message
+ <resource: #skipInDebuggersWalkBack>
+
+ (ConfigurableFeatures hasFontConfig) ifFalse:[
+ super primitiveFailed: 'FontConfig support not compiled in. Recompile with -DHAVE_FONTCONFIG'.
+ ].
+ ^ super primitiveFailed: message
+
+ "Created: / 22-02-2016 / 08:13:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!FcPattern methodsFor:'finalization'!
+
+destroy
+ %{ /* STACK: 64000 */
+#ifdef HAVE_FONTCONFIG
+ FcPatternDestroy((FcPattern*)__externalAddressVal(self));
+ __externalAddressVal(self) = NULL;
+ RETURN ( self );
+ #endif
+%}.
+ self primitiveFailed.
+!
+
+finalize
+ self destroy
+
+ "Created: / 16-02-2016 / 19:05:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!FcPattern methodsFor:'initialization & release'!
+
+initialize
+%{ /* STACK: 64000 */
+#ifdef HAVE_FONTCONFIG
+ __externalAddressVal(self) = (void*)FcPatternCreate();
+ __SSEND0(self, @symbol(registerForFinalization), 4);
+ RETURN ( self );
+ err:;
+
+#endif
+%}.
+ self primitiveFailed.
+
+ "Created: / 16-02-2016 / 19:04:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+
+!
+
+initializeFromString: aString
+ | error |
+%{ /* STACK: 64000 */
+#ifdef HAVE_FONTCONFIG
+ if ( ! __isStringLike ( aString ) ) {
+ error = @symbol(BadArg1);
+ goto err;
+ }
+ __externalAddressVal(self) = (void*)FcNameParse(__stringVal(aString));
+ __SSEND0(self, @symbol(registerForFinalization), 4);
+ RETURN ( self );
+ err:;
+#endif
+%}.
+ self primitiveFailed.
+
+!
+
+release
+ self unregisterForFinalization.
+ self destroy
+
+ "Created: / 16-02-2016 / 19:04:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!FcPattern methodsFor:'printing & storing'!
+
+printOn:aStream
+ | string |
+ super printOn: aStream.
+ string := self asString.
+ string notEmptyOrNil ifTrue:[
+ aStream nextPutAll: ' - '.
+ aStream nextPutAll: self asString
+ ]
+
+ "Modified: / 17-02-2016 / 17:29:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!FcPattern class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+
+
+FcPattern initialize!
--- a/FontDescription.st Tue Jan 03 14:45:53 2017 +0100
+++ b/FontDescription.st Thu Jan 05 21:04:46 2017 +0000
@@ -960,20 +960,35 @@
sameDeviceFontAs:aFont
aFont species ~~ self species ifTrue:[^ false].
- (family ~= aFont family) ifTrue:[ ^ false ].
- (face ~= aFont face) ifTrue:[ ^ false ].
- ((style = aFont style)
- or:[ (style = 'italic' and:[aFont style = 'oblique'])
- or:[ style = 'oblique' and:[aFont style = 'italic']]]) ifFalse:[ ^ false ].
+ ^ self sameFamily: aFont family
+ face: aFont face
+ style: aFont style
+ size: aFont size
+ unit: aFont sizeUnit
+ pixelSize: aFont pixelSize
+ encoding: aFont encoding
+
+ "Modified: / 29-02-2016 / 08:30:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+
+!
- (encoding isNil or:[encoding = aFont encoding]) ifFalse:[ ^ false ].
- (sizeUnit ? #pt) ~= aFont sizeUnit ifTrue:[ ^ false ].
+sameFamily: otherFamily face: otherFace style: otherStyle size: otherSize unit: otherSizeUnit pixelSize: otherPixelSize encoding: otherEncoding
+ (family = otherFamily) ifFalse:[ ^ false ].
+ (face = otherFace) ifFalse:[ ^ false ].
+ ((style = otherStyle)
+ or:[ (style = 'italic' and:[otherStyle = 'oblique'])
+ or:[ style = 'oblique' and:[otherStyle = 'italic']]]) ifFalse:[ ^ false ].
+
+ (encoding isNil or:[encoding = otherEncoding]) ifFalse:[ ^ false ].
+ (sizeUnit ? #pt) = otherSizeUnit ifFalse:[ ^ false ].
(sizeUnit ? #pt) == #pt ifTrue:[
- (size ~= aFont size) ifTrue:[ ^ false ].
+ (size ~= otherSize) ifTrue:[ ^ false ].
] ifFalse:[
- (pixelSize ~= aFont pixelSize) ifTrue:[ ^ false ].
+ (pixelSize ~= otherPixelSize) ifTrue:[ ^ false ].
].
^ true
+
+ "Created: / 29-02-2016 / 08:28:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!FontDescription methodsFor:'converting'!
--- a/Form.st Tue Jan 03 14:45:53 2017 +0100
+++ b/Form.st Thu Jan 05 21:04:46 2017 +0000
@@ -102,9 +102,9 @@
Form allSubInstancesDo:[:eachForm |
eachForm graphicsDevice == aDevice ifTrue:[
- "now, try to recreate it"
+ "now, try to recreate it"
eachForm recreate.
- ]
+ ]
]
"Modified: 5.7.1996 / 17:55:58 / cg"
@@ -116,10 +116,10 @@
(something == #save) ifTrue:[
"get all bits from the device into saveable arrays"
Form allSubInstancesDo:[:eachForm |
- (PrimitiveFailureSignal , DeviceWorkstation drawingOnClosedDeviceSignal) handle:[:ex |
- 'Form [warning]: cannot fetch form bits from device' errorPrintCR
- ] do:[
- |dev|
+ (PrimitiveFailureSignal , DeviceWorkstation drawingOnClosedDeviceSignal) handle:[:ex |
+ 'Form [warning]: cannot fetch form bits from device' errorPrintCR
+ ] do:[
+ |dev|
((dev := eachForm graphicsDevice) notNil
and:[dev isPersistentInSnapshot]) ifTrue:[
@@ -1542,7 +1542,13 @@
initialize
depth := 1.
maskedPixelsAre0 := false.
+ gc notNil ifTrue:[
+ gc paint: (Color colorId:1).
+ gc backgroundPaint:(Color colorId:0).
+ ].
super initialize.
+
+ "Modified: / 25-04-2016 / 20:19:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
recreate
@@ -1636,6 +1642,9 @@
"flush device handles (sent after a restart)"
self setDevice:device id:nil gcId:nil.
+ gc notNil ifTrue:[
+ gc registerChange.
+ ].
"Created: 15.6.1996 / 15:44:28 / cg"
!
@@ -1687,7 +1696,7 @@
].
device notNil ifTrue:[
(gc createPixmapWidth:w height:h depth:d) isNil ifTrue:[^nil].
- realized := gc drawableId notNil.
+ realized := self drawableId notNil.
].
!
@@ -1932,6 +1941,11 @@
version_CVS
^ '$Header$'
+!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
! !
--- a/GraphicsAttributes.st Tue Jan 03 14:45:53 2017 +0100
+++ b/GraphicsAttributes.st Thu Jan 05 21:04:46 2017 +0000
@@ -1,5 +1,5 @@
"
- COPYRIGHT (c) 1995 by Claus Gittinger
+ COPYRIGHT (c) 1992 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
@@ -9,16 +9,13 @@
other person. No title to or ownership of the software is
hereby transferred.
"
+"{ Package: 'stx:libview' }"
Object subclass:#GraphicsAttributes
- instanceVariableNames:'paint
- font
- lineStyle lineWidth
- joinStyle capStyle
- maskOrigin'
- classVariableNames:''
- poolDictionaries:''
- category:'Graphics-Support'
+ instanceVariableNames:'paint font lineStyle lineWidth joinStyle capStyle maskOrigin'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Graphics-Support'
!
!GraphicsAttributes class methodsFor:'documentation'!
@@ -37,10 +34,6 @@
"
!
-version
- ^ '$Header: /cvs/stx/stx/libview/GraphicsAttributes.st,v 1.4 1995-11-11 15:51:01 cg Exp $'
-!
-
documentation
"
instances keep multiple graphics attributes as used in a graphicsContext.
@@ -65,42 +58,44 @@
"
! !
-!GraphicsAttributes methodsFor:'installing'!
-
-installOn:aGC
- paint notNil ifTrue:[aGC paint:paint].
- font notNil ifTrue:[aGC font:font].
- lineWidth notNil ifTrue:[aGC lineWidth:lineWidth].
- lineStyle notNil ifTrue:[aGC lineStyle:lineStyle].
- joinStyle notNil ifTrue:[aGC joinStyle:joinStyle].
- capStyle notNil ifTrue:[aGC capStyle:capStyle].
- maskOrigin notNil ifTrue:[aGC maskOrigin:capStyle].
-! !
-
!GraphicsAttributes methodsFor:'accessing'!
-paint
- "return the current paint drawing color"
+capStyle
+ "return the cap-style for line-drawing"
+
+ ^ capStyle
+!
- ^ paint
+capStyle:aStyleSymbol
+ "set the cap-style for line-drawing;
+ possible styles are: #notLast, #butt, #round, #projecting"
+
+ capStyle := aStyleSymbol
!
-paint:aColor
- "set the drawing painting color"
+font
+ "return the drawing font"
- paint := aColor
+ ^ font
+!
+
+font:aFont
+ "set the drawing font"
+
+ font := aFont
!
-lineWidth
- "return the drawing linewidth"
+joinStyle
+ "return the join-style for polygon-drawing"
- ^ lineWidth
+ ^ joinStyle
!
-lineWidth:aNumber
- "set the line drawing width in pixels"
+joinStyle:aStyleSymbol
+ "set the join-style of lines in polygon-drawing;
+ possible styles are: #miter, #bevel, #round"
- lineWidth := aNumber
+ joinStyle := aStyleSymbol
!
lineStyle
@@ -116,42 +111,16 @@
lineStyle := aStyleSymbol
!
-capStyle
- "return the cap-style for line-drawing"
-
- ^ capStyle
-!
+lineWidth
+ "return the drawing linewidth"
-capStyle:aStyleSymbol
- "set the cap-style for line-drawing;
- possible styles are: #notLast, #butt, #round, #projecting"
-
- capStyle := aStyleSymbol
+ ^ lineWidth
!
-joinStyle
- "return the join-style for polygon-drawing"
-
- ^ joinStyle
-!
-
-joinStyle:aStyleSymbol
- "set the join-style of lines in polygon-drawing;
- possible styles are: #miter, #bevel, #round"
+lineWidth:aNumber
+ "set the line drawing width in pixels"
- joinStyle := aStyleSymbol
-!
-
-font
- "return the drawing font"
-
- ^ font
-!
-
-font:aFont
- "set the drawing font"
-
- font := aFont
+ lineWidth := aNumber
!
maskOrigin:aPoint
@@ -167,11 +136,16 @@
^ maskOrigin
!
-phase:aPoint
- "set the origin within the mask (used to draw with patterns).
- This is an alias for ST/X's #maskOrigin:"
+paint
+ "return the current paint drawing color"
- maskOrigin := aPoint
+ ^ paint
+!
+
+paint:aColor
+ "set the drawing painting color"
+
+ paint := aColor
!
phase
@@ -179,6 +153,30 @@
This is an alias for ST/X's #maskOrigin"
^ maskOrigin
+!
+
+phase:aPoint
+ "set the origin within the mask (used to draw with patterns).
+ This is an alias for ST/X's #maskOrigin:"
+
+ maskOrigin := aPoint
! !
+!GraphicsAttributes methodsFor:'installing'!
+installOn:aGC
+ paint notNil ifTrue:[aGC paint:paint].
+ font notNil ifTrue:[aGC font:font].
+ lineWidth notNil ifTrue:[aGC lineWidth:lineWidth].
+ lineStyle notNil ifTrue:[aGC lineStyle:lineStyle].
+ joinStyle notNil ifTrue:[aGC joinStyle:joinStyle].
+ capStyle notNil ifTrue:[aGC capStyle:capStyle].
+ maskOrigin notNil ifTrue:[aGC maskOrigin:capStyle].
+! !
+
+!GraphicsAttributes class methodsFor:'documentation'!
+
+version
+ ^ '$Header: /cvs/stx/stx/libview/GraphicsAttributes.st,v 1.4 1995-11-11 15:51:01 cg Exp $'
+! !
+
--- a/GraphicsContext.st Tue Jan 03 14:45:53 2017 +0100
+++ b/GraphicsContext.st Thu Jan 05 21:04:46 2017 +0000
@@ -1867,7 +1867,7 @@
font := font onDevice:device.
ascent := font ascent.
- aString isString ifTrue:[
+ (aString isString and:[font isAntialiasedFont not]) ifTrue:[
"/ a real string;
"/ do it in a monochrome form (for speed)
--- a/GraphicsDevice.st Tue Jan 03 14:45:53 2017 +0100
+++ b/GraphicsDevice.st Thu Jan 05 21:04:46 2017 +0000
@@ -14,12 +14,19 @@
"{ NameSpace: Smalltalk }"
Object subclass:#GraphicsDevice
- instanceVariableNames:'displayId screen eventListeners deviceType'
+ instanceVariableNames:'displayId screen eventListeners deviceType graphicsContextClass'
classVariableNames:''
poolDictionaries:''
category:'Interface-Graphics'
!
+GraphicsDevice class instanceVariableNames:'graphicsContextClass'
+
+"
+ No other class instance variables are inherited by this class.
+"
+
+!
AllocationFailure subclass:#GraphicResourceAllocationFailure
instanceVariableNames:''
classVariableNames:''
@@ -66,6 +73,47 @@
! !
+!GraphicsDevice class methodsFor:'accessing'!
+
+graphicsContextClass
+ "Return a graphics context class to use for this graphics device type.
+ Default is to use DeviceGraphicsContext"
+ ^ graphicsContextClass ? DeviceGraphicsContext
+
+ "Modified (comment): / 25-02-2016 / 07:30:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+graphicsContextClass:aClass
+ "Set a graphics context class to use for this graphics device type.
+ Usually there's no need set this, just stich with defaults."
+
+ graphicsContextClass := aClass.
+
+ "Modified (comment): / 25-02-2016 / 07:30:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!GraphicsDevice methodsFor:'accessing'!
+
+graphicsContextClass
+ "Return a graphics context class to use for this device.
+ Default is to use DeviceGraphicsContext"
+ graphicsContextClass isNil ifTrue:[
+ graphicsContextClass := self class graphicsContextClass.
+ ].
+ ^ graphicsContextClass
+
+ "Modified: / 25-02-2016 / 07:31:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+graphicsContextClass:aClass
+ "Set a graphics context class to use for this device.
+ Usually there's no need set this, just stich with defaults."
+
+ graphicsContextClass := aClass.
+
+ "Modified (comment): / 25-02-2016 / 07:26:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!GraphicsDevice methodsFor:'accessing & queries'!
addEventListener:aListener
@@ -117,7 +165,20 @@
The defaults is to use the inherited graphics context.
Subclasses may redefine this to use their own graphics context"
- ^ DeviceGraphicsContext onDevice:self.
+ |gc|
+
+ GraphicsMedium superclass == DeviceGraphicsContext ifTrue:[
+ "this is for transition to delegatest GC"
+ ^ aGraphicsMedium.
+ ].
+ graphicsContextClass isNil ifTrue:[
+ graphicsContextClass := self class graphicsContextClass.
+ ].
+ gc := graphicsContextClass onDevice:self.
+ gc font:aGraphicsMedium class defaultFont.
+ ^ gc.
+
+ "Modified: / 25-02-2016 / 07:32:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!GraphicsDevice methodsFor:'event processing'!
--- a/GraphicsMedium.st Tue Jan 03 14:45:53 2017 +0100
+++ b/GraphicsMedium.st Thu Jan 05 21:04:46 2017 +0000
@@ -14,7 +14,7 @@
"{ NameSpace: Smalltalk }"
Object subclass:#GraphicsMedium
- instanceVariableNames:'device gc width height realized'
+ instanceVariableNames:'gc device width height realized'
classVariableNames:''
poolDictionaries:''
category:'Graphics-Support'
--- a/Image.st Tue Jan 03 14:45:53 2017 +0100
+++ b/Image.st Thu Jan 05 21:04:46 2017 +0000
@@ -23,7 +23,8 @@
ImageNotFoundQuerySignal BadImageFormatQuerySignal
ImageSaveErrorSignal ImageLoadErrorSignal FileCreationErrorSignal
CannotRepresentImageSignal InformationLostQuerySignal
- UnrepresentableColorSignal'
+ UnrepresentableColorSignal ARGB_A_OFFSET_MACHINE
+ ARGB_R_OFFSET_MACHINE ARGB_G_OFFSET_MACHINE ARGB_B_OFFSET_MACHINE'
poolDictionaries:''
category:'Graphics-Images'
!
@@ -875,9 +876,21 @@
UnrepresentableColorSignal := ImageErrorSignal newSignalMayProceed:true.
UnrepresentableColorSignal nameClass:self message:#unrepresentableColorSignal.
- ]
-
- "Modified: / 18.5.1999 / 15:50:03 / cg"
+ ].
+ UninterpretedBytes isBigEndian ifTrue:[
+ ARGB_A_OFFSET_MACHINE := 1.
+ ARGB_R_OFFSET_MACHINE := 2.
+ ARGB_G_OFFSET_MACHINE := 3.
+ ARGB_B_OFFSET_MACHINE := 4.
+ ] ifFalse:[
+ ARGB_A_OFFSET_MACHINE := 4.
+ ARGB_R_OFFSET_MACHINE := 3.
+ ARGB_G_OFFSET_MACHINE := 2.
+ ARGB_B_OFFSET_MACHINE := 1.
+ ].
+
+ "Modified: / 18-05-1999 / 15:50:03 / cg"
+ "Modified: / 28-02-2016 / 14:36:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
initializeFileFormatTable
@@ -2654,6 +2667,100 @@
!Image methodsFor:'accessing'!
+bitsARGB32
+ | bitsARGB32 |
+
+ bitsARGB32 := ByteArray new: width * height * 4.
+ self bitsARGB32Into: bitsARGB32.
+ ^ bitsARGB32
+
+ "Created: / 01-09-2015 / 18:02:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+bitsARGB32Into: buffer
+ self bitsARGB32Into: buffer startingAt: 1
+
+ "Created: / 01-09-2015 / 17:18:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+bitsARGB32Into: buffer startingAt: first
+ self bitsARGB32Into: buffer startingAt: first stride: width
+
+ "Created: / 01-09-2015 / 17:18:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+bitsARGB32Into: buffer startingAt: first stride: stride
+ "Store each pixel is a 32-bit quantity, with alpha in the upper
+ 8 bits, then red, then green, then blue. The 32-bit quantities are
+ stored native-endian. Pre-multiplied alpha is used. (That is, 50%
+ transparent red is 0x80800000, not 0x80ff0000.)"
+
+ mask isNil ifTrue:[
+ 0 to: height - 1 do:[:y |
+ | base |
+ base := (first - 1) + (y * stride).
+ 0 to: width - 1 do:[:x |
+ | pixel color offset |
+
+ offset := base + (x * 4).
+ pixel := self pixelAtX: x y: y.
+ color := self colorFromValue: pixel.
+ buffer at: (offset + ARGB_R_OFFSET_MACHINE) put: color redByte.
+ buffer at: (offset + ARGB_G_OFFSET_MACHINE) put: color greenByte.
+ buffer at: (offset + ARGB_B_OFFSET_MACHINE) put: color blueByte.
+ buffer at: (offset + ARGB_A_OFFSET_MACHINE) put: 16rFF.
+ ]
+ ]
+ ] ifFalse:[
+ mask depth == 1 ifTrue:[
+ 0 to: height - 1 do:[:y |
+ | base |
+
+ base := (first - 1) + (y * stride).
+ 0 to: width - 1 do:[:x |
+ | pixel color offset |
+
+ offset := base + (x * 4).
+ (mask pixelAtX: x y:y) ifTrue:[
+ pixel := self pixelAtX: x y: y.
+ color := self colorFromValue: pixel.
+ buffer at: (offset + ARGB_R_OFFSET_MACHINE) put: color redByte.
+ buffer at: (offset + ARGB_G_OFFSET_MACHINE) put: color greenByte.
+ buffer at: (offset + ARGB_B_OFFSET_MACHINE) put: color blueByte.
+ buffer at: (offset + ARGB_A_OFFSET_MACHINE) put: 16rFF.
+ ] ifFalse:[
+ buffer at: (offset + ARGB_R_OFFSET_MACHINE) put: 0.
+ buffer at: (offset + ARGB_G_OFFSET_MACHINE) put: 0.
+ buffer at: (offset + ARGB_B_OFFSET_MACHINE) put: 0.
+ buffer at: (offset + ARGB_A_OFFSET_MACHINE) put: 0.
+ ].
+ ]
+ ]
+ ] ifFalse:[
+ mask depth == 8 ifTrue:[
+ 0 to: height - 1 do:[:y |
+ | base |
+
+ base := (first - 1) + (y * stride).
+ 0 to: width - 1 do:[:x |
+ | pixel color offset alpha |
+
+ offset := base + (x * 4).
+ pixel := self pixelAtX: x y: y.
+ color := self colorFromValue: pixel.
+ alpha := mask pixelAtX: x y:y.
+ buffer at: (offset + ARGB_R_OFFSET_MACHINE) put: (color redByte * alpha) // 16rFF.
+ buffer at: (offset + ARGB_G_OFFSET_MACHINE) put: (color greenByte * alpha) // 16rFF.
+ buffer at: (offset + ARGB_B_OFFSET_MACHINE) put: (color blueByte * alpha) // 16rFF.
+ buffer at: (offset + ARGB_A_OFFSET_MACHINE) put: alpha
+ ]
+ ]
+ ]]].
+
+ "Created: / 01-09-2015 / 17:16:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 28-02-2016 / 14:38:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
bitsPerSample
"return the number of bits per sample.
The return value is an array of bits-per-plane."
@@ -12782,6 +12889,7 @@
photometric ~= self class defaultPhotometric ifTrue:[
(colorMap isNil or:[photometric ~~ #palette]) ifTrue:[
aStream nextPutAll:' photometric:('. photometric storeOn:aStream. aStream nextPut:$).
+ needSemi := false.
].
].
aStream nextPut:$).
@@ -12841,7 +12949,8 @@
].
aStream nextPutAll:'; yourself'
- "Modified: / 22.8.1998 / 12:55:21 / cg"
+ "Modified: / 22-08-1998 / 12:55:21 / cg"
+ "Modified: / 01-09-2015 / 17:24:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!Image methodsFor:'private'!
@@ -15109,6 +15218,11 @@
version_CVS
^ '$Header$'
+!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
! !
--- a/MDIChildView.st Tue Jan 03 14:45:53 2017 +0100
+++ b/MDIChildView.st Thu Jan 05 21:04:46 2017 +0000
@@ -21,3 +21,4 @@
version
^ '$Header: /cvs/stx/stx/libview/MDIChildView.st,v 1.1 2006-02-24 11:27:01 cg Exp $'
! !
+
--- a/Make.proto Tue Jan 03 14:45:53 2017 +0100
+++ b/Make.proto Thu Jan 05 21:04:46 2017 +0000
@@ -34,7 +34,7 @@
# add the path(es) here:,
# ********** OPTIONAL: MODIFY the next lines ***
# LOCALINCLUDES=-Ifoo -Ibar
-LOCALINCLUDES=$(OPTIONAL_SUPPORT_XLIB_INCLUDE) -I$(INCLUDE_TOP)/stx/libbasic
+LOCALINCLUDES=$(OPTIONAL_SUPPORT_XLIB_INCLUDE) -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic2
# if you need any additional defines for embedded C code,
@@ -107,7 +107,7 @@
-__GLXWorkstation.$(O): GLXWorkstation.st $(INCLUDE_TOP)/stx/libview/XWorkstation.H $(INCLUDE_TOP)/stx/libview/DeviceWorkstation.H $(INCLUDE_TOP)/stx/libview/HostGraphicsDevice.H $(INCLUDE_TOP)/stx/libview/GraphicsDevice.H $(INCLUDE)/stc.h
+__GLXWorkstation.$(O): GLXWorkstation.st $(INCLUDE_TOP)/stx/libview/XWorkstation.$(O) $(INCLUDE_TOP)/stx/libview/DeviceWorkstation.H $(INCLUDE_TOP)/stx/libview/HostGraphicsDevice.H $(INCLUDE_TOP)/stx/libview/GraphicsDevice.H $(INCLUDE)/stc.h
$(MAKE) $(BIG_STFILE_RULE) BIG_FILE=GLXWorkstation \
CC="$(CC)" OPT="$(OPT)" \
CLASSLIB_CC="$(CLASSLIB_CC)" CLASSLIB_OPT="$(CLASSLIB_OPT)" \
@@ -232,6 +232,13 @@
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo -n '**NOHG**'))
+stx_libview.$(O): $(shell hg root)/.hg/dirstate
+endif
+
@@ -256,7 +263,7 @@
# build all mandatory prerequisite packages (containing superclasses) for this package
prereq:
- cd ../libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ cd ../libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
@@ -276,86 +283,80 @@
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
-$(OUTDIR)AbstractBackground.$(O) AbstractBackground.$(C) AbstractBackground.$(H): AbstractBackground.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)AbstractBorder.$(O) AbstractBorder.$(C) AbstractBorder.$(H): AbstractBorder.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)Color.$(O) Color.$(C) Color.$(H): Color.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)Colormap.$(O) Colormap.$(C) Colormap.$(H): Colormap.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(STCHDR)
-$(OUTDIR)Controller.$(O) Controller.$(C) Controller.$(H): Controller.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)Cursor.$(O) Cursor.$(C) Cursor.$(H): Cursor.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)DeviceHandle.$(O) DeviceHandle.$(C) DeviceHandle.$(H): DeviceHandle.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)DisplayTransform.$(O) DisplayTransform.$(C) DisplayTransform.$(H): DisplayTransform.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)Event.$(O) Event.$(C) Event.$(H): Event.st $(INCLUDE_TOP)/stx/libbasic/Message.$(H) $(INCLUDE_TOP)/stx/libbasic/MessageSend.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)FillStyle.$(O) FillStyle.$(C) FillStyle.$(H): FillStyle.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)FontDescription.$(O) FontDescription.$(C) FontDescription.$(H): FontDescription.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)GraphicsContext.$(O) GraphicsContext.$(C) GraphicsContext.$(H): GraphicsContext.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)GraphicsDevice.$(O) GraphicsDevice.$(C) GraphicsDevice.$(H): GraphicsDevice.st $(INCLUDE_TOP)/stx/libbasic/AllocationFailure.$(H) $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProceedableError.$(H) $(STCHDR)
-$(OUTDIR)GraphicsMedium.$(O) GraphicsMedium.$(C) GraphicsMedium.$(H): GraphicsMedium.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)Image.$(O) Image.$(C) Image.$(H): Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)ImageReader.$(O) ImageReader.$(C) ImageReader.$(H): ImageReader.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)KeyboardForwarder.$(O) KeyboardForwarder.$(C) KeyboardForwarder.$(H): KeyboardForwarder.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)KeyboardMap.$(O) KeyboardMap.$(C) KeyboardMap.$(H): KeyboardMap.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Dictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/IdentityDictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/Set.$(H) $(STCHDR)
-$(OUTDIR)ResourcePack.$(O) ResourcePack.$(C) ResourcePack.$(H): ResourcePack.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Dictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/Set.$(H) $(STCHDR)
-$(OUTDIR)WindowGroup.$(O) WindowGroup.$(C) WindowGroup.$(H): WindowGroup.st $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Notification.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/Query.$(H) $(STCHDR)
-$(OUTDIR)WindowSensor.$(O) WindowSensor.$(C) WindowSensor.$(H): WindowSensor.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)stx_libview.$(O) stx_libview.$(C) stx_libview.$(H): stx_libview.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
-$(OUTDIR)BeveledBorder.$(O) BeveledBorder.$(C) BeveledBorder.$(H): BeveledBorder.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBorder.$(H) $(STCHDR)
-$(OUTDIR)BitmapFillStyle.$(O) BitmapFillStyle.$(C) BitmapFillStyle.$(H): BitmapFillStyle.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/FillStyle.$(H) $(STCHDR)
-$(OUTDIR)BitmapFont.$(O) BitmapFont.$(C) BitmapFont.$(H): BitmapFont.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/FontDescription.$(H) $(STCHDR)
-$(OUTDIR)Border.$(O) Border.$(C) Border.$(H): Border.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBorder.$(H) $(STCHDR)
-$(OUTDIR)ColorPalette.$(O) ColorPalette.$(C) ColorPalette.$(H): ColorPalette.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libview/Colormap.$(H) $(STCHDR)
-$(OUTDIR)CompoundFont.$(O) CompoundFont.$(C) CompoundFont.$(H): CompoundFont.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/FontDescription.$(H) $(STCHDR)
-$(OUTDIR)Depth16Image.$(O) Depth16Image.$(C) Depth16Image.$(H): Depth16Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
-$(OUTDIR)Depth1Image.$(O) Depth1Image.$(C) Depth1Image.$(H): Depth1Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
-$(OUTDIR)Depth24Image.$(O) Depth24Image.$(C) Depth24Image.$(H): Depth24Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
-$(OUTDIR)Depth2Image.$(O) Depth2Image.$(C) Depth2Image.$(H): Depth2Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
-$(OUTDIR)Depth32Image.$(O) Depth32Image.$(C) Depth32Image.$(H): Depth32Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
-$(OUTDIR)Depth48Image.$(O) Depth48Image.$(C) Depth48Image.$(H): Depth48Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
-$(OUTDIR)Depth4Image.$(O) Depth4Image.$(C) Depth4Image.$(H): Depth4Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
-$(OUTDIR)Depth64Image.$(O) Depth64Image.$(C) Depth64Image.$(H): Depth64Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
-$(OUTDIR)Depth8Image.$(O) Depth8Image.$(C) Depth8Image.$(H): Depth8Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
-$(OUTDIR)DeviceGraphicsContext.$(O) DeviceGraphicsContext.$(C) DeviceGraphicsContext.$(H): DeviceGraphicsContext.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DeviceHandle.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsContext.$(H) $(STCHDR)
-$(OUTDIR)DisplaySurface.$(O) DisplaySurface.$(C) DisplaySurface.$(H): DisplaySurface.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(STCHDR)
-$(OUTDIR)Font.$(O) Font.$(C) Font.$(H): Font.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/FontDescription.$(H) $(STCHDR)
-$(OUTDIR)Form.$(O) Form.$(C) Form.$(H): Form.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(STCHDR)
-$(OUTDIR)GradientBackground.$(O) GradientBackground.$(C) GradientBackground.$(H): GradientBackground.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBackground.$(H) $(STCHDR)
-$(OUTDIR)GradientFillStyle.$(O) GradientFillStyle.$(C) GradientFillStyle.$(H): GradientFillStyle.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/FillStyle.$(H) $(STCHDR)
-$(OUTDIR)HostGraphicsDevice.$(O) HostGraphicsDevice.$(C) HostGraphicsDevice.$(H): HostGraphicsDevice.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsDevice.$(H) $(STCHDR)
-$(OUTDIR)ImageBackground.$(O) ImageBackground.$(C) ImageBackground.$(H): ImageBackground.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBackground.$(H) $(STCHDR)
-$(OUTDIR)MacButtonBorder.$(O) MacButtonBorder.$(C) MacButtonBorder.$(H): MacButtonBorder.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBorder.$(H) $(STCHDR)
-$(OUTDIR)NoBackground.$(O) NoBackground.$(C) NoBackground.$(H): NoBackground.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBackground.$(H) $(STCHDR)
-$(OUTDIR)OrientedFillStyle.$(O) OrientedFillStyle.$(C) OrientedFillStyle.$(H): OrientedFillStyle.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/FillStyle.$(H) $(STCHDR)
-$(OUTDIR)RoundButtonBorder.$(O) RoundButtonBorder.$(C) RoundButtonBorder.$(H): RoundButtonBorder.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBorder.$(H) $(STCHDR)
-$(OUTDIR)ScaleTransform.$(O) ScaleTransform.$(C) ScaleTransform.$(H): ScaleTransform.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplayTransform.$(H) $(STCHDR)
-$(OUTDIR)SimpleBorder.$(O) SimpleBorder.$(C) SimpleBorder.$(H): SimpleBorder.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBorder.$(H) $(STCHDR)
-$(OUTDIR)SolidBackground.$(O) SolidBackground.$(C) SolidBackground.$(H): SolidBackground.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBackground.$(H) $(STCHDR)
-$(OUTDIR)SolidFillStyle.$(O) SolidFillStyle.$(C) SolidFillStyle.$(H): SolidFillStyle.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/FillStyle.$(H) $(STCHDR)
-$(OUTDIR)SynchronousWindowSensor.$(O) SynchronousWindowSensor.$(C) SynchronousWindowSensor.$(H): SynchronousWindowSensor.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/WindowSensor.$(H) $(STCHDR)
-$(OUTDIR)TranslationTransform.$(O) TranslationTransform.$(C) TranslationTransform.$(H): TranslationTransform.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplayTransform.$(H) $(STCHDR)
-$(OUTDIR)TranslucentColor.$(O) TranslucentColor.$(C) TranslucentColor.$(H): TranslucentColor.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Color.$(H) $(STCHDR)
-$(OUTDIR)ViewStyle.$(O) ViewStyle.$(C) ViewStyle.$(H): ViewStyle.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Dictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/Set.$(H) $(INCLUDE_TOP)/stx/libview/ResourcePack.$(H) $(STCHDR)
-$(OUTDIR)WindowEvent.$(O) WindowEvent.$(C) WindowEvent.$(H): WindowEvent.st $(INCLUDE_TOP)/stx/libbasic/Message.$(H) $(INCLUDE_TOP)/stx/libbasic/MessageSend.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Event.$(H) $(STCHDR)
-$(OUTDIR)DeviceWorkstation.$(O) DeviceWorkstation.$(C) DeviceWorkstation.$(H): DeviceWorkstation.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsDevice.$(H) $(INCLUDE_TOP)/stx/libview/HostGraphicsDevice.$(H) $(STCHDR)
-$(OUTDIR)DisplayRootView.$(O) DisplayRootView.$(C) DisplayRootView.$(H): DisplayRootView.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(STCHDR)
-$(OUTDIR)FixedPalette.$(O) FixedPalette.$(C) FixedPalette.$(H): FixedPalette.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libview/ColorPalette.$(H) $(INCLUDE_TOP)/stx/libview/Colormap.$(H) $(STCHDR)
-$(OUTDIR)ImageMask.$(O) ImageMask.$(C) ImageMask.$(H): ImageMask.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Depth1Image.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
-$(OUTDIR)MacFlatButtonBorder.$(O) MacFlatButtonBorder.$(C) MacFlatButtonBorder.$(H): MacFlatButtonBorder.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBorder.$(H) $(INCLUDE_TOP)/stx/libview/SimpleBorder.$(H) $(STCHDR)
-$(OUTDIR)MappedPalette.$(O) MappedPalette.$(C) MappedPalette.$(H): MappedPalette.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libview/ColorPalette.$(H) $(INCLUDE_TOP)/stx/libview/Colormap.$(H) $(STCHDR)
-$(OUTDIR)RoundedBorder.$(O) RoundedBorder.$(C) RoundedBorder.$(H): RoundedBorder.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBorder.$(H) $(INCLUDE_TOP)/stx/libview/SimpleBorder.$(H) $(STCHDR)
-$(OUTDIR)SimpleView.$(O) SimpleView.$(C) SimpleView.$(H): SimpleView.st $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Notification.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProceedingNotification.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(STCHDR)
-$(OUTDIR)WidgetEvent.$(O) WidgetEvent.$(C) WidgetEvent.$(H): WidgetEvent.st $(INCLUDE_TOP)/stx/libbasic/Message.$(H) $(INCLUDE_TOP)/stx/libbasic/MessageSend.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Event.$(H) $(INCLUDE_TOP)/stx/libview/WindowEvent.$(H) $(STCHDR)
-$(OUTDIR)WindowingTransformation.$(O) WindowingTransformation.$(C) WindowingTransformation.$(H): WindowingTransformation.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplayTransform.$(H) $(INCLUDE_TOP)/stx/libview/ScaleTransform.$(H) $(STCHDR)
-$(OUTDIR)FixedPaletteWithAlpha.$(O) FixedPaletteWithAlpha.$(C) FixedPaletteWithAlpha.$(H): FixedPaletteWithAlpha.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libview/ColorPalette.$(H) $(INCLUDE_TOP)/stx/libview/Colormap.$(H) $(INCLUDE_TOP)/stx/libview/FixedPalette.$(H) $(STCHDR)
-$(OUTDIR)MonoMappedPalette.$(O) MonoMappedPalette.$(C) MonoMappedPalette.$(H): MonoMappedPalette.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libview/ColorPalette.$(H) $(INCLUDE_TOP)/stx/libview/Colormap.$(H) $(INCLUDE_TOP)/stx/libview/MappedPalette.$(H) $(STCHDR)
-$(OUTDIR)ShadowView.$(O) ShadowView.$(C) ShadowView.$(H): ShadowView.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(STCHDR)
-$(OUTDIR)View.$(O) View.$(C) View.$(H): View.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(STCHDR)
-$(OUTDIR)TopView.$(O) TopView.$(C) TopView.$(H): TopView.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(STCHDR)
-$(OUTDIR)PopUpView.$(O) PopUpView.$(C) PopUpView.$(H): PopUpView.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/TopView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(STCHDR)
-$(OUTDIR)StandardSystemView.$(O) StandardSystemView.$(C) StandardSystemView.$(H): StandardSystemView.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/TopView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(STCHDR)
-$(OUTDIR)ModalBox.$(O) ModalBox.$(C) ModalBox.$(H): ModalBox.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/StandardSystemView.$(H) $(INCLUDE_TOP)/stx/libview/TopView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(STCHDR)
-$(OUTDIR)XEmbedContainerView.$(O) XEmbedContainerView.$(C) XEmbedContainerView.$(H): XEmbedContainerView.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(STCHDR)
-$(OUTDIR)XWorkstation.$(O) XWorkstation.$(C) XWorkstation.$(H): XWorkstation.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DeviceGraphicsContext.$(H) $(INCLUDE_TOP)/stx/libview/DeviceWorkstation.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsContext.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsDevice.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/HostGraphicsDevice.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(STCHDR)
-$(OUTDIR)XftFontDescription.$(O) XftFontDescription.$(C) XftFontDescription.$(H): XftFontDescription.st $(INCLUDE_TOP)/stx/libbasic/ExternalAddress.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/FontDescription.$(H) $(STCHDR)
-$(OUTDIR)GLXWorkstation.$(O) GLXWorkstation.$(C) GLXWorkstation.$(H): GLXWorkstation.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DeviceWorkstation.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsDevice.$(H) $(INCLUDE_TOP)/stx/libview/HostGraphicsDevice.$(H) $(INCLUDE_TOP)/stx/libview/XWorkstation.$(H) $(STCHDR)
+$(OUTDIR)AbstractBackground.$(O) AbstractBackground.$(H): AbstractBackground.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)AbstractBorder.$(O) AbstractBorder.$(H): AbstractBorder.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)Color.$(O) Color.$(H): Color.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)Colormap.$(O) Colormap.$(H): Colormap.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(STCHDR)
+$(OUTDIR)Controller.$(O) Controller.$(H): Controller.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)Cursor.$(O) Cursor.$(H): Cursor.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)DeviceHandle.$(O) DeviceHandle.$(H): DeviceHandle.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)DisplayTransform.$(O) DisplayTransform.$(H): DisplayTransform.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)Event.$(O) Event.$(H): Event.st $(INCLUDE_TOP)/stx/libbasic/Message.$(H) $(INCLUDE_TOP)/stx/libbasic/MessageSend.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)FontDescription.$(O) FontDescription.$(H): FontDescription.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)GraphicsContext.$(O) GraphicsContext.$(H): GraphicsContext.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)GraphicsDevice.$(O) GraphicsDevice.$(H): GraphicsDevice.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)GraphicsMedium.$(O) GraphicsMedium.$(H): GraphicsMedium.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)Image.$(O) Image.$(H): Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)ImageReader.$(O) ImageReader.$(H): ImageReader.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)KeyboardForwarder.$(O) KeyboardForwarder.$(H): KeyboardForwarder.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)KeyboardMap.$(O) KeyboardMap.$(H): KeyboardMap.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Dictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/IdentityDictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/Set.$(H) $(STCHDR)
+$(OUTDIR)ResourcePack.$(O) ResourcePack.$(H): ResourcePack.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Dictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/Set.$(H) $(STCHDR)
+$(OUTDIR)WindowGroup.$(O) WindowGroup.$(H): WindowGroup.st $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Notification.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/Query.$(H) $(STCHDR)
+$(OUTDIR)WindowSensor.$(O) WindowSensor.$(H): WindowSensor.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)stx_libview.$(O) stx_libview.$(H): stx_libview.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
+$(OUTDIR)BeveledBorder.$(O) BeveledBorder.$(H): BeveledBorder.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBorder.$(H) $(STCHDR)
+$(OUTDIR)BitmapFont.$(O) BitmapFont.$(H): BitmapFont.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/FontDescription.$(H) $(STCHDR)
+$(OUTDIR)Border.$(O) Border.$(H): Border.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBorder.$(H) $(STCHDR)
+$(OUTDIR)ColorPalette.$(O) ColorPalette.$(H): ColorPalette.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libview/Colormap.$(H) $(STCHDR)
+$(OUTDIR)CompoundFont.$(O) CompoundFont.$(H): CompoundFont.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/FontDescription.$(H) $(STCHDR)
+$(OUTDIR)Depth16Image.$(O) Depth16Image.$(H): Depth16Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
+$(OUTDIR)Depth1Image.$(O) Depth1Image.$(H): Depth1Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
+$(OUTDIR)Depth24Image.$(O) Depth24Image.$(H): Depth24Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
+$(OUTDIR)Depth2Image.$(O) Depth2Image.$(H): Depth2Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
+$(OUTDIR)Depth32Image.$(O) Depth32Image.$(H): Depth32Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
+$(OUTDIR)Depth48Image.$(O) Depth48Image.$(H): Depth48Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
+$(OUTDIR)Depth4Image.$(O) Depth4Image.$(H): Depth4Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
+$(OUTDIR)Depth64Image.$(O) Depth64Image.$(H): Depth64Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
+$(OUTDIR)Depth8Image.$(O) Depth8Image.$(H): Depth8Image.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
+$(OUTDIR)DeviceGraphicsContext.$(O) DeviceGraphicsContext.$(H): DeviceGraphicsContext.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DeviceHandle.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsContext.$(H) $(STCHDR)
+$(OUTDIR)DisplaySurface.$(O) DisplaySurface.$(H): DisplaySurface.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(STCHDR)
+$(OUTDIR)Font.$(O) Font.$(H): Font.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/FontDescription.$(H) $(STCHDR)
+$(OUTDIR)Form.$(O) Form.$(H): Form.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(STCHDR)
+$(OUTDIR)GradientBackground.$(O) GradientBackground.$(H): GradientBackground.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBackground.$(H) $(STCHDR)
+$(OUTDIR)HostGraphicsDevice.$(O) HostGraphicsDevice.$(H): HostGraphicsDevice.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsDevice.$(H) $(STCHDR)
+$(OUTDIR)ImageBackground.$(O) ImageBackground.$(H): ImageBackground.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBackground.$(H) $(STCHDR)
+$(OUTDIR)MacButtonBorder.$(O) MacButtonBorder.$(H): MacButtonBorder.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBorder.$(H) $(STCHDR)
+$(OUTDIR)NoBackground.$(O) NoBackground.$(H): NoBackground.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBackground.$(H) $(STCHDR)
+$(OUTDIR)ScaleTransform.$(O) ScaleTransform.$(H): ScaleTransform.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplayTransform.$(H) $(STCHDR)
+$(OUTDIR)SimpleBorder.$(O) SimpleBorder.$(H): SimpleBorder.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBorder.$(H) $(STCHDR)
+$(OUTDIR)SolidBackground.$(O) SolidBackground.$(H): SolidBackground.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBackground.$(H) $(STCHDR)
+$(OUTDIR)SynchronousWindowSensor.$(O) SynchronousWindowSensor.$(H): SynchronousWindowSensor.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/WindowSensor.$(H) $(STCHDR)
+$(OUTDIR)ViewStyle.$(O) ViewStyle.$(H): ViewStyle.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Dictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/Set.$(H) $(INCLUDE_TOP)/stx/libview/ResourcePack.$(H) $(STCHDR)
+$(OUTDIR)WindowEvent.$(O) WindowEvent.$(H): WindowEvent.st $(INCLUDE_TOP)/stx/libbasic/Message.$(H) $(INCLUDE_TOP)/stx/libbasic/MessageSend.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Event.$(H) $(STCHDR)
+$(OUTDIR)DeviceWorkstation.$(O) DeviceWorkstation.$(H): DeviceWorkstation.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsDevice.$(H) $(INCLUDE_TOP)/stx/libview/HostGraphicsDevice.$(H) $(STCHDR)
+$(OUTDIR)DisplayRootView.$(O) DisplayRootView.$(H): DisplayRootView.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(STCHDR)
+$(OUTDIR)ImageMask.$(O) ImageMask.$(H): ImageMask.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Depth1Image.$(H) $(INCLUDE_TOP)/stx/libview/Image.$(H) $(STCHDR)
+$(OUTDIR)MacFlatButtonBorder.$(O) MacFlatButtonBorder.$(H): MacFlatButtonBorder.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBorder.$(H) $(INCLUDE_TOP)/stx/libview/SimpleBorder.$(H) $(STCHDR)
+$(OUTDIR)MappedPalette.$(O) MappedPalette.$(H): MappedPalette.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libview/ColorPalette.$(H) $(INCLUDE_TOP)/stx/libview/Colormap.$(H) $(STCHDR)
+$(OUTDIR)RoundedBorder.$(O) RoundedBorder.$(H): RoundedBorder.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/AbstractBorder.$(H) $(INCLUDE_TOP)/stx/libview/SimpleBorder.$(H) $(STCHDR)
+$(OUTDIR)SimpleView.$(O) SimpleView.$(H): SimpleView.st $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Notification.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProceedingNotification.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(STCHDR)
+$(OUTDIR)WidgetEvent.$(O) WidgetEvent.$(H): WidgetEvent.st $(INCLUDE_TOP)/stx/libbasic/Message.$(H) $(INCLUDE_TOP)/stx/libbasic/MessageSend.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/Event.$(H) $(INCLUDE_TOP)/stx/libview/WindowEvent.$(H) $(STCHDR)
+$(OUTDIR)WindowingTransformation.$(O) WindowingTransformation.$(H): WindowingTransformation.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplayTransform.$(H) $(INCLUDE_TOP)/stx/libview/ScaleTransform.$(H) $(STCHDR)
+$(OUTDIR)XGraphicsContext.$(O) XGraphicsContext.$(H): XGraphicsContext.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DeviceGraphicsContext.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsContext.$(H) $(STCHDR)
+$(OUTDIR)FixedPaletteWithAlpha.$(O) FixedPaletteWithAlpha.$(H): FixedPaletteWithAlpha.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libview/ColorPalette.$(H) $(INCLUDE_TOP)/stx/libview/Colormap.$(H) $(INCLUDE_TOP)/stx/libview/FixedPalette.$(H) $(STCHDR)
+$(OUTDIR)MonoMappedPalette.$(O) MonoMappedPalette.$(H): MonoMappedPalette.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libview/ColorPalette.$(H) $(INCLUDE_TOP)/stx/libview/Colormap.$(H) $(INCLUDE_TOP)/stx/libview/MappedPalette.$(H) $(STCHDR)
+$(OUTDIR)ShadowView.$(O) ShadowView.$(H): ShadowView.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(STCHDR)
+$(OUTDIR)View.$(O) View.$(H): View.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(STCHDR)
+$(OUTDIR)TopView.$(O) TopView.$(H): TopView.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(STCHDR)
+$(OUTDIR)PopUpView.$(O) PopUpView.$(H): PopUpView.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/TopView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(STCHDR)
+$(OUTDIR)StandardSystemView.$(O) StandardSystemView.$(H): StandardSystemView.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/TopView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(STCHDR)
+$(OUTDIR)ModalBox.$(O) ModalBox.$(H): ModalBox.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/StandardSystemView.$(H) $(INCLUDE_TOP)/stx/libview/TopView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(STCHDR)
+$(OUTDIR)FcConstants.$(O) FcConstants.$(H): FcConstants.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/SharedPool.$(H) $(STCHDR)
+$(OUTDIR)XEmbedContainerView.$(O) XEmbedContainerView.$(H): XEmbedContainerView.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(STCHDR)
+$(OUTDIR)XWorkstation.$(O) XWorkstation.$(H): XWorkstation.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DeviceGraphicsContext.$(H) $(INCLUDE_TOP)/stx/libview/DeviceWorkstation.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsContext.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsDevice.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/HostGraphicsDevice.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(STCHDR)
+$(OUTDIR)XftFontDescription.$(O) XftFontDescription.$(H): XftFontDescription.st $(INCLUDE_TOP)/stx/libbasic/ExternalAddress.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/FontDescription.$(H) $(STCHDR)
+$(OUTDIR)FcPattern.$(O) FcPattern.$(H): FcPattern.st $(INCLUDE_TOP)/stx/libbasic/ExternalAddress.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/FcConstants.$(H) $(STCHDR)
+$(OUTDIR)GLXWorkstation.$(O) GLXWorkstation.$(H): GLXWorkstation.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DeviceWorkstation.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsDevice.$(H) $(INCLUDE_TOP)/stx/libview/HostGraphicsDevice.$(H) $(INCLUDE_TOP)/stx/libview/XWorkstation.$(H) $(STCHDR)
# ENDMAKEDEPEND --- do not remove this line
--- a/Make.spec Tue Jan 03 14:45:53 2017 +0100
+++ b/Make.spec Thu Jan 05 21:04:46 2017 +0000
@@ -22,7 +22,7 @@
# (if removed, they will be created as common
# -Pxxx : defines the package
# -Zxxx : a prefix for variables within the classLib
-# -Dxxx : defines passed to CC for inline C-code
+# -Dxxx : defines passed to to CC for inline C-code
# -Ixxx : include path passed to CC for inline C-code
# +optspace : optimized for space
# +optspace2 : optimized more for space
@@ -50,6 +50,17 @@
# STCWARNINGS=-warnEOLComments
STCWARNINGS=-warnNonStandard -warnUnused
+UNIX_CLASSES= \
+ FcConstants \
+ FcPattern \
+ XftFontDescription \
+ XEmbedContainerView \
+ XWorkstation \
+ GLXWorkstation \
+
+WIN32_CLASSES= \
+ WinWorkstation \
+
COMMON_CLASSES= \
AbstractBackground \
AbstractBorder \
@@ -60,7 +71,6 @@
DeviceHandle \
DisplayTransform \
Event \
- FillStyle \
FontDescription \
GraphicsContext \
GraphicsDevice \
@@ -74,7 +84,6 @@
WindowSensor \
stx_libview \
BeveledBorder \
- BitmapFillStyle \
BitmapFont \
Border \
ColorPalette \
@@ -93,25 +102,18 @@
Font \
Form \
GradientBackground \
- GradientFillStyle \
HostGraphicsDevice \
ImageBackground \
MacButtonBorder \
NoBackground \
- OrientedFillStyle \
- RoundButtonBorder \
ScaleTransform \
SimpleBorder \
SolidBackground \
- SolidFillStyle \
SynchronousWindowSensor \
- TranslationTransform \
- TranslucentColor \
ViewStyle \
WindowEvent \
DeviceWorkstation \
DisplayRootView \
- FixedPalette \
ImageMask \
MacFlatButtonBorder \
MappedPalette \
@@ -119,7 +121,9 @@
SimpleView \
WidgetEvent \
WindowingTransformation \
- FixedPaletteWithAlpha \
+ XGraphicsContext \
+ FixedPalette \
+ FixedPaletteWithAlpha \
MonoMappedPalette \
ShadowView \
View \
@@ -128,17 +132,19 @@
StandardSystemView \
ModalBox \
-WIN32_CLASSES= \
- WinWorkstation \
-
-UNIX_CLASSES= \
- XftFontDescription \
- XEmbedContainerView \
- XWorkstation \
- GLXWorkstation \
+UNIX_OBJS= \
+ $(OUTDIR_SLASH)FcConstants.$(O) \
+ $(OUTDIR_SLASH)FcPattern.$(O) \
+ $(OUTDIR_SLASH)XftFontDescription.$(O) \
+ $(OUTDIR_SLASH)XEmbedContainerView.$(O) \
+ $(OUTDIR_SLASH)XWorkstation.$(O) \
+ $(OUTDIR_SLASH)GLXWorkstation.$(O) \
+
+WIN32_OBJS= \
+ $(OUTDIR_SLASH)WinWorkstation.$(O) \
COMMON_OBJS= \
$(OUTDIR_SLASH)AbstractBackground.$(O) \
@@ -150,7 +156,6 @@
$(OUTDIR_SLASH)DeviceHandle.$(O) \
$(OUTDIR_SLASH)DisplayTransform.$(O) \
$(OUTDIR_SLASH)Event.$(O) \
- $(OUTDIR_SLASH)FillStyle.$(O) \
$(OUTDIR_SLASH)FontDescription.$(O) \
$(OUTDIR_SLASH)GraphicsContext.$(O) \
$(OUTDIR_SLASH)GraphicsDevice.$(O) \
@@ -164,7 +169,6 @@
$(OUTDIR_SLASH)WindowSensor.$(O) \
$(OUTDIR_SLASH)stx_libview.$(O) \
$(OUTDIR_SLASH)BeveledBorder.$(O) \
- $(OUTDIR_SLASH)BitmapFillStyle.$(O) \
$(OUTDIR_SLASH)BitmapFont.$(O) \
$(OUTDIR_SLASH)Border.$(O) \
$(OUTDIR_SLASH)ColorPalette.$(O) \
@@ -183,25 +187,18 @@
$(OUTDIR_SLASH)Font.$(O) \
$(OUTDIR_SLASH)Form.$(O) \
$(OUTDIR_SLASH)GradientBackground.$(O) \
- $(OUTDIR_SLASH)GradientFillStyle.$(O) \
$(OUTDIR_SLASH)HostGraphicsDevice.$(O) \
$(OUTDIR_SLASH)ImageBackground.$(O) \
$(OUTDIR_SLASH)MacButtonBorder.$(O) \
$(OUTDIR_SLASH)NoBackground.$(O) \
- $(OUTDIR_SLASH)OrientedFillStyle.$(O) \
- $(OUTDIR_SLASH)RoundButtonBorder.$(O) \
$(OUTDIR_SLASH)ScaleTransform.$(O) \
$(OUTDIR_SLASH)SimpleBorder.$(O) \
$(OUTDIR_SLASH)SolidBackground.$(O) \
- $(OUTDIR_SLASH)SolidFillStyle.$(O) \
$(OUTDIR_SLASH)SynchronousWindowSensor.$(O) \
- $(OUTDIR_SLASH)TranslationTransform.$(O) \
- $(OUTDIR_SLASH)TranslucentColor.$(O) \
$(OUTDIR_SLASH)ViewStyle.$(O) \
$(OUTDIR_SLASH)WindowEvent.$(O) \
$(OUTDIR_SLASH)DeviceWorkstation.$(O) \
$(OUTDIR_SLASH)DisplayRootView.$(O) \
- $(OUTDIR_SLASH)FixedPalette.$(O) \
$(OUTDIR_SLASH)ImageMask.$(O) \
$(OUTDIR_SLASH)MacFlatButtonBorder.$(O) \
$(OUTDIR_SLASH)MappedPalette.$(O) \
@@ -209,6 +206,8 @@
$(OUTDIR_SLASH)SimpleView.$(O) \
$(OUTDIR_SLASH)WidgetEvent.$(O) \
$(OUTDIR_SLASH)WindowingTransformation.$(O) \
+ $(OUTDIR_SLASH)XGraphicsContext.$(O) \
+ $(OUTDIR_SLASH)FixedPalette.$(O) \
$(OUTDIR_SLASH)FixedPaletteWithAlpha.$(O) \
$(OUTDIR_SLASH)MonoMappedPalette.$(O) \
$(OUTDIR_SLASH)ShadowView.$(O) \
@@ -217,15 +216,6 @@
$(OUTDIR_SLASH)PopUpView.$(O) \
$(OUTDIR_SLASH)StandardSystemView.$(O) \
$(OUTDIR_SLASH)ModalBox.$(O) \
-
-WIN32_OBJS= \
- $(OUTDIR_SLASH)WinWorkstation.$(O) \
-
-UNIX_OBJS= \
- $(OUTDIR_SLASH)XftFontDescription.$(O) \
- $(OUTDIR_SLASH)XEmbedContainerView.$(O) \
- $(OUTDIR_SLASH)XWorkstation.$(O) \
- $(OUTDIR_SLASH)GLXWorkstation.$(O) \
+ $(OUTDIR_SLASH)extensions.$(O) \
-
--- a/NeXTWorkstation.st Tue Jan 03 14:45:53 2017 +0100
+++ b/NeXTWorkstation.st Thu Jan 05 21:04:46 2017 +0000
@@ -1,22 +1,10 @@
-"
- COPYRIGHT (c) 1992 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.
-"
+"{ Package: 'stx:libview' }"
DeviceWorkstation subclass:#NeXTWorkstation
- instanceVariableNames:'
- buffered
- knownDrawableIds'
- classVariableNames: ''
- poolDictionaries:''
- category:'Interface-Graphics'
+ instanceVariableNames:'buffered knownDrawableIds'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Interface-Graphics'
!
NeXTWorkstation comment:'
@@ -32,10 +20,10 @@
$Header: /cvs/stx/stx/libview/NeXTWorkstation.st,v 1.22 2013-05-21 20:49:14 cg Exp $
written spring 92 by claus
-'!
+'
+!
!NeXTWorkstation primitiveDefinitions!
-
%{
#include <stdio.h>
@@ -46,7 +34,6 @@
! !
!NeXTWorkstation primitiveFunctions!
-
%{
/*
* cannot include objc stuff - too many name conflicts
@@ -83,117 +70,6 @@
"initialize some common constants"
! !
-!NeXTWorkstation methodsFor:'initialize / release'!
-
-initialize
- "{ Symbol: color }"
- "{ Symbol: monochrome }"
-%{
- int depth, width, height;
- char *visual;
-
- /* do NXApp stuff, get screen infos */
- _NX_init(&visual, &depth, &width, &height);
-
- _INST(visualType) = _MKSYMBOL(visual, (OBJ *)0);
- _INST(depth) = _MKSMALLINT(depth);
- _INST(width) = _MKSMALLINT(width);
- _INST(height) = _MKSMALLINT(height);
-
- _INST(widthMM) = _MKSMALLINT(300);
- _INST(heightMM) = _MKSMALLINT(222);
-
- if (strcmp(visual, "StaticGray") == 0) {
- _INST(hasColors) = false;
- _INST(hasGreyscales) = true;
- _INST(bitsPerRGB) = _MKSMALLINT(2);
- if (depth == 2)
- _INST(ncells) = _MKSMALLINT(4);
- _INST(monitorType) = _monochrome;
- } else if (strcmp(visual, "TrueColor") == 0) {
- _INST(hasColors) = true;
- _INST(hasGreyscales) = true;
- /*
- * does this exist ?"
- *
- if (depth == 8) {
- _INST(ncells) = _MKSMALLINT(256);
- }
- *
- */
- /* should work for colorStation */
- if (depth == 12) {
- _INST(ncells) = _MKSMALLINT(4096);
- _INST(bitsPerRGB) = _MKSMALLINT(4);
- }
- /* should work for nextDimension */
- if (depth == 24) {
- _INST(ncells) = _MKSMALLINT(4096 * 4096);
- _INST(bitsPerRGB) = _MKSMALLINT(8);
- }
- _INST(monitorType) = _color;
- }
-%}
-.
- dispatching := false.
- shiftDown := false.
- ctrlDown := false.
- metaDown := false.
- altDown := false.
- motionEventCompression := true.
- buffered := true.
- self initializeKeyboardMap
-!
-
-close
-%{
- _NX_close();
-%}
-! !
-
-!NeXTWorkstation methodsFor:'private'!
-
-addKnownView:aView winId:aNumber withId:aDrawableNumber
- "add the View aView with Id:aNumber to the list of known views/id's"
-
- knownViews isNil ifTrue:[
- knownViews := OrderedCollection new:100.
- knownIds := OrderedCollection new:100.
- knownDrawableIds := OrderedCollection new:100
- ].
- knownViews add:aView.
- knownIds add:aNumber.
- knownDrawableIds add:aDrawableNumber
-! !
-
-!NeXTWorkstation methodsFor:'misc'!
-
-lastError
- "return the last X-error string - when buffering is on, this may be
- an error for a long-ago operation"
-
- ^ nil
-!
-
-unBuffered
- "make all drawing be sent immediately to the display"
-
- buffered := false
-!
-
-buffered
- "buffer drawing - do not send it immediately to the display"
-
- buffered := true
-!
-
-synchronizeOutput
- "send all buffered drawing to the display"
-%{
- NXPing();
-%}
-! !
-
!NeXTWorkstation class methodsFor:'queries'!
platformName
@@ -202,22 +78,23 @@
!NeXTWorkstation methodsFor:'accessing & queries'!
+blackpixel
+ "return the colorId of black;
+ for next, we use the color directly"
+
+ ^ 16r000000
+!
+
displayFileDescriptor
"return the displays fileNumber - for select"
^ nil
!
-serverVendor
- ^ 'NeXT'
-!
+hasDPS
+ "return true, if display supports postscript output into a view"
-vendorRelease
- ^ 2.1 "this is wrong - should get it from somewhere ..."
-!
-
-protocolVersion
- ^ self vendorRelease
+ ^ true
!
hasShape
@@ -227,28 +104,23 @@
^ false
!
-hasDPS
- "return true, if display supports postscript output into a view"
+protocolVersion
+ ^ self vendorRelease
+!
- ^ true
+serverVendor
+ ^ 'NeXT'
!
-blackpixel
- "return the colorId of black;
- for next, we use the color directly"
+translatePoint:aPoint from:windowId1 to:windowId2
+ "given a point in window1, return the coordinate in window2
+ - use to xlate points from a window to rootwindow"
- ^ 16r000000
+ ^ self shouldNotImplement
!
-whitepixel
- "return the colorId of white;
- for next, we use the color directly"
-
- ^ 16rFFFFFF
-!
-
-visualType:aSymbol
- ^ self shouldNotImplement
+vendorRelease
+ ^ 2.1 "this is wrong - should get it from somewhere ..."
!
viewIdFromPoint:aPoint in:windowId
@@ -260,37 +132,41 @@
^ self shouldNotImplement
!
-translatePoint:aPoint from:windowId1 to:windowId2
- "given a point in window1, return the coordinate in window2
- - use to xlate points from a window to rootwindow"
+visualType:aSymbol
+ ^ self shouldNotImplement
+!
- ^ self shouldNotImplement
+whitepixel
+ "return the colorId of white;
+ for next, we use the color directly"
+
+ ^ 16rFFFFFF
! !
!NeXTWorkstation methodsFor:'bitmap/window creation'!
+createBitmapFromArray:anArray width:w height:h
+ ^ self shouldNotImplement
+!
+
+createBitmapFromFile:aString for:aForm
+ ^ self shouldNotImplement
+!
+
+createBitmapWidth:w height:h
+ ^ self shouldNotImplement
+!
+
createFaxImageFromArray:data width:w height:h type:type k:k msbFirst:msbFirst
"create a new faxImage in the workstation"
^ nil
!
-createBitmapWidth:w height:h
- ^ self shouldNotImplement
-!
-
createPixmapWidth:w height:h depth:d
^ self shouldNotImplement
!
-createBitmapFromFile:aString for:aForm
- ^ self shouldNotImplement
-!
-
-createBitmapFromArray:anArray width:w height:h
- ^ self shouldNotImplement
-!
-
createWindowFor:aView left:xpos top:ypos width:wwidth height:wheight
|ext minWidth minHeight maxWidth maxHeight
@@ -359,18 +235,6 @@
^ drawableId
!
-rootWindowFor:aView
- ^ self shouldNotImplement
-!
-
-destroyView:aView withId:aWindowId
- ^ self shouldNotImplement
-!
-
-destroyPixmap:aDrawableId
- ^ self shouldNotImplement
-!
-
destroyFaxImage:aFaxImageId
^ self shouldNotImplement
!
@@ -379,103 +243,35 @@
^ self shouldNotImplement
!
-gcFor:aDrawableId
+destroyPixmap:aDrawableId
^ self shouldNotImplement
-! !
-
-!NeXTWorkstation methodsFor:'misc stuff'!
-
-setInputFocusTo:aWindowId
- ^ self primitiveFailed
-! !
-
-!NeXTWorkstation methodsFor:'font stuff'!
-
-listOfAvailableFonts
- "return a list with all available font names on this display"
-%{
- char **names;
- char **cp;
- int count, i;
- static struct inlineCache dummy1 = _DUMMYILC1;
- OBJ arr;
-
- names = (char **) _objc_availableFonts(_FontManager_new());
- /* count them */
- for (cp = names; *cp; cp++) ;;
- count = cp - names;
- arr = _SEND1(@global(Array), @symbol(new:), nil, &dummy1, _MKSMALLINT(count));
- for (i=0; i<count;i++)
- _ArrayInstPtr(arr)->a_element[i] = __MKSTRING(names[i]);
- free(names);
- RETURN (arr);
-%}
-!
-
-createFontFor:aFontName
- ^ self primitiveFailed
-!
-
-releaseFont:aFontId
- ^ self primitiveFailed
!
-ascentOf:aFontId
- ^ self primitiveFailed
-!
-
-descentOf:aFontId
- self badFont
-!
-
-minWidthOfFont:aFontId
- self badFont
-!
-
-maxWidthOfFont:aFontId
- self badFont
-!
-
-widthOf:aString inFont:aFontId
- ^ self primitiveFailed
+destroyView:aView withId:aWindowId
+ ^ self shouldNotImplement
!
-widthOf:aString from:index1 to:index2 inFont:aFontId
- ^ self primitiveFailed
-! !
-
-!NeXTWorkstation methodsFor:'cursor stuff'!
-
-destroyCursor:aCursorId
- ^ self primitiveFailed
+gcFor:aDrawableId
+ ^ self shouldNotImplement
!
-createCursorSourceFormId:sourceFormId maskFormId:maskFormId hotX:hx hotY:hy
- ^ self primitiveFailed
-!
-
-grabPointerIn:aWindowId
- ^ self primitiveFailed
-!
-
-ungrabPointer
- ^ self primitiveFailed
-!
-
-pointerPosition
- ^ self primitiveFailed
+rootWindowFor:aView
+ ^ self shouldNotImplement
! !
!NeXTWorkstation methodsFor:'color stuff'!
-listOfAvailableColors
- ^ super listOfAvailableColors
+colorCell
+ "allocate a color - return index.
+ Since NeXTs are either StaticGrey or StaticColor, return nil here."
+
+ ^ nil
!
-freeColor:colorIndex
- "colors are never freed"
+colorNamed:aString
+ "allocate a color with color name - return index"
- ^ self
+ ^ super colorNamed:aString
!
colorRed:redVal green:greenVal blue:blueVal
@@ -493,30 +289,16 @@
^ (((r bitShift:8) bitOr:g) bitShift:8) bitOr:b
!
-colorNamed:aString
- "allocate a color with color name - return index"
-
- ^ super colorNamed:aString
-!
-
-colorCell
- "allocate a color - return index.
- Since NeXTs are either StaticGrey or StaticColor, return nil here."
-
- ^ nil
-!
-
-setColor:index red:redVal green:greenVal blue:blueVal
- "change color in map at:index.
- Since NeXTs are either StaticGrey or StaticColor, do nothing here."
+freeColor:colorIndex
+ "colors are never freed"
^ self
!
-getRedFrom:index
- "get red part of color in map at:index"
+getBlueFrom:index
+ "get blue part of color in map at:index"
- ^ ((index bitShift:-16) bitAnd:16rFF) * 100 / 16rFF
+ ^ (index bitAnd:16rFF) * 100 / 16rFF
!
getGreenFrom:index
@@ -525,289 +307,62 @@
^ ((index bitShift:-8) bitAnd:16rFF) * 100 / 16rFF
!
-getBlueFrom:index
- "get blue part of color in map at:index"
-
- ^ (index bitAnd:16rFF) * 100 / 16rFF
-! !
-
-!NeXTWorkstation methodsFor:'window stuff'!
+getRedFrom:index
+ "get red part of color in map at:index"
-setBackingStore:how in:aWindowId
- "turn on/off backing-store for a window"
-
- ^ self
-!
-
-setSaveUnder:yesOrNo in:aWindowId
- "turn on/off save-under for a window"
-
- ^ self
+ ^ ((index bitShift:-16) bitAnd:16rFF) * 100 / 16rFF
!
-setWindowBackground:aColorId in:aWindowId
-%{
-#ifdef NOTDEF
- int id, ir, ig, ib;
- float r, g, b;
- NXColor clr;
-
- if (__isSmallInteger(aColorId)) {
- id = _intVal(aColorId);
- ir = (id >> 16) & 0xFF;
- ig = (id >> 8) & 0xFF;
- ib = id & 0xFF;
- /* scale from 0 .. 255 to 0.0 .. 1.0 */
- r = (float)ir / 255.0;
- g = (float)ig / 255.0;
- b = (float)ib / 255.0;
- clr = NXConvertRGBToColor(r, g, b);
- }
-#endif
-%}
-.
- ^ self primitiveFailed
-!
-
-setWindowBackgroundPixmap:aPixmapId in:aWindowId
- ^ self primitiveFailed
-!
-
-setWindowBorderColor:aColorId in:aWindowId
- ^ self primitiveFailed
+listOfAvailableColors
+ ^ super listOfAvailableColors
!
-setWindowBorderPixmap:aPixmapId in:aWindowId
- ^ self primitiveFailed
-!
-
-setWindowBorderWidth:aNumber in:aWindowId
- ^ self primitiveFailed
-!
-
-setWindowBorderShape:aPixmapId in:aWindowId
- ^ self
-!
-
-setWindowShape:aPixmapId in:aWindowId
- ^ self
-!
-
-setCursor:aCursorId in:aWindowId
- ^ self primitiveFailed
-!
-
-setWindowName:aString in:aWindowId
- ^ self primitiveFailed
-!
-
-setWindowIcon:aForm in:aWindowId
- ^ self primitiveFailed
-!
+setColor:index red:redVal green:greenVal blue:blueVal
+ "change color in map at:index.
+ Since NeXTs are either StaticGrey or StaticColor, do nothing here."
-setWindowIcon:aForm mask:aMaskForm in:aWindowId
- ^ self primitiveFailed
-!
-
-setWindowIconWindow:aView in:aWindowId
- ^ self primitiveFailed
-!
-
-clearWindow:aWindowId
- ^ self primitiveFailed
-!
+ ^ self
+! !
-clearRectangleX:x y:y width:width height:height in:aWindowId
- ^ self primitiveFailed
-!
-
-mapWindow:aWindowId
- ^ self primitiveFailed
-!
+!NeXTWorkstation methodsFor:'cursor stuff'!
-unmapWindow:aWindowId
- ^ self primitiveFailed
-!
-
-raiseWindow:aWindowId
- ^ self primitiveFailed
-!
-
-moveWindow:aWindowId x:x y:y
+createCursorSourceFormId:sourceFormId maskFormId:maskFormId hotX:hx hotY:hy
^ self primitiveFailed
!
-resizeWindow:aWindowId width:w height:h
- ^ self primitiveFailed
-!
-
-moveResizeWindow:aWindowId x:x y:y width:w height:h
- ^ self primitiveFailed
-! !
-
-!NeXTWorkstation methodsFor:'graphic context stuff'!
-
-setForeground:fgColorIndex in:aGCId
- "set foreground color to be drawn with"
-
- ^ self primitiveFailed
-!
-
-setBackground:bgColorIndex in:aGCId
- "set background color to be drawn with"
-
- ^ self primitiveFailed
-!
-
-setForeground:fgColorIndex background:bgColorIndex in:aGCId
- "set foreground and background colors to be drawn with"
-
- ^ self primitiveFailed
-!
-
-setForeground:fgColor background:bgColor mask:aBitmapId in:aGCId
- "set foreground and background colors to be drawn with using mask or
- solid (if aBitmapId is nil)"
-
- ^ self primitiveFailed
-!
-
-setLineWidth:aNumber in:aGCId
- "set linewidth to be drawn with"
-
- ^ self primitiveFailed
-!
-
-setForeground:fgColor background:bgColor mask:aBitmapId lineWidth:lw in:aGCId
- "set foreground and background colors to be drawn with using mask or
- solid (if aBitmapId is nil); also set lineWidth"
-
+destroyCursor:aCursorId
^ self primitiveFailed
!
-setFunction:aFunctionSymbol in:aGCId
- "set alu function to be drawn with"
-
- "{ Symbol: and } "
- "{ Symbol: or } "
- "{ Symbol: xor } "
- "{ Symbol: copy } "
- "{ Symbol: copyInverted } "
- "{ Symbol: andInverted } "
- "{ Symbol: andReverse } "
- "{ Symbol: orInverted } "
- "{ Symbol: orReverse } "
-
- ^ self primitiveFailed
-!
-
-setFont:aFontId in:aGCId
- "set font to be drawn in"
-
- ^ self primitiveFailed
-!
-
-setPixmapMask:aPixmapId in:aGCId
- "set or clear the drawing mask - a pixmap mask providing full color"
-
- ^ self primitiveFailed
-!
-
-setBitmapMask:aBitmapId in:aGCId
- "set or clear the drawing mask - a bitmap mask using current fg/bg"
-
+grabPointerIn:aWindowId
^ self primitiveFailed
!
-setMaskOriginX:orgX y:orgY in:aGCid
- "set the mask origin"
-
- ^ self primitiveFailed
-!
-
-setClipByChildren:aBool in:aGCId
- "enable/disable drawing into child views"
-
- ^ self primitiveFailed
-!
-
-noClipIn:aDrawableId gc:aGCId
- "disable clipping rectangle"
-
+pointerPosition
^ self primitiveFailed
!
-setClipX:clipX y:clipY width:clipWidth height:clipHeight in:drawableId gc:aGCId
- "clip to a rectangle"
-
- ^ self primitiveFailed
-!
-
-setGraphicsExposures:aBoolean in:aGCId
- "set or clear the graphics exposures flag"
-
- ^ self primitiveFailed
-! !
-
-!NeXTWorkstation methodsFor:'retrieving pixels'!
-
-getPixelX:x y:y from:aDrawableId
- "return the pixel value at x/y"
-
+ungrabPointer
^ self primitiveFailed
! !
!NeXTWorkstation methodsFor:'drawing'!
-displayString:aString x:x y:y in:aDrawableId with:aGCId
- "draw a string - draw foreground only"
-
-%{
- float fx, fy;
-
- do {
- if (__isSmallInteger(x))
- fx = (float)_intVal(x);
- else if (_isFloat(x))
- fx = _floatVal(x);
- else break;
- if (__isSmallInteger(y))
- fy = (float)_intVal(y);
- else if (_isFloat(y))
- fy = _floatVal(y);
- else break;
- setDrawable(aDrawableId);
- PSmoveto(fx, fy);
- PSshow((char *)_stringVal(aString));
- if (_INST(buffered) == false)
- NXPing();
- RETURN ( self );
- } while (1);
-%}
-.
- self primitiveFailed
-!
-
-displayString:aString from:index1 to:index2 x:x y:y in:aDrawableId with:aGCId
- "draw part of a string - draw foreground only"
+copyFromId:sourceId x:srcX y:srcY gc:srcGCId to:destId x:dstX y:dstY gc:dstGCId width:w height:h
+ "do a bit-blt"
^ self primitiveFailed
!
-displayOpaqueString:aString x:x y:y in:aDrawableId with:aGCId
- "draw a string - draw both foreground and background"
+copyPlaneFromId:sourceId x:srcX y:srcY gc:srcGCId to:destId x:dstX y:dstY gc:dstGCId width:w height:h
+ "do a bit-blt"
^ self primitiveFailed
!
-displayOpaqueString:aString from:index1 to:index2 x:x y:y in:aDrawableId with:aGCId
- "draw part of a string - draw both foreground and background"
-
- ^ self primitiveFailed
-!
-
-displayPointX:x y:y in:aDrawableId with:aGCId
- "draw a point"
+displayArcX:x y:y w:width h:height from:startAngle angle:angle
+ in:aDrawableId with:aGCId
+ "draw an arc"
^ self primitiveFailed
!
@@ -856,8 +411,66 @@
^ self primitiveFailed
!
-drawRectangleX:x y:y width:width height:height in:aDrawableId with:aGCId
- "draw a rectangle"
+displayOpaqueString:aString from:index1 to:index2 x:x y:y in:aDrawableId with:aGCId
+ "draw part of a string - draw both foreground and background"
+
+ ^ self primitiveFailed
+!
+
+displayOpaqueString:aString x:x y:y in:aDrawableId with:aGCId
+ "draw a string - draw both foreground and background"
+
+ ^ self primitiveFailed
+!
+
+displayPointX:x y:y in:aDrawableId with:aGCId
+ "draw a point"
+
+ ^ self primitiveFailed
+!
+
+displayString:aString from:index1 to:index2 x:x y:y in:aDrawableId with:aGCId
+ "draw part of a string - draw foreground only"
+
+ ^ self primitiveFailed
+!
+
+displayString:aString x:x y:y in:aDrawableId with:aGCId
+ "draw a string - draw foreground only"
+
+%{
+ float fx, fy;
+
+ do {
+ if (__isSmallInteger(x))
+ fx = (float)_intVal(x);
+ else if (_isFloat(x))
+ fx = _floatVal(x);
+ else break;
+ if (__isSmallInteger(y))
+ fy = (float)_intVal(y);
+ else if (_isFloat(y))
+ fy = _floatVal(y);
+ else break;
+ setDrawable(aDrawableId);
+ PSmoveto(fx, fy);
+ PSshow((char *)_stringVal(aString));
+ if (_INST(buffered) == false)
+ NXPing();
+ RETURN ( self );
+ } while (1);
+%}
+.
+ self primitiveFailed
+!
+
+drawBits:imageBits depth:imageDepth 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.
+ It has to be checked elsewhere, that server can do it with the given
+ depth; also it is assumed, that the colormap is setup correctly"
^ self primitiveFailed
!
@@ -868,21 +481,8 @@
^ self primitiveFailed
!
-copyFromId:sourceId x:srcX y:srcY gc:srcGCId to:destId x:dstX y:dstY gc:dstGCId width:w height:h
- "do a bit-blt"
-
- ^ self primitiveFailed
-!
-
-copyPlaneFromId:sourceId x:srcX y:srcY gc:srcGCId to:destId x:dstX y:dstY gc:dstGCId width:w height:h
- "do a bit-blt"
-
- ^ self primitiveFailed
-!
-
-displayArcX:x y:y w:width h:height from:startAngle angle:angle
- in:aDrawableId with:aGCId
- "draw an arc"
+drawRectangleX:x y:y width:width height:height in:aDrawableId with:aGCId
+ "draw a rectangle"
^ self primitiveFailed
!
@@ -894,6 +494,12 @@
^ self primitiveFailed
!
+fillPolygon:aPolygon in:aDrawableId with:aGCId
+ "fill a polygon"
+
+ ^ self primitiveFailed
+!
+
fillRectangleX:x y:y width:w height:h in:aDrawableId with:aGCId
"fill a rectangle"
@@ -937,23 +543,6 @@
RETURN ( self );
} while (1);
%}
-!
-
-fillPolygon:aPolygon in:aDrawableId with:aGCId
- "fill a polygon"
-
- ^ self primitiveFailed
-!
-
-drawBits:imageBits depth:imageDepth 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.
- It has to be checked elsewhere, that server can do it with the given
- depth; also it is assumed, that the colormap is setup correctly"
-
- ^ self primitiveFailed
! !
!NeXTWorkstation methodsFor:'events'!
@@ -962,19 +551,18 @@
^ self primitiveFailed
!
-setEventMask:aMask in:aWindowId
- ^ self primitiveFailed
-!
-
-exposeEventsFor:aViewId do:aBlock
-!
-
eventPending
"return true, if any event is pending"
^ false
!
+eventPending:anEventSymbol for:aWindowId
+ "return true, if a specific event is pending"
+
+ ^ self primitiveFailed
+!
+
eventPendingWithoutSync
"return true, if any event is pending"
@@ -987,8 +575,410 @@
^ self primitiveFailed
!
-eventPending:anEventSymbol for:aWindowId
- "return true, if a specific event is pending"
+exposeEventsFor:aViewId do:aBlock
+!
+
+setEventMask:aMask in:aWindowId
+ ^ self primitiveFailed
+! !
+
+!NeXTWorkstation methodsFor:'font stuff'!
+
+ascentOf:aFontId
+ ^ self primitiveFailed
+!
+
+createFontFor:aFontName
+ ^ self primitiveFailed
+!
+
+descentOf:aFontId
+ self badFont
+!
+
+listOfAvailableFonts
+ "return a list with all available font names on this display"
+%{
+ char **names;
+ char **cp;
+ int count, i;
+ static struct inlineCache dummy1 = _DUMMYILC1;
+ OBJ arr;
+
+ names = (char **) _objc_availableFonts(_FontManager_new());
+ /* count them */
+ for (cp = names; *cp; cp++) ;;
+ count = cp - names;
+ arr = _SEND1(@global(Array), @symbol(new:), nil, &dummy1, _MKSMALLINT(count));
+ for (i=0; i<count;i++)
+ _ArrayInstPtr(arr)->a_element[i] = __MKSTRING(names[i]);
+ free(names);
+ RETURN (arr);
+%}
+!
+
+maxWidthOfFont:aFontId
+ self badFont
+!
+
+minWidthOfFont:aFontId
+ self badFont
+!
+
+releaseFont:aFontId
+ ^ self primitiveFailed
+!
+
+widthOf:aString from:index1 to:index2 inFont:aFontId
+ ^ self primitiveFailed
+!
+
+widthOf:aString inFont:aFontId
+ ^ self primitiveFailed
+! !
+
+!NeXTWorkstation methodsFor:'graphic context stuff'!
+
+noClipIn:aDrawableId gc:aGCId
+ "disable clipping rectangle"
+
+ ^ self primitiveFailed
+!
+
+setBackground:bgColorIndex in:aGCId
+ "set background color to be drawn with"
+
+ ^ self primitiveFailed
+!
+
+setBitmapMask:aBitmapId in:aGCId
+ "set or clear the drawing mask - a bitmap mask using current fg/bg"
+
+ ^ self primitiveFailed
+!
+
+setClipByChildren:aBool in:aGCId
+ "enable/disable drawing into child views"
+
+ ^ self primitiveFailed
+!
+
+setClipX:clipX y:clipY width:clipWidth height:clipHeight in:drawableId gc:aGCId
+ "clip to a rectangle"
+
+ ^ self primitiveFailed
+!
+
+setFont:aFontId in:aGCId
+ "set font to be drawn in"
+
+ ^ self primitiveFailed
+!
+
+setForeground:fgColorIndex background:bgColorIndex in:aGCId
+ "set foreground and background colors to be drawn with"
+
+ ^ self primitiveFailed
+!
+
+setForeground:fgColor background:bgColor mask:aBitmapId in:aGCId
+ "set foreground and background colors to be drawn with using mask or
+ solid (if aBitmapId is nil)"
+
+ ^ self primitiveFailed
+!
+
+setForeground:fgColor background:bgColor mask:aBitmapId lineWidth:lw in:aGCId
+ "set foreground and background colors to be drawn with using mask or
+ solid (if aBitmapId is nil); also set lineWidth"
+
+ ^ self primitiveFailed
+!
+
+setForeground:fgColorIndex in:aGCId
+ "set foreground color to be drawn with"
+
+ ^ self primitiveFailed
+!
+
+setFunction:aFunctionSymbol in:aGCId
+ "set alu function to be drawn with"
+
+ "{ Symbol: and } "
+ "{ Symbol: or } "
+ "{ Symbol: xor } "
+ "{ Symbol: copy } "
+ "{ Symbol: copyInverted } "
+ "{ Symbol: andInverted } "
+ "{ Symbol: andReverse } "
+ "{ Symbol: orInverted } "
+ "{ Symbol: orReverse } "
+
+ ^ self primitiveFailed
+!
+
+setGraphicsExposures:aBoolean in:aGCId
+ "set or clear the graphics exposures flag"
+
+ ^ self primitiveFailed
+!
+
+setLineWidth:aNumber in:aGCId
+ "set linewidth to be drawn with"
+
+ ^ self primitiveFailed
+!
+
+setMaskOriginX:orgX y:orgY in:aGCid
+ "set the mask origin"
+
+ ^ self primitiveFailed
+!
+
+setPixmapMask:aPixmapId in:aGCId
+ "set or clear the drawing mask - a pixmap mask providing full color"
^ self primitiveFailed
! !
+
+!NeXTWorkstation methodsFor:'initialize / release'!
+
+close
+%{
+ _NX_close();
+%}
+!
+
+initialize
+ "{ Symbol: color }"
+ "{ Symbol: monochrome }"
+%{
+ int depth, width, height;
+ char *visual;
+
+ /* do NXApp stuff, get screen infos */
+ _NX_init(&visual, &depth, &width, &height);
+
+ _INST(visualType) = _MKSYMBOL(visual, (OBJ *)0);
+ _INST(depth) = _MKSMALLINT(depth);
+ _INST(width) = _MKSMALLINT(width);
+ _INST(height) = _MKSMALLINT(height);
+
+ _INST(widthMM) = _MKSMALLINT(300);
+ _INST(heightMM) = _MKSMALLINT(222);
+
+ if (strcmp(visual, "StaticGray") == 0) {
+ _INST(hasColors) = false;
+ _INST(hasGreyscales) = true;
+ _INST(bitsPerRGB) = _MKSMALLINT(2);
+ if (depth == 2)
+ _INST(ncells) = _MKSMALLINT(4);
+ _INST(monitorType) = _monochrome;
+ } else if (strcmp(visual, "TrueColor") == 0) {
+ _INST(hasColors) = true;
+ _INST(hasGreyscales) = true;
+ /*
+ * does this exist ?"
+ *
+ if (depth == 8) {
+ _INST(ncells) = _MKSMALLINT(256);
+ }
+ *
+ */
+ /* should work for colorStation */
+ if (depth == 12) {
+ _INST(ncells) = _MKSMALLINT(4096);
+ _INST(bitsPerRGB) = _MKSMALLINT(4);
+ }
+ /* should work for nextDimension */
+ if (depth == 24) {
+ _INST(ncells) = _MKSMALLINT(4096 * 4096);
+ _INST(bitsPerRGB) = _MKSMALLINT(8);
+ }
+ _INST(monitorType) = _color;
+ }
+%}
+.
+ dispatching := false.
+ shiftDown := false.
+ ctrlDown := false.
+ metaDown := false.
+ altDown := false.
+ motionEventCompression := true.
+ buffered := true.
+ self initializeKeyboardMap
+! !
+
+!NeXTWorkstation methodsFor:'misc'!
+
+buffered
+ "buffer drawing - do not send it immediately to the display"
+
+ buffered := true
+!
+
+lastError
+ "return the last X-error string - when buffering is on, this may be
+ an error for a long-ago operation"
+
+ ^ nil
+!
+
+synchronizeOutput
+ "send all buffered drawing to the display"
+%{
+ NXPing();
+%}
+!
+
+unBuffered
+ "make all drawing be sent immediately to the display"
+
+ buffered := false
+! !
+
+!NeXTWorkstation methodsFor:'misc stuff'!
+
+setInputFocusTo:aWindowId
+ ^ self primitiveFailed
+! !
+
+!NeXTWorkstation methodsFor:'private'!
+
+addKnownView:aView winId:aNumber withId:aDrawableNumber
+ "add the View aView with Id:aNumber to the list of known views/id's"
+
+ knownViews isNil ifTrue:[
+ knownViews := OrderedCollection new:100.
+ knownIds := OrderedCollection new:100.
+ knownDrawableIds := OrderedCollection new:100
+ ].
+ knownViews add:aView.
+ knownIds add:aNumber.
+ knownDrawableIds add:aDrawableNumber
+! !
+
+!NeXTWorkstation methodsFor:'retrieving pixels'!
+
+getPixelX:x y:y from:aDrawableId
+ "return the pixel value at x/y"
+
+ ^ self primitiveFailed
+! !
+
+!NeXTWorkstation methodsFor:'window stuff'!
+
+clearRectangleX:x y:y width:width height:height in:aWindowId
+ ^ self primitiveFailed
+!
+
+clearWindow:aWindowId
+ ^ self primitiveFailed
+!
+
+mapWindow:aWindowId
+ ^ self primitiveFailed
+!
+
+moveResizeWindow:aWindowId x:x y:y width:w height:h
+ ^ self primitiveFailed
+!
+
+moveWindow:aWindowId x:x y:y
+ ^ self primitiveFailed
+!
+
+raiseWindow:aWindowId
+ ^ self primitiveFailed
+!
+
+resizeWindow:aWindowId width:w height:h
+ ^ self primitiveFailed
+!
+
+setBackingStore:how in:aWindowId
+ "turn on/off backing-store for a window"
+
+ ^ self
+!
+
+setCursor:aCursorId in:aWindowId
+ ^ self primitiveFailed
+!
+
+setSaveUnder:yesOrNo in:aWindowId
+ "turn on/off save-under for a window"
+
+ ^ self
+!
+
+setWindowBackground:aColorId in:aWindowId
+%{
+#ifdef NOTDEF
+ int id, ir, ig, ib;
+ float r, g, b;
+ NXColor clr;
+
+ if (__isSmallInteger(aColorId)) {
+ id = _intVal(aColorId);
+ ir = (id >> 16) & 0xFF;
+ ig = (id >> 8) & 0xFF;
+ ib = id & 0xFF;
+ /* scale from 0 .. 255 to 0.0 .. 1.0 */
+ r = (float)ir / 255.0;
+ g = (float)ig / 255.0;
+ b = (float)ib / 255.0;
+ clr = NXConvertRGBToColor(r, g, b);
+ }
+#endif
+%}
+.
+ ^ self primitiveFailed
+!
+
+setWindowBackgroundPixmap:aPixmapId in:aWindowId
+ ^ self primitiveFailed
+!
+
+setWindowBorderColor:aColorId in:aWindowId
+ ^ self primitiveFailed
+!
+
+setWindowBorderPixmap:aPixmapId in:aWindowId
+ ^ self primitiveFailed
+!
+
+setWindowBorderShape:aPixmapId in:aWindowId
+ ^ self
+!
+
+setWindowBorderWidth:aNumber in:aWindowId
+ ^ self primitiveFailed
+!
+
+setWindowIcon:aForm in:aWindowId
+ ^ self primitiveFailed
+!
+
+setWindowIcon:aForm mask:aMaskForm in:aWindowId
+ ^ self primitiveFailed
+!
+
+setWindowIconWindow:aView in:aWindowId
+ ^ self primitiveFailed
+!
+
+setWindowName:aString in:aWindowId
+ ^ self primitiveFailed
+!
+
+setWindowShape:aPixmapId in:aWindowId
+ ^ self
+!
+
+unmapWindow:aWindowId
+ ^ self primitiveFailed
+! !
+
+
+NeXTWorkstation initialize!
--- a/RoundButtonBorder.st Tue Jan 03 14:45:53 2017 +0100
+++ b/RoundButtonBorder.st Thu Jan 05 21:04:46 2017 +0000
@@ -147,4 +147,10 @@
version_CVS
^ '$Header: /cvs/stx/stx/libview/RoundButtonBorder.st,v 1.4 2009-11-05 13:55:59 cg Exp $'
+!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
! !
+
--- a/ShadowView.st Tue Jan 03 14:45:53 2017 +0100
+++ b/ShadowView.st Thu Jan 05 21:04:46 2017 +0000
@@ -129,7 +129,7 @@
"the length of the shadow from myView"
shadowLength := device pixelPerMillimeter.
- "/ shadowLength := (self graphicsDevice pixelPerMillimeter * 2.0) rounded.
+ "/ shadowLength := (device pixelPerMillimeter * 2.0) rounded.
!
realize
--- a/SimpleView.st Tue Jan 03 14:45:53 2017 +0100
+++ b/SimpleView.st Thu Jan 05 21:04:46 2017 +0000
@@ -631,11 +631,11 @@
Due to historic reasons, there are multiple mechanisms for popupMenu
definition:
- - static menus
-
- - dynamic menus from the view
-
- - dynamic menus from the model / menuHolder
+ - static menus
+
+ - dynamic menus from the view
+
+ - dynamic menus from the model / menuHolder
static menus
@@ -646,35 +646,35 @@
It can be defined at initialization time or redefined any time later.
The menu is defined with:
- someView middleButtonMenu:<aPopUpMenu>
+ someView middleButtonMenu:<aPopUpMenu>
Compatibility note:
- static menus should no longer be used - their operation
- is incompatible with ST-80 and ST/X's dynamic menus.
- Do not use them if you care for compatibility.
+ static menus should no longer be used - their operation
+ is incompatible with ST-80 and ST/X's dynamic menus.
+ Do not use them if you care for compatibility.
Also, they do not care for any menuPerformers or menuHolders.
(instead, they use a receiver instance variable, which gets the messages).
example:
- |top v1 v2|
-
- top := StandardSystemView new.
- top extent:300@300.
-
- v1 := View origin:0.0@0.0 corner:0.5@1.0 in:top.
- v1 viewBackground:Color red.
-
- v2 := View origin:0.5@0.0 corner:1.0@1.0 in:top.
- v2 viewBackground:Color yellow.
-
- v1 middleButtonMenu:(
- PopUpMenu
- labels:#('foo' 'bar')
- selectors:#(foo bar)
- receiver:v1
- ).
-
- top open.
+ |top v1 v2|
+
+ top := StandardSystemView new.
+ top extent:300@300.
+
+ v1 := View origin:0.0@0.0 corner:0.5@1.0 in:top.
+ v1 viewBackground:Color red.
+
+ v2 := View origin:0.5@0.0 corner:1.0@1.0 in:top.
+ v2 viewBackground:Color yellow.
+
+ v1 middleButtonMenu:(
+ PopUpMenu
+ labels:#('foo' 'bar')
+ selectors:#(foo bar)
+ receiver:v1
+ ).
+
+ top open.
@@ -700,42 +700,42 @@
to the view IFF the model would not respond to the menu message.
(this allows mixing of menu messages for the view AND the model).
- |top v1 v2 holder|
-
- holder := Plug new.
- holder respondTo:#menu1
- with:[
- v1 menuMessage:#otherMenu1.
- PopUpMenu
- labels:#('foo' 'bar')
- selectors:#(foo bar).
- ].
- holder respondTo:#otherMenu1
- with:[
- v1 menuMessage:#menu1.
- PopUpMenu
- labels:#('other foo' 'other bar')
- selectors:#(foo bar).
- ].
- holder respondTo:#menu2
- with:[ PopUpMenu
- labels:#('copy' 'bar2')
- selectors:#(copySelection bar2)
- ].
-
- top := StandardSystemView new.
- top extent:300@300.
-
- v1 := View origin:0.0@0.0 corner:0.5@1.0 in:top.
- v1 viewBackground:Color red.
-
- v2 := TextView origin:0.5@0.0 corner:1.0@1.0 in:top.
- v2 contents:'pop me up'.
-
- v1 model:holder; menuMessage:#menu1.
- v2 menuHolder:holder; menuMessage:#menu2.
-
- top open.
+ |top v1 v2 holder|
+
+ holder := Plug new.
+ holder respondTo:#menu1
+ with:[
+ v1 menuMessage:#otherMenu1.
+ PopUpMenu
+ labels:#('foo' 'bar')
+ selectors:#(foo bar).
+ ].
+ holder respondTo:#otherMenu1
+ with:[
+ v1 menuMessage:#menu1.
+ PopUpMenu
+ labels:#('other foo' 'other bar')
+ selectors:#(foo bar).
+ ].
+ holder respondTo:#menu2
+ with:[ PopUpMenu
+ labels:#('copy' 'bar2')
+ selectors:#(copySelection bar2)
+ ].
+
+ top := StandardSystemView new.
+ top extent:300@300.
+
+ v1 := View origin:0.0@0.0 corner:0.5@1.0 in:top.
+ v1 viewBackground:Color red.
+
+ v2 := TextView origin:0.5@0.0 corner:1.0@1.0 in:top.
+ v2 contents:'pop me up'.
+
+ v1 model:holder; menuMessage:#menu1.
+ v2 menuHolder:holder; menuMessage:#menu2.
+
+ top open.
an additional goody is the possibility, to change the menuPerformer (textViews only).
If defined, that one will get the menus message (instead of the model/view).
@@ -748,32 +748,33 @@
- it could be forwarded to the view, though.
This could be useful to intercept/filter things).
- |top v menuProvider menuExecutor |
-
- menuProvider := Plug new.
- menuProvider respondTo:#menu
- with:[ PopUpMenu
- labels:#('copy' 'foo')
- selectors:#(copySelection foo)
- ].
-
- menuExecutor := Plug new.
- menuExecutor respondTo:#copySelection
- with:[Transcript showCR:'copy function'].
- menuExecutor respondTo:#foo
- with:[Transcript showCR:'foo function'].
-
- top := StandardSystemView new.
- top extent:300@300.
-
- v := TextView origin:0.0@0.0 corner:1.0@1.0 in:top.
- v contents:'pop me up'.
-
- v menuHolder:menuProvider; menuMessage:#menu.
- v menuPerformer:menuExecutor.
-
- top open.
+ |top v menuProvider menuExecutor |
+
+ menuProvider := Plug new.
+ menuProvider respondTo:#menu
+ with:[ PopUpMenu
+ labels:#('copy' 'foo')
+ selectors:#(copySelection foo)
+ ].
+
+ menuExecutor := Plug new.
+ menuExecutor respondTo:#copySelection
+ with:[Transcript showCR:'copy function'].
+ menuExecutor respondTo:#foo
+ with:[Transcript showCR:'foo function'].
+
+ top := StandardSystemView new.
+ top extent:300@300.
+
+ v := TextView origin:0.0@0.0 corner:1.0@1.0 in:top.
+ v contents:'pop me up'.
+
+ v menuHolder:menuProvider; menuMessage:#menu.
+ v menuPerformer:menuExecutor.
+
+ top open.
"
+
! !
!SimpleView class methodsFor:'initialization'!
@@ -1312,31 +1313,20 @@
(Screen isNil or:[Screen current isNil]) ifTrue:[^ self].
"
- tell all view classes to flush any
+ Don't do anything when restarting from a snapshot. Otherwuse
+ all fonts and so on got reset to defaults which is what we
+ DON'T want. If the font is not available, then font ioself
+ should pick a proper replacement.
+ "
+ Smalltalk isRestarting ifTrue:[ ^ self ].
+ "
+ Tell all view classes to flush any
cached style-data
"
self changed:#style.
SimpleView updateStyleCache.
SimpleView allSubclassesDo:[:aClass |
- "JV@2010-12-02: Removed to avoid lost of preferred fonts on image restart"
- "/ cg: no, this is required!!!!!!
- "/ otherwise, we get ugly courier fonts on windows
- "/ updateStyleCache MUST clear any previously
- "/ cached font values, otherwise you cannot load a style's font.
- "/ if you want to keep your fonts, do it elsewhere (keep some userFontPrefs and restore from there)
-
- "/ JV: Font preferences ARE already saved in user's setting.rc/setting.stx, but they
- "/ are not reloaded on snapshot restart (which is correct, I think).
- "/ This just discard such fonts. I would say calling this upon snapshot restart
- "/ is a bad idea. Workaround it only for me is not a solution as all other
- "/ Linux users are ... off. Let's workaround it:
- (Smalltalk isInitialized not and:
- [OperatingSystem getOSType == #linux and:
- [UserPreferences current linuxFontWorkaround]])
- ifFalse:[
- aClass defaultFont:nil.
- ].
-
+ aClass defaultFont:nil.
(aClass class includesSelector:#updateStyleCache) ifTrue:[
aClass updateStyleCache
].
@@ -1354,7 +1344,7 @@
"Modified: / 15-09-1998 / 22:04:15 / cg"
"Modified (format): / 05-10-2011 / 16:08:47 / az"
- "Modified (format): / 30-03-2012 / 17:31:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 20-04-2016 / 08:46:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
updateStyleCache
@@ -1770,7 +1760,7 @@
When constructed from a UI-spec, this key is typically specified there
(however, special apps may change it dynamically, if a component changes
its semantic meaning dynamically)"
-
+
^ helpKey
!
@@ -2184,7 +2174,7 @@
lightColor isNil ifTrue:[
|avgColor|
-
+
avgColor := viewBackground averageColorIn:(0@0 corner:7@7).
lightColor := avgColor lightened.
].
@@ -2377,8 +2367,8 @@
Currently, there are only a small number of views which return true here,
one being the HTML view, which rearranges its text depending on the width,
and therefore, it is a bad idea to hide/show scrollbars dynamically"
-
- ^ false
+
+ ^ false
!
widthOfContents
@@ -2406,8 +2396,8 @@
pointer leaves the view.
Currently, there is no view, which returns true
(maybe if we ever support chinese writing top to bottom..."
-
- ^ false
+
+ ^ false
! !
!SimpleView methodsFor:'accessing-dimensions'!
@@ -3195,7 +3185,7 @@
|extent shapeForm borderForm w h f|
-"/ self graphicsDevice supportsPolygonShapedViews ifTrue:[
+"/ device supportsPolygonShapedViews ifTrue:[
"/ "/ TODO: add code for mswin
"/ ].
@@ -3421,7 +3411,7 @@
layout notNil ifTrue:[
layout isRectangle ifTrue:[
^ 0@0
- ].
+ ].
^(layout rightFraction) @ (layout bottomFraction)
].
"MB:added }"
@@ -3464,7 +3454,7 @@
layout notNil ifTrue:[
layout isRectangle ifTrue:[
^ 0@0
- ].
+ ].
^(layout leftFraction) @ (layout topFraction)
].
"MB:added }"
@@ -4407,22 +4397,22 @@
self hiddenOnRealize:false.
realized ifFalse:[
- superView isNil ifTrue:[ "/ I am a topView
- self drawableId isNil ifTrue:[
- "this once was:
- self realize.
- but we don't want Topviews to realize implicitly.
- BTW. the code doesn't work anyway"
- ] ifFalse:[
- self remap.
- ].
- ] ifFalse:[
- (superView realized "/ superview already shown
- or:[superView id notNil]) "/ superview already created
- ifTrue:[
- self realize
- ]
- ].
+ superView isNil ifTrue:[ "/ I am a topView
+ self drawableId isNil ifTrue:[
+ "this once was:
+ self realize.
+ but we don't want Topviews to realize implicitly.
+ BTW. the code doesn't work anyway"
+ ] ifFalse:[
+ self remap.
+ ].
+ ] ifFalse:[
+ (superView realized "/ superview already shown
+ or:[superView id notNil]) "/ superview already created
+ ifTrue:[
+ self realize
+ ]
+ ].
]
"
@@ -4500,9 +4490,9 @@
For ST-80 compatibility, please use #beVisible / #beInvisible."
aBoolean ifTrue:[
- flagBits := flagBits bitOr:FlagHiddenOnRealize
+ flagBits := flagBits bitOr:FlagHiddenOnRealize
] ifFalse:[
- flagBits := flagBits bitClear:FlagHiddenOnRealize
+ flagBits := flagBits bitClear:FlagHiddenOnRealize
].
"Modified: 17.6.1997 / 11:23:26 / cg"
@@ -4702,16 +4692,16 @@
Don't use this right now for non-views"
aComponent isView ifTrue:[
- self addSubView:aComponent
+ self addSubView:aComponent
] ifFalse:[
- components isNil ifTrue:[
- components := OrderedCollection new
- ].
- components add:aComponent.
- aComponent container:self.
- shown ifTrue:[
- aComponent displayOn:self
- ]
+ components isNil ifTrue:[
+ components := OrderedCollection new
+ ].
+ components add:aComponent.
+ aComponent container:self.
+ shown ifTrue:[
+ aComponent displayOn:self
+ ]
]
"Modified: 13.5.1996 / 21:19:51 / cg"
@@ -4815,14 +4805,14 @@
aComponent origin:0.0@0.0 corner:1.0@1.0.
aComponent isView ifTrue:[
- self addSubView:aComponent
+ self addSubView:aComponent
] ifFalse:[
- components := OrderedCollection with:aComponent.
- aComponent container:self.
-
- shown ifTrue:[
- aComponent displayOn:self
- ]
+ components := OrderedCollection with:aComponent.
+ aComponent container:self.
+
+ shown ifTrue:[
+ aComponent displayOn:self
+ ]
]
"Modified: 13.5.1996 / 21:20:29 / cg"
@@ -4856,11 +4846,11 @@
Don't use this right now for non-views"
aComponent isView ifTrue:[
- self removeSubView:aComponent
+ self removeSubView:aComponent
] ifFalse:[
- components isNil ifTrue:[^self].
- components remove:aComponent ifAbsent:[].
- aComponent container:nil
+ components isNil ifTrue:[^self].
+ components remove:aComponent ifAbsent:[].
+ aComponent container:nil
]
"Modified: / 11-09-2006 / 17:14:30 / User"
@@ -6098,7 +6088,7 @@
shown := false.
dependents notNil ifTrue:[
self changed:#visibility.
- self changed:#destroyed
+ self changed:#destroyed
].
].
super destroyed
@@ -6147,6 +6137,12 @@
shown ifFalse:[
^ self
].
+ "/ JV@2016-02-21: Double check to make sure GC is not already destroyed
+ "/ to avoid 'attempt to draw to closed drawable. Not sure how this could
+ "/ happen but apparently it sometimes happens...
+ gc drawableId isNil ifTrue:[
+ ^ self
+ ].
nw := w.
nh := h.
@@ -6302,23 +6298,23 @@
|focusView|
components notNil ifTrue:[
- components notNil ifTrue:[
- self componentsContainingX:x y:y do:[:comp :cx :cy |
- comp keyPress:key x:cx y:cy.
- ^ self
- ]
- ].
+ components notNil ifTrue:[
+ self componentsContainingX:x y:y do:[:comp :cx :cy |
+ comp keyPress:key x:cx y:cy.
+ ^ self
+ ]
+ ].
].
key == #Menu ifTrue:[
- ((focusView := self windowGroup focusView) notNil
- and:[focusView ~~ self])
- ifTrue:[
- "/ forward to the focusView
- focusView keyPress:key x:-1 y:-1.
- ^ self
- ].
- ^ self activateMenu.
+ ((focusView := self windowGroup focusView) notNil
+ and:[focusView ~~ self])
+ ifTrue:[
+ "/ forward to the focusView
+ focusView keyPress:key x:-1 y:-1.
+ ^ self
+ ].
+ ^ self activateMenu.
].
(key == #ZoomIn or:[key == #ZoomOut]) ifTrue:[
@@ -6331,24 +6327,24 @@
].
x isNil ifTrue:[
- "/ already redelegated, but nowhere handled
- superView notNil ifTrue:[
- superView keyPress:key x:nil y:nil.
- ].
- ^ self
+ "/ already redelegated, but nowhere handled
+ superView notNil ifTrue:[
+ superView keyPress:key x:nil y:nil.
+ ].
+ ^ self
].
superView notNil ifTrue:[
- superView
- dispatchEvent:#keyPress:x:y:
- arguments:(Array with:key with:0 with:0)
+ superView
+ dispatchEvent:#keyPress:x:y:
+ arguments:(Array with:key with:0 with:0)
"/ WindowEvent
"/ sendEvent:#keyPress:x:y:
"/ arguments:(Array with:key with:0 with:0)
"/ view:superView
] ifFalse:[
- super keyPress:key x:x y:y
+ super keyPress:key x:x y:y
]
"Modified: / 20.5.1998 / 22:55:08 / cg"
@@ -6431,7 +6427,7 @@
"/ tell my subViews ...
subViews notNil ifTrue:[
- subViews do:[:v |
+ subViews do:[:v |
"/ v shown ifFalse:[
v mapped.
"/ ]
@@ -6475,12 +6471,12 @@
horizontal := pageScroll := false.
(UserPreferences current shiftMouseWheelScrollsHorizontally) ifTrue:[
horizontal := sensor shiftDown
- ] ifFalse:[
+ ] ifFalse:[
pageScroll := sensor shiftDown.
].
-
+
pageScroll ifFalse:[
- amountToScroll := horizontal
+ amountToScroll := horizontal
ifTrue:[ self horizontalScrollStep]
ifFalse:[ self verticalScrollStep ].
amountToScroll := self scaleMouseWheelScrollAmount:amountToScroll.
@@ -6531,7 +6527,7 @@
self requestFocus.
].
dependents notNil ifTrue:[ self changed:#pointerInView with:true ]
-
+
"Modified: / 01-08-2012 / 17:06:41 / cg"
!
@@ -6614,7 +6610,7 @@
or:[ viewBackground needsFullRedrawOnChangeOfHeight]) ifTrue:[
self invalidate
]
- ].
+ ].
(subViews := self subViews) notEmptyOrNil ifTrue:[
(how isNil "false"
@@ -6687,9 +6683,12 @@
in that here, but some geometry managers redefine this, to reorganize
components if that happens."
+ "/ Inform the GC
+ gc subViewChangedSizeOrOrigin.
^ self
- "Created: 22.9.1995 / 14:44:59 / claus"
+ "Created: / 22-09-1995 / 14:44:59 / claus"
+ "Modified: / 02-04-2016 / 15:36:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
terminate
@@ -6906,7 +6905,7 @@
"Created: / 12-07-2011 / 14:36:02 / cg"
!
-simulateButtonRelease:button at:aPoint
+simulateButtonRelease:button at:aPoint
"simulate a button release by determining which sub-view is affected and
synthetically generating a buttonPressEvent for whatever view is underneath.
Returns the view which precessed the event or nil."
@@ -7057,11 +7056,11 @@
(ev isButtonEvent or:[ev isPointerEnterLeaveEvent]) ifTrue:[
"/ if there is a pointer grab, the event has to sent to that one
- targetView := device activePointerGrab.
+ targetView := self device activePointerGrab.
] ifFalse:[
(ev isKeyEvent) ifTrue:[
"/ if there is a pointer grab, the event has to sent to that one
- targetView := device activeKeyboardGrab.
+ targetView := self device activeKeyboardGrab.
].
].
targetView isNil ifTrue:[
@@ -7424,6 +7423,10 @@
graphicsDevice setWindowBorderColor:clrId in:self drawableId.
]
]
+ ] ifFalse:[
+"/ superView notNil ifTrue:[
+"/ superView showFocus:explicit
+"/ ]
]
"Modified: / 17.9.1998 / 15:08:34 / cg"
@@ -7645,7 +7648,7 @@
(app := self application) notNil ifTrue:[
app noticeOfWindowOpen:self
].
- dependents notNil ifTrue:[ self changed:#opened ]
+ dependents notNil ifTrue:[ self changed:#opened ]
!
originChanged:delta
@@ -9439,7 +9442,7 @@
Actually, its a historical leftover"
windowGroup notNil ifTrue:[
- ^ windowGroup sensor hasButtonMotionEventFor:self
+ ^ windowGroup sensor hasButtonMotionEventFor:self
].
^ super buttonMotionEventPending
@@ -9610,7 +9613,7 @@
but possibly slower, since resources are reallocated over and over.
If you redefine this method, make certain that 'super fetchDeviceResources'
is always sent."
-
+
shadowColor notNil ifTrue:[
shadowColor := shadowColor onDevice:device
].
@@ -10099,7 +10102,13 @@
!
recreate
- "recreate (i.e. tell X about me) after a snapin or a migration"
+ "Recreate (i.e. tell the windowing system about me) after a snapin or a migration"
+
+ "/ Issue #86: Do not recreate a view which has been
+ "/ destroyed (by mean of sending it #destroy) but for
+ "/ some other reason retained.
+ "/ See https://swing.fit.cvut.cz/projects/stx-jv
+ self isBeingDestroyed ifTrue:[ ^self ].
self drawableId isNil ifTrue:[
super recreate.
@@ -11278,7 +11287,7 @@
isPopup := self isPopUpView.
activeWindowGroup notNil ifTrue:[
mainGroup := activeWindowGroup mainGroup.
- mainView := mainGroup mainView.
+ mainView := mainGroup mainView.
].
"/ set the windowgroup BEFORE sending the aboutToOpen notification
@@ -11286,13 +11295,13 @@
"/ this allows for the handler to enqueue an event,
"/ or to add event hooks.
(inSystemProcess := Processor activeProcessIsSystemProcess) ifTrue:[
- "
- put myself into the modal group, let it handle events for
- me as well. This is only a half way solution, since the view
- is not modal at all ... however, the only situation
- where this happens is with modal boxes popped while in a
- modal browser. You will forgive me for that inconvenience.
- "
+ "
+ put myself into the modal group, let it handle events for
+ me as well. This is only a half way solution, since the view
+ is not modal at all ... however, the only situation
+ where this happens is with modal boxes popped while in a
+ modal browser. You will forgive me for that inconvenience.
+ "
windowGroup := activeWindowGroup.
activeWindowGroup notNil ifTrue:[activeWindowGroup addTopView:self].
] ifFalse:[
@@ -11300,43 +11309,43 @@
].
windowGroup isNil ifTrue:[
- "/ create a new window group put myself into it
+ "/ create a new window group put myself into it
windowGroup := self windowGroupClass new.
windowGroup
setProcess:Processor activeProcess;
- addTopView:self;
- setPreviousGroup:previousGroup.
-
- superView notNil ifTrue:[
- "/
- "/ special: this is a modal subview,
- "/ prevent the view from reassigning its windowGroup when realized
+ addTopView:self;
+ setPreviousGroup:previousGroup.
+
+ superView notNil ifTrue:[
+ "/
+ "/ special: this is a modal subview,
+ "/ prevent the view from reassigning its windowGroup when realized
"/ (subviews normally place themself into the superviews group)
- "/
- windowGroup isForModalSubview:true.
- ].
+ "/
+ windowGroup isForModalSubview:true.
+ ].
].
makeTransient := true.
transientFor := mainView.
isPopup ifFalse:[
- "/ the following allows for knowledgable programmers to suppress dialog boxes,
- "/ or to patch common controls right before opening...
- (Dialog aboutToOpenBoxNotificationSignal raiseRequestWith:self) == #abort ifTrue:[
- ^ self
- ].
+ "/ the following allows for knowledgable programmers to suppress dialog boxes,
+ "/ or to patch common controls right before opening...
+ (Dialog aboutToOpenBoxNotificationSignal raiseRequestWith:self) == #abort ifTrue:[
+ ^ self
+ ].
windowGroup isNil ifTrue:[
"/ the aboutToOpenBoxNotificationSignal handler destroyed me (although it should proceed with #abort)!!
"/ Transcript showCR:(self class name,': box opening suppressed by aboutToOpenBoxNotificationSignal handler').
^ self.
].
- "/ the following allows for hooks to add a bell sound or other whenever a dialog opens
+ "/ the following allows for hooks to add a bell sound or other whenever a dialog opens
device modalWindowListenersDo:[:listener | listener aboutToOpenWindow:self].
- "/ the following raises the corresponding mainview, so the dialog shows above
- "/ any currently covered view. However, be careful if being debugged, or if this dialog
- "/ is opened by an already open dialog.
+ "/ the following raises the corresponding mainview, so the dialog shows above
+ "/ any currently covered view. However, be careful if being debugged, or if this dialog
+ "/ is opened by an already open dialog.
(mainView isNil or:[mainView windowGroup isInModalLoop]) ifTrue:[
(previousGroup notNil and:[previousGroup isModal]) ifTrue:[
transientFor := previousGroup mainView.
@@ -11347,21 +11356,21 @@
(transientFor windowGroup isInModalLoop
or:[ transientFor windowGroup isDebugged
or:[ activeWindowGroup isDebugged
- ]]) ifFalse:[
- self tracePoint:#cg message:'activate'.
+ ]]) ifFalse:[
+ self tracePoint:#cg message:'activate'.
self debuggingCodeFor:#cg is:[ Transcript showCR:transientFor; showCR:transientFor windowGroup. ].
transientFor activate; setForegroundWindow.
"/ ] ifTrue:[
"/ makeTransient := false.
- ]
- ].
+ ]
+ ].
].
"/ makeTransient ifTrue:[
transientFor notNil ifTrue:[
- "set the transient property.
- This is currently used for X, to tell the Window Manager
- That this view should be always on top of the mainView"
- self drawableId isNil ifTrue:[self create].
+ "set the transient property.
+ This is currently used for X, to tell the Window Manager
+ That this view should be always on top of the mainView"
+ self drawableId isNil ifTrue:[self create].
device setTransient:self drawableId for:transientFor id.
].
"/ ].
@@ -11369,79 +11378,79 @@
self raise.
inSystemProcess ifTrue:[
- self realize
+ self realize
] ifFalse:[
- "
- show a stop-cursor in the suspended window groups
- "
- (mainGroup notNil and:[isPopup not]) ifTrue:[
- mainGroup showCursor:(Cursor stop).
- previousGroup ~~ mainGroup ifTrue:[
- previousGroup showCursor:(Cursor stop).
- ].
- cursorChanged := true.
- ].
-
- "
- go dispatch events in this new group
- (thus current windowgroup is blocked from interaction)
- "
- AbortOperationRequest handle:[:ex |
- "/ the dialog/popup is aborted - hide it. Care for another abort during the hide.
- AbortOperationRequest handle:[:ex2 |
- "/ an aborted hide (possibly due to a cancelled user confirmation or similar)
- self breakPoint:#cg.
- ex exit.
- ] do:[
- self hide.
- realized ifTrue:[
- "/ self halt. "/ hide handled and closeRequest not wanted:
- ex exit.
- ].
- ].
- ] do:[
- [
- [
+ "
+ show a stop-cursor in the suspended window groups
+ "
+ (mainGroup notNil and:[isPopup not]) ifTrue:[
+ mainGroup showCursor:(Cursor stop).
+ previousGroup ~~ mainGroup ifTrue:[
+ previousGroup showCursor:(Cursor stop).
+ ].
+ cursorChanged := true.
+ ].
+
+ "
+ go dispatch events in this new group
+ (thus current windowgroup is blocked from interaction)
+ "
+ AbortOperationRequest handle:[:ex |
+ "/ the dialog/popup is aborted - hide it. Care for another abort during the hide.
+ AbortOperationRequest handle:[:ex2 |
+ "/ an aborted hide (possibly due to a cancelled user confirmation or similar)
+ self breakPoint:#cg.
+ ex exit.
+ ] do:[
+ self hide.
+ realized ifTrue:[
+ "/ self halt. "/ hide handled and closeRequest not wanted:
+ ex exit.
+ ].
+ ].
+ ] do:[
+ [
+ [
windowGroup startupModal:[realized and:aBlock] forGroup:activeWindowGroup
- ] ifCurtailed:[
- self hide.
- ]
- ] ensure:[
+ ] ifCurtailed:[
+ self hide.
+ ]
+ ] ensure:[
activeWindowGroup notNil ifTrue:[
activeWindowGroup graphicsDevice sync. "that's a round trip - make sure that all drawing has been processed"
- "/ ensure that eventListener runs here ...
+ "/ ensure that eventListener runs here ...
Delay waitForMilliseconds:50.
activeWindowGroup processExposeEvents.
- (self isPopUpView or:[ReturnFocusWhenClosingModalBoxes]) ifTrue:[
- "
- return the input focus to the previously active group's top.
- This helps with window managers which need an explicit click
- on the view for the focus.
- Only do this, if the previous group is still having the focus.
- (i.e. no other view was opened in the meantime)
- "
+ (self isPopUpView or:[ ReturnFocusWhenClosingModalBoxes ]) ifTrue:[
+ "
+ return the input focus to the previously active group's top.
+ This helps with window managers which need an explicit click
+ on the view for the focus.
+ Only do this, if the previous group is still having the focus.
+ (i.e. no other view was opened in the meantime)
+ "
activeWindowGroup graphicsDevice focusView isNil ifTrue:[
tops := activeWindowGroup topViews.
- (tops notEmptyOrNil) ifTrue:[
- tops first getKeyboardFocus
- ].
- ].
- ].
-
- "
- restore cursors in the changed groups
- "
- cursorChanged notNil ifTrue:[
- mainGroup restoreCursors.
- previousGroup ~~ mainGroup ifTrue:[
- previousGroup restoreCursors.
- ].
- ].
- ].
+ (tops notEmptyOrNil) ifTrue:[
+ tops first getKeyboardFocus
+ ].
+ ].
+ ].
+
+ "
+ restore cursors in the changed groups
+ "
+ cursorChanged notNil ifTrue:[
+ mainGroup restoreCursors.
+ previousGroup ~~ mainGroup ifTrue:[
+ previousGroup restoreCursors.
+ ].
+ ].
+ ].
Dialog boxClosedNotificationSignal raiseRequestWith:self.
- ]
- ].
+ ]
+ ].
]
"Created: / 10-12-1995 / 14:06:14 / cg"
@@ -11617,6 +11626,22 @@
"
!
+waitUntilEventsProcessed
+ "Wait until all queued events for this view are processes.
+ In normal applications, you do not need to call this, however,
+ in tests you may need to delay assertions until all events
+ are processed."
+
+ | blocker |
+
+ [ Screen current eventPending ] whileTrue.
+ blocker := Semaphore new.
+ self sensor pushAction: [ blocker signal ].
+ blocker wait.
+
+ "Created: / 31-03-2016 / 22:33:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
waitUntilVisible
"wait until the receiver visible.
In normal applications, you do not need to wait till a view is
@@ -11913,6 +11938,12 @@
version_CVS
^ '$Header$'
+
+!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
! !
--- a/StandardSystemView.st Tue Jan 03 14:45:53 2017 +0100
+++ b/StandardSystemView.st Thu Jan 05 21:04:46 2017 +0000
@@ -1584,43 +1584,6 @@
self setCursor
].
- "/JV@2012-11-11: Updated to be ICCCM 2.0 Compliant - some modern Window managers
- "/ provide better UX when application behave nicely. Being
- "/ conformant should not hurt as St/X don't depend on X resources anyway :-)
- "/ See:
- "/
- "/ http://tronche.com/gui/x/icccm/sec-4.html
-
- (currentUserPrefs icccm20Compliant == true) ifTrue:[
- "/ICCCM 2.0 compliant name & class. See ICCCM 2.0 section 4.1.2.5.
-
- | commandName lastSepIndex |
-
- commandName := Smalltalk commandName.
- lastSepIndex := commandName lastIndexOf: Filename separator.
- windowNameString := commandName copyFrom: lastSepIndex + 1.
- windowClassNameString := windowNameString asUppercaseFirst.
-
- "/ Also, set _NET_WM_PID
- self setWindowPid: nil.
- ] ifFalse:[
- "/ Old code..."
- application notNil ifTrue:[
- windowClassNameString := application class name.
- ] ifFalse:[
- (self class == StandardSystemView and:[subViews size == 1]) ifTrue:[
- "This is a subclass of SimpleView wrapped into a StandardSystemView"
- windowClassNameString := subViews first class name.
- ] ifFalse:[
- windowClassNameString := self class name.
- ]
- ].
- windowClassNameString := 'Stx.', windowClassNameString.
- windowNameString := 'main'.
- ].
-
- self windowClass:windowClassNameString name:windowNameString.
-
"Modified: / 14-06-1996 / 17:14:25 / stefan"
"Modified: / 04-01-2013 / 16:13:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 22-05-2015 / 21:09:35 / cg"
--- a/SynchronousWindowSensor.st Tue Jan 03 14:45:53 2017 +0100
+++ b/SynchronousWindowSensor.st Thu Jan 05 21:04:46 2017 +0000
@@ -45,12 +45,12 @@
Instead, the underlying view is notified synchronously (via a message send)
immediately about the event.
- SynchronousWindowSensor are used for only one single situation:
+ 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
+ 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.
@@ -78,8 +78,8 @@
aView
dispatchEvent:#exposeX:y:width:height:
- arguments:(Array with:aRectangle left
- with:aRectangle top
+ arguments:(Array with:aRectangle left
+ with:aRectangle top
with:aRectangle width
with:aRectangle height)
!
--- a/TranslucentColor.st Tue Jan 03 14:45:53 2017 +0100
+++ b/TranslucentColor.st Thu Jan 05 21:04:46 2017 +0000
@@ -73,7 +73,6 @@
^ alpha * 16rFFFF // 255
!
-
setAlphaByte:aByteValuedInteger
"set the alpha value (0..255),
where 0 is completely transparent and 255 is completely opaque"
--- a/ViewStyle.st Tue Jan 03 14:45:53 2017 +0100
+++ b/ViewStyle.st Thu Jan 05 21:04:46 2017 +0000
@@ -131,43 +131,81 @@
!ViewStyle methodsFor:'accessing'!
-at:aKey
- |sCls val|
+at:key
+ ^ self at: key default: nil for: thisContext sender receiver
+
+ "Modified: / 10-09-1995 / 10:59:38 / claus"
+ "Modified: / 19-07-2016 / 21:41:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
- sCls := thisContext sender receiver.
- sCls isBehavior ifFalse:[sCls := sCls class].
- (sCls isSubclassOf:SimpleView) ifTrue:[
- val := self at:(sCls name , '.' , aKey) default:nil.
- val notNil ifTrue:[^ val].
- ].
- ^ self at:aKey default:nil
+at:key default:default
+ ^ self at: key default: default for: thisContext sender receiver
- "Modified: 10.9.1995 / 10:59:38 / claus"
+ "Created: / 14-10-1997 / 00:21:15 / cg"
+ "Modified: / 15-09-1998 / 21:47:13 / cg"
+ "Modified: / 19-07-2016 / 21:41:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-at:aKey default:default
- "translate a string; if not present, return default.
- Here, two keys are tried, iff the key is of the form 'foo.bar',
- 'fooBar' is also tried.
- This has been added for a smooth migration towards names with a form of
- 'classname.itemKey' in the stylesheets."
+at:key default:default for: class
+ "Retrieve a style resource (color, image, string...) for given key and
+ view `class`. If not found, `default` is returned.
+
+ Resource `key` is either a simple key (for example 'foo') or
+ compound key (for example 'bar.foo'). Resource is looked up
+ as follows:
- |v i k2|
+ 1. key '<class name>.foo' is looked up, if it exists
+ then its value is returned.
+ 2. key 'bar.foo' is looked up, if it exists then
+ then its value is returned (only if key is compound)
+ 3. key 'foo' is looked up, if it exists then
+ then its value is returned
+ 4. `default` value is returned.
+
+ This has been added to support fine-grained resource (mainly color) specification
+ allowing (easy) customization per widget class (in a somewhat predictable) way.
+ All that while being backward compatible.
+ "
+
+ | i key1 key2 key3 |
- (self includesKey:aKey) ifTrue:[
- ^ (super at:aKey ifAbsent:default) value
+ i := key indexOf: $..
+ i ~~ 0 ifTrue:[
+ key3 := (key copyFrom: i + 1).
+ key2 := key.
+ ] ifFalse:[
+ key3 := key.
+ key2 := nil.
].
- (i := aKey indexOf:$.) ~~ 0 ifTrue:[
- k2 := (aKey copyTo:i-1) , (aKey copyFrom:i+1) asUppercaseFirst.
- (self includesKey:k2) ifTrue:[^ super at:k2 ifAbsent:default].
+ key1 := class class theNonMetaclass name , '.' , key3.
+
+ (self includesKey:key1) ifTrue:[
+ ^ (super at:key1 ifAbsent:default) value
].
- ^ default value
+ (key2 notNil and:[self includesKey:key2]) ifTrue:[
+ ^ (super at:key2 ifAbsent:default) value
+ ].
+ (self includesKey:key3) ifTrue:[
+ ^ (super at:key3 ifAbsent:default) value
+ ].
+ ^ default value.
- "Created: / 14.10.1997 / 00:21:15 / cg"
- "Modified: / 15.9.1998 / 21:47:13 / cg"
+ "Created: / 19-07-2016 / 22:21:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-colorAt:aKey
+colorAt: key
+ ^ self colorAt: key default: nil for: thisContext sender receiver
+
+ "Modified: / 19-07-2016 / 21:32:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+colorAt:key default:default
+ ^ self colorAt:key default:default for: thisContext sender receiver
+
+ "Modified (format): / 19-07-2016 / 21:36:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+colorAt:key default:default for:class
"retrieve a color resource - also acquire a device color
to avoid repeated color allocations later"
@@ -175,7 +213,7 @@
device := Display.
- value := self at:aKey default:nil.
+ value := self at:key default:default for: class.
value isInteger ifTrue:[
value := Color rgbValue:value
].
@@ -184,61 +222,32 @@
deviceColor notNil ifTrue:[^ deviceColor].
].
^ value
-!
-colorAt:aKey default:default
- "retrieve a color resource - also acquire a device color
- to avoid repeated color allocations later"
-
- |value device deviceColor|
-
- device := Display.
-
- value := self at:aKey default:default.
- value isInteger ifTrue:[
- value := Color rgbValue:value
- ].
- (value notNil and:[device notNil]) ifTrue:[
- deviceColor := value onDevice:device.
- deviceColor notNil ifTrue:[^ deviceColor].
- ].
- ^ value
-!
-
-deviceResourceAt:aKey default:default
- "retrieve a resource - also acquire a device version
- for the default display, to avoid repeated allocations later"
-
- |aResource deviceResource device|
-
- device := Display.
-
- aResource := self at:aKey default:default.
- (aResource notNil and:[device notNil]) ifTrue:[
- deviceResource := aResource onDevice:device.
- deviceResource notNil ifTrue:[^ deviceResource].
- ].
- ^ aResource
-
- "Modified: / 5.9.1998 / 20:25:19 / cg"
+ "Created: / 19-07-2016 / 21:32:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 19-07-2016 / 22:40:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
doesNotUnderstand:aMessage
^ self at:(aMessage selector) default:nil
!
-fontAt:aKey
+fontAt:key
+ ^ self fontAt: key default: nil for: thisContext sender receiver.
+!
+
+fontAt:key default:default
+ ^ self fontAt:key default:default for: thisContext sender receiver
+
+ "Modified: / 19-07-2016 / 22:42:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+fontAt:key default:default for: class
"retrieve a font resource - also acquire a device font
to avoid repeated font allocations later"
- ^ self deviceResourceAt:aKey default:nil
-!
+ ^ self deviceResourceAt:key default:default for: class
-fontAt:aKey default:default
- "retrieve a font resource - also acquire a device font
- to avoid repeated font allocations later"
-
- ^ self deviceResourceAt:aKey default:default
+ "Created: / 19-07-2016 / 22:42:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
is3D
@@ -273,6 +282,26 @@
"Created: 6.9.1997 / 11:40:16 / cg"
! !
+!ViewStyle methodsFor:'private'!
+
+deviceResourceAt:key default:default for: class
+ "retrieve a resource - also acquire a device version
+ for the default display, to avoid repeated allocations later"
+
+ |aResource deviceResource device|
+
+ device := Display.
+
+ aResource := self at:key default:default for: class.
+ (aResource notNil and:[device notNil]) ifTrue:[
+ deviceResource := aResource onDevice:device.
+ deviceResource notNil ifTrue:[^ deviceResource].
+ ].
+ ^ aResource
+
+ "Created: / 19-07-2016 / 22:41:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!ViewStyle methodsFor:'queries'!
isWindowsStyle
@@ -343,5 +372,10 @@
version_CVS
^ '$Header$'
+!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
! !
--- a/WinWorkstation.st Tue Jan 03 14:45:53 2017 +0100
+++ b/WinWorkstation.st Thu Jan 05 21:04:46 2017 +0000
@@ -19,7 +19,7 @@
classVariableNames:'BeepDuration NativeDialogs NativeFileDialogs NativeWidgets
NativeWidgetClassTable StandardColorValues IgnoreSysColorChanges
IgnoreFontChanges SystemColorValues CanEndSession
- VerboseNativeDialogs'
+ VerboseNativeDialogs '
poolDictionaries:''
category:'Interface-Graphics'
!
@@ -167,6 +167,7 @@
#undef Character
#define Character WIN_Character
+#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
/* #include <malloc.h> */
@@ -216,7 +217,11 @@
# define WIN32_LEAN_AND_MEAN
# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0500 /* need this to get certain defines from winuser.h (WM_NCXBUTTONDOWN) */
-# endif
+# undef WINVER
+# define WINVER 0x0501 /* need this to get AW_XXX defines from winuser.h */
+# endif
+
+
# include <windows.h>
# ifdef HANDLE_DEVICE_EVENTS
# include <dbt.h>
@@ -941,6 +946,11 @@
unsigned int virtualKey; /* in params */
} registerHotKeyInfo;
+/* PS_JOIN_MASK is missing from the mingw32 headers */
+#ifndef PS_JOIN_MASK
+# define PS_JOIN_MASK (PS_JOIN_BEVEL|PS_JOIN_MITER|PS_JOIN_ROUND)
+#endif
+
%}
! !
@@ -2054,7 +2064,7 @@
}
goto again;
}
- /* fail evtl. später ändern und in st verzögert aufrufen
+ /* fail evtl. spter ndern und in st verzgert aufrufen
*/
console_fprintf(stderr, "WinWorkstation [info]: UnregisterClass %s failed.\n",(char*)ev->ev_arg1);
}
@@ -6438,13 +6448,61 @@
%}
!
+getGuiResources
+ "For resource debugging only. Returns an array containing
+ number of allocated / peak user / GDU objects.
+
+ NOTE: This method uses GetGuiResources() Windows API so it returns
+ values of Windows counters as opposite to WinWorkstation internal
+ counters (which are returned by #getHandleCounts family of methods)."
+
+ | counts |
+
+ counts := Array new: 4.
+%{
+/* Sigh, _PEAK constants seems not to be defined under MinGW / MinGW64.
+ * Define them here.
+ */
+#ifndef GR_GDIOBJECTS_PEAK
+# define GR_GDIOBJECTS_PEAK 2
+#endif
+#ifndef GR_USEROBJECTS_PEAK
+# define GR_USEROBJECTS_PEAK 4
+#endif
+ HANDLE proc = GetCurrentProcess();
+ __ArrayInstPtr(counts)->a_element[0] = __MKSMALLINT(GetGuiResources(proc, GR_GDIOBJECTS));
+ __ArrayInstPtr(counts)->a_element[1] = __MKSMALLINT(GetGuiResources(proc, GR_GDIOBJECTS_PEAK));
+ __ArrayInstPtr(counts)->a_element[2] = __MKSMALLINT(GetGuiResources(proc, GR_USEROBJECTS));
+ __ArrayInstPtr(counts)->a_element[3] = __MKSMALLINT(GetGuiResources(proc, GR_USEROBJECTS_PEAK));
+%}.
+ ^counts
+
+!
+
+printGuiResourceCounts
+ "Show number of allocated user / GDI objects.
+
+ NOTE: This method uses GetGuiResources() Windows API so it prints
+ values of Windows counters as opposite to WinWorkstation internal
+ counters (which are returned by #printHandleCounts)."
+
+ | counts |
+
+ counts := self getGuiResources.
+
+ 'GetGuiResources(): # User Objects = ' errorPrint. counts first errorPrintCR.
+ ' Peak User Objects = ' errorPrint. counts second errorPrintCR.
+ ' # GDI Objects = ' errorPrint. counts third errorPrintCR.
+ ' Peak GDI Objects = ' errorPrint. counts fourth errorPrintCR.
+!
+
printHandleCounts
"show prim values"
- 'WINWORKSTATION: pWin=' print. self windowHandleCounts print.
- ' pBit=' print. self bitmapHandleCounts print.
- ' pGc=' print. self gcDataHandleCounts print.
- ' pCurs=' print. self cursorHandleCounts printCR
+ 'WINWORKSTATION: # Windows = ' errorPrint. self windowHandleCounts errorPrintCR.
+ ' # Bitmaps = ' errorPrint. self bitmapHandleCounts errorPrintCR.
+ ' # Fonts = ' errorPrint. self fontHandleCounts errorPrintCR.
+ ' # GC Data = ' errorPrint. self gcDataHandleCounts errorPrintCR.
!
windowHandleCounts
@@ -6616,9 +6674,22 @@
displayName
"return the display-connections display name.
- For Windows, a dummy name is returned"
-
- ^ 'local'
+ For Windows, a name of window station is returned"
+ | err |
+
+%{
+ if (__isExternalAddress(__INST(displayId))) {
+ HANDLE station = (HANDLE)__externalAddressVal(__INST(displayId));
+ char stationName[256];
+ DWORD stationNameLen = 0;
+
+ stationName[255] = '\0';
+ if ( GetUserObjectInformation ( station, UOI_NAME, stationName, 255, &stationNameLen)) {
+ RETURN( __MKSTRING(stationName));
+ }
+ }
+%}.
+ self primitiveFailed: err
!
focusFollowsMouse:aBoolean
@@ -8067,6 +8138,93 @@
self removeKnownView:aView withId:aWindowId
!
+dcGetClipBoxForGC: gcId
+ "Return clipping box for given device context (as #(left top right bottom) ). "
+
+ | error |
+%{
+ if (__isExternalAddress(gcId)) {
+ struct gcData *gc = _GCDATA(gcId);
+ HDC hDC;
+ RECT clipbox;
+ OBJ arr;
+ if (! gc->_hDC) {
+ hDC = _getDC(gc);
+ gc->_hDC = hDC;
+ } else {
+ hDC = gc->_hDC;
+ }
+ clipbox.left = -1;
+ clipbox.top = -1;
+ clipbox.right = -1;
+ clipbox.bottom = -1;
+ GetClipBox(hDC, &clipbox);
+ arr = __ARRAY_NEW_INT(4);
+ __ArrayInstPtr(arr)->a_element[0] = __MKSMALLINT(clipbox.left);
+ __ArrayInstPtr(arr)->a_element[1] = __MKSMALLINT(clipbox.top);
+ __ArrayInstPtr(arr)->a_element[2] = __MKSMALLINT(clipbox.right);
+ __ArrayInstPtr(arr)->a_element[3] = __MKSMALLINT(clipbox.bottom);
+ RETURN ( arr );
+
+ }
+ error = @symbol(BadArg1);
+ err:;
+%}.
+ ^ self primitiveFailed: error
+!
+
+dcLockForGC:gcId
+ "Locks and return a device context for given GC.
+ Returned DeviceContext is associated with given GC and it's
+ guaranteed not to be destroyed (by ReleaseDC()) until
+ #dcUnlockForGC: is called.
+
+ NOTE: The DC __is__ destroyed, however, when the whole
+ GC is destroyed."
+
+ | error |
+%{
+ if (__isExternalAddress(gcId)) {
+ struct gcData *gc = _GCDATA(gcId);
+ HDC hDC;
+ if (! gc->_hDC) {
+ hDC = _getDC(gc);
+ gc->_hDC = hDC;
+ } else {
+ hDC = gc->_hDC;
+ }
+ gc->doNotCacheOrRelease = 1;
+ RETURN ( __MKEXTERNALADDRESS ( hDC ) );
+ }
+ error = @symbol(BadArg1);
+ err:;
+%}.
+ ^ self primitiveFailed: error
+!
+
+dcUnlockForGC:gcId
+ "Unlocks and __destroy__ a device context for given GC previously
+ locked by #dcLockForGC:. If the GC was not locked,
+ calling this method is no-op."
+
+ | error |
+%{
+ if (__isExternalAddress(gcId)) {
+ struct gcData *gc = _GCDATA(gcId);
+ if (gc->hWnd) {
+ gc->doNotCacheOrRelease = 0;
+ if (gc->_hDC) {
+ _releaseDC(gc);
+ }
+ }
+ RETURN ( nil );
+ }
+ error = @symbol(BadArg1);
+ err:;
+%}.
+ ^ self primitiveFailed: error
+!
+
gcFor:aDrawableId
%{ /* NOCONTEXT */
@@ -8265,7 +8423,7 @@
%{ /* STACK: 16000 */
- WNDCLASS wc;
+ WNDCLASSW wc;
long bg, bd, bw;
int winStyleBits, winEXStyleBits;
int w, h, x, y;
@@ -15169,16 +15327,68 @@
%}
!
-primInitializeFor:aDisplayName
- "initialize the receiver for a connection to a display;
- the argument, aDisplayName may be nil (for the default display)
- or the name of the display server as hostname:number
- (not yet under WIN32)"
-
-%{ /* NOCONTEXT */
-
- RETURN ( __MKSMALLINT(1) );
-%}.
+primInitializeFor:stationNameOrNil
+ "Initialize the receiver for a connection to given window station.
+ It the argument `stationNameOrNil` is nil, then it connects
+ to process default window station.
+
+ Return an external address for window station handle or nil if
+ requested window station is not an interactive one (i.e, one
+ cannot initialize Win32Workstation on non-interactive window
+ station).
+
+ See https://msdn.microsoft.com/en-us/library/windows/desktop/ms687096(v=vs.85).aspx
+ "
+
+ | errcode |
+
+%{
+ HWINSTA station;
+ if (stationNameOrNil == nil) {
+ station = GetProcessWindowStation();
+ if (station == NULL) {
+ errcode = __MKINT( GetLastError() );
+ goto err;
+ }
+ /*
+ * Check we're connected to "WinSta0" station, only this
+ * one is interactive one.
+ */
+ char stationName[8];
+ int stationNameLen;
+ if ( GetUserObjectInformation ( station, UOI_NAME, stationName, 9, &stationNameLen) ) {
+ if (strncmp(stationName, "WinSta0", 8) == 0) {
+ RETURN ( __MKEXTERNALADDRESS ( station ) );
+ }
+ }
+ RETURN ( nil );
+
+ } else if (__isStringLike( stationNameOrNil)) {
+ if (strncmp(__stringVal(stationNameOrNil), "WinSta0", 8) == 0) {
+ /*
+ * We're explicitly asked to connect to "WinSta0" station.
+ * This could be hand for example when Smalltalk is running as
+ * a service on non-interactive session and want to open
+ * a window to inform user. Maybe, maybe not. Anyway, do our best
+ * here.
+ */
+ station = OpenWindowStation("WinSta0", TRUE, NULL);
+ if (station == NULL) {
+ errcode = __MKINT( GetLastError() );
+ goto err;
+ }
+ if ( ! SetProcessWindowStation(station) ) {
+ errcode = __MKINT( GetLastError() );
+ goto err;
+ }
+ RETURN ( __MKEXTERNALADDRESS ( station ) );
+ }
+ RETURN ( nil );
+ }
+ err:;
+%}.
+ self primitiveFailed: errcode
+
!
reinitialize
@@ -18963,7 +19173,7 @@
}
%}
"
- (StandardSystemView new label:'äöü') open
+ (StandardSystemView new label:'') open
"
!
--- a/XEmbedContainerView.st Tue Jan 03 14:45:53 2017 +0100
+++ b/XEmbedContainerView.st Thu Jan 05 21:04:46 2017 +0000
@@ -196,7 +196,7 @@
createWindowX:x y:y width:w height:h
|childWindowIds|
- childWindowIds := self graphicsDevice childIdsOf:self drawableId.
+ childWindowIds := device childIdsOf:self drawableId.
childWindowIds size == 1
ifFalse:[ self error:'I should have exactly one child'. ].
clientViewId := childWindowIds first.
@@ -217,9 +217,9 @@
| childWindowIds |
- childWindowIds := self graphicsDevice childIdsOf: self drawableId.
+ childWindowIds := device childIdsOf: self drawableId.
childWindowIds size == 0 ifTrue:[
- self graphicsDevice removeKnownView: clientView withId: clientViewId.
+ device removeKnownView: clientView withId: clientViewId.
clientViewId := nil.
clientView := nil.
].
@@ -265,8 +265,8 @@
clientViewId ifNil:[^self].
- (self graphicsDevice
- sendClientEvent: (self graphicsDevice atomIDOf:'_XEMBED')
+ (device
+ sendClientEvent: (device atomIDOf:'_XEMBED')
format:32
to:clientViewId
propagate:false
@@ -354,17 +354,17 @@
!
propertyChange:propertyId state:state
- propertyId == (self graphicsDevice atomIDOf:'_XEMBED_INFO') ifTrue:[
+ propertyId == (device atomIDOf:'_XEMBED_INFO') ifTrue:[
self mapUnmapAccordingToXEmbedInfo.
^self.
].
(superView notNil and:[superView hasWorkaround: #uzbl]) ifTrue:[
- propertyId == (self graphicsDevice atomIDOf:'WM_NORMAL_HINTS') ifTrue:[
- self graphicsDevice
+ propertyId == (device atomIDOf:'WM_NORMAL_HINTS') ifTrue:[
+ device
resizeWindow:self drawableId
width: 0 height: 0.
- self graphicsDevice
+ device
resizeWindow:self drawableId
width: self width - 1 height: self height - 1.
]
@@ -382,8 +382,8 @@
superView removeSubView:self.
].
self drawableId notNil ifTrue:[
- self graphicsDevice
- reparentWindow: self drawableId to: self graphicsDevice rootWindowId;
+ device
+ reparentWindow: self drawableId to: device rootWindowId;
removeKnownView:self withId:self drawableId.
]
@@ -394,7 +394,7 @@
initEvents
|graphicsDevice|
- graphicsDevice := self graphicsDevice.
+ graphicsDevice := device.
graphicsDevice
setEventMask:
@@ -410,7 +410,7 @@
self setDevice:container device id:wid gcId:nil.
superView := container.
windowGroup := container windowGroup.
- self graphicsDevice addKnownView: self withId: wid.
+ device addKnownView: self withId: wid.
container add: self.
self initEvents.
self origin: 0.0@0.0 corner: 1.0@1.0.
@@ -424,8 +424,8 @@
mapUnmapAccordingToXEmbedInfo
|val|
- val := self graphicsDevice
- getProperty:(self graphicsDevice atomIDOf:'_XEMBED_INFO')
+ val := device
+ getProperty:(device atomIDOf:'_XEMBED_INFO')
from:self drawableId
delete:false.
val ifNil:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/XGraphicsContext.st Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,70 @@
+"{ Package: 'stx:libview' }"
+
+"{ NameSpace: Smalltalk }"
+
+DeviceGraphicsContext subclass:#XGraphicsContext
+ instanceVariableNames:'depth xftDrawId cairoSurfaceId'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Interface-Graphics'
+!
+
+
+!XGraphicsContext methodsFor:'accessing'!
+
+depth
+ ^ depth
+!
+
+xftDrawId
+ ^ xftDrawId
+!
+
+xftDrawId:anXftDrawHandle
+ xftDrawId := anXftDrawHandle.
+
+ "Modified (format): / 23-06-2014 / 21:28:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!XGraphicsContext methodsFor:'initialization & release'!
+
+destroy
+ xftDrawId notNil ifTrue:[
+ XftFontDescription xftDrawDestroy: xftDrawId
+ ].
+ super destroy.
+
+ "Created: / 25-11-2016 / 00:10:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+prepareForReinit
+ "kludge - clear drawableId and gcId
+ needed after snapin"
+
+ super prepareForReinit.
+ xftDrawId := nil.
+ cairoSurfaceId := nil.
+
+ "Created: / 09-10-2014 / 00:02:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 26-12-2014 / 22:51:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!XGraphicsContext methodsFor:'view creation'!
+
+createBitmapFromArray:data width:width height:height
+ depth := 1.
+ super createBitmapFromArray:data width:width height:height
+!
+
+createPixmapWidth:w height:h depth:d
+ depth := d.
+ super createPixmapWidth:w height:h depth:d
+! !
+
+!XGraphicsContext class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+
--- a/XWorkstation.st Tue Jan 03 14:45:53 2017 +0100
+++ b/XWorkstation.st Thu Jan 05 21:04:46 2017 +0000
@@ -29,7 +29,9 @@
selectionFetchers selectionHandlers preWaitAction xlibTimeout
xlibTimeoutForWindowCreation hasConnectionBroken uniqueDeviceID
stxDeviceAtom uuidAtom primaryBuffer windowGroupWindow
- maxOperationsUntilFlush operationsUntilFlush lastError'
+ maxOperationsUntilFlush operationsUntilFlush lastError hostname
+ wmClientLeaderAtom wmClientMachineAtom wmClassName wmClassClass
+ pid netWmPidAtom'
classVariableNames:'RawKeySymTranslation ConservativeSync MaxStringLength
DefaultXLibTimeout DefaultXLibTimeoutForWindowCreation
ErrorDBCache'
@@ -37,13 +39,6 @@
category:'Interface-Graphics'
!
-Object subclass:#PseudoDeviceWithoutXFTSupport
- instanceVariableNames:'realDevice'
- classVariableNames:''
- poolDictionaries:''
- privateIn:XWorkstation
-!
-
Object subclass:#SelectionFetcher
instanceVariableNames:'sema message display drawableID selectionID propertyID targetID
buffer done incremental'
@@ -73,7 +68,7 @@
#ifdef LINUX
# ifndef __arm__
-# define SHM
+# define SHM
# endif
#endif
@@ -370,7 +365,6 @@
# endif
#endif /* SUPPORT_OPENLOOCK_WM_HINTS */
-
%}
! !
@@ -388,6 +382,19 @@
#define DPRINTF(x) if (__debug__) { console_printf x; }
+
+/* Some libraries, notably Cairo uses MIT-SHM extension
+ * that sends back ShmCompletion event. Such event needs
+ * to be silently ignored.
+ * However, since it comes from an extension, the event type
+ * must be queried. To avoid a query each time we get it,
+ * cache the value in a variable.
+ */
+#ifdef SHM
+static int ShmCompletionType = -1;
+#endif
+
+
%}
! !
@@ -766,6 +773,16 @@
"Modified: / 27.4.1999 / 17:21:30 / cg"
! !
+!XWorkstation class methodsFor:'accessing'!
+
+graphicsContextClass
+ "Return a graphics context class to use for this device.
+ Default is to use DeviceGraphicsContext"
+ ^ graphicsContextClass ? XGraphicsContext
+
+ "Created: / 25-02-2016 / 07:26:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!XWorkstation class methodsFor:'accessing-display capabilities'!
hasXCursorLibrary
@@ -1024,15 +1041,6 @@
^ nil
!
-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."
-
- ^ PseudoDeviceWithoutXFTSupport basicNew realDevice:self
-!
-
blackpixel
"return the colornumber of black"
@@ -2175,13 +2183,17 @@
XGCValues xgcv;
XSetWindowAttributes xswa;
XSizeHints sizehints;
+ XClassHint classhint;
int bw, bd, bg;
- Window newWindow, parentWindow;
+ Window newWindow, parentWindow, windowGroupWindow;
XFontStruct *f;
Pixmap backPixmap = (Pixmap)0;
int flags = 0, depth, ioClass;
Atom WmDeleteWindowAtom, WmSaveYourselfAtom, WmProtocolsAtom;
Atom WmQuitAppAtom, MotifWMHintsAtom;
+ Atom WmClientLeaderAtom;
+ Atom WmClientMachineAtom;
+ Atom NetWmPidAtom;
Atom STXDeviceAtom, UUIDAtom;
Atom atoms[3];
int atomCount = 0;
@@ -2315,6 +2327,12 @@
__cnt_view++;
#endif
+ if (__isExternalAddress(windowGroupWindowId)) {
+ windowGroupWindow = __WindowVal(windowGroupWindowId);
+ } else {
+ windowGroupWindow = newWindow;
+ }
+
/*
* define its icon and name
* (only makes sense for topWindows)
@@ -2333,10 +2351,10 @@
}
}
- if (__isExternalAddress(windowGroupWindowId)) {
- wmhints.window_group = __WindowVal(windowGroupWindowId);
- wmhints.flags |= WindowGroupHint;
- }
+
+ wmhints.window_group = windowGroupWindow;
+ wmhints.flags |= WindowGroupHint;
+
if (__isExternalAddress(wiconViewId)) {
wmhints.flags |= IconWindowHint;
@@ -2370,6 +2388,15 @@
WmDeleteWindowAtom = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
__INST(deleteWindowAtom) = __MKATOMOBJ(WmDeleteWindowAtom);
+ WmClientLeaderAtom = XInternAtom(dpy, "WM_CLIENT_LEADER", False);
+ __INST(wmClientLeaderAtom) = __MKATOMOBJ(WmClientLeaderAtom);
+
+ WmClientMachineAtom = XInternAtom(dpy, "WM_CLIENT_MACHINE", False);
+ __INST(wmClientMachineAtom) = __MKATOMOBJ(WmClientMachineAtom);
+
+ NetWmPidAtom = XInternAtom(dpy, "_NET_WM_PID", False);
+ __INST(netWmPidAtom) = __MKATOMOBJ(NetWmPidAtom);
+
UUIDAtom = XInternAtom(dpy, "UUID", False);
__INST(uuidAtom) = __MKATOMOBJ(UUIDAtom);
STXDeviceAtom = XInternAtom(dpy, "STX_DEVICE_ID", False);
@@ -2389,6 +2416,10 @@
#else
WmSaveYourselfAtom = 0;
#endif
+ WmClientLeaderAtom = __AtomVal(__INST(wmClientLeaderAtom));
+ WmClientMachineAtom = __AtomVal(__INST(wmClientMachineAtom));
+ NetWmPidAtom = __AtomVal(__INST(netWmPidAtom));
+
UUIDAtom = __AtomVal(__INST(uuidAtom));;
STXDeviceAtom = __AtomVal(__INST(stxDeviceAtom));;
}
@@ -2421,12 +2452,50 @@
bcopy(__byteArrayVal(__INST(uniqueDeviceID)), uuidBytes, numUUIDBytes);
ENTER_XLIB();
- XChangeProperty (dpy, newWindow, STXDeviceAtom, UUIDAtom, 8, PropModeReplace,
+ XChangeProperty (dpy, newWindow, STXDeviceAtom, XA_ATOM, 8, PropModeReplace,
uuidBytes, numUUIDBytes );
LEAVE_XLIB();
}
}
+ ENTER_XLIB();
+ /*
+ * Defined by ICCCM (https://tronche.com/gui/x/icccm/sec-5.html)
+ * Section 5.1. Client Support for Session Management,
+ */
+ XChangeProperty (dpy, newWindow, WmClientLeaderAtom, XA_WINDOW, 32,
+ PropModeReplace, (unsigned char *)&windowGroupWindow, 1);
+ /*
+ * Section 4.1.2.9. WM_CLIENT_MACHINE Property
+ */
+ if (__isStringLike(__INST(hostname))) {
+ XChangeProperty (dpy, newWindow, WmClientMachineAtom, XA_STRING, 8,
+ PropModeReplace, __stringVal(__INST(hostname)), __stringSize(__INST(hostname)));
+ }
+ /*
+ * Section 4.1.2.5. WM_CLASS Property
+ */
+ classhint.res_class = classhint.res_name = 0;
+
+ if (__isStringLike(__INST(wmClassClass))) {
+ classhint.res_class = (char *) __stringVal(__INST(wmClassClass));
+ }
+
+ if (__isStringLike(__INST(wmClassName))) {
+ classhint.res_name = (char *) __stringVal(__INST(wmClassName));
+ }
+ XSetClassHint(myDpy, newWindow, &classhint);
+ /*
+ * Defined by EWMH, http://standards.freedesktop.org/wm-spec/1.3
+ * Section Application Window Properties
+ */
+ if (__isInteger(__INST(pid))) {
+ int pid = __intVal(__INST(pid));
+ XChangeProperty (dpy, newWindow, NetWmPidAtom, XA_CARDINAL, 32,
+ PropModeReplace, (unsigned char *)&pid, 1);
+ }
+ LEAVE_XLIB();
+
#ifdef SUPPORT_MOTIF_WM_HINTS
/*
* less decoration
@@ -2528,13 +2597,11 @@
#ifdef COUNT_RESOURCES
__cnt_gc--;
#endif
- } else {
- console_fprintf(stderr, "XWorkstation [warning]: trying to destroy GC twice\n");
- }
- RETURN ( self );
- }
-%}.
- self primitiveFailed
+ RETURN ( self );
+ }
+ }
+%}.
+ self primitiveFailed: 'Trying to destroy GC twice'
!
destroyPixmap:aDrawableId
@@ -5689,6 +5756,13 @@
"ignored for now"
"/ aView resizeRequest
+
+!
+
+shmCompletion: aView
+ "ignored for now"
+
+
! !
!XWorkstation methodsFor:'event handling'!
@@ -6501,9 +6575,15 @@
__ArrayInstPtr(anEventArray)->a_element[3] = t; __STORE(anEventArray, t);
__ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(rpe->x);
__ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(rpe->y);
- break;
+ break;
default:
+#ifdef SHM
+ if (ev.type == ShmCompletionType) {
+ __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(shmCompletion:);
+ break;
+ }
+#endif
__ArrayInstPtr(anEventArray)->a_element[2] = @symbol(unknownX11Event);
break;
}
@@ -7891,7 +7971,7 @@
).
Screen current
- heightOf:'hello World gggÖÜ' from:1 to:15
+ heightOf:'hello World ggg' from:1 to:15
inFont:(Screen current getDefaultFontWithEncoding:#'iso10646-1')
"
!
@@ -9194,7 +9274,35 @@
"
buttonTranslation := buttonTranslation copy.
- buttonTranslation at: 2 put: #paste
+ buttonTranslation at: 2 put: #paste.
+
+ "
+ Cache hostname in order to set WM_CLIENT_MACHINE
+ (defined by ICCCM, Section 4.1.2.9)
+ "
+ hostname := OperatingSystem getHostName.
+
+ "
+ Create (and cache) class and name for WM_CLASS property.
+ (defined by ICCCM, Section 4.1.2.5. WM_CLASS Property)
+ "
+ wmClassName := OperatingSystem getEnvironment: 'RESOURCE_NAME'.
+ wmClassName isNil ifTrue:[
+ wmClassName := Smalltalk commandName.
+ "/ strip of any directory names
+ wmClassName := wmClassName copyFrom: (wmClassName lastIndexOf: Filename separator) + 1.
+ ].
+ (wmClassName = 'stx' or:[wmClassName = 'stx-bin']) ifTrue:[
+ wmClassName := 'smalltalkx'.
+ wmClassClass := 'SmalltalkX'.
+ ] ifFalse:[
+ wmClassClass := wmClassName asUppercaseFirst.
+ ].
+ "
+ Cache pid in order to set _NET_WM_PID properu
+ (defined by EWMH, Section Application Window Properties
+ "
+ pid := OperatingSystem getProcessId.
"Modified (comment): / 17-04-2012 / 21:18:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
@@ -9484,7 +9592,14 @@
__INST(rgbVisual) = __INST(rgbaVisual); __STORESELF(rgbVisual);
}
}
- }
+
+ }
+#ifdef SHM
+ if (__INST(hasShmExtension) == true) {
+ ShmCompletionType = XShmGetEventBase(dpy) + ShmCompletion;
+ }
+#endif
+
%}.
!
@@ -12359,12 +12474,6 @@
self primitiveFailedOrClosedConnection
!
-newGraphicsContextFor:aGraphicsMedium
- "Redefined to use my own device specific graphics context"
-
- ^ X11GraphicsContext onDevice:self.
-!
-
parentWindowIdOf:aWindowId
"return a windows parent-window id.
Useful with getGeometryOf:, to compute information about the decoration."
@@ -13295,45 +13404,6 @@
^ false "/ or true or what ?
! !
-!XWorkstation::PseudoDeviceWithoutXFTSupport class methodsFor:'documentation'!
-
-documentation
-"
- this is a proxy device, which forwards its messages to a real device,
- possibly overriding some messages.
- It is currently only used as a hack (workaround) a bug in the XWindows
- interface, which cannot draw strings into pixmaps using XFT fonts.
- For this, a pseudoDevice instance is set as device into the pixmap's GC,
- so it will draw using non-xft fonts.
- This should vanish, once the xft drawing works.
-
- [author:]
- cg
-"
-! !
-
-!XWorkstation::PseudoDeviceWithoutXFTSupport methodsFor:'accessing'!
-
-realDevice:aDevice
- realDevice := aDevice.
-! !
-
-!XWorkstation::PseudoDeviceWithoutXFTSupport methodsFor:'message forwarding'!
-
-doesNotUnderstand:aMessage
- ^ aMessage sendTo:realDevice
-! !
-
-!XWorkstation::PseudoDeviceWithoutXFTSupport methodsFor:'queries'!
-
-deviceFonts
- ^ realDevice deviceFonts keys reject:[:f | f isXftFont ]
-!
-
-supportsXftFonts
- ^ false.
-! !
-
!XWorkstation::SelectionFetcher class methodsFor:'documentation'!
documentation
@@ -13589,8 +13659,8 @@
"
A special window to serve as window group id. This window
is newer mapped. This window is used
- in XWMHints & _NET_WM_LEADER properties to define
- application window group
+ in XWMHints, _NET_WM_LEADER and WM_CLIENT_LEADER properties
+ to define application window group
[author:]
Jan Vrany <jan.vrany@fit.cvut.cz>
@@ -14133,6 +14203,11 @@
version_CVS
^ '$Header$'
+!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
! !
--- a/XftFontDescription.st Tue Jan 03 14:45:53 2017 +0100
+++ b/XftFontDescription.st Thu Jan 05 21:04:46 2017 +0000
@@ -3,33 +3,10 @@
"{ NameSpace: Smalltalk }"
FontDescription subclass:#XftFontDescription
- instanceVariableNames:'device fontId width minCode maxCode ascent descent height
+ instanceVariableNames:'device fontId closestFont minCode maxCode ascent descent height
fixedWidth'
- classVariableNames:'FC_FAMILY FC_STYLE FC_SLANT FC_WEIGHT FC_SIZE FC_ASPECT
- FC_PIXEL_SIZE FC_SPACING FC_FOUNDRY FC_ANTIALIAS FC_HINTING
- FC_HINT_STYLE FC_VERTICAL_LAYOUT FC_AUTOHINT FC_WIDTH FC_FILE
- FC_INDEX FC_FT_FACE FC_RASTERIZER FC_OUTLINE FC_SCALABLE FC_SCALE
- FC_DPI FC_RGBA FC_MINSPACE FC_SOURCE FC_CHARSET FC_LANG
- FC_FONTVERSION FC_FULLNAME FC_FAMILYLANG FC_STYLELANG
- FC_FULLNAMELANG FC_CAPABILITY FC_FONTFORMAT FC_EMBOLDEN
- FC_EMBEDDED_BITMAP FC_DECORATIVE FC_LCD_FILTER FC_NAMELANG
- FC_CHAR_WIDTH FC_CHAR_HEIGHT FC_MATRIX FC_WEIGHT_THIN
- FC_WEIGHT_EXTRALIGHT FC_WEIGHT_ULTRALIGHT FC_WEIGHT_LIGHT
- FC_WEIGHT_BOOK FC_WEIGHT_REGULAR FC_WEIGHT_NORMAL
- FC_WEIGHT_MEDIUM FC_WEIGHT_DEMIBOLD FC_WEIGHT_SEMIBOLD
- FC_WEIGHT_BOLD FC_WEIGHT_EXTRABOLD FC_WEIGHT_ULTRABOLD
- FC_WEIGHT_BLACK FC_WEIGHT_HEAVY FC_WEIGHT_EXTRABLACK
- FC_WEIGHT_ULTRABLACK FC_SLANT_ROMAN FC_SLANT_ITALIC
- FC_SLANT_OBLIQUE FC_WIDTH_ULTRACONDENSED FC_WIDTH_EXTRACONDENSED
- FC_WIDTH_CONDENSED FC_WIDTH_SEMICONDENSED FC_WIDTH_NORMAL
- FC_WIDTH_SEMIEXPANDED FC_WIDTH_EXPANDED FC_WIDTH_EXTRAEXPANDED
- FC_WIDTH_ULTRAEXPANDED FC_PROPORTIONAL FC_DUAL FC_MONO
- FC_CHARCELL FC_RGBA_UNKNOWN FC_RGBA_RGB FC_RGBA_BGR FC_RGBA_VRGB
- FC_RGBA_VBGR FC_RGBA_NONE FC_HINT_NONE FC_HINT_SLIGHT
- FC_HINT_MEDIUM FC_HINT_FULL FC_LCD_NONE FC_LCD_DEFAULT
- FC_LCD_LIGHT FC_LCD_LEGACY StXFace2FCWeightMap
- StXStyle2FCSlantMap FirstTimeCalled CachedFontList'
- poolDictionaries:''
+ classVariableNames:'CachedFontList RecentlyUsedFonts Lobby'
+ poolDictionaries:'FcConstants'
category:'Graphics-Support'
!
@@ -40,13 +17,6 @@
privateIn:XftFontDescription
!
-ExternalAddress subclass:#FCPatternHandle
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- privateIn:XftFontDescription
-!
-
ExternalAddress subclass:#XftDrawHandle
instanceVariableNames:''
classVariableNames:''
@@ -74,20 +44,25 @@
#define Time XTime
#ifdef XFT
+# ifndef HAVE_FONTCONFIG
+# error "XFT defined but not HAVE_FONTCONFIG. Xft fonts cannot be used without FontConfig support"
+# endif
extern OBJ __GLOBAL_GET_BY_NAME(char *);
# define __HANDLE_VAL(type, externalAddress) \
- ((type)__externalAddressVal(externalAddress))
+ ((type)__externalAddressVal(externalAddress))
# define __HANDLE_NEW(ptr, __cls) \
- ({ \
- OBJ handle = __MKEXTERNALADDRESS(ptr); \
- OBJ clsObj = __GLOBAL_GET_BY_NAME(__cls);\
- __InstPtr(handle)->o_class = clsObj; \
- __STORE(handle, clsObj); \
- handle; \
- })
+ ({ \
+ OBJ handle = __MKEXTERNALADDRESS(ptr); \
+ OBJ clsObj = __GLOBAL_GET_BY_NAME(__cls);\
+ __InstPtr(handle)->o_class = clsObj; \
+ __STORE(handle, clsObj); \
+ handle; \
+ })
+
+
# define DISPLAY(x) __HANDLE_VAL(Display*, x)
# define SCREEN(x) ((int)(__intVal(x)))
@@ -98,7 +73,7 @@
/* FontConfig objects */
# define FC_PATTERN(x) __HANDLE_VAL(XftPattern*, x)
-# define FC_PATTERN_HANDLE_NEW(x) __HANDLE_NEW(x, "XftFontDescription::FCPatternHandle")
+# define FC_PATTERN_HANDLE_NEW(x) __HANDLE_NEW(x, "FcPattern")
/* Xft Objects */
@@ -108,8 +83,12 @@
# define XFT_DRAW(x) __HANDLE_VAL(XftDraw*, x)
# define XFT_DRAW_HANDLE_NEW(x) __HANDLE_NEW(x, "XftFontDescription::XftDrawHandle")
+
# include <X11/Xft/Xft.h>
+# include <X11/Xft/XftCompat.h>
+
#endif
+
%}
! !
@@ -161,168 +140,87 @@
initialize
"Invoked at system start or when the class is dynamically loaded."
- " Taken from fontconfig,h "
-
- FC_FAMILY := 'family'. "/* String */
- FC_STYLE := 'style'. "/* String */
- FC_SLANT := 'slant'. "/* Int */
- FC_WEIGHT := 'weight'. "/* Int */
- FC_SIZE := 'size'. "/* Double */
- FC_ASPECT := 'aspect'. "/* Double */
- FC_PIXEL_SIZE := 'pixelsize'. "/* Double */
- FC_SPACING := 'spacing'. "/* Int */
- FC_FOUNDRY := 'foundry'. "/* String */
- FC_ANTIALIAS := 'antialias'. "/* Bool (depends) */
- FC_HINTING := 'hinting'. "/* Bool (true) */
- FC_HINT_STYLE := 'hintstyle'. "/* Int */
- FC_VERTICAL_LAYOUT := 'verticallayout'. "/* Bool (false) */
- FC_AUTOHINT := 'autohint'. "/* Bool (false) */
- FC_WIDTH := 'width'. "/* Int */
- FC_FILE := 'file'. "/* String */
- FC_INDEX := 'index'. "/* Int */
- FC_FT_FACE := 'ftface'. "/* FT_Face */
- FC_RASTERIZER := 'rasterizer'. "/* String */
- FC_OUTLINE := 'outline'. "/* Bool */
- FC_SCALABLE := 'scalable'. "/* Bool */
- FC_SCALE := 'scale'. "/* double */
- FC_DPI := 'dpi'. "/* double */
- FC_RGBA := 'rgba'. "/* Int */
- FC_MINSPACE := 'minspace'. "/* Bool use minimum line spacing */
- FC_SOURCE := 'source'. "/* String (deprecated) */
- FC_CHARSET := 'charset'. "/* CharSet */
- FC_LANG := 'lang'. "/* String RFC 3066 langs */
- FC_FONTVERSION := 'fontversion'. "/* Int from 'head'.table */
- FC_FULLNAME := 'fullname'. "/* String */
- FC_FAMILYLANG := 'familylang'. "/* String RFC 3066 langs */
- FC_STYLELANG := 'stylelang'. "/* String RFC 3066 langs */
- FC_FULLNAMELANG := 'fullnamelang'. "/* String RFC 3066 langs */
- FC_CAPABILITY := 'capability'. "/* String */
- FC_FONTFORMAT := 'fontformat'. "/* String */
- FC_EMBOLDEN := 'embolden'. "/* Bool - true if emboldening needed*/
- FC_EMBEDDED_BITMAP := 'embeddedbitmap'."/* Bool - true to enable embedded bitmaps */
- FC_DECORATIVE := 'decorative'. "/* Bool - true if style is a decorative variant */
- FC_LCD_FILTER := 'lcdfilter'. "/* Int */
- FC_NAMELANG := 'namelang'. "/* String RFC 3866 langs */
-
-
- "Adjust outline rasterizer"
- FC_CHAR_WIDTH := 'charwidth'."/* Int */
- FC_CHAR_HEIGHT := 'charheight'."/* Int */
- FC_MATRIX := 'matrix'. "/* FcMatrix */
-
- FC_WEIGHT_THIN := 0.
- FC_WEIGHT_EXTRALIGHT := 40.
- FC_WEIGHT_ULTRALIGHT := FC_WEIGHT_EXTRALIGHT.
- FC_WEIGHT_LIGHT := 50.
- FC_WEIGHT_BOOK := 75.
- FC_WEIGHT_REGULAR := 80.
- FC_WEIGHT_NORMAL := FC_WEIGHT_REGULAR.
- FC_WEIGHT_MEDIUM := 100.
- FC_WEIGHT_DEMIBOLD := 180.
- FC_WEIGHT_SEMIBOLD := FC_WEIGHT_DEMIBOLD.
- FC_WEIGHT_BOLD := 200.
- FC_WEIGHT_EXTRABOLD := 205.
- FC_WEIGHT_ULTRABOLD := FC_WEIGHT_EXTRABOLD.
- FC_WEIGHT_BLACK := 210.
- FC_WEIGHT_HEAVY := FC_WEIGHT_BLACK.
- FC_WEIGHT_EXTRABLACK := 215.
- FC_WEIGHT_ULTRABLACK := FC_WEIGHT_EXTRABLACK.
-
- FC_SLANT_ROMAN := 0.
- FC_SLANT_ITALIC := 100.
- FC_SLANT_OBLIQUE := 110.
-
- FC_WIDTH_ULTRACONDENSED := 50.
- FC_WIDTH_EXTRACONDENSED := 63.
- FC_WIDTH_CONDENSED := 75.
- FC_WIDTH_SEMICONDENSED := 87.
- FC_WIDTH_NORMAL := 100.
- FC_WIDTH_SEMIEXPANDED := 113.
- FC_WIDTH_EXPANDED := 125.
- FC_WIDTH_EXTRAEXPANDED := 150.
- FC_WIDTH_ULTRAEXPANDED := 200.
-
- FC_PROPORTIONAL := 0.
- FC_DUAL := 90.
- FC_MONO := 100.
- FC_CHARCELL := 110.
-
- "sub-pixel order"
- FC_RGBA_UNKNOWN := 0.
- FC_RGBA_RGB := 1.
- FC_RGBA_BGR := 2.
- FC_RGBA_VRGB := 3.
- FC_RGBA_VBGR := 4.
- FC_RGBA_NONE := 5.
-
- "hinting style"
- FC_HINT_NONE := 0.
- FC_HINT_SLIGHT := 1.
- FC_HINT_MEDIUM := 2.
- FC_HINT_FULL := 3.
-
- "LCD filter"
- FC_LCD_NONE := 0.
- FC_LCD_DEFAULT := 1.
- FC_LCD_LIGHT := 2.
- FC_LCD_LEGACY := 3.
-
- StXFace2FCWeightMap := Dictionary withKeysAndValues:{
- #thin. FC_WEIGHT_THIN.
- #extralight. FC_WEIGHT_EXTRALIGHT.
- #ultralight. FC_WEIGHT_ULTRALIGHT.
- #light. FC_WEIGHT_LIGHT.
- #book. FC_WEIGHT_BOOK.
- #regular. FC_WEIGHT_REGULAR.
- #normal. FC_WEIGHT_NORMAL.
- #medium. FC_WEIGHT_MEDIUM.
- #demibold. FC_WEIGHT_DEMIBOLD.
- #semibold. FC_WEIGHT_SEMIBOLD.
- #bold. FC_WEIGHT_BOLD.
- #extrabold. FC_WEIGHT_EXTRABOLD.
- #ultrabold. FC_WEIGHT_ULTRABOLD.
- #black. FC_WEIGHT_BLACK.
- #heavy. FC_WEIGHT_HEAVY.
- #extrablack. FC_WEIGHT_EXTRABLACK.
- #ultrablack. FC_WEIGHT_ULTRABLACK.
- }.
- StXStyle2FCSlantMap := Dictionary withKeysAndValues:{
- #roman. FC_SLANT_ROMAN.
- #italic. FC_SLANT_ITALIC.
- #oblique. FC_SLANT_OBLIQUE.
- }.
+ Lobby isNil ifTrue:[
+ Lobby := Registry new.
+ ].
"Modified: / 30-12-2013 / 19:48:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!XftFontDescription class methodsFor:'instance creation'!
+family:familyString face:faceString style:styleString size:size sizeUnit:sizeUnit encoding:encoding
+ "returns a font for given family, face, style, size and the specified encoding.
+ The returned font is not associated to a specific device"
+
+ |proto|
+
+ RecentlyUsedFonts notNil ifTrue:[
+ proto := RecentlyUsedFonts
+ detect:[:fn |
+ fn sameFamily: familyString
+ face: faceString
+ style: styleString
+ size: size
+ unit: sizeUnit
+ pixelSize: nil
+ encoding: encoding]
+ ifNone:[ nil ].
+ proto notNil ifTrue:[
+ ^ proto
+ ].
+ ].
+
+ CachedFontList notNil ifTrue:[
+ proto := CachedFontList
+ detect:[:fn |
+ fn sameFamily: familyString
+ face: faceString
+ style: styleString
+ size: size
+ unit: sizeUnit
+ pixelSize: nil
+ encoding: encoding]
+ ifNone:[ nil ].
+ proto notNil ifTrue:[
+ ^ (proto shallowCopy)
+ setDevice: nil patternId: nil fontId: nil;
+ family:familyString face:faceString style:styleString size:size sizeUnit:sizeUnit encoding:encoding
+ ].
+ ].
+ ^ super
+ family:familyString face:faceString style:styleString size:size sizeUnit:sizeUnit encoding:encoding
+
+ "Modified: / 29-02-2016 / 08:34:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
for:aFontOrFontDescription
^ self
- family:aFontOrFontDescription family
- face:aFontOrFontDescription face
- style:aFontOrFontDescription style
- size:aFontOrFontDescription size
- sizeUnit:#pt
- encoding:aFontOrFontDescription encoding
+ family:aFontOrFontDescription family
+ face:aFontOrFontDescription face
+ style:aFontOrFontDescription style
+ size:aFontOrFontDescription size
+ sizeUnit:#pt
+ encoding:aFontOrFontDescription encoding
+!
+
+named: aString
+ ^ self new setName: aString
+
+ "Created: / 05-03-2015 / 05:20:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
new
+ "return an initialized instance"
+
^ self basicNew initialize.
! !
-!XftFontDescription class methodsFor:'change & update'!
-
-aboutToDestroyViewWithDevice:aDevice id:aWindowId
- "a view is going to be destroyed.
- Have to disassociate the XftDrawId from the drawableId aWindowId"
+!XftFontDescription class methodsFor:'* uncategorized *'!
-"/ no longer used...
-"/ Lobby do:[:eachXftFont|
-"/ eachXftFont graphicsDevice == aDevice ifTrue:[
-"/ eachXftFont disassociateXftDrawableFrom:aWindowId.
-"/ ].
-"/ ].
+aboutToDestroyViewWithDevice:aGLXWorkstation id:anExternalAddress
+
+ "Created: / 11-10-2015 / 11:32:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!XftFontDescription class methodsFor:'examples'!
@@ -397,131 +295,27 @@
!XftFontDescription class methodsFor:'primitives'!
xftAvailable
-%{
-#ifdef XFT
- RETURN ( true )
-#endif
-%}.
- ^ false
+ <resource: #obsolete>
+
+ ^ ConfigurableFeatures hasXFT
"Created: / 20-12-2013 / 21:10:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (format): / 22-02-2016 / 08:15:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+
!
-xftFontClose:fontIdArg displayId:displayId
- | error |
-
-%{ /* STACK: 64000 */
+xftDrawDestroy: xftDrawId
+%{
#ifdef XFT
- if ( ! __isExternalAddressLike(fontIdArg) ) {
- error = @symbol(BadArg1);
- goto err;
- }
- if ( ! __isExternalAddressLike(displayId) ) {
- error = @symbol(BadArg2);
- goto err;
+ if (__isExternalAddressLike(xftDrawId)) {
+ XftDraw *xftDraw = XFT_DRAW(xftDrawId);
+ XftDrawDestroy(xftDraw);
}
- XftFontClose (DISPLAY(displayId), XFT_FONT(fontIdArg));
- RETURN(self);
-err:;
-#endif
-%}.
- self primitiveFailed: error
-!
-
-xftFontGetAscent: fontIdArg
- | error |
-
-%{ /* STACK: 64000 */
-#ifdef XFT
- if ( ! __isExternalAddressLike(fontIdArg) ) {
- error = @symbol(BadArg1);
- goto err;
- }
- RETURN ( __MKINT( XFT_FONT(fontIdArg)->ascent ) );
- err:;
-#endif
-%}.
- self primitiveFailed: error
-
- "Created: / 21-12-2013 / 00:56:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-xftFontGetDescent:fontIdArg
- | error |
-
-%{ /* STACK: 64000 */
-#ifdef XFT
- if ( ! __isExternalAddressLike(fontIdArg) ) {
- error = @symbol(BadArg1);
- goto err;
- }
- RETURN ( __MKINT( XFT_FONT(fontIdArg)->descent ) );
- err:;
+ RETURN (self);
#endif
%}.
- self primitiveFailed: error
-
- "Created: / 21-12-2013 / 00:56:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-xftFontGetHeight: fontIdArg
- | error |
-
-%{ /* STACK: 64000 */
-#ifdef XFT
- if ( ! __isExternalAddressLike(fontIdArg) ) {
- error = @symbol(BadArg1);
- goto err;
- }
- RETURN ( __MKINT( XFT_FONT(fontIdArg)->height ) );
- err:;
-#endif
-%}.
- self primitiveFailed: error
-
- "Created: / 21-12-2013 / 00:56:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-xftFontGetMaxAdvanceWidth: fontIdArg
- | error |
+ self primitiveFailed.
-%{ /* STACK: 64000 */
-#ifdef XFT
- if ( ! __isExternalAddressLike(fontIdArg) ) {
- error = @symbol(BadArg1);
- goto err;
- }
- RETURN ( __MKINT( XFT_FONT(fontIdArg)->max_advance_width ) );
- err:;
-#endif
-%}.
- self primitiveFailed: error
-
- "Created: / 30-12-2013 / 20:02:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-xftFontGetPattern: fontIdArg
- | error |
-
-%{ /* STACK: 64000 */
-#ifdef XFT
- XftPattern* p;
- if ( ! __isExternalAddressLike(fontIdArg) ) {
- error = @symbol(BadArg1);
- goto err;
- }
- p = XFT_FONT(fontIdArg)->pattern;
- if (p == NULL) {
- RETURN ( nil );
- } else {
- RETURN ( FC_PATTERN_HANDLE_NEW ( p ) );
- }
- err:;
-#endif
-%}.
- self primitiveFailed: error
-
- "Created: / 21-12-2013 / 00:55:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!XftFontDescription class methodsFor:'queries'!
@@ -530,7 +324,7 @@
"uses fc-list to get a list of available fontDescriptions"
CachedFontList isNil ifTrue:[
- CachedFontList := FCFontListParser new listOfAvailableFonts
+ CachedFontList := FCFontListParser new listOfAvailableFonts
].
^ CachedFontList
@@ -543,11 +337,7 @@
!XftFontDescription methodsFor:'accessing'!
encoding
- ^ encoding ? #'iso10646-1'
-!
-
-face
- ^ face ? ''
+ ^ encoding ? 'iso10646-1'
!
fullName
@@ -576,12 +366,12 @@
minCode := something.
!
-style
- ^ style ? ''
+size
+ ^ size ? 0
!
weight:aNumber
- "set the weight. The face is the string representation of weight."
+ "set the weight"
self assert:(self fontId isNil). "/ cannot change an instantiated font
@@ -643,14 +433,10 @@
!XftFontDescription methodsFor:'accessing-private'!
-getXftFontId
+getFontId
^ fontId
"Created: / 02-01-2014 / 23:29:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-setFontId:fontIdArg
- fontId := fontIdArg.
! !
!XftFontDescription methodsFor:'converting'!
@@ -669,13 +455,237 @@
^ newFont
! !
+!XftFontDescription methodsFor:'displaying'!
+
+displayString:aString from:index1 to:index2Arg x:xArg y:yArg in:aGC opaque:opaque
+ "display a partial string at some position in aGC."
+
+ |index2 bytesPerCharacter transformation
+ clipOrg clipCorn clipRect clipX clipY clipW clipH clipPnt
+ fg fgR fgG fgB fgA fgPixel bg bgR bgG bgB bgA bgPixel
+ drawX drawY drawPnt displayId screen drawableId error stringLen drawId drawIdIsShared
+ newXftDrawId newDrawableAssociation |
+
+ aGC isPixmap ifTrue:[
+ aGC depth ifTrue:[
+ "/ Using XFT font to draw in bitmap is not allowed. In theory it could
+ "/ work if XFT would just turn gray into either black or white. But XFT
+ "/ doesn't do it and simply draw nothing without failing in any way.
+ "/
+ "/ To prevent this silent failures, forbid drawing XFT onto bitmaps
+ "/ (depth-1 pixmaps). After all, the while point of XFT is to use
+ "/ anti-aliased fonts.
+ self error: 'XFT font cannot be used with bitmaps'.
+ ^self
+ ].
+ ].
+
+
+ "limit the string len, otherwise bad output is generated"
+ stringLen := index2Arg - index1 + 1.
+ stringLen > 1000 "8000" ifTrue:[
+ index2 := index1 + 1000 "8000" - 1.
+ ] ifFalse:[
+ stringLen <= 0 ifTrue:[^ self].
+ index2 := index2Arg.
+ ].
+ bytesPerCharacter := aString bitsPerCharacter // 8.
+
+ clipRect := aGC deviceClippingBoundsOrNil.
+ clipRect notNil ifTrue:[
+ clipX := clipRect left.
+ clipY := clipRect top.
+ clipW := clipRect width.
+ clipH := clipRect height.
+ ].
+
+ transformation := aGC transformation.
+ transformation isNil ifTrue:[
+ drawX := xArg.
+ drawY := yArg.
+ ] ifFalse:[
+ drawPnt := transformation transformPoint:(xArg @ yArg).
+ drawX := drawPnt x ceiling.
+ drawY := drawPnt y ceiling.
+ ].
+
+ fg := aGC paint.
+ fgR := fg scaledRed.
+ fgG := fg scaledGreen.
+ fgB := fg scaledBlue.
+ fgA := fg scaledAlpha.
+
+ fgR isNil ifTrue:[
+ "/ when drawing into a pixmap...
+ fgPixel := fg colorId.
+ fgPixel == 0 ifTrue:[
+ fgR := fgG := fgB := 0.
+ ] ifFalse:[
+ fgR := fgG := fgB := 16rFFFF.
+ ]
+ ].
+
+ opaque ifTrue:[
+ bg := aGC backgroundPaint.
+ bg isColor ifTrue:[
+ bgR := bg scaledRed.
+ bgG := bg scaledGreen.
+ bgB := bg scaledBlue.
+ bgA := bg scaledAlpha.
+ ] ifFalse:[
+ "images are not yet implemented"
+ "/ #todo: fill background rectangle
+ bgR := bgG := bgB := bgA := 16rFFFF.
+ ].
+ bgR isNil ifTrue:[
+ "/ when drawing into a pixmap...
+ bgPixel := bg colorId.
+ bgPixel == 0 ifTrue:[
+ bgR := bgG := bgB := 0.
+ ] ifFalse:[
+ bgR := bgG := bgB := 16rFFFF.
+ ]
+ ].
+ ].
+ displayId := device displayIdOrErrorIfBroken.
+ displayId isNil ifTrue:[
+ ^ self.
+ ].
+ screen := device screen.
+ drawableId := aGC drawableId.
+
+ ((aGC class == XGraphicsContext) or:[aGC isKindOf: XGraphicsContext]) ifTrue:[
+ "/ TODO: Following should be done atomically together with drawing...
+ drawId := aGC xftDrawId.
+ drawIdIsShared := false.
+ drawId isNil ifTrue:[
+%{ /* STACK: 64000 */
+ drawId = XFT_DRAW_HANDLE_NEW ( XftDrawCreate ( DISPLAY( displayId ) ,
+ DRAWABLE( drawableId ) ,
+ DefaultVisual( DISPLAY( displayId), SCREEN (screen) ) ,
+ DefaultColormap( DISPLAY( displayId), SCREEN (screen) ) ) );
+%}.
+ aGC xftDrawId: drawId.
+ ].
+ ] ifFalse:[
+ self error: 'GC passed to XftGraphicsContext is not an XGraphicsContext!!'.
+ ^self
+ ].
+
+%{ /* STACK: 64000 */
+#ifdef XFT
+ XftColor color;
+ XGlyphInfo extents;
+ XRectangle clipRX;
+ char *string;
+ int len;
+ int __bytesPerCharacter;
+ XftDraw *__sharedDrawId;
+ XftFont *__xftFont = XFT_FONT(__INST(fontId));
+
+ if (!(__bothSmallInteger(drawX, drawY)
+ && __bothSmallInteger(index1, index2)
+ && __isSmallInteger(bytesPerCharacter)
+ && (__isSmallInteger(fgPixel) || (__bothSmallInteger(fgR, fgG) && __bothSmallInteger(fgB, fgA)))
+ && (opaque == false || __isSmallInteger(bgPixel) || (__bothSmallInteger(bgR, bgG) && __bothSmallInteger(bgB, bgA)))
+ && __isNonNilObject(aString)
+ )) {
+ goto err;
+ }
+
+ __bytesPerCharacter = __intVal(bytesPerCharacter);
+ __sharedDrawId = XFT_DRAW ( drawId );
+
+ string = __stringVal(aString) + ((__intVal(index1) - 1 ) * __bytesPerCharacter);
+ len = __intVal(index2) - __intVal(index1) + 1;
+
+ if (clipRect != nil) {
+ clipRX.x = __intVal(clipX);
+ clipRX.y = __intVal(clipY);
+ clipRX.width = __intVal(clipW);
+ clipRX.height = __intVal(clipH);
+ XftDrawSetClipRectangles(__sharedDrawId, 0, 0, &clipRX, 1);
+ } else {
+ XftDrawSetClip(__sharedDrawId, 0);
+ }
+
+ if (opaque == true) {
+ if (bgPixel != nil) {
+ color.pixel = (unsigned long)__intVal(bgPixel);
+ }
+ color.color.red = __intVal(bgR);
+ color.color.green = __intVal(bgG);
+ color.color.blue = __intVal(bgB);
+ color.color.alpha = __intVal(bgA);
+
+ switch (__bytesPerCharacter) {
+ case 1:
+ XftTextExtents8(DISPLAY(displayId), __xftFont, (FcChar8*)string, len, &extents);
+ break;
+ case 2:
+ XftTextExtents16(DISPLAY(displayId), __xftFont, (FcChar16*)string, len, &extents);
+ break;
+ case 4:
+ XftTextExtents32(DISPLAY(displayId), __xftFont, (FcChar32*)string, len, &extents);
+ break;
+ }
+ XftDrawRect(__sharedDrawId, &color, __intVal(drawX) - extents.x, __intVal(drawY) - __xftFont->ascent, extents.width, __xftFont->height);
+ }
+ if (fgPixel != nil) {
+ color.pixel = (unsigned long)__intVal(fgPixel);
+ }
+ color.color.red = __intVal(fgR);
+ color.color.green = __intVal(fgG);
+ color.color.blue = __intVal(fgB);
+ color.color.alpha = __intVal(fgA);
+
+ switch (__bytesPerCharacter) {
+ case 1:
+ XftDrawString8(__sharedDrawId, &color,__xftFont,
+ __intVal(drawX),
+ __intVal(drawY),
+ (FcChar8*)string,
+ len);
+ break;
+
+ case 2:
+ XftDrawString16(__sharedDrawId, &color, __xftFont,
+ __intVal(drawX),
+ __intVal(drawY),
+ (FcChar16*)string,
+ len);
+ break;
+
+ case 4:
+ XftDrawString32(__sharedDrawId, &color, __xftFont,
+ __intVal(drawX),
+ __intVal(drawY),
+ (FcChar32*)string,
+ len);
+ break;
+
+ default:
+ goto err;
+ }
+
+ RETURN(self);
+
+#endif
+ err:;
+%}.
+ self primitiveFailed: error.
+
+ "Created: / 21-12-2013 / 21:11:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 23-06-2014 / 22:06:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!XftFontDescription methodsFor:'error reporting'!
primitiveFailed
<resource: #skipInDebuggersWalkBack>
- self class xftAvailable ifFalse:[
- super primitiveFailed:'Xft support is not configured'.
+ ConfigurableFeatures hasXFT ifFalse:[
+ super primitiveFailed:'Xft support is not configured'.
].
super primitiveFailed
!
@@ -683,42 +693,39 @@
primitiveFailed:errorString
<resource: #skipInDebuggersWalkBack>
- self class xftAvailable ifFalse:[
- super primitiveFailed:'Xft support is not configured'.
+ ConfigurableFeatures hasXFT ifFalse:[
+ super primitiveFailed:'Xft support is not configured'.
].
super primitiveFailed:errorString
! !
!XftFontDescription methodsFor:'finalization'!
+finalizationLobby
+ ^ Lobby
+!
+
finalize
- self releaseFromDevice
+ self xftDrawDestroy
! !
!XftFontDescription methodsFor:'getting a device font'!
-installInDeviceForGCId:aGCId
- "install the font for aGCId"
-
- (device isNil or:[fontId isNil]) ifTrue:[
- Logger error:'no device font for: %1' with:self.
- ^ nil.
- ].
- "nothing to install"
-!
-
onDevice:aGraphicsDevice
"Create a new XftFont representing the closes font as
myself on aDevice; if one already exists, return the one."
- ^ self onDevice:aGraphicsDevice ifAbsent:self
+ ^ self onDevice: aGraphicsDevice ifAbsent: nil
+
+ "Modified: / 14-04-1997 / 18:22:31 / cg"
+ "Modified: / 29-02-2016 / 07:08:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-onDevice:aGraphicsDevice ifAbsent:aBlock
- "Create a new XftFont representing the closest font as
+onDevice:aGraphicsDevice ifAbsent: aBlock
+ "Create a new XftFont representing the closes font as
myself on aDevice; if one already exists, return the one."
- |displayId myPatternHandle closestPatternHandle newFontId computedWeight deviceFont|
+ | myPatternId closestPatternId1 closestPatternId2 newFontId |
(device == aGraphicsDevice) ifTrue:[
"I am already assigned to that device ..."
@@ -728,985 +735,168 @@
^ self
].
aGraphicsDevice supportsXftFonts ifFalse:[
- ^ self asNonXftFont onDevice:aGraphicsDevice.
+ ^ super onDevice:aGraphicsDevice ifAbsent:aBlock.
].
- deviceFont := aGraphicsDevice deviceFonts detect:[:eachFont | self sameDeviceFontAs:eachFont] ifNone:[].
- deviceFont notNil ifTrue:[
- ^ deviceFont.
+ RecentlyUsedFonts isNil ifTrue:[
+ RecentlyUsedFonts := OrderedCollection new:20.
].
- computedWeight := weight.
- computedWeight isNil ifTrue:[
- computedWeight := StXFace2FCWeightMap at:(face ? '') asLowercase ifAbsent:[FC_WEIGHT_REGULAR].
+ RecentlyUsedFonts keysAndValuesDo:[:index :aFont |
+ ((aFont class == self class) and:[(self sameDeviceFontAs:aFont)]) ifTrue:[
+ "/ Transcript showCR:'hit'.
+ RecentlyUsedFonts
+ removeIndex:index;
+ addFirst:aFont.
+ ^ aFont
+ ]
].
- (OperatingSystem isMAClike and:[FirstTimeCalled ~~ false]) ifTrue:[
- "Slow font matching is a MAC-only feature"
- Logger info:'XFT: matching font (this may take a long time, if the system''s font cache needs to be filled first. Be patient...'.
- FirstTimeCalled := false.
+ RecentlyUsedFonts size >= 20 ifTrue:[
+ RecentlyUsedFonts removeLast.
].
- [
- myPatternHandle := FCPatternHandle create.
- myPatternHandle
- add:FC_FOUNDRY value:manufacturer;
- add:FC_FAMILY value:family;
- add:FC_WEIGHT value:computedWeight;
- add:FC_SLANT value:(StXStyle2FCSlantMap at:(style ? '') asLowercase ifAbsent:[FC_SLANT_ROMAN]).
- sizeUnit = #px ifTrue:[
- myPatternHandle add:FC_PIXEL_SIZE value:(pixelSize isNil ifTrue:[nil] ifFalse:[pixelSize rounded]).
- ] ifFalse:[
- myPatternHandle add:FC_SIZE value:(size isNil ifTrue:[nil] ifFalse:[size rounded]).
+ aGraphicsDevice deviceFonts do:[:aFont |
+ ((aFont class == self class) and:[self sameDeviceFontAs:aFont]) ifTrue:[
+ RecentlyUsedFonts addFirst:aFont.
+ ^ aFont
].
+ ].
- displayId := aGraphicsDevice displayId.
- closestPatternHandle := myPatternHandle matchFontOnDisplayId:displayId screen:aGraphicsDevice screen.
- closestPatternHandle notNil ifTrue:[
- newFontId := closestPatternHandle getFontOnDisplayId:displayId.
- newFontId notNil ifTrue:[
- "/ Good, this font exists!!
- device isNil ifTrue:[
- deviceFont := self.
- ] ifFalse:[
- deviceFont := self copy.
- ].
- closestPatternHandle := nil.
- deviceFont setDevice:aGraphicsDevice patternId:nil fontId:newFontId.
- aGraphicsDevice registerFont:deviceFont.
- ^ deviceFont.
+ "/ Transcript show: 'XFT font not found in cache:'; showCR: self printString.
+ [
+ myPatternId := FcPattern fromFontDescription: self.
+ newFontId := self xftFontOpenPattern: aGraphicsDevice displayId pattern: myPatternId.
+ newFontId notNil ifTrue:[
+ "/ Good, this font exists!!
+ myPatternId := nil.
+ ] ifFalse:[
+ closestPatternId1 := self xftFontMatch: aGraphicsDevice displayId screen: aGraphicsDevice screen pattern: myPatternId.
+ closestPatternId1 isNil ifTrue:[
+ self error: 'No font matches'.
+ ].
+ closestPatternId2 := closestPatternId1 copy.
+ newFontId := self xftFontOpenPattern: aGraphicsDevice displayId pattern: closestPatternId1.
+ "/ !!!!!!!! closestPatternId is no longer valid !!!!!!!!
+ closestPatternId1 := nil.
+ newFontId isNil ifTrue:[
+ ^ aBlock value
].
].
+ fontId := newFontId.
+ device := aGraphicsDevice.
+ aGraphicsDevice registerFont:self.
+ RecentlyUsedFonts addFirst:self.
+ myPatternId notNil ifTrue:[myPatternId release].
+ closestPatternId1 notNil ifTrue:[closestPatternId1 release].
+ closestPatternId2 notNil ifTrue:[closestPatternId2 release].
+ ^ self.
] ensure:[
- myPatternHandle notNil ifTrue:[myPatternHandle destroy].
- closestPatternHandle notNil ifTrue:[closestPatternHandle destroy].
+ myPatternId notNil ifTrue:[myPatternId release].
+ closestPatternId1 notNil ifTrue:[closestPatternId1 release].
+ closestPatternId2 notNil ifTrue:[closestPatternId2 release].
].
- ^ aBlock value
"
(XftFontDescription family:'monospace' size:16) onDevice:Screen current
"
- "Modified: / 14-04-1997 / 18:22:31 / cg"
- "Modified: / 02-01-2014 / 23:43:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 29-02-2016 / 08:36:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!XftFontDescription methodsFor:'initialization'!
initialize
- "Invoked when a new instance is created."
+ super initialize.
+ flags := AntialiasedFlag
- super initialize.
- size := 0.
- encoding := #'iso10646-1'.
-!
-
-isScaledFont
- ^ true
+ "Modified: / 26-11-2016 / 21:25:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
setDevice: deviceArg patternId: patternIdArg fontId: fontIdArg
device := deviceArg.
fontId := fontIdArg.
patternIdArg notNil ifTrue:[
- family := patternIdArg get: FC_FAMILY index: 0.
- size := patternIdArg get: FC_SIZE index: 0.
- face := patternIdArg get: FC_WEIGHT index: 0.
- face := StXFace2FCWeightMap keyAtValue: face.
- style := patternIdArg get: FC_SLANT index: 0.
- style := StXStyle2FCSlantMap keyAtValue: style.
+ family := patternIdArg at: FC_FAMILY index: 1.
+ size := patternIdArg at: FC_SIZE index: 1.
+ face := patternIdArg at: FC_WEIGHT index: 1.
+ face := StXFace2FCWeightMap keyAtValue: face.
+ face isEmptyOrNil ifTrue:[ face := nil ].
+ style := patternIdArg at: FC_SLANT index: 1.
+ style := StXStyle2FCSlantMap keyAtValue: style.
+ style isEmptyOrNil ifTrue:[ style := nil ].
+ name := patternIdArg at: FC_FULLNAME index: 1.
-"/ name:= patternIdArg get: 'fullname' index: 0.
-"/ encoding:= patternIdArg get: 'encoding' index: 0.
- ].
- size isNil ifTrue:[
- size := 0.
- ].
- encoding isNil ifTrue:[
- encoding := #'iso10646-1'.
+ encoding:= patternIdArg at: 'encoding' index: 1.
].
"Created: / 21-12-2013 / 00:46:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 30-12-2013 / 12:49:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 29-02-2016 / 07:43:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+setName: aString
+ "Initializes font description from a string like 'times-12' or 'times,charter-12:bold'"
+
+ | pattern |
+
+ pattern := FcPattern fromString: aString.
+ pattern notNil ifTrue:[
+ family := pattern at: FC_FAMILY index: 1.
+ size := pattern at: FC_SIZE index: 1.
+ face := pattern at: FC_WEIGHT index: 1.
+ face := StXFace2FCWeightMap keyAtValue: face.
+ style := pattern at: FC_SLANT index: 1.
+ style := StXStyle2FCSlantMap keyAtValue: style.
+ name := pattern at: FC_FULLNAME index: 1.
+ encoding:= pattern at: 'encoding' index: 1.
+ encoding notNil ifTrue:[encoding := encoding asSymbol].
+ pattern release.
+ ].
+
+ "
+ XftFontDescription named: 'times-12'
+ XftFontDescription named: 'times,charter-12:bold'
+ XftFontDescription named: 'Sans-10'
+ "
+
+ "Created: / 05-03-2015 / 05:19:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!XftFontDescription methodsFor:'primitives'!
-xftTextExtents:displayIdArg string:aString from:start to:stop into:extentsArrayOrNil
- "get the extents of aString.
- Answer thr width of aString (in reality the xOff).
- If extentArrayOrNil is an Array, fill is with the extent info:
- #(width height x y xOff yOff)."
-
- |error bytesPerCharacter|
+xftDrawChange:xftDrawId drawable:drawableId
+ | error |
- bytesPerCharacter := aString bytesPerCharacter.
-
-%{ /* STACK: 64000 */
+%{
#ifdef XFT
- XGlyphInfo info;
- char *string;
- int len;
- int __bytesPerCharacter = __intVal(bytesPerCharacter);
-
- if ( ! __isExternalAddressLike(displayIdArg) ) {
+ if ( ! __isExternalAddressLike(xftDrawId) ) {
error = @symbol(BadArg1);
goto err;
}
- if ( ! __isSmallInteger(start) ) {
- error = @symbol(BadArg3);
- goto err;
- }
- if ( ! __isSmallInteger(stop) ) {
- error = @symbol(BadArg4);
- goto err;
- }
- if ( ! __isExternalAddressLike(__INST(fontId)) ) {
- error = @symbol(BadFontId);
- goto err;
+ if (drawableId == nil) {
+ XftDrawChange(XFT_DRAW(xftDrawId), None);
+ RETURN (self);
}
-
- string = __stringVal(aString) + ((__intVal(start) - 1) * __bytesPerCharacter);
- len = __intVal(stop) - __intVal(start) + 1;
-
- switch (__bytesPerCharacter) {
- case 1:
- XftTextExtents8(DISPLAY(displayIdArg), XFT_FONT(__INST(fontId)), (FcChar8*)string, len, &info);
- break;
- case 2:
- XftTextExtents16(DISPLAY(displayIdArg), XFT_FONT(__INST(fontId)), (FcChar16*)string, len, &info);
- break;
- case 4:
- XftTextExtents32(DISPLAY(displayIdArg), XFT_FONT(__INST(fontId)), (FcChar32*)string, len, &info);
- break;
- default:
+ if ( ! __isExternalAddressLike(drawableId) ) {
error = @symbol(BadArg2);
goto err;
}
-
- if (extentsArrayOrNil != nil && __isArray(extentsArrayOrNil)) {
- switch (__arraySize(extentsArrayOrNil)) {
- case 6:
- __arrayVal(extentsArrayOrNil)[5] = __MKSMALLINT(info.yOff);
- case 5:
- __arrayVal(extentsArrayOrNil)[4] = __MKSMALLINT(info.xOff);
- case 4:
- __arrayVal(extentsArrayOrNil)[3] = __MKSMALLINT(info.y);
- case 3:
- __arrayVal(extentsArrayOrNil)[2] = __MKSMALLINT(info.x);
- case 2:
- __arrayVal(extentsArrayOrNil)[1] = __MKSMALLINT(info.height);
- case 1:
- __arrayVal(extentsArrayOrNil)[0] = __MKSMALLINT(info.width);
- }
+ if (XftDrawDrawable( XFT_DRAW(xftDrawId) ) != DRAWABLE( drawableId ) ) {
+ XftDrawChange( XFT_DRAW(xftDrawId) , DRAWABLE( drawableId ) );
}
-
- RETURN(__MKSMALLINT(info.xOff));
-
- err:;
-#endif
-%}.
- error notNil ifTrue:[
- self primitiveFailed: error.
- ^ nil.
- ].
-
- "Created: / 21-12-2013 / 10:42:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 30-12-2013 / 20:00:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!XftFontDescription methodsFor:'printing & storing'!
-
-storeOn:aStream
- "append a character sequence to the argument, aStream from which the
- receiver can be reconstructed using readFrom:."
-
- aStream nextPutAll:'(XftFontDescription family:'. family storeOn:aStream.
- aStream nextPutAll:' face:'. face storeOn:aStream.
- aStream nextPutAll:' style:'. style storeOn:aStream.
- aStream nextPutAll:' size:'. size storeOn:aStream.
- aStream nextPutAll:' encoding:'. encoding storeOn:aStream.
- aStream nextPut:$)
-
- "
- (XftFontDescription family: 'DejaVu Sans' size: 8) storeString
- "
-! !
-
-!XftFontDescription methodsFor:'queries-dimensions'!
-
-ascent
- "return the ascent - the number of pixels above the baseLine."
- ascent isNil ifTrue:[
- ascent := self class xftFontGetAscent: fontId
- ].
- ^ ascent
-
- "Created: / 21-12-2013 / 01:19:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-descent
- "return the descent - the number of pixels below the baseLine."
-
- descent isNil ifTrue:[
- descent := self class xftFontGetDescent: fontId
- ].
- ^ descent
-
- "Created: / 21-12-2013 / 01:20:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-getFontMetrics
- |info|
-
- info := DeviceWorkstation::DeviceFontMetrics new.
- info
- ascent:self ascent
- descent:self descent
- maxAscent:self maxAscent
- maxDescent:self maxDescent
- minWidth:self maxWidth
- maxWidth:self maxWidth
- avgWidth:self maxWidth
- minCode:self minCode
- maxCode:self maxCode
- direction:#LeftToRight.
- ^ info
-!
-
-getFontResolution
- device isNil ifTrue:[ ^ 72 @ 72 ].
- ^ device resolution
-!
-
-height
- "return the height - the number of pixels above plus below the baseLine."
-
- height isNil ifTrue:[
- height := self class xftFontGetHeight: fontId
- ].
- ^ height
-
- "Created: / 21-12-2013 / 01:20:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-isFixedWidth
- "return true, if this is a fixed pitch font
- (i.e. all characters are of the same width).
- Also called monospaced fonts"
-
- fixedWidth isNil ifTrue:[
- fontId isNil ifTrue:[
- ^ false "we don't know yet"
- ].
- "/ take some obviously different chars
- width := self widthOf:' '.
- fixedWidth := (self widthOf:'i') == width
- and:[(self widthOf:'W') == width
- and:[(self widthOf:'.') == width]]
- ].
- ^ fixedWidth.
-
- "Created: / 21-12-2013 / 10:38:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-maxAscent
- "return the font's maximum-ascent (i.e. the maximum of all characters);
- That is the number of units (usually pixels) above the baseline."
-
- ^ self ascent
-
- "Created: / 30-12-2013 / 20:01:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-maxDescent
- "return the font's maximum-descent (i.e. the maximum of all characters);
- That is the number of units (usually pixels) below the baseline."
-
- ^ self descent
-
- "Created: / 30-12-2013 / 20:01:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-maxWidth
- "return the font's maximum-width character (i.e. the maximum of all characters);
- That is a number of units (usually pixels)."
-
- self isFixedWidth ifTrue:[
- ^ width
- ].
- ^ self class xftFontGetMaxAdvanceWidth: fontId
-
- "Created: / 30-12-2013 / 20:02:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-patternStringForId:patternIdArg
- |name family size pixelSize face style encoding foundry width|
-
- patternIdArg notNil ifTrue:[
- foundry := patternIdArg get: FC_FOUNDRY index: 0.
- family := patternIdArg get: FC_FAMILY index: 0.
- size := patternIdArg get: FC_SIZE index: 0.
- pixelSize := patternIdArg get: FC_PIXEL_SIZE index: 0.
- face := patternIdArg get: FC_WEIGHT index: 0.
- face := StXFace2FCWeightMap keyAtValue: face.
- style := patternIdArg get: FC_SLANT index: 0.
- style := StXStyle2FCSlantMap keyAtValue: style.
- width := patternIdArg get: FC_WIDTH index: 0.
-
- name:= patternIdArg get: 'fullname' index: 0.
-
- encoding:= patternIdArg get: 'encoding' index: 0.
- ].
-
- ^ '%8-%1-%2-%3-%4pt/%5px-%6-%9 (%7)' bindWith:family with:face with:style with:size with:pixelSize with:encoding with:name
- with:foundry with:width.
-!
-
-width
- "return the font's characters width;
- That is a number of units (usually pixels).
- For variable pitch fonts, the width of the space character is returned.
- For fixed fonts, this is the same as minWidth or maxWidth (or any character).
- The receiver must be associated to a device, for this query to be legal."
-
- width isNil ifTrue:[
- width := self widthOf:' '.
- ].
- ^ width
-!
-
-widthOf:aString from:start to:stop
- "return the width of a sub string"
-
- (stop < start) ifTrue:[^ 0].
- fixedWidth == true ifTrue:[
- ^ width * (stop - start + 1)
- ].
- device isNil ifTrue:[
- self errorNoDevice.
- ].
- ^ self xftTextExtents:device displayId string:aString from:start to:stop into:nil.
-
- "Created: / 21-12-2013 / 10:42:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 29-12-2013 / 21:16:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!XftFontDescription methodsFor:'release'!
-
-releaseFromDevice
- "I am no longer available on the device"
-
- (device notNil and:[fontId notNil]) ifTrue:[
- self class xftFontClose:fontId displayId:device displayId.
- device := nil.
- fontId := nil.
- width := nil.
- ].
-! !
-
-!XftFontDescription methodsFor:'testing'!
-
-isAlienFont
- "my GraphicsContext knows how to disply strings in my font"
-
- ^ false
-!
-
-isXftFont
- ^ true
-! !
-
-!XftFontDescription::FCFontListParser class methodsFor:'api'!
-
-listOfAvailableFonts
- ^ self new listOfAvailableFonts
-
- "
- self listOfAvailableFonts
- "
-! !
-
-!XftFontDescription::FCFontListParser class methodsFor:'documentation'!
-
-documentation
-"
- parses fc-list output to get a list of XftFontDescriptions
-
- [author:]
- cg
-
- [instance variables:]
-
- [class variables:]
-
- [see also:]
-
-"
-! !
-
-!XftFontDescription::FCFontListParser methodsFor:'api'!
-
-listOfAvailableFonts
- |readEntry list fcListProg|
-
- list := OrderedCollection new.
-
- readEntry := [
- |key line|
-
- [
- line := pipeStream nextLine.
- ] doUntil:[(line startsWith:'Pattern has') or:[Transcript showCR:line. false]].
-
- currentDescription := XftFontDescription new.
- [line := pipeStream nextLine. line notEmptyOrNil] whileTrue:[
- "/ Transcript showCR:l.
- lineStream := line readStream. lineStream skipSeparators.
- key := ('fc_', (lineStream upTo:$:)) asSymbolIfInterned.
- (
- #(fc_family fc_style fc_slant fc_weight fc_width
- fc_pixelsize fc_spacing fc_foundry fc_antialias
- fc_file fc_outline fc_scalable fc_charset fc_lang
- fc_fontversion fc_fontformat fc_decorative fc_index
- fc_outline fc_familylang fc_stylelang fc_fullname
- fc_fullnamelang fc_capability fc_hash fc_postscriptname
- fc_symbol fc_color
- ) includesIdentical:key
- ) ifTrue:[
- self perform:key.
- ] ifFalse:[
- Transcript show:'Xft ignored line: '; showCR:line.
- ].
- ].
- list add:currentDescription
- ].
-
- fcListProg := #('/usr/bin/fc-list' '/usr/X11/bin/fc-list') detect:[:eachProg|
- eachProg asFilename isExecutableProgram
- ] ifNone:[
- 'XftFontDescription [warning]: fc-list program not found - no XFT fonts' errorPrintCR.
- ^ list.
- ].
-
- pipeStream := PipeStream readingFrom:fcListProg, ' -v'.
- [
- [pipeStream atEnd] whileFalse:[
- readEntry value.
- ]
- ] ensure:[
- pipeStream close
- ].
- ^ list
-
- "
- FCFontListParser new listOfAvailableFonts
- "
-! !
-
-!XftFontDescription::FCFontListParser methodsFor:'font list keywords'!
-
-fc_antialias
- "helper for font listing"
-
- currentDescription isAntialiasedFont:(self getBoolean).
-!
-
-fc_charset
- "helper for font listing"
-
- |page bits l min max minCode maxCode|
-
- [ l := pipeStream nextLine. l notEmpty ] whileTrue:[
- "/ Transcript show:'->'; showCR:l.
- (l startsWith:Character tab) ifFalse:[
- (l startsWith:'(') ifFalse:[self halt].
- currentDescription minCode:minCode; maxCode:maxCode.
- ^ self.
- ].
-
- lineStream := l readStream.
- lineStream skipSeparators.
- page := Integer readFrom:(lineStream upTo:$:) radix:16.
- lineStream next.
- bits := 0 to:7 collect:[:i|
- lineStream skipSeparators.
- Integer readFrom:(lineStream upToSeparator) radix:16.
- ].
- min := (page * 256 + 0).
- max := (page * 256 + 255).
- minCode isNil ifTrue:[
- minCode := min.
- maxCode := max.
- ] ifFalse:[
- minCode := minCode min:min.
- maxCode := maxCode max:max.
- ].
- ].
- "/ currentDescription characterSet:(self getString).
- currentDescription minCode:minCode; maxCode:maxCode.
-!
-
-fc_decorative
- "helper for font listing"
-
- currentDescription isDecorativeFont:(self getBoolean).
-!
-
-fc_family
- "helper for font listing"
-
- currentDescription family:(self getString).
-!
-
-fc_file
- "helper for font listing"
-
- currentDescription file:(self getString).
-!
-
-fc_fontformat
- "helper for font listing"
-
- currentDescription fontFormat:(self getString).
-!
-
-fc_fontversion
- "helper for font listing"
-
- currentDescription fontVersion:(self getInteger).
-!
-
-fc_foundry
- "helper for font listing"
-
- |foundry|
-
- foundry := self getString.
- foundry ~= 'unknown' ifTrue:[
- currentDescription foundry:foundry.
- ].
-!
-
-fc_fullname
- "helper for font listing"
-
- currentDescription name:self getString.
-!
-
-fc_outline
- "helper for font listing"
-
- currentDescription isOutlineFont:(self getBoolean).
-!
-
-fc_pixelsize
- "helper for font listing"
-
- currentDescription setPixelSize:(self getInteger).
- currentDescription setSizeUnit:#px.
- "/ currentDescription setSize:(self getInteger).
- "/ currentDescription setSizeUnit:#pt.
-!
-
-fc_scalable
- "helper for font listing"
-
- currentDescription isScalableFont:self getBoolean.
-!
-
-fc_slant
- "helper for font listing"
-
- currentDescription slant:(self getInteger).
-!
-
-fc_spacing
- "helper for font listing"
-
- currentDescription spacing:(self getInteger).
-!
-
-fc_style
- "helper for font listing"
-
- |xftStyle|
-
- xftStyle := self getString asLowercase.
- (xftStyle includesString:'italic') ifTrue:[
- currentDescription style:#italic.
- ^ self.
- ].
- (xftStyle includesString:'oblique') ifTrue:[
- currentDescription style:#oblique.
- ^ self.
- ].
- currentDescription style:#roman.
-!
-
-fc_weight
- "helper for font listing"
-
- currentDescription weight:(self getInteger).
-!
-
-fc_width
- "helper for font listing"
-
- currentDescription width:(self getInteger).
-! !
-
-!XftFontDescription::FCFontListParser methodsFor:'font list keywords - ignored'!
-
-fc_capability
- "helper for font listing"
-
- "currentDescription capability:" (self getString).
-!
-
-fc_color
- "helper for font listing - ignored for now"
-
- "currentDescription isColorFont:"(self getBoolean).
-!
-
-fc_familylang
- "helper for font listing"
-
- "currentDescription familylang:" (self getString).
-!
-
-fc_fullnamelang
- "helper for font listing"
-
- "currentDescription fullnamelang:" (self getString).
-!
-
-fc_hash
- "helper for font listing"
-
- "currentDescription hash:" self getString.
-!
-
-fc_index
- "helper for font listing"
-
- "currentDescription index:" (self getInteger).
-!
-
-fc_lang
- "helper for font listing"
-
- "/ currentDescription characterSet:(self getString).
-!
-
-fc_postscriptname
- "helper for font listing"
-
- "currentDescription postscriptname:" self getString.
-!
-
-fc_stylelang
- "helper for font listing"
-
- "currentDescription stylelang:" (self getString).
-!
-
-fc_symbol
- "helper for font listing - ignored for now"
-
- "currentDescription isSymbolFont:"(self getBoolean).
-! !
-
-!XftFontDescription::FCFontListParser methodsFor:'helpers'!
-
-getBoolean
- "helper for font listing"
-
- |s|
-
- lineStream skipSeparators.
- s := lineStream nextAlphaNumericWord.
- ^ (s indexOfSubCollection:'True') ~~ 0. "/ match at least 'True' and 'FCTrue'
-
- "
- 'xxFalse' indexOfSubCollection:'True'
- 'FcTrue' indexOfSubCollection:'True'
- "
-!
-
-getInteger
- "helper for font listing"
-
- lineStream skipSeparators.
- ^ Integer readFrom:lineStream.
-!
-
-getString
- "helper for font listing"
-
- lineStream skipThrough:$".
- ^ lineStream upTo:$".
-! !
-
-!XftFontDescription::FCPatternHandle class methodsFor:'instance creation'!
-
-create
- ^ self new create
-
- "
- self new create destroy
- "
-! !
-
-!XftFontDescription::FCPatternHandle methodsFor:'primitives'!
-
-add:attribute value: value
- "Add a value to the specified pattern element after existing values"
-
- ^ self add: attribute value: value append: true.
-!
-
-add:attribute value: value append: append
- "Add a value to the specified pattern element. If 'append' is true, the value
- is added after existing values, otherwise it is added before them."
-
- | error |
-
-%{ /* STACK: 64000 */
-#ifdef XFT
- XftValue v;
- Bool b;
-
- if (__INST(address_) == 0) {
- error = @symbol(NullReceiver);
- goto err;
- }
- if ( ! __isStringLike ( attribute ) ) {
- error = @symbol(BadArg1);
- goto err;
- }
- if ( append != true && append != false ) {
- error = @symbol(BadArg3);
- goto err;
- }
- if ( __isStringLike ( value ) ) {
- v.type = FcTypeString;
- /* Passing pointer inside Smalltalk should be safe,
- * Xft/FontConfig libraries seem to allocate and store
- * a __copy__ of the string (if I understood the code correctly)
- */
- v.u.s = __stringVal( value);
- } else if ( __isSmallInteger( value ) ) {
- v.type = XftTypeInteger;
- v.u.i = (int)__intVal( value );
- } else if ( value == true || value == false ) {
- v.type = XftTypeBool;
- v.u.b = value == true ? True : False;
- } else if ( __isFloat ( value ) ) {
- v.type = XftTypeDouble;
- v.u.d = __floatVal( value );
- } else if ( value == nil ) {
- v.type = XftTypeVoid;
- v.u.f = NULL;
- } else {
- error = @symbol(BadArg2);
- goto err;
- }
- b = XftPatternAdd((XftPattern*)__INST(address_), __stringVal(attribute), v, append == true ? True : False );
- RETURN ( b == True ? true : false );
-
- err:;
+ RETURN (self);
+err:;
#endif
%}.
self primitiveFailed: error
- "Created: / 20-12-2013 / 21:50:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-create
-%{
-#ifdef XFT
- __INST(address_) = (void *)XftPatternCreate();
-#endif
-%}.
+ "Created: / 26-12-2013 / 12:17:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-delete: pattern attribute: attribute
- | error |
-%{ /* STACK: 64000 */
-#ifdef XFT
- if (__INST(address_) == 0) {
- error = @symbol(BadHandle);
- goto err;
- }
- if ( ! __isStringLike ( attribute ) ) {
- error = @symbol(BadArg1);
- goto err;
- }
- XftPatternDel( (XftPattern*)__INST(address_), __stringVal ( attribute ) );
- RETURN ( self );
-
- err:;
-#endif
-%}.
- self primitiveFailed: error
-!
-
-destroy
-%{ /* STACK: 64000 */
-#ifdef XFT
- if (__INST(address_) != 0) {
- XftPatternDestroy((XftPattern*)__INST(address_));
- __INST(address_) = 0;
- RETURN ( self );
- }
-#endif
-%}.
- self primitiveFailed.
-!
-
-duplicate
- | error |
-%{
-#ifdef XFT
- if (__INST(address_) != 0) {
- RETURN (FC_PATTERN_HANDLE_NEW((XftPattern*)__INST(address_)));
- RETURN ( self );
- }
-#endif
-%}.
- self primitiveFailed
-!
-
-get:attribute index: index
- "Return a value from the specified element -- multiple values can be indexed
- with 'index' starting at zero."
-
+xftDrawCreate: displayId screen: screen drawable: drawableId
| error |
-%{ /* STACK: 64000 */
-#ifdef XFT
- XftValue v;
- XftResult r;
-
- if (__INST(address_) == 0) {
- error = @symbol(NullReceiver);
- goto err;
- }
- if ( ! __isStringLike ( attribute ) ) {
- error = @symbol(BadArg1);
- goto err;
- }
- if ( ! __isSmallInteger( index ) ) {
- error = @symbol(BadArg2);
- goto err;
- }
- r = XftPatternGet((XftPattern*)__INST(address_), __stringVal( attribute ), __intVal( index ), &v);
- if ( r != XftResultMatch) {
- RETURN ( nil );
- }
- if ( v.type == XftTypeString) {
- RETURN ( __MKSTRING(v.u.s) );
- } else if ( v.type == XftTypeInteger ) {
- RETURN ( __MKINT (v.u.i) );
- } else if ( v.type == XftTypeBool ) {
- RETURN ( v.u.b == True ? true : false );
- } else if ( v.type == XftTypeDouble ) {
- RETURN ( __MKFLOAT (v.u.d) );
- } else if ( v.type == XftTypeVoid ) {
- RETURN ( nil );
- } else {
- error = @symbol(UnssuportedTypeValue);
- goto err;
- }
- err:;
-#endif
-%}.
- self primitiveFailed: error
-!
-
-getFontOnDisplayId:displayId
- "Note: the pattern is destroyed when the font is closed"
-
- | error |
-
-%{ /* STACK: 64000 */
-#ifdef XFT
- XftFont* f;
- if (!__isExternalAddressLike(displayId) ) {
- error = @symbol(BadArg1);
- goto err;
- }
- if (__INST(address_) == 0) {
- error = @symbol(BadHandle);
- goto err;
- }
-
- f = XftFontOpenPattern(DISPLAY(displayId), (XftPattern*)__INST(address_));
- if (f == NULL) {
- RETURN (nil);
- } else {
- RETURN (XFT_FONT_HANDLE_NEW(f));
- }
- err:;
-#endif
-%}.
- self primitiveFailed: error
-
- "Created: / 20-12-2013 / 23:53:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-matchFontOnDisplayId:displayId screen:screen
- | error |
-
-%{ /* STACK: 64000 */
-#ifdef XFT
- XftPattern *p;
- XftResult r;
-
- if (!__isExternalAddressLike(displayId)) {
- error = @symbol(BadArg1);
- goto err;
- }
- if (!__isSmallInteger( screen) ) {
- error = @symbol(BadArg2);
- goto err;
- }
- if (__INST(address_) == 0) {
- error = @symbol(BadHandle);
- goto err;
- }
-
-// Already done in match:
-// XftConfigSubstitute(FC_PATTERN( patternId ));
-// XftDefaultSubstitute(DISPLAY(displayId), SCREEN( screen ), FC_PATTERN( patternId ));
- p = XftFontMatch(DISPLAY(displayId), SCREEN(screen), (XftPattern*)__INST(address_), &r);
- if (p) {
- RETURN (FC_PATTERN_HANDLE_NEW(p) );
- } else {
- error = @symbol(XftFontMatchReturnedNull);
- }
- err:;
-#endif
-%}.
- self primitiveFailed: error
-
- "Created: / 21-12-2013 / 00:08:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!XftFontDescription::XftDrawHandle class methodsFor:'instance creation'!
-
-createForDisplayId:displayId screen:screen drawable:drawableId
- ^ self new createForDisplayId:displayId screen:screen drawable:drawableId
-! !
-
-!XftFontDescription::XftDrawHandle methodsFor:'primitives'!
-
-createForDisplayId:displayId screen:screen drawable:drawableId
- | error |
-
-%{ /* STACK: 64000 */
+%{
#ifdef XFT
if ( ! __isExternalAddressLike(displayId) ) {
error = @symbol(BadArg1);
@@ -1720,10 +910,10 @@
error = @symbol(BadArg3);
goto err;
}
- __INST(address_) = (void *) XftDrawCreate ( DISPLAY(displayId) ,
- DRAWABLE(drawableId) ,
- DefaultVisual(DISPLAY(displayId), SCREEN (screen)) ,
- DefaultColormap(DISPLAY(displayId), SCREEN (screen)));
+ RETURN ( XFT_DRAW_HANDLE_NEW ( XftDrawCreate ( DISPLAY( displayId ) ,
+ DRAWABLE( drawableId ) ,
+ DefaultVisual( DISPLAY( displayId), SCREEN (screen) ) ,
+ DefaultColormap( DISPLAY( displayId), SCREEN (screen) ) ) ) );
err:;
#endif
%}.
@@ -1732,78 +922,10 @@
"Created: / 21-12-2013 / 21:12:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-destroy
-%{ /* STACK: 64000 */
-#ifdef XFT
- if (__INST(address_) != 0) {
- XftDrawDestroy((XftDraw*)__INST(address_));
- __INST(address_) = 0;
- RETURN ( self );
- }
-#endif
-%}.
- self primitiveFailed.
-!
-
-disassociateFrom:drawableId
- "Disassociate the XftDrawable from drawableId.
- This mist be done before the drawable is destroyed,
- otherwise the XftDrawable is destroyed together with the drawable,
- and X11 errors will be signaled."
-
- | error |
-
-%{ /* STACK: 64000 */
-#ifdef XFT
- if (__INST(address_) == 0) {
- // nothing to disasassociate from...
- RETURN(self);
- }
- if (!__isExternalAddressLike(drawableId)) {
- error = @symbol(BadArg);
- goto err;
- }
- if (XftDrawDrawable((XftDraw*)__INST(address_)) == DRAWABLE(drawableId)) {
- XftDrawChange((XftDraw*)__INST(address_), None);
- }
- RETURN(self);
-err:;
-#endif
-%}.
- self primitiveFailed: error
-
- "Created: / 26-12-2013 / 12:17:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-drawChange:drawableId
- | error |
-
-%{ /* STACK: 64000 */
-#ifdef XFT
- if (drawableId == nil) {
- XftDrawChange((XftDraw*)__INST(address_), None);
- RETURN (self);
- }
- if (!__isExternalAddressLike(drawableId)) {
- error = @symbol(BadArg1);
- goto err;
- }
- if (XftDrawDrawable((XftDraw*)__INST(address_)) != DRAWABLE( drawableId)) {
- XftDrawChange((XftDraw*)__INST(address_), DRAWABLE( drawableId));
- }
- RETURN (self);
-err:;
-#endif
-%}.
- self primitiveFailed: error
-
- "Created: / 26-12-2013 / 12:17:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-drawRectWithColor:aColor x:x y:y width:w height:h
+xftDrawRect: drawIdArg color: aColor x: x y: y width: w height: h
| error r g b a pix |
- aColor isColor ifFalse:[^self primitiveFailed: #BadArg1].
+ aColor isColor ifFalse:[^self primitiveFailed: #BadArg2].
r := aColor scaledRed.
g := aColor scaledGreen.
@@ -1818,44 +940,43 @@
]
].
pix := aColor colorId.
-%{ /* STACK: 64000 */
+%{ /* STACK: 64000 */
#ifdef XFT
XftColor clr;
-
- if (__INST(address_) == 0) {
- error = @symbol(BadHandle);
+ if ( ! __isExternalAddressLike(drawIdArg) ) {
+ error = @symbol(BadArg1);
goto err;
}
- if (!__isSmallInteger(pix)) {
+ if ( ! __isSmallInteger(pix) ) {
error = @symbol(BadColorId);
goto err;
}
- if (!__isSmallInteger(x)) {
- error = @symbol(BadArg2);
- goto err;
- }
- if (! __isSmallInteger(y)) {
+ if ( ! __isSmallInteger(x) ) {
error = @symbol(BadArg3);
goto err;
}
- if (!__isSmallInteger(w)) {
+ if ( ! __isSmallInteger(y) ) {
error = @symbol(BadArg4);
goto err;
}
- if (!__isSmallInteger(h)) {
+ if ( ! __isSmallInteger(w) ) {
error = @symbol(BadArg5);
goto err;
}
+ if ( ! __isSmallInteger(h) ) {
+ error = @symbol(BadArg6);
+ goto err;
+ }
clr.pixel = (unsigned long)__intVal(pix);
clr.color.red = __intVal(r);
clr.color.green = __intVal(g);
clr.color.blue = __intVal(b);
clr.color.alpha = __intVal(a);
- XftDrawRect((XftDraw*)__INST(address_), &clr,
+ XftDrawRect(XFT_DRAW(drawIdArg), &clr,
__intVal(x), __intVal(y), __intVal(w) ,__intVal(h));
- RETURN (self);
+ RETURN ( self );
err:;
#endif
%}.
@@ -1865,33 +986,65 @@
"Modified: / 31-12-2013 / 00:37:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-drawString:aString color:aColor font:fontIdArg x:x y:y from:start to:stop
+xftDrawSetClip: drawIdArg rectangle: rect
+ | error xObj yObj wObj hObj |
+
+ rect notNil ifTrue:[
+ xObj := rect left.
+ yObj := rect top.
+ wObj := rect width.
+ hObj := rect height.
+ ].
+%{ /* STACK: 64000 */
+#ifdef XFT
+ XRectangle r;
+ if ( ! __isExternalAddressLike(drawIdArg) ) {
+ error = @symbol(BadArg1);
+ goto err;
+ }
+ if (rect != nil) {
+ r.x = __intVal(xObj);
+ r.y = __intVal(yObj);
+ r.width = __intVal(wObj);
+ r.height = __intVal(hObj);
+ XftDrawSetClipRectangles( XFT_DRAW(drawIdArg) , 0, 0, &r, 1);
+ } else {
+ XftDrawSetClipRectangles( XFT_DRAW(drawIdArg) , 0, 0, (XRectangle*)NULL, 0);
+ }
+ RETURN ( self );
+ err:;
+#endif
+%}.
+ self primitiveFailed: error.
+
+ "Created: / 31-12-2013 / 01:24:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+xftDrawString: drawIdArg color: aColor font: fontIdArg x: x y: y string: text from: start to: stop
| error r g b a pix |
aColor isColor ifFalse:[^self primitiveFailed: #BadArg2].
- pix := aColor colorId.
r := aColor scaledRed.
+ g := aColor scaledGreen.
+ b := aColor scaledBlue.
+ a := aColor alpha * 65535.
r isNil ifTrue:[
"/ when drawing into a pixmap...
- pix == 0 ifTrue:[
- r := g := b := a := 0.
+ aColor colorId == 0 ifTrue:[
+ r := g := b := 0.
] ifFalse:[
- r := g := b := a := 16rFFFF.
+ r := g := b := 16rFFFF.
]
- ] ifFalse:[
- g := aColor scaledGreen.
- b := aColor scaledBlue.
- a := aColor alpha * 65535.
].
-%{ /* STACK: 64000 */
+ pix := aColor colorId.
+%{ /* STACK: 64000 */
#ifdef XFT
int _start, _stop;
int __x, __y;
XftColor clr;
-
- if (__INST(address_) == 0) {
- error = @symbol(BadHandle);
+ if ( ! __isExternalAddressLike(drawIdArg) ) {
+ error = @symbol(BadArg1);
goto err;
}
if ( ! __isSmallInteger(pix) ) {
@@ -1927,13 +1080,13 @@
clr.color.blue = __intVal(b);
clr.color.alpha = __intVal(a);
- if ( __isStringLike(aString) ) {
- XftDrawString8((XftDraw*)__INST(address_), &clr, XFT_FONT(fontIdArg),
+ if ( __isStringLike(text) ) {
+ XftDrawString8(XFT_DRAW(drawIdArg), &clr, XFT_FONT(fontIdArg),
__x, __y,
- __stringVal(aString) + (_start - 1), _stop - _start + 1);
+ __stringVal(text) + (_start - 1), _stop - _start + 1);
RETURN ( self );
} else {
- error = @symbol(BadArg1);
+ error = @symbol(BadArg5);
goto err;
}
err:;
@@ -1945,39 +1098,761 @@
"Modified: / 30-12-2013 / 20:00:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-setClipRect:rect
- | error xObj yObj wObj hObj |
+xftFontGetAscent: fontIdArg
+ | error |
+
+%{
+#ifdef XFT
+ int v;
+ if ( ! __isExternalAddressLike(fontIdArg) ) {
+ error = @symbol(BadArg1);
+ goto err;
+ }
+ v = XFT_FONT(fontIdArg)->ascent;
+ RETURN ( __MKINT( v ) );
+ err:;
+#endif
+%}.
+ self primitiveFailed: error
+
+ "Created: / 21-12-2013 / 00:56:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+xftFontGetDescent:fontIdArg
+ | error |
+
+%{
+#ifdef XFT
+ int v;
+ if ( ! __isExternalAddressLike(fontIdArg) ) {
+ error = @symbol(BadArg1);
+ goto err;
+ }
+ v = XFT_FONT(fontIdArg)->descent;
+ RETURN ( __MKINT( v ) );
+ err:;
+#endif
+%}.
+ self primitiveFailed: error
+
+ "Created: / 21-12-2013 / 00:56:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+xftFontGetHeight: fontIdArg
+ | error |
- rect notNil ifTrue:[
- xObj := rect left.
- yObj := rect top.
- wObj := rect width.
- hObj := rect height.
- ].
+%{
+#ifdef XFT
+ int v;
+ if ( ! __isExternalAddressLike(fontIdArg) ) {
+ error = @symbol(BadArg1);
+ goto err;
+ }
+ v = XFT_FONT(fontIdArg)->height;
+ RETURN ( __MKINT( v ) );
+ err:;
+#endif
+%}.
+ self primitiveFailed: error
+
+ "Created: / 21-12-2013 / 00:56:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+xftFontGetMaxAdvanceWidth: fontIdArg
+ | error |
+
+%{
+#ifdef XFT
+ int v;
+ if ( ! __isExternalAddressLike(fontIdArg) ) {
+ error = @symbol(BadArg1);
+ goto err;
+ }
+ v = XFT_FONT(fontIdArg)->max_advance_width;
+ RETURN ( __MKINT( v ) );
+ err:;
+#endif
+%}.
+ self primitiveFailed: error
+
+ "Created: / 30-12-2013 / 20:02:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+xftFontGetPattern: fontIdArg
+ | error |
+
+%{
+#ifdef XFT
+ XftPattern* p;
+ if ( ! __isExternalAddressLike(fontIdArg) ) {
+ error = @symbol(BadArg1);
+ goto err;
+ }
+ p = XFT_FONT(fontIdArg)->pattern;
+ if (p == NULL) {
+ RETURN ( nil );
+ } else {
+ RETURN ( FC_PATTERN_HANDLE_NEW ( p ) );
+ }
+ err:;
+#endif
+%}.
+ self primitiveFailed: error
+
+ "Created: / 21-12-2013 / 00:55:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+xftFontMatch: displayId screen: screen pattern: patternId
+ | error |
+
%{ /* STACK: 64000 */
#ifdef XFT
- if (__INST(address_) == 0) {
- error = @symbol(BadHandle);
+ XftPattern* p;
+ XftResult r;
+
+ if ( ! __isExternalAddressLike(displayId) ) {
+ error = @symbol(BadArg1);
+ goto err;
+ }
+ if ( ! __isSmallInteger( screen ) ) {
+ error = @symbol(BadArg2);
+ goto err;
+ }
+ if ( ! __isExternalAddressLike(patternId) ) {
+ error = @symbol(BadArg3);
goto err;
}
- if (rect != nil) {
- XRectangle r;
+
+ XftConfigSubstitute(FC_PATTERN( patternId ));
+ XftDefaultSubstitute(DISPLAY(displayId) , SCREEN( screen ), FC_PATTERN( patternId ));
+ p = XftFontMatch( DISPLAY(displayId) , SCREEN( screen ), FC_PATTERN( patternId ), &r );
+ if (p) {
+ RETURN ( FC_PATTERN_HANDLE_NEW ( p ) );
+ } else {
+ error = @symbol(XftFontMatchReturnedNull);
+ }
+ err:;
+#endif
+%}.
+ self primitiveFailed: error
+
+ "Created: / 21-12-2013 / 00:08:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+xftFontOpenPattern: displayId pattern: patternId
+ "Note: the pattern is destroyed when the font is closed"
+
+ | error |
+
+%{ /* STACK: 64000 */
+#ifdef XFT
+ XftFont* f;
+ if ( ! __isExternalAddressLike(displayId) ) {
+ error = @symbol(BadArg1);
+ goto err;
+ }
+ if ( ! __isExternalAddressLike(patternId) ) {
+ error = @symbol(BadArg2);
+ goto err;
+ }
+
+ f = XftFontOpenPattern( DISPLAY(displayId) , FC_PATTERN( patternId ) );
+ if (f == NULL) {
+ RETURN ( nil );
+ } else {
+ RETURN ( XFT_FONT_HANDLE_NEW ( f ) );
+ }
+ err:;
+#endif
+%}.
+ self primitiveFailed: error
+
+ "Created: / 20-12-2013 / 23:53:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+xftTextExtents: displayIdArg font: fontIdArg string: text from: start to: stop
+ | error extents bitsPerCharacter |
- r.x = __intVal(xObj);
- r.y = __intVal(yObj);
- r.width = __intVal(wObj);
- r.height = __intVal(hObj);
- XftDrawSetClipRectangles((XftDraw*)__INST(address_), 0, 0, &r, 1);
- } else {
- XftDrawSetClipRectangles((XftDraw*)__INST(address_), 0, 0, (XRectangle*)NULL, 0);
+ extents := Array new: 6.
+ bitsPerCharacter := text bitsPerCharacter.
+%{ /* STACK: 64000 */
+#ifdef XFT
+ XGlyphInfo info;
+ int bytesPerCharacter;
+ char *string;
+ int len;
+
+ bytesPerCharacter = __intVal(bitsPerCharacter) / 8;
+
+ if ( ! __isExternalAddressLike(displayIdArg) ) {
+ error = @symbol(BadArg1);
+ goto err;
+ }
+ if ( ! __isExternalAddressLike(fontIdArg) ) {
+ error = @symbol(BadArg2);
+ goto err;
+ }
+ if ( ! __isSmallInteger(start) ) {
+ error = @symbol(BadArg4);
+ goto err;
}
- RETURN ( self );
+ if ( ! __isSmallInteger(stop) ) {
+ error = @symbol(BadArg5);
+ goto err;
+ }
+
+ string = __stringVal( text ) + (( __intVal(start) - 1 ) * bytesPerCharacter);
+ len = __intVal(stop) - __intVal(start) + 1;
+
+
+ switch (bytesPerCharacter) {
+ case 1:
+ XftTextExtents8(DISPLAY(displayIdArg), XFT_FONT(fontIdArg), (FcChar8*)string, len, &info);
+ break;
+ case 2:
+ XftTextExtents16(DISPLAY(displayIdArg), XFT_FONT(fontIdArg), (FcChar16*)string, len, &info);
+ break;
+ case 4:
+ XftTextExtents32(DISPLAY(displayIdArg), XFT_FONT(fontIdArg), (FcChar32*)string, len, &info);
+ break;
+ }
+ __ArrayInstPtr(extents)->a_element[0] = __MKSMALLINT(info.width);
+ __ArrayInstPtr(extents)->a_element[1] = __MKSMALLINT(info.height);
+ __ArrayInstPtr(extents)->a_element[2] = __MKSMALLINT(info.x);
+ __ArrayInstPtr(extents)->a_element[3] = __MKSMALLINT(info.y);
+ __ArrayInstPtr(extents)->a_element[4] = __MKSMALLINT(info.xOff);
+ __ArrayInstPtr(extents)->a_element[5] = __MKSMALLINT(info.yOff);
+ error = nil;
err:;
#endif
%}.
- self primitiveFailed: error.
+ error notNil ifTrue:[
+ self primitiveFailed: error.
+ ^ nil.
+ ].
+ ^ extents
+
+ "Created: / 21-12-2013 / 10:42:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 30-12-2013 / 20:00:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!XftFontDescription methodsFor:'printing & storing'!
+
+storeOn:aStream
+ "append a character sequence to the argument, aStream from which the
+ receiver can be reconstructed using readFrom:."
+
+ aStream nextPutAll:'(XftFontDescription family:'. family storeOn:aStream.
+ aStream nextPutAll:' face:'. face storeOn:aStream.
+ aStream nextPutAll:' style:'. style storeOn:aStream.
+ aStream nextPutAll:' size:'. size storeOn:aStream.
+ aStream nextPutAll:' encoding:'. encoding storeOn:aStream.
+ aStream nextPut:$)
+
+ "
+ (XftFontDescription family: 'DejaVu Sans' size: 8) storeString
+ "
+! !
+
+!XftFontDescription methodsFor:'queries-dimensions'!
+
+ascent
+ "return the ascent - the number of pixels above the baseLine."
+ ascent isNil ifTrue:[
+ ascent := self xftFontGetAscent: fontId
+ ].
+ ^ ascent
+
+ "Created: / 21-12-2013 / 01:19:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+descent
+ "return the descent - the number of pixels below the baseLine."
+
+ descent isNil ifTrue:[
+ descent := self xftFontGetDescent: fontId
+ ].
+ ^ descent
+
+ "Created: / 21-12-2013 / 01:20:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+getFontMetrics
+ |info|
+
+ info := DeviceWorkstation::DeviceFontMetrics new.
+ info
+ ascent:self ascent
+ descent:self descent
+ maxAscent:self maxAscent
+ maxDescent:self maxDescent
+ minWidth:self maxWidth
+ maxWidth:self maxWidth
+ avgWidth:self maxWidth
+ minCode:self minCode
+ maxCode:self maxCode
+ direction:#LeftToRight.
+ ^ info
+!
+
+getFontResolution
+ device isNil ifTrue:[ ^ 72 @ 72 ].
+ ^ device resolution
+!
+
+height
+ "return the height - the number of pixels above plus below the baseLine."
+
+ height isNil ifTrue:[
+ height := self xftFontGetHeight: fontId
+ ].
+ ^ height
+
+ "Created: / 21-12-2013 / 01:20:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+isFixedWidth
+ "return true, if this is a fixed pitch font (i.e. all characters
+ are of the same width)"
+
+ fixedWidth isNil ifTrue:[
+ (device notNil and:[fontId notNil]) ifTrue:[
+ |w|
+
+ "/ take some obvously different chars
+ w := self widthOf:'.'.
+ ((self widthOf:'i') == w
+ and:[ (self widthOf:'W') == w
+ and:[ (self widthOf:' ') == w ]]
+ ) ifTrue:[
+ fixedWidth := w.
+ ] ifFalse:[
+ fixedWidth := false
+ ]
+ ]
+ ].
+ ^ fixedWidth notNil and:[fixedWidth isInteger]
+
+ "Created: / 21-12-2013 / 10:38:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+maxAscent
+ "return the font's maximum-ascent (i.e. the maximum of all characters);
+ That is the number of units (usually pixels) above the baseline."
+
+ ^ self ascent
+
+ "Created: / 30-12-2013 / 20:01:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+maxDescent
+ "return the font's maximum-descent (i.e. the maximum of all characters);
+ That is the number of units (usually pixels) below the baseline."
+
+ ^ self descent
+
+ "Created: / 30-12-2013 / 20:01:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+maxWidth
+ "return the font's maximum-width character (i.e. the maximum of all characters);
+ That is a number of units (usually pixels)."
+
+ (fixedWidth class == SmallInteger) ifTrue:[
+ ^ fixedWidth
+ ].
+ ^ self xftFontGetMaxAdvanceWidth: fontId
+
+ "Created: / 30-12-2013 / 20:02:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+width
+ "return the font's characters width;
+ That is a number of units (usually pixels).
+ For variable pitch fonts, the width of the space character is returned.
+ For fixed fonts, this is the same as minWidth or maxWidth (or any character).
+ The receiver must be associated to a device, for this query to be legal."
+
+ fixedWidth class == SmallInteger ifTrue:[
+ ^ fixedWidth
+ ].
+ ^ self widthOf:' '
+
+ "Modified: 30.4.1996 / 16:43:45 / cg"
+!
+
+widthOf:aString from:start to:stop
+ "return the width of a sub string"
+
+ |extents maxWidthOfSingleGlyph|
+
+ (stop < start) ifTrue:[^ 0].
+ maxWidthOfSingleGlyph := self maxWidth.
+ "xOff from XFTTextExtents is a signed short.
+ Work arond for long strings"
+ (stop - start + 1) * maxWidthOfSingleGlyph > 32767 ifTrue:[
+ |total chunkSize|
+
+ chunkSize := (32767 // maxWidthOfSingleGlyph) - 1.
+ total := 0.
+ start to:stop by:chunkSize do:[:eachChunkStart|
+ extents := self xftTextExtents:device displayId font:fontId string:aString
+ from:eachChunkStart to:((eachChunkStart+chunkSize-1) min:stop).
+ "/ extents --> #(width height x y xOff yOff)
+ total := total + extents fifth.
+ ].
+ ^ total.
+ ].
+ extents := self xftTextExtents: device displayId font:fontId string:aString from:start to:stop.
+ "/ extents --> #(width height x y xOff yOff)
+ "/ cg: shouln't this be first ?!!
+ ^ extents fifth.
+
+ "Created: / 21-12-2013 / 10:42:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 29-12-2013 / 21:16:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!XftFontDescription methodsFor:'release'!
+
+releaseFromDevice
+ "I am no longer available on the device"
+
+ Lobby unregister:self.
+ "/ cg: no, xftDrawDestroy should not be done.
+ "/ (releaseFromDevice is called when either the display connection
+ "/ is lost, or a snapshot image is restarted)
+ "/ self xftDrawDestroy.
+
+ RecentlyUsedFonts := nil.
+ device := nil.
+ fontId := nil.
+ closestFont := nil.
+
+ "Modified: / 25-11-2016 / 00:12:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!XftFontDescription methodsFor:'testing'!
+
+isScaledFont
+ "Xft fonts are always scaled"
+
+ ^ true
+!
+
+isXftFont
+ ^ true
+! !
+
+!XftFontDescription::FCFontListParser class methodsFor:'documentation'!
+
+documentation
+"
+ parses fc-list output to get a list of XftFontDescriptions
+
+ [author:]
+ cg
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+
+"
+! !
+
+!XftFontDescription::FCFontListParser methodsFor:'api'!
+
+listOfAvailableFonts
+ |readEntry list l fcListProg|
+
+ list := OrderedCollection new.
+
+ readEntry :=
+ [
+ |key|
+
+ [l startsWith:'Pattern has'] whileFalse:[
+ l := pipeStream nextLine. Transcript showCR:l.
+ ].
- "Created: / 31-12-2013 / 01:24:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ currentDescription := XftFontDescription new.
+ [ l := pipeStream nextLine. l notEmptyOrNil ] whileTrue:[
+ "/ Transcript showCR:l.
+ lineStream := l readStream. lineStream skipSeparators.
+ key := lineStream upToSeparator.
+ (
+ #('family:' 'style:' 'slant:' 'weight:' 'width:'
+ 'pixelsize:' 'spacing:' 'foundry:' 'antialias:'
+ 'file:' 'outline' 'scalable:' 'charset:' 'lang:'
+ 'fontversion:' 'fontformat:' 'decorative:' 'index:'
+ 'outline:' 'familylang:' 'stylelang:' 'fullname:'
+ 'fullnamelang:' 'capability:' 'hash:' 'postscriptname:'
+ ) includes:key
+ ) ifTrue:[
+ self perform:('fc_',(key allButLast)) asSymbol
+ ] ifFalse:[
+ Transcript show:'Xft ignored line: '; showCR:l.
+ self breakPoint:#cg.
+ ].
+ ].
+ list add:currentDescription
+ ].
+
+ fcListProg := #('/usr/bin/fc-list' '/usr/X11/bin/fc-list') detect:[:eachProg|
+ eachProg asFilename isExecutableProgram
+ ] ifNone:[
+ 'XftFontDescription [warning]: fc-list program not found - no XFT fonts' errorPrintCR.
+ ^ list.
+ ].
+
+ pipeStream := PipeStream readingFrom:fcListProg, ' -v'.
+ [
+ [pipeStream atEnd] whileFalse:[
+ l := pipeStream nextLine.
+ readEntry value.
+ ]
+ ] ensure:[
+ pipeStream close
+ ].
+ ^ list
+
+ "
+ FCFontListParser new listOfAvailableFonts
+ "
+! !
+
+!XftFontDescription::FCFontListParser methodsFor:'font list keywords'!
+
+fc_antialias
+ "helper for font listing"
+
+ currentDescription isAntialiasedFont:(self getBoolean).
+!
+
+fc_capability
+ "helper for font listing"
+
+ "currentDescription capability:" (self getString).
+!
+
+fc_charset
+ "helper for font listing"
+
+ |page bits l min max minCode maxCode|
+
+ [ l := pipeStream nextLine. l notEmpty ] whileTrue:[
+ "/ Transcript show:'->'; showCR:l.
+ (l startsWith:Character tab) ifFalse:[
+ (l startsWith:'(') ifFalse:[self halt].
+ currentDescription minCode:minCode.
+ currentDescription maxCode:maxCode.
+ ^ self.
+ ].
+
+ lineStream := l readStream.
+ lineStream skipSeparators.
+ page := Integer readFrom:(lineStream upTo:$:) radix:16.
+ lineStream next.
+ bits := 0 to:7 collect:[:i|
+ lineStream skipSeparators.
+ Integer readFrom:(lineStream upToSeparator) radix:16.
+ ].
+ min := (page * 256 + 0).
+ max := (page * 256 + 255).
+ minCode isNil ifTrue:[
+ minCode := min.
+ maxCode := max.
+ ] ifFalse:[
+ minCode := minCode min:min.
+ maxCode := maxCode max:max.
+ ].
+ ].
+ "/ currentDescription characterSet:(self getString).
+ currentDescription minCode:minCode.
+ currentDescription maxCode:maxCode.
+!
+
+fc_decorative
+ "helper for font listing"
+
+ currentDescription isDecorativeFont:(self getBoolean).
+!
+
+fc_family
+ "helper for font listing"
+
+ currentDescription family:(self getString).
+!
+
+fc_familylang
+ "helper for font listing"
+
+ "currentDescription familylang:" (self getString).
+!
+
+fc_file
+ "helper for font listing"
+
+ currentDescription file:(self getString).
+!
+
+fc_fontformat
+ "helper for font listing"
+
+ currentDescription fontFormat:(self getString).
+!
+
+fc_fontversion
+ "helper for font listing"
+
+ currentDescription fontVersion:(self getInteger).
+!
+
+fc_foundry
+ "helper for font listing"
+
+ currentDescription foundry:(self getString).
+!
+
+fc_fullname
+ "helper for font listing"
+
+ "currentDescription fullname:" (self getString).
+!
+
+fc_fullnamelang
+ "helper for font listing"
+
+ "currentDescription fullnamelang:" (self getString).
+!
+
+fc_hash
+ "helper for font listing"
+
+ "currentDescription hash:" self getString.
+!
+
+fc_index
+ "helper for font listing"
+
+ "currentDescription index:" (self getInteger).
+!
+
+fc_lang
+ "helper for font listing"
+
+ "/ currentDescription characterSet:(self getString).
+!
+
+fc_outline
+ "helper for font listing"
+
+ currentDescription isOutlineFont:(self getBoolean).
+!
+
+fc_pixelsize
+ "helper for font listing"
+
+ currentDescription setPixelSize:(self getInteger).
+ currentDescription setSizeUnit:#px.
+ "/ currentDescription setSize:(self getInteger).
+ "/ currentDescription setSizeUnit:#pt.
+!
+
+fc_postscriptname
+ "helper for font listing"
+
+ "currentDescription postscriptname:" self getString.
+!
+
+fc_scalable
+ "helper for font listing"
+
+ currentDescription isScalableFont:(self getBoolean).
+!
+
+fc_slant
+ "helper for font listing"
+
+ currentDescription slant:(self getInteger).
+!
+
+fc_spacing
+ "helper for font listing"
+
+ currentDescription spacing:(self getInteger).
+!
+
+fc_style
+ "helper for font listing"
+
+ |xftStyle|
+
+ xftStyle := self getString.
+"/ ((xftStyle includesString:'Bold') or:[xftStyle includesString:'Fett']) ifTrue:[
+"/ currentDescription face:'bold'.
+"/ currentDescription style:'roman'.
+"/ ^ self.
+"/ ].
+ ((xftStyle includesString:'Italic') or:[xftStyle includesString:'Oblique']) ifTrue:[
+"/ currentDescription face:'medium'.
+ currentDescription style:'italic'.
+ ^ self.
+ ].
+"/ (xftStyle includesString:'Regular') ifTrue:[
+"/ currentDescription face:'regular'.
+"/ currentDescription style:'roman'.
+"/ ^ self.
+"/ ].
+"/ self halt.
+"/ currentDescription face:'medium'.
+ currentDescription style:'roman'.
+!
+
+fc_stylelang
+ "helper for font listing"
+
+ "currentDescription stylelang:" (self getString).
+!
+
+fc_weight
+ "helper for font listing"
+
+ currentDescription weight:(self getInteger).
+!
+
+fc_width
+ "helper for font listing"
+
+ currentDescription width:(self getInteger).
+! !
+
+!XftFontDescription::FCFontListParser methodsFor:'helpers'!
+
+getBoolean
+ "helper for font listing"
+
+ |s|
+
+ lineStream skipSeparators.
+ s := lineStream nextAlphaNumericWord.
+ ^ s = 'FcTrue'.
+!
+
+getInteger
+ "helper for font listing"
+
+ lineStream skipSeparators.
+ ^ Integer readFrom:lineStream.
+!
+
+getString
+ "helper for font listing"
+
+ lineStream skipSeparators.
+ lineStream peekFor:$".
+ ^ (lineStream upTo:$").
! !
!XftFontDescription class methodsFor:'documentation'!
@@ -1988,6 +1863,11 @@
version_CVS
^ '$Header$'
+!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
! !
--- a/abbrev.stc Tue Jan 03 14:45:53 2017 +0100
+++ b/abbrev.stc Thu Jan 05 21:04:46 2017 +0000
@@ -10,10 +10,12 @@
DeviceHandle DeviceHandle stx:libview 'Graphics-Support' 0
DisplayTransform DisplayTransform stx:libview 'Graphics-Transformations' 0
Event Event stx:libview 'Interface-Support-UI' 0
-FillStyle FillStyle stx:libview 'Compatibility-Squeak-Balloon-Fills' 0
+FcConstants FcConstants stx:libview 'Graphics-Support-FontConfig' 0
FontDescription FontDescription stx:libview 'Graphics-Support' 0
+GraphicsAttributes GraphicsAttributes stx:libview 'Graphics-Support' 0
GraphicsContext GraphicsContext stx:libview 'Graphics-Support' 0
GraphicsDevice GraphicsDevice stx:libview 'Interface-Graphics' 0
+GraphicsMedium GraphicsMedium stx:libview 'Graphics-Support' 0
Image Image stx:libview 'Graphics-Images' 0
ImageReader ImageReader stx:libview 'Graphics-Images-Readers' 0
KeyboardForwarder KeyboardForwarder stx:libview 'Interface-Support-UI' 0
@@ -23,11 +25,11 @@
WindowSensor WindowSensor stx:libview 'Interface-Support-UI' 0
stx_libview stx_libview stx:libview '* Projects & Packages *' 3
BeveledBorder BeveledBorder stx:libview 'Graphics-Support' 0
-BitmapFillStyle BitmapFillStyle stx:libview 'Compatibility-Squeak-Balloon-Fills' 0
BitmapFont BitmapFont stx:libview 'Graphics-Support' 0
Border Border stx:libview 'Graphics-Support' 0
ColorPalette ColorPalette stx:libview 'Graphics-Images-Support' 0
CompoundFont CompoundFont stx:libview 'Graphics-Support' 0
+ControllerWithMenu ControllerWithMenu stx:libview 'Interface-Support-Controllers' 0
Depth16Image Depth16Image stx:libview 'Graphics-Images' 0
Depth1Image Depth1Image stx:libview 'Graphics-Images' 0
Depth24Image Depth24Image stx:libview 'Graphics-Images' 0
@@ -38,53 +40,46 @@
Depth64Image Depth64Image stx:libview 'Graphics-Images' 0
Depth8Image Depth8Image stx:libview 'Graphics-Images' 0
DeviceGraphicsContext DeviceGraphicsContext stx:libview 'Graphics-Support' 0
+DisplaySurface DisplaySurface stx:libview 'Graphics-Support' 0
+FcPattern FcPattern stx:libview 'Graphics-Support-FontConfig' 0
Font Font stx:libview 'Graphics-Support' 0
+Form Form stx:libview 'Compatibility-ST80-Graphics-Display Objects' 0
GradientBackground GradientBackground stx:libview 'Graphics-Support' 0
-GradientFillStyle GradientFillStyle stx:libview 'Compatibility-Squeak-Balloon-Fills' 0
HostGraphicsDevice HostGraphicsDevice stx:libview 'Interface-Graphics' 0
ImageBackground ImageBackground stx:libview 'Graphics-Support' 0
MacButtonBorder MacButtonBorder stx:libview 'Graphics-Support' 0
NoBackground NoBackground stx:libview 'Graphics-Support' 0
-OrientedFillStyle OrientedFillStyle stx:libview 'Compatibility-Squeak-Balloon-Fills' 0
RoundButtonBorder RoundButtonBorder stx:libview 'Graphics-Support' 0
ScaleTransform ScaleTransform stx:libview 'Graphics-Transformations' 0
SimpleBorder SimpleBorder stx:libview 'Graphics-Support' 0
SolidBackground SolidBackground stx:libview 'Graphics-Support' 0
-SolidFillStyle SolidFillStyle stx:libview 'Compatibility-Squeak-Balloon-Fills' 0
SynchronousWindowSensor SynchronousWindowSensor stx:libview 'Interface-Support-UI' 0
-TranslationTransform TranslationTransform stx:libview 'Graphics-Transformations' 0
TranslucentColor TranslucentColor stx:libview 'Graphics-Support' 0
ViewStyle ViewStyle stx:libview 'Views-Support' 0
WindowEvent WindowEvent stx:libview 'Interface-Support-UI' 0
XftFontDescription XftFontDescription stx:libview 'Graphics-Support' 0
+AlphaMask AlphaMask stx:libview 'Graphics-Images' 0
DeviceWorkstation DeviceWorkstation stx:libview 'Interface-Graphics' 0
+DisplayRootView DisplayRootView stx:libview 'Views-Special' 0
FixedPalette FixedPalette stx:libview 'Graphics-Images-Support' 0
-GraphicsMedium GraphicsMedium stx:libview 'Graphics-Support' 0
ImageMask ImageMask stx:libview 'Graphics-Images' 0
MacFlatButtonBorder MacFlatButtonBorder stx:libview 'Graphics-Support' 0
MappedPalette MappedPalette stx:libview 'Graphics-Images-Support' 0
RoundedBorder RoundedBorder stx:libview 'Graphics-Support' 0
+SimpleView SimpleView stx:libview 'Views-Basic' 2
WidgetEvent WidgetEvent stx:libview 'Interface-Support-UI' 0
WindowingTransformation WindowingTransformation stx:libview 'Graphics-Transformations' 0
-DisplaySurface DisplaySurface stx:libview 'Graphics-Support' 0
+XGraphicsContext XGraphicsContext stx:libview 'Interface-Graphics' 0
FixedPaletteWithAlpha FixedPaletteWithAlpha stx:libview 'Graphics-Images-Support' 0
-Form Form stx:libview 'Compatibility-ST80-Graphics-Display Objects' 0
MonoMappedPalette MonoMappedPalette stx:libview 'Graphics-Images-Support' 0
-DisplayRootView DisplayRootView stx:libview 'Views-Special' 0
-SimpleView SimpleView stx:libview 'Views-Basic' 2
+NeXTWorkstation NeXTWorkstation stx:libview 'Interface-Graphics' 0
ShadowView ShadowView stx:libview 'Views-Special' 2
View View stx:libview 'Views-Basic' 2
XEmbedContainerView XEmbedContainerView stx:libview 'Views-XEmbed' 2
XWorkstation XWorkstation stx:libview 'Interface-Graphics' 0
GLXWorkstation GLXWorkstation stx:libview 'Interface-Graphics' 0
TopView TopView stx:libview 'Views-Basic' 2
+MDIChildView MDIChildView stx:libview 'Views-Basic' 2
PopUpView PopUpView stx:libview 'Views-Basic' 2
StandardSystemView StandardSystemView stx:libview 'Views-Basic' 2
ModalBox ModalBox stx:libview 'Views-Basic' 2
-GraphicsAttributes GraphicsAttributes stx:libview 'Graphics-Support' 0
-ControllerWithMenu ControllerWithMenu stx:libview 'Interface-Support-Controllers' 0
-AlphaMask AlphaMask stx:libview 'Graphics-Images' 0
-GuiServerWorkstation GuiServerWorkstation stx:libview 'Interface-Graphics' 0
-NeXTWorkstation NeXTWorkstation stx:libview 'Interface-Graphics' 0
-MDIChildView MDIChildView stx:libview 'Views-Basic' 2
-WinWorkstation WinWorkstation stx:libview 'unknownCategory' 0
--- a/bc.mak Tue Jan 03 14:45:53 2017 +0100
+++ b/bc.mak Thu Jan 05 21:04:46 2017 +0000
@@ -47,7 +47,7 @@
!endif
-LOCALINCLUDES=$(OPTIONAL_SUPPORT_XLIB_INCLUDE) -I$(INCLUDE_TOP)\stx\libbasic
+LOCALINCLUDES=$(OPTIONAL_SUPPORT_XLIB_INCLUDE) -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libbasic2
LOCALDEFINES=
STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) $(COMMONSYMBOLS) -varPrefix=$(LIBNAME)
@@ -88,88 +88,88 @@
test: $(TOP)\goodies\builder\reports\NUL
pushd $(TOP)\goodies\builder\reports & $(MAKE_BAT)
$(TOP)\goodies\builder\reports\report-runner.bat -D . -r Builder::TestReport -p $(PACKAGE)
-
+
clean::
-del *.$(CSUFFIX)
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
-$(OUTDIR)AbstractBackground.$(O) AbstractBackground.$(C) AbstractBackground.$(H): AbstractBackground.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)AbstractBorder.$(O) AbstractBorder.$(C) AbstractBorder.$(H): AbstractBorder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)Color.$(O) Color.$(C) Color.$(H): Color.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)Colormap.$(O) Colormap.$(C) Colormap.$(H): Colormap.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(STCHDR)
-$(OUTDIR)Controller.$(O) Controller.$(C) Controller.$(H): Controller.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)Cursor.$(O) Cursor.$(C) Cursor.$(H): Cursor.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)DeviceHandle.$(O) DeviceHandle.$(C) DeviceHandle.$(H): DeviceHandle.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)DisplayTransform.$(O) DisplayTransform.$(C) DisplayTransform.$(H): DisplayTransform.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)Event.$(O) Event.$(C) Event.$(H): Event.st $(INCLUDE_TOP)\stx\libbasic\Message.$(H) $(INCLUDE_TOP)\stx\libbasic\MessageSend.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)FillStyle.$(O) FillStyle.$(C) FillStyle.$(H): FillStyle.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)FontDescription.$(O) FontDescription.$(C) FontDescription.$(H): FontDescription.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)GraphicsContext.$(O) GraphicsContext.$(C) GraphicsContext.$(H): GraphicsContext.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)GraphicsDevice.$(O) GraphicsDevice.$(C) GraphicsDevice.$(H): GraphicsDevice.st $(INCLUDE_TOP)\stx\libbasic\AllocationFailure.$(H) $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProceedableError.$(H) $(STCHDR)
-$(OUTDIR)GraphicsMedium.$(O) GraphicsMedium.$(C) GraphicsMedium.$(H): GraphicsMedium.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)Image.$(O) Image.$(C) Image.$(H): Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)ImageReader.$(O) ImageReader.$(C) ImageReader.$(H): ImageReader.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)KeyboardForwarder.$(O) KeyboardForwarder.$(C) KeyboardForwarder.$(H): KeyboardForwarder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)KeyboardMap.$(O) KeyboardMap.$(C) KeyboardMap.$(H): KeyboardMap.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Dictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\IdentityDictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\Set.$(H) $(STCHDR)
-$(OUTDIR)ResourcePack.$(O) ResourcePack.$(C) ResourcePack.$(H): ResourcePack.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Dictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\Set.$(H) $(STCHDR)
-$(OUTDIR)WindowGroup.$(O) WindowGroup.$(C) WindowGroup.$(H): WindowGroup.st $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Notification.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\Query.$(H) $(STCHDR)
-$(OUTDIR)WindowSensor.$(O) WindowSensor.$(C) WindowSensor.$(H): WindowSensor.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)stx_libview.$(O) stx_libview.$(C) stx_libview.$(H): stx_libview.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
-$(OUTDIR)BeveledBorder.$(O) BeveledBorder.$(C) BeveledBorder.$(H): BeveledBorder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBorder.$(H) $(STCHDR)
-$(OUTDIR)BitmapFillStyle.$(O) BitmapFillStyle.$(C) BitmapFillStyle.$(H): BitmapFillStyle.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\FillStyle.$(H) $(STCHDR)
-$(OUTDIR)BitmapFont.$(O) BitmapFont.$(C) BitmapFont.$(H): BitmapFont.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\FontDescription.$(H) $(STCHDR)
-$(OUTDIR)Border.$(O) Border.$(C) Border.$(H): Border.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBorder.$(H) $(STCHDR)
-$(OUTDIR)ColorPalette.$(O) ColorPalette.$(C) ColorPalette.$(H): ColorPalette.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libview\Colormap.$(H) $(STCHDR)
-$(OUTDIR)CompoundFont.$(O) CompoundFont.$(C) CompoundFont.$(H): CompoundFont.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\FontDescription.$(H) $(STCHDR)
-$(OUTDIR)Depth16Image.$(O) Depth16Image.$(C) Depth16Image.$(H): Depth16Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
-$(OUTDIR)Depth1Image.$(O) Depth1Image.$(C) Depth1Image.$(H): Depth1Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
-$(OUTDIR)Depth24Image.$(O) Depth24Image.$(C) Depth24Image.$(H): Depth24Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
-$(OUTDIR)Depth2Image.$(O) Depth2Image.$(C) Depth2Image.$(H): Depth2Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
-$(OUTDIR)Depth32Image.$(O) Depth32Image.$(C) Depth32Image.$(H): Depth32Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
-$(OUTDIR)Depth48Image.$(O) Depth48Image.$(C) Depth48Image.$(H): Depth48Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
-$(OUTDIR)Depth4Image.$(O) Depth4Image.$(C) Depth4Image.$(H): Depth4Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
-$(OUTDIR)Depth64Image.$(O) Depth64Image.$(C) Depth64Image.$(H): Depth64Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
-$(OUTDIR)Depth8Image.$(O) Depth8Image.$(C) Depth8Image.$(H): Depth8Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
-$(OUTDIR)DeviceGraphicsContext.$(O) DeviceGraphicsContext.$(C) DeviceGraphicsContext.$(H): DeviceGraphicsContext.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DeviceHandle.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsContext.$(H) $(STCHDR)
-$(OUTDIR)DisplaySurface.$(O) DisplaySurface.$(C) DisplaySurface.$(H): DisplaySurface.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(STCHDR)
-$(OUTDIR)Font.$(O) Font.$(C) Font.$(H): Font.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\FontDescription.$(H) $(STCHDR)
-$(OUTDIR)Form.$(O) Form.$(C) Form.$(H): Form.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(STCHDR)
-$(OUTDIR)GradientBackground.$(O) GradientBackground.$(C) GradientBackground.$(H): GradientBackground.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBackground.$(H) $(STCHDR)
-$(OUTDIR)GradientFillStyle.$(O) GradientFillStyle.$(C) GradientFillStyle.$(H): GradientFillStyle.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\FillStyle.$(H) $(STCHDR)
-$(OUTDIR)HostGraphicsDevice.$(O) HostGraphicsDevice.$(C) HostGraphicsDevice.$(H): HostGraphicsDevice.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsDevice.$(H) $(STCHDR)
-$(OUTDIR)ImageBackground.$(O) ImageBackground.$(C) ImageBackground.$(H): ImageBackground.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBackground.$(H) $(STCHDR)
-$(OUTDIR)MacButtonBorder.$(O) MacButtonBorder.$(C) MacButtonBorder.$(H): MacButtonBorder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBorder.$(H) $(STCHDR)
-$(OUTDIR)NoBackground.$(O) NoBackground.$(C) NoBackground.$(H): NoBackground.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBackground.$(H) $(STCHDR)
-$(OUTDIR)OrientedFillStyle.$(O) OrientedFillStyle.$(C) OrientedFillStyle.$(H): OrientedFillStyle.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\FillStyle.$(H) $(STCHDR)
-$(OUTDIR)RoundButtonBorder.$(O) RoundButtonBorder.$(C) RoundButtonBorder.$(H): RoundButtonBorder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBorder.$(H) $(STCHDR)
-$(OUTDIR)ScaleTransform.$(O) ScaleTransform.$(C) ScaleTransform.$(H): ScaleTransform.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplayTransform.$(H) $(STCHDR)
-$(OUTDIR)SimpleBorder.$(O) SimpleBorder.$(C) SimpleBorder.$(H): SimpleBorder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBorder.$(H) $(STCHDR)
-$(OUTDIR)SolidBackground.$(O) SolidBackground.$(C) SolidBackground.$(H): SolidBackground.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBackground.$(H) $(STCHDR)
-$(OUTDIR)SolidFillStyle.$(O) SolidFillStyle.$(C) SolidFillStyle.$(H): SolidFillStyle.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\FillStyle.$(H) $(STCHDR)
-$(OUTDIR)SynchronousWindowSensor.$(O) SynchronousWindowSensor.$(C) SynchronousWindowSensor.$(H): SynchronousWindowSensor.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\WindowSensor.$(H) $(STCHDR)
-$(OUTDIR)TranslationTransform.$(O) TranslationTransform.$(C) TranslationTransform.$(H): TranslationTransform.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplayTransform.$(H) $(STCHDR)
-$(OUTDIR)TranslucentColor.$(O) TranslucentColor.$(C) TranslucentColor.$(H): TranslucentColor.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Color.$(H) $(STCHDR)
-$(OUTDIR)ViewStyle.$(O) ViewStyle.$(C) ViewStyle.$(H): ViewStyle.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Dictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\Set.$(H) $(INCLUDE_TOP)\stx\libview\ResourcePack.$(H) $(STCHDR)
-$(OUTDIR)WindowEvent.$(O) WindowEvent.$(C) WindowEvent.$(H): WindowEvent.st $(INCLUDE_TOP)\stx\libbasic\Message.$(H) $(INCLUDE_TOP)\stx\libbasic\MessageSend.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Event.$(H) $(STCHDR)
-$(OUTDIR)DeviceWorkstation.$(O) DeviceWorkstation.$(C) DeviceWorkstation.$(H): DeviceWorkstation.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsDevice.$(H) $(INCLUDE_TOP)\stx\libview\HostGraphicsDevice.$(H) $(STCHDR)
-$(OUTDIR)DisplayRootView.$(O) DisplayRootView.$(C) DisplayRootView.$(H): DisplayRootView.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(STCHDR)
-$(OUTDIR)FixedPalette.$(O) FixedPalette.$(C) FixedPalette.$(H): FixedPalette.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libview\ColorPalette.$(H) $(INCLUDE_TOP)\stx\libview\Colormap.$(H) $(STCHDR)
-$(OUTDIR)ImageMask.$(O) ImageMask.$(C) ImageMask.$(H): ImageMask.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Depth1Image.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
-$(OUTDIR)MacFlatButtonBorder.$(O) MacFlatButtonBorder.$(C) MacFlatButtonBorder.$(H): MacFlatButtonBorder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBorder.$(H) $(INCLUDE_TOP)\stx\libview\SimpleBorder.$(H) $(STCHDR)
-$(OUTDIR)MappedPalette.$(O) MappedPalette.$(C) MappedPalette.$(H): MappedPalette.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libview\ColorPalette.$(H) $(INCLUDE_TOP)\stx\libview\Colormap.$(H) $(STCHDR)
-$(OUTDIR)RoundedBorder.$(O) RoundedBorder.$(C) RoundedBorder.$(H): RoundedBorder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBorder.$(H) $(INCLUDE_TOP)\stx\libview\SimpleBorder.$(H) $(STCHDR)
-$(OUTDIR)SimpleView.$(O) SimpleView.$(C) SimpleView.$(H): SimpleView.st $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Notification.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProceedingNotification.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(STCHDR)
-$(OUTDIR)WidgetEvent.$(O) WidgetEvent.$(C) WidgetEvent.$(H): WidgetEvent.st $(INCLUDE_TOP)\stx\libbasic\Message.$(H) $(INCLUDE_TOP)\stx\libbasic\MessageSend.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Event.$(H) $(INCLUDE_TOP)\stx\libview\WindowEvent.$(H) $(STCHDR)
-$(OUTDIR)WindowingTransformation.$(O) WindowingTransformation.$(C) WindowingTransformation.$(H): WindowingTransformation.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplayTransform.$(H) $(INCLUDE_TOP)\stx\libview\ScaleTransform.$(H) $(STCHDR)
-$(OUTDIR)FixedPaletteWithAlpha.$(O) FixedPaletteWithAlpha.$(C) FixedPaletteWithAlpha.$(H): FixedPaletteWithAlpha.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libview\ColorPalette.$(H) $(INCLUDE_TOP)\stx\libview\Colormap.$(H) $(INCLUDE_TOP)\stx\libview\FixedPalette.$(H) $(STCHDR)
-$(OUTDIR)MonoMappedPalette.$(O) MonoMappedPalette.$(C) MonoMappedPalette.$(H): MonoMappedPalette.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libview\ColorPalette.$(H) $(INCLUDE_TOP)\stx\libview\Colormap.$(H) $(INCLUDE_TOP)\stx\libview\MappedPalette.$(H) $(STCHDR)
-$(OUTDIR)ShadowView.$(O) ShadowView.$(C) ShadowView.$(H): ShadowView.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(STCHDR)
-$(OUTDIR)View.$(O) View.$(C) View.$(H): View.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(STCHDR)
-$(OUTDIR)TopView.$(O) TopView.$(C) TopView.$(H): TopView.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(STCHDR)
-$(OUTDIR)PopUpView.$(O) PopUpView.$(C) PopUpView.$(H): PopUpView.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\TopView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(STCHDR)
-$(OUTDIR)StandardSystemView.$(O) StandardSystemView.$(C) StandardSystemView.$(H): StandardSystemView.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\TopView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(STCHDR)
-$(OUTDIR)ModalBox.$(O) ModalBox.$(C) ModalBox.$(H): ModalBox.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\StandardSystemView.$(H) $(INCLUDE_TOP)\stx\libview\TopView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(STCHDR)
-$(OUTDIR)WinWorkstation.$(O) WinWorkstation.$(C) WinWorkstation.$(H): WinWorkstation.st $(STCHDR)
+$(OUTDIR)AbstractBackground.$(O) AbstractBackground.$(H): AbstractBackground.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)AbstractBorder.$(O) AbstractBorder.$(H): AbstractBorder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)Color.$(O) Color.$(H): Color.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)Colormap.$(O) Colormap.$(H): Colormap.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(STCHDR)
+$(OUTDIR)Controller.$(O) Controller.$(H): Controller.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)Cursor.$(O) Cursor.$(H): Cursor.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)DeviceHandle.$(O) DeviceHandle.$(H): DeviceHandle.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)DisplayTransform.$(O) DisplayTransform.$(H): DisplayTransform.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)Event.$(O) Event.$(H): Event.st $(INCLUDE_TOP)\stx\libbasic\Message.$(H) $(INCLUDE_TOP)\stx\libbasic\MessageSend.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)FontDescription.$(O) FontDescription.$(H): FontDescription.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)GraphicsContext.$(O) GraphicsContext.$(H): GraphicsContext.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)GraphicsDevice.$(O) GraphicsDevice.$(H): GraphicsDevice.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)GraphicsMedium.$(O) GraphicsMedium.$(H): GraphicsMedium.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)Image.$(O) Image.$(H): Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)ImageReader.$(O) ImageReader.$(H): ImageReader.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)KeyboardForwarder.$(O) KeyboardForwarder.$(H): KeyboardForwarder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)KeyboardMap.$(O) KeyboardMap.$(H): KeyboardMap.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Dictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\IdentityDictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\Set.$(H) $(STCHDR)
+$(OUTDIR)ResourcePack.$(O) ResourcePack.$(H): ResourcePack.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Dictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\Set.$(H) $(STCHDR)
+$(OUTDIR)WindowGroup.$(O) WindowGroup.$(H): WindowGroup.st $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Notification.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\Query.$(H) $(STCHDR)
+$(OUTDIR)WindowSensor.$(O) WindowSensor.$(H): WindowSensor.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)stx_libview.$(O) stx_libview.$(H): stx_libview.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
+$(OUTDIR)BeveledBorder.$(O) BeveledBorder.$(H): BeveledBorder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBorder.$(H) $(STCHDR)
+$(OUTDIR)BitmapFont.$(O) BitmapFont.$(H): BitmapFont.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\FontDescription.$(H) $(STCHDR)
+$(OUTDIR)Border.$(O) Border.$(H): Border.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBorder.$(H) $(STCHDR)
+$(OUTDIR)ColorPalette.$(O) ColorPalette.$(H): ColorPalette.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libview\Colormap.$(H) $(STCHDR)
+$(OUTDIR)CompoundFont.$(O) CompoundFont.$(H): CompoundFont.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\FontDescription.$(H) $(STCHDR)
+$(OUTDIR)Depth16Image.$(O) Depth16Image.$(H): Depth16Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
+$(OUTDIR)Depth1Image.$(O) Depth1Image.$(H): Depth1Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
+$(OUTDIR)Depth24Image.$(O) Depth24Image.$(H): Depth24Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
+$(OUTDIR)Depth2Image.$(O) Depth2Image.$(H): Depth2Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
+$(OUTDIR)Depth32Image.$(O) Depth32Image.$(H): Depth32Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
+$(OUTDIR)Depth48Image.$(O) Depth48Image.$(H): Depth48Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
+$(OUTDIR)Depth4Image.$(O) Depth4Image.$(H): Depth4Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
+$(OUTDIR)Depth64Image.$(O) Depth64Image.$(H): Depth64Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
+$(OUTDIR)Depth8Image.$(O) Depth8Image.$(H): Depth8Image.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
+$(OUTDIR)DeviceGraphicsContext.$(O) DeviceGraphicsContext.$(H): DeviceGraphicsContext.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DeviceHandle.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsContext.$(H) $(STCHDR)
+$(OUTDIR)DisplaySurface.$(O) DisplaySurface.$(H): DisplaySurface.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(STCHDR)
+$(OUTDIR)Font.$(O) Font.$(H): Font.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\FontDescription.$(H) $(STCHDR)
+$(OUTDIR)Form.$(O) Form.$(H): Form.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(STCHDR)
+$(OUTDIR)GradientBackground.$(O) GradientBackground.$(H): GradientBackground.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBackground.$(H) $(STCHDR)
+$(OUTDIR)HostGraphicsDevice.$(O) HostGraphicsDevice.$(H): HostGraphicsDevice.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsDevice.$(H) $(STCHDR)
+$(OUTDIR)ImageBackground.$(O) ImageBackground.$(H): ImageBackground.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBackground.$(H) $(STCHDR)
+$(OUTDIR)MacButtonBorder.$(O) MacButtonBorder.$(H): MacButtonBorder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBorder.$(H) $(STCHDR)
+$(OUTDIR)NoBackground.$(O) NoBackground.$(H): NoBackground.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBackground.$(H) $(STCHDR)
+$(OUTDIR)ScaleTransform.$(O) ScaleTransform.$(H): ScaleTransform.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplayTransform.$(H) $(STCHDR)
+$(OUTDIR)SimpleBorder.$(O) SimpleBorder.$(H): SimpleBorder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBorder.$(H) $(STCHDR)
+$(OUTDIR)SolidBackground.$(O) SolidBackground.$(H): SolidBackground.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBackground.$(H) $(STCHDR)
+$(OUTDIR)SynchronousWindowSensor.$(O) SynchronousWindowSensor.$(H): SynchronousWindowSensor.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\WindowSensor.$(H) $(STCHDR)
+$(OUTDIR)ViewStyle.$(O) ViewStyle.$(H): ViewStyle.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Dictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\Set.$(H) $(INCLUDE_TOP)\stx\libview\ResourcePack.$(H) $(STCHDR)
+$(OUTDIR)WindowEvent.$(O) WindowEvent.$(H): WindowEvent.st $(INCLUDE_TOP)\stx\libbasic\Message.$(H) $(INCLUDE_TOP)\stx\libbasic\MessageSend.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Event.$(H) $(STCHDR)
+$(OUTDIR)DeviceWorkstation.$(O) DeviceWorkstation.$(H): DeviceWorkstation.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsDevice.$(H) $(INCLUDE_TOP)\stx\libview\HostGraphicsDevice.$(H) $(STCHDR)
+$(OUTDIR)DisplayRootView.$(O) DisplayRootView.$(H): DisplayRootView.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(STCHDR)
+$(OUTDIR)ImageMask.$(O) ImageMask.$(H): ImageMask.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Depth1Image.$(H) $(INCLUDE_TOP)\stx\libview\Image.$(H) $(STCHDR)
+$(OUTDIR)MacFlatButtonBorder.$(O) MacFlatButtonBorder.$(H): MacFlatButtonBorder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBorder.$(H) $(INCLUDE_TOP)\stx\libview\SimpleBorder.$(H) $(STCHDR)
+$(OUTDIR)MappedPalette.$(O) MappedPalette.$(H): MappedPalette.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libview\ColorPalette.$(H) $(INCLUDE_TOP)\stx\libview\Colormap.$(H) $(STCHDR)
+$(OUTDIR)RoundedBorder.$(O) RoundedBorder.$(H): RoundedBorder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\AbstractBorder.$(H) $(INCLUDE_TOP)\stx\libview\SimpleBorder.$(H) $(STCHDR)
+$(OUTDIR)SimpleView.$(O) SimpleView.$(H): SimpleView.st $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Notification.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProceedingNotification.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(STCHDR)
+$(OUTDIR)WidgetEvent.$(O) WidgetEvent.$(H): WidgetEvent.st $(INCLUDE_TOP)\stx\libbasic\Message.$(H) $(INCLUDE_TOP)\stx\libbasic\MessageSend.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\Event.$(H) $(INCLUDE_TOP)\stx\libview\WindowEvent.$(H) $(STCHDR)
+$(OUTDIR)WindowingTransformation.$(O) WindowingTransformation.$(H): WindowingTransformation.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplayTransform.$(H) $(INCLUDE_TOP)\stx\libview\ScaleTransform.$(H) $(STCHDR)
+$(OUTDIR)XGraphicsContext.$(O) XGraphicsContext.$(H): XGraphicsContext.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DeviceGraphicsContext.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsContext.$(H) $(STCHDR)
+$(OUTDIR)FixedPaletteWithAlpha.$(O) FixedPaletteWithAlpha.$(H): FixedPaletteWithAlpha.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libview\ColorPalette.$(H) $(INCLUDE_TOP)\stx\libview\Colormap.$(H) $(INCLUDE_TOP)\stx\libview\FixedPalette.$(H) $(STCHDR)
+$(OUTDIR)MonoMappedPalette.$(O) MonoMappedPalette.$(H): MonoMappedPalette.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libview\ColorPalette.$(H) $(INCLUDE_TOP)\stx\libview\Colormap.$(H) $(INCLUDE_TOP)\stx\libview\MappedPalette.$(H) $(STCHDR)
+$(OUTDIR)ShadowView.$(O) ShadowView.$(H): ShadowView.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(STCHDR)
+$(OUTDIR)View.$(O) View.$(H): View.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(STCHDR)
+$(OUTDIR)TopView.$(O) TopView.$(H): TopView.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(STCHDR)
+$(OUTDIR)PopUpView.$(O) PopUpView.$(H): PopUpView.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\TopView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(STCHDR)
+$(OUTDIR)StandardSystemView.$(O) StandardSystemView.$(H): StandardSystemView.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\TopView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(STCHDR)
+$(OUTDIR)ModalBox.$(O) ModalBox.$(H): ModalBox.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\StandardSystemView.$(H) $(INCLUDE_TOP)\stx\libview\TopView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(STCHDR)
# ENDMAKEDEPEND --- do not remove this line
+
+# **Must be at end**
+
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+!IFDEF HGROOT
+$(OUTDIR)stx_libview.$(O): $(HGROOT)\.hg\dirstate
+!ENDIF
--- a/bmake.bat Tue Jan 03 14:45:53 2017 +0100
+++ b/bmake.bat Thu Jan 05 21:04:46 2017 +0000
@@ -4,6 +4,9 @@
@REM do not edit - automatically generated from ProjectDefinition
@REM -------
@SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
+@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
make.exe -N -f bc.mak %DEFINES% %*
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extensions.st Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,34 @@
+"{ Package: 'stx:libview' }"!
+
+!ConfigurableFeatures class methodsFor:'queries-features'!
+
+hasFontConfig
+%{
+#if defined(HAVE_FONTCONFIG)
+ RETURN ( true );
+#endif
+%}.
+ ^ false
+
+ "Created: / 22-02-2016 / 08:08:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!ConfigurableFeatures class methodsFor:'queries-features'!
+
+hasXFT
+%{
+#if defined(HAVE_FONTCONFIG) && defined(XFT)
+ RETURN ( true );
+#endif
+%}.
+ ^ false
+
+ "Created: / 22-02-2016 / 08:08:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!stx_libview class methodsFor:'documentation'!
+
+extensionsVersion_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
--- a/libInit.cc Tue Jan 03 14:45:53 2017 +0100
+++ b/libInit.cc Thu Jan 05 21:04:46 2017 +0000
@@ -108,98 +108,93 @@
__BEGIN_PACKAGE2__("libstx_libview__DFN", _libstx_libview_InitDefinition, "stx:libview");
_stx_137libview_Init(pass,__pRT__,snd);
- __END_PACKAGE__();
+__END_PACKAGE__();
}
-void _libstx_libview_Init(int pass, struct __vmData__ *__pRT__, OBJ snd)
-{
- __BEGIN_PACKAGE2__("libstx_libview", _libstx_libview_Init, "stx:libview");
- _AbstractBackground_Init(pass,__pRT__,snd);
- _AbstractBorder_Init(pass,__pRT__,snd);
- _Color_Init(pass,__pRT__,snd);
- _Colormap_Init(pass,__pRT__,snd);
- _Controller_Init(pass,__pRT__,snd);
- _Cursor_Init(pass,__pRT__,snd);
- _DeviceHandle_Init(pass,__pRT__,snd);
- _DisplayTransform_Init(pass,__pRT__,snd);
- _Event_Init(pass,__pRT__,snd);
- _FillStyle_Init(pass,__pRT__,snd);
- _FontDescription_Init(pass,__pRT__,snd);
- _GraphicsContext_Init(pass,__pRT__,snd);
- _GraphicsDevice_Init(pass,__pRT__,snd);
- _GraphicsMedium_Init(pass,__pRT__,snd);
- _Image_Init(pass,__pRT__,snd);
- _ImageReader_Init(pass,__pRT__,snd);
- _KeyboardForwarder_Init(pass,__pRT__,snd);
- _KeyboardMap_Init(pass,__pRT__,snd);
- _ResourcePack_Init(pass,__pRT__,snd);
- _WindowGroup_Init(pass,__pRT__,snd);
- _WindowSensor_Init(pass,__pRT__,snd);
- _stx_137libview_Init(pass,__pRT__,snd);
- _BeveledBorder_Init(pass,__pRT__,snd);
- _BitmapFillStyle_Init(pass,__pRT__,snd);
- _BitmapFont_Init(pass,__pRT__,snd);
- _Border_Init(pass,__pRT__,snd);
- _ColorPalette_Init(pass,__pRT__,snd);
- _CompoundFont_Init(pass,__pRT__,snd);
- _Depth16Image_Init(pass,__pRT__,snd);
- _Depth1Image_Init(pass,__pRT__,snd);
- _Depth24Image_Init(pass,__pRT__,snd);
- _Depth2Image_Init(pass,__pRT__,snd);
- _Depth32Image_Init(pass,__pRT__,snd);
- _Depth48Image_Init(pass,__pRT__,snd);
- _Depth4Image_Init(pass,__pRT__,snd);
- _Depth64Image_Init(pass,__pRT__,snd);
- _Depth8Image_Init(pass,__pRT__,snd);
- _DeviceGraphicsContext_Init(pass,__pRT__,snd);
- _DisplaySurface_Init(pass,__pRT__,snd);
- _Font_Init(pass,__pRT__,snd);
- _Form_Init(pass,__pRT__,snd);
- _GradientBackground_Init(pass,__pRT__,snd);
- _GradientFillStyle_Init(pass,__pRT__,snd);
- _HostGraphicsDevice_Init(pass,__pRT__,snd);
- _ImageBackground_Init(pass,__pRT__,snd);
- _MacButtonBorder_Init(pass,__pRT__,snd);
- _NoBackground_Init(pass,__pRT__,snd);
- _OrientedFillStyle_Init(pass,__pRT__,snd);
- _RoundButtonBorder_Init(pass,__pRT__,snd);
- _ScaleTransform_Init(pass,__pRT__,snd);
- _SimpleBorder_Init(pass,__pRT__,snd);
- _SolidBackground_Init(pass,__pRT__,snd);
- _SolidFillStyle_Init(pass,__pRT__,snd);
- _SynchronousWindowSensor_Init(pass,__pRT__,snd);
- _TranslationTransform_Init(pass,__pRT__,snd);
- _TranslucentColor_Init(pass,__pRT__,snd);
- _ViewStyle_Init(pass,__pRT__,snd);
- _WindowEvent_Init(pass,__pRT__,snd);
- _DeviceWorkstation_Init(pass,__pRT__,snd);
- _DisplayRootView_Init(pass,__pRT__,snd);
- _FixedPalette_Init(pass,__pRT__,snd);
- _ImageMask_Init(pass,__pRT__,snd);
- _MacFlatButtonBorder_Init(pass,__pRT__,snd);
- _MappedPalette_Init(pass,__pRT__,snd);
- _RoundedBorder_Init(pass,__pRT__,snd);
- _SimpleView_Init(pass,__pRT__,snd);
- _WidgetEvent_Init(pass,__pRT__,snd);
- _WindowingTransformation_Init(pass,__pRT__,snd);
- _FixedPaletteWithAlpha_Init(pass,__pRT__,snd);
- _MonoMappedPalette_Init(pass,__pRT__,snd);
- _ShadowView_Init(pass,__pRT__,snd);
- _View_Init(pass,__pRT__,snd);
- _TopView_Init(pass,__pRT__,snd);
- _PopUpView_Init(pass,__pRT__,snd);
- _StandardSystemView_Init(pass,__pRT__,snd);
- _ModalBox_Init(pass,__pRT__,snd);
+void _libstx_libview_Init(pass, __pRT__, snd)
+OBJ snd; struct __vmData__ *__pRT__; {
+__BEGIN_PACKAGE2__("libstx_libview", _libstx_libview_Init, "stx:libview");
+_AbstractBackground_Init(pass,__pRT__,snd);
+_AbstractBorder_Init(pass,__pRT__,snd);
+_Color_Init(pass,__pRT__,snd);
+_Colormap_Init(pass,__pRT__,snd);
+_Controller_Init(pass,__pRT__,snd);
+_Cursor_Init(pass,__pRT__,snd);
+_DeviceHandle_Init(pass,__pRT__,snd);
+_DisplayTransform_Init(pass,__pRT__,snd);
+_Event_Init(pass,__pRT__,snd);
+_FontDescription_Init(pass,__pRT__,snd);
+_GraphicsContext_Init(pass,__pRT__,snd);
+_GraphicsDevice_Init(pass,__pRT__,snd);
+_GraphicsMedium_Init(pass,__pRT__,snd);
+_Image_Init(pass,__pRT__,snd);
+_ImageReader_Init(pass,__pRT__,snd);
+_KeyboardForwarder_Init(pass,__pRT__,snd);
+_KeyboardMap_Init(pass,__pRT__,snd);
+_ResourcePack_Init(pass,__pRT__,snd);
+_WindowGroup_Init(pass,__pRT__,snd);
+_WindowSensor_Init(pass,__pRT__,snd);
+_stx_137libview_Init(pass,__pRT__,snd);
+_BeveledBorder_Init(pass,__pRT__,snd);
+_BitmapFont_Init(pass,__pRT__,snd);
+_Border_Init(pass,__pRT__,snd);
+_ColorPalette_Init(pass,__pRT__,snd);
+_CompoundFont_Init(pass,__pRT__,snd);
+_Depth16Image_Init(pass,__pRT__,snd);
+_Depth1Image_Init(pass,__pRT__,snd);
+_Depth24Image_Init(pass,__pRT__,snd);
+_Depth2Image_Init(pass,__pRT__,snd);
+_Depth32Image_Init(pass,__pRT__,snd);
+_Depth48Image_Init(pass,__pRT__,snd);
+_Depth4Image_Init(pass,__pRT__,snd);
+_Depth64Image_Init(pass,__pRT__,snd);
+_Depth8Image_Init(pass,__pRT__,snd);
+_DeviceGraphicsContext_Init(pass,__pRT__,snd);
+_DisplaySurface_Init(pass,__pRT__,snd);
+_Font_Init(pass,__pRT__,snd);
+_Form_Init(pass,__pRT__,snd);
+_GradientBackground_Init(pass,__pRT__,snd);
+_HostGraphicsDevice_Init(pass,__pRT__,snd);
+_ImageBackground_Init(pass,__pRT__,snd);
+_MacButtonBorder_Init(pass,__pRT__,snd);
+_NoBackground_Init(pass,__pRT__,snd);
+_ScaleTransform_Init(pass,__pRT__,snd);
+_SimpleBorder_Init(pass,__pRT__,snd);
+_SolidBackground_Init(pass,__pRT__,snd);
+_SynchronousWindowSensor_Init(pass,__pRT__,snd);
+_ViewStyle_Init(pass,__pRT__,snd);
+_WindowEvent_Init(pass,__pRT__,snd);
+_DeviceWorkstation_Init(pass,__pRT__,snd);
+_DisplayRootView_Init(pass,__pRT__,snd);
+_ImageMask_Init(pass,__pRT__,snd);
+_MacFlatButtonBorder_Init(pass,__pRT__,snd);
+_MappedPalette_Init(pass,__pRT__,snd);
+_RoundedBorder_Init(pass,__pRT__,snd);
+_SimpleView_Init(pass,__pRT__,snd);
+_WidgetEvent_Init(pass,__pRT__,snd);
+_WindowingTransformation_Init(pass,__pRT__,snd);
+_XGraphicsContext_Init(pass,__pRT__,snd);
+_FixedPalette_Init(pass,__pRT__,snd);
+_FixedPaletteWithAlpha_Init(pass,__pRT__,snd);
+_MonoMappedPalette_Init(pass,__pRT__,snd);
+_ShadowView_Init(pass,__pRT__,snd);
+_View_Init(pass,__pRT__,snd);
+_TopView_Init(pass,__pRT__,snd);
+_PopUpView_Init(pass,__pRT__,snd);
+_StandardSystemView_Init(pass,__pRT__,snd);
+_ModalBox_Init(pass,__pRT__,snd);
#ifdef UNIX
- _XftFontDescription_Init(pass,__pRT__,snd);
- _XEmbedContainerView_Init(pass,__pRT__,snd);
- _XWorkstation_Init(pass,__pRT__,snd);
- _GLXWorkstation_Init(pass,__pRT__,snd);
+_FcConstants_Init(pass,__pRT__,snd);
+_FcPattern_Init(pass,__pRT__,snd);
+_XftFontDescription_Init(pass,__pRT__,snd);
+_XEmbedContainerView_Init(pass,__pRT__,snd);
+_XWorkstation_Init(pass,__pRT__,snd);
+_GLXWorkstation_Init(pass,__pRT__,snd);
#endif /* UNIX */
#ifdef WIN32
- _WinWorkstation_Init(pass,__pRT__,snd);
+_WinWorkstation_Init(pass,__pRT__,snd);
#endif /* WIN32 */
-
- __END_PACKAGE__();
+_stx_137libview_extensions_Init(pass,__pRT__,snd);
+__END_PACKAGE__();
}
--- a/mingwmake.bat Tue Jan 03 14:45:53 2017 +0100
+++ b/mingwmake.bat Thu Jan 05 21:04:46 2017 +0000
@@ -4,6 +4,9 @@
@REM do not edit - automatically generated from ProjectDefinition
@REM -------
@SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
+@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
@pushd ..\rules
@call find_mingw.bat
--- a/resources/de.rs Tue Jan 03 14:45:53 2017 +0100
+++ b/resources/de.rs Thu Jan 05 21:04:46 2017 +0000
@@ -276,8 +276,17 @@
'Paste as String Literal' 'Clipboard als Literalstring einfügen'
'Open FileBrowser on It' 'Dateibrowser auf diese Datei öffnen'
+#if (Smalltalk releaseIdentification = 'Smalltalk/X jv')
+'LICENCEFILE' 'german/LICENCE_FREE_STX.html'
+#else
+# if (Smalltalk releaseIdentification = 'ST/X_free_demo_vsn')
+'LICENCEFILE' 'german/LICENCE_FREE_STX.html'
+# else
+'LICENCEFILE' 'german/LICENCE_STX.html'
+# endif
+#endif
; 'LICENCEFILE' 'doc/online/german/LICENCE_STX.html'
-'LICENCEFILE' 'german/LICENCE_STX.html'
+
'Please read the licence terms:' 'Bitte lesen Sie die Lizenzbedingungen:'
'accept licence terms' 'Lizenzbedingungen akzeptieren'
'Accept Licence Terms' 'Lizenzbedingungen akzeptieren'
--- a/resources/resources.rs Tue Jan 03 14:45:53 2017 +0100
+++ b/resources/resources.rs Thu Jan 05 21:04:46 2017 +0000
@@ -158,7 +158,15 @@
'TIME_FORMAT' ? 24
#endif
+#if (Smalltalk releaseIdentification = 'Smalltalk/X jv')
+'LICENCEFILE' 'english/LICENCE_FREE_STX.html'
+#else
+# if (Smalltalk releaseIdentification = 'ST/X_free_demo_vsn')
+'LICENCEFILE' 'english/LICENCE_FREE_STX.html'
+# else
'LICENCEFILE' 'english/LICENCE_STX.html'
+# endif
+#endif
; 'LICENCEFILE' ? 'doc/online/english/LICENCE_STX.html'
MENU_Help [ (View styleSheet at:#useQuestForHelp) == true ifTrue:'?' ifFalse:[ View resources at:'Help'] ]
--- a/stx_libview.st Tue Jan 03 14:45:53 2017 +0100
+++ b/stx_libview.st Thu Jan 05 21:04:46 2017 +0000
@@ -53,6 +53,52 @@
"
! !
+!stx_libview class methodsFor:'accessing - hg - settings'!
+
+hgEnsureCopyrightMethod
+ "If true, then #copyright method is automatically compiled in each class
+ (but iff project definition defines it)
+
+ Default is true (compile such method) but if the repository is mirror of CVS and
+ you want to merge back to CVS at some point, you may want to not compile them
+ to keep changes against CVS minimal"
+
+ ^false
+
+ "Created: / 09-10-2013 / 15:39:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+hgEnsureVersion_HGMethod
+ "If true, then #version_HG method is automatically compiled in each class.
+
+ Default is true (compile such method) but if the repository is mirror of CVS and
+ you want to merge back to CVS at some point, you may want to not compile them
+ to keep changes against CVS minimal.
+
+ If false, version_HG is compiled only in classes that has been modified
+ and commited.
+
+ Note that Mercurial can live without them
+ just fine"
+
+ ^false
+
+ "Created: / 09-10-2013 / 15:39:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+hgRemoveContainesForDeletedClasses
+ "If true, then containers for removed classes are __AUTOMATICALLY__ removed from the
+ repositoru. If false, obsolete containes are kept.
+
+ Default is true (remove obsolete containers) but if the repository is mirror of CVS and
+ you want to merge back to CVS at some point, you may want to return false to avoid deletions
+ of obsolete files. Usefull when branching off an old CVS repo with loads of mess."
+
+ ^false
+
+ "Created: / 09-10-2013 / 15:39:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!stx_libview class methodsFor:'description'!
excludedFromPreRequisites
@@ -64,31 +110,43 @@
#'stx:libview2' "TIFFReader - referenced by Image>>saveOn: "
#'stx:libwidg' "Button - referenced by ModalBox>>initialize "
#'stx:libwidg2' "ImageView - referenced by Form>>show "
+ #'stx:goodies/communication' "HTTPInterface - referenced by ImageReader class>>fromURL: "
)
!
mandatoryPreRequisites
- "list all required mandatory packages.
- Packages are mandatory, if they contain superclasses of the package's classes
- or classes which are extended by this package.
- This list can be maintained manually or (better) generated and
- updated by scanning the superclass hierarchies
- (the browser has a menu function for that)
- However, often too much is found, and you may want to explicitely
- exclude individual packages in the #excludedFromPreRequisites method."
+ "list packages which are mandatory as a prerequisite.
+ This are packages containing superclasses of my classes and classes which
+ are extended by myself.
+ They are mandatory, because we need these packages as a prerequisite for loading and compiling.
+ This method is generated automatically,
+ by searching along the inheritance chain of all of my classes."
^ #(
- #'stx:libbasic' "MessageSend - superclass of WindowEvent::ButtonMultiPressEvent "
+ #'stx:libbasic' "Collection - superclass of ColorPalette"
)
!
referencedPreRequisites
- "list all packages containing classes referenced by the packages's members.
- This list can be maintained manually or (better) generated and
- updated by looking for global variable accesses
- (the browser has a menu function for that)
- However, often too much is found, and you may want to explicitely
- exclude individual packages in the #excludedFromPreRequisites method."
+ "list packages which are a prerequisite, because they contain
+ classes which are referenced by my classes.
+ We do not need these packages as a prerequisite for compiling or loading,
+ however, a class from it may be referenced during execution and having it
+ unloaded then may lead to a runtime doesNotUnderstand error, unless the caller
+ includes explicit checks for the package being present.
+ This method is generated automatically,
+ by searching all classes (and their packages) which are referenced by my classes."
+
+ ^ #(
+ #'stx:libbasic2' "BooleanArray - referenced by Image>>floodFillAt:withValue:"
+ )
+!
+
+subProjects
+ "list packages which are known as subprojects.
+ The generated makefile will enter those and make there as well.
+ However: they are not forced to be loaded when a package is loaded;
+ for those, redefine requiredPrerequisites"
^ #(
)
@@ -188,7 +246,7 @@
-__GLXWorkstation.$(O): GLXWorkstation.st $(INCLUDE_TOP)/stx/libview/XWorkstation.H $(INCLUDE_TOP)/stx/libview/DeviceWorkstation.H $(INCLUDE_TOP)/stx/libview/HostGraphicsDevice.H $(INCLUDE_TOP)/stx/libview/GraphicsDevice.H $(INCLUDE)/stc.h
+__GLXWorkstation.$(O): GLXWorkstation.st $(INCLUDE_TOP)/stx/libview/XWorkstation.$(O) $(INCLUDE_TOP)/stx/libview/DeviceWorkstation.H $(INCLUDE_TOP)/stx/libview/HostGraphicsDevice.H $(INCLUDE_TOP)/stx/libview/GraphicsDevice.H $(INCLUDE)/stc.h
$(MAKE) $(BIG_STFILE_RULE) BIG_FILE=GLXWorkstation \
CC="$(CC)" OPT="$(OPT)" \
CLASSLIB_CC="$(CLASSLIB_CC)" CLASSLIB_OPT="$(CLASSLIB_OPT)" \
@@ -348,10 +406,12 @@
DeviceHandle
DisplayTransform
Event
- FillStyle
+ (FcConstants unix)
FontDescription
+ (GraphicsAttributes autoload)
GraphicsContext
GraphicsDevice
+ GraphicsMedium
Image
ImageReader
KeyboardForwarder
@@ -361,11 +421,11 @@
WindowSensor
#'stx_libview'
BeveledBorder
- BitmapFillStyle
BitmapFont
Border
ColorPalette
CompoundFont
+ (ControllerWithMenu autoload)
Depth16Image
Depth1Image
Depth24Image
@@ -376,64 +436,60 @@
Depth64Image
Depth8Image
DeviceGraphicsContext
+ DisplaySurface
+ (FcPattern unix)
Font
+ Form
GradientBackground
- GradientFillStyle
HostGraphicsDevice
ImageBackground
MacButtonBorder
NoBackground
- OrientedFillStyle
- RoundButtonBorder
+ (RoundButtonBorder autoload)
ScaleTransform
SimpleBorder
SolidBackground
- SolidFillStyle
SynchronousWindowSensor
- TranslationTransform
- TranslucentColor
+ (TranslucentColor autoload)
ViewStyle
WindowEvent
(XftFontDescription unix)
+ (AlphaMask autoload)
DeviceWorkstation
+ DisplayRootView
FixedPalette
- GraphicsMedium
ImageMask
MacFlatButtonBorder
MappedPalette
RoundedBorder
+ SimpleView
WidgetEvent
WindowingTransformation
- DisplaySurface
+ XGraphicsContext
FixedPaletteWithAlpha
- Form
MonoMappedPalette
- DisplayRootView
- SimpleView
+ (NeXTWorkstation autoload)
ShadowView
View
(XEmbedContainerView unix)
(XWorkstation unix)
(GLXWorkstation unix)
TopView
+ (MDIChildView autoload)
PopUpView
StandardSystemView
ModalBox
- (GraphicsAttributes autoload)
- (ControllerWithMenu autoload)
- (AlphaMask autoload)
- (GuiServerWorkstation autoload)
- (NeXTWorkstation autoload)
- (MDIChildView autoload)
(WinWorkstation win32)
)
!
extensionMethodNames
- "lists the extension methods which are to be included in the project.
- Entries are 2-element array literals, consisting of class-name and selector."
+ "list class/selector pairs of extensions.
+ A correponding method with real names must be present in my concrete subclasses"
^ #(
+ 'ConfigurableFeatures class' hasFontConfig
+ 'ConfigurableFeatures class' hasXFT
)
! !
@@ -477,5 +533,11 @@
version_CVS
^ '$Header$'
+
+!
+
+version_HG
+ ^ '$Changeset: <not expanded> $'
+
! !
--- a/styles/Adwaita.style Tue Jan 03 14:45:53 2017 +0100
+++ b/styles/Adwaita.style Thu Jan 05 21:04:46 2017 +0000
@@ -9,11 +9,11 @@
previewFileName 'viewStyleSample_adwaita.png'
#if (Language == #german) or:[Language == #de]
-comment 'an GNOME3 Adwaita angelehnter Stil (unvollständig)'
+comment 'an GNOME3 Adwaita angelehnter Stil (unvollstndig)'
#endif
#if (Language == #french) or:[Language == #fr]
-comment 'Un style qui résemble GNOME3 Adwaita (incomplet)'
+comment 'Un style qui rsemble GNOME3 Adwaita (incomplet)'
#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/FcPatternTests.st Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,99 @@
+"{ Package: 'stx:libview/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestCase subclass:#FcPatternTests
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Graphics-Support-FontConfig-Tests'
+!
+
+
+!FcPatternTests methodsFor:'running'!
+
+setUp
+ self skipIf: (Smalltalk at: #FcPattern) isNil description: 'FcPattern class not available'
+
+ "Created: / 17-02-2016 / 14:16:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 15-03-2016 / 07:52:51 / jv"
+! !
+
+!FcPatternTests methodsFor:'tests'!
+
+test_01
+ | p |
+
+ p := FcPattern new.
+ self assert: (p at: 'x' ifAbsent:[ 1 ]) = 1.
+ p at: 'x' put: 10.
+ self assert: (p at: 'x') = 10.
+ p at: 'x' add: 20.
+ self assert: (p at: 'x') = #(10 20).
+ p at: 'x' add: 30 append: false.
+ self assert: (p at: 'x') = #(30 10 20).
+ p release.
+ self should: [ p at: 'x' put: 10 ] raise: Object primitiveFailureSignal
+
+ "Created: / 17-02-2016 / 13:58:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_02
+ | p1 p2 |
+
+ p1 := FcPattern new.
+ p1 at: 'x' put: 10.
+
+ p2 := FcPattern new.
+ p2 at: 'x' put: 10.
+
+ self assert: p1 hash == p2 hash.
+ self assert: p1 = p2.
+
+ p1 removeKey: 'x'.
+ self assert: p1 ~= p2.
+
+ p2 removeKey: 'x'.
+ self assert: p1 = p2.
+
+ "Created: / 17-02-2016 / 14:57:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_03
+ | p1 p2 |
+
+ p1 := FcPattern new.
+ p1 at: 'x' put: 10.
+
+ p2 := p1 copy.
+ self assert: (p1 at: 'x') = 10.
+ self assert: (p2 at: 'x') = 10.
+
+ p1 removeKey: 'x'.
+ self assert: (p2 at: 'x') = 10.
+
+ p1 release.
+ self assert: (p2 at: 'x') = 10.
+
+ "Created: / 17-02-2016 / 14:58:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_04
+ | p1 |
+
+ p1 := FcPattern new.
+ self assert: p1 asString = ''.
+
+ p1 at: 'family' put: 'Helvetica'.
+ self assert: p1 asString = 'Helvetica'.
+
+ "Created: / 17-02-2016 / 15:01:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!FcPatternTests class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/FormTests.st Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,57 @@
+"{ Package: 'stx:libview/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestCase subclass:#FormTests
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Compatibility-ST80-Graphics-Display Objects-Tests'
+!
+
+!FormTests methodsFor:'running'!
+
+setUp
+ Display isNil ifTrue:[
+ Smalltalk openDisplay
+ ].
+ self skipIf: Display isNil description: 'Display connection not available'
+
+ "Created: / 25-04-2016 / 20:30:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!FormTests methodsFor:'tests - regression'!
+
+test_issue_25a
+ "
+ https://swing.fit.cvut.cz/projects/stx-jv/ticket/25
+ "
+ | form font |
+
+ self skipIf: ConfigurableFeatures hasXFT not description: 'XFT support not compiled in'.
+ form := Form width:32 height:32 depth:24.
+ form paint: Color black on: Color white.
+ form clear.
+ self assert: (form bits allSatisfy:[:byte | byte == 255 ]).
+ font := XftFontDescription for: SimpleView defaultFont.
+ form font: font.
+ form displayString: 'X' x: 16 y: 16.
+ self assert: (form bits anySatisfy:[:byte | byte ~~ 255 ]).
+
+ "Created: / 26-11-2016 / 00:23:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_issue_82
+ "
+ https://swing.fit.cvut.cz/projects/stx-jv/ticket/82
+ "
+ | f |
+ f := Form width:8 height:8 depth:1.
+ f colorMap:(Array with:Screen current blackColor with: Screen current whiteColor).
+ f clear.
+ f paint:(Color colorId:1).
+ self assert: (f bits allSatisfy:[:byte | byte = 0 ])
+
+ "Created: / 25-04-2016 / 20:04:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/Make.proto Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,133 @@
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: stx_libview_tests.
+#
+# Warning: once you modify this file, do not rerun
+# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
+#
+# The Makefile as generated by this Make.proto supports the following targets:
+# make - compile all st-files to a classLib
+# make clean - clean all temp files
+# make clobber - clean all
+#
+# This file contains definitions for Unix based platforms.
+# It shares common definitions with the win32-make in Make.spec.
+
+#
+# position (of this package) in directory hierarchy:
+# (must point to ST/X top directory, for tools and includes)
+TOP=../..
+INCLUDE_TOP=$(TOP)/..
+
+# subdirectories where targets are to be made:
+SUBDIRS=
+
+
+# subdirectories where Makefiles are to be made:
+# (only define if different from SUBDIRS)
+# ALLSUBDIRS=
+
+REQUIRED_SUPPORT_DIRS=
+
+# if your embedded C code requires any system includes,
+# add the path(es) here:,
+# ********** OPTIONAL: MODIFY the next lines ***
+# LOCALINCLUDES=-Ifoo -Ibar
+LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libview
+
+
+# if you need any additional defines for embedded C code,
+# add them here:,
+# ********** OPTIONAL: MODIFY the next lines ***
+# LOCALDEFINES=-Dfoo -Dbar -DDEBUG
+LOCALDEFINES=
+
+LIBNAME=libstx_libview_tests
+STCLOCALOPT='-package=$(PACKAGE)' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -headerDir=. -varPrefix=$(LIBNAME)
+
+
+# ********** OPTIONAL: MODIFY the next line ***
+# additional C-libraries that should be pre-linked with the class-objects
+LD_OBJ_LIBS=
+LOCAL_SHARED_LIBS=
+
+
+# ********** OPTIONAL: MODIFY the next line ***
+# additional C targets or libraries should be added below
+LOCAL_EXTRA_TARGETS=
+
+OBJS= $(COMMON_OBJS) $(UNIX_OBJS)
+
+
+
+all:: preMake classLibRule postMake
+
+pre_objs::
+
+
+
+
+
+
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo -n '**NOHG**'))
+stx_libview_tests.$(O): $(shell hg root)/.hg/dirstate
+endif
+
+
+
+
+# run default testsuite for this package
+test: $(TOP)/goodies/builder/reports
+ $(MAKE) -C $(TOP)/goodies/builder/reports -f Makefile.init
+ $(TOP)/goodies/builder/reports/report-runner.sh -D . -r Builder::TestReport -p $(PACKAGE)
+
+
+
+# add more install actions here
+install::
+
+# add more install actions for aux-files (resources) here
+installAux::
+
+# add more preMake actions here
+preMake::
+
+# add more postMake actions here
+postMake:: cleanjunk
+
+# build all mandatory prerequisite packages (containing superclasses) for this package
+prereq:
+ cd ../../libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ cd ../../libbasic2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ cd ../ && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ cd ../../libview2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ cd ../../goodies/sunit && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+
+
+
+# build all packages containing referenced classes for this package
+# they are not needed to compile the package (but later, to load it)
+references:
+
+
+cleanjunk::
+ -rm -f *.s *.s2
+
+clean::
+ -rm -f *.o *.H
+
+clobber:: clean
+ -rm -f *.so *.dll
+
+
+# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
+$(OUTDIR)FcPatternTests.$(O) FcPatternTests.$(C) FcPatternTests.$(H): FcPatternTests.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)FormTests.$(O) FormTests.$(C) FormTests.$(H): FormTests.st $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)stx_libview_tests.$(O) stx_libview_tests.$(C) stx_libview_tests.$(H): stx_libview_tests.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
+
+# ENDMAKEDEPEND --- do not remove this line
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/Make.spec Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,67 @@
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: stx_libview_tests.
+#
+# Warning: once you modify this file, do not rerun
+# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
+#
+# This file contains specifications which are common to all platforms.
+#
+
+# Do NOT CHANGE THESE DEFINITIONS
+# (otherwise, ST/X will have a hard time to find out the packages location from its packageID,
+# to find the source code of a class and to find the library for a package)
+MODULE=stx
+MODULE_DIR=libview/tests
+PACKAGE=$(MODULE):$(MODULE_DIR)
+
+
+# Argument(s) to the stc compiler (stc --usage).
+# -headerDir=. : create header files locally
+# (if removed, they will be created as common
+# -Pxxx : defines the package
+# -Zxxx : a prefix for variables within the classLib
+# -Dxxx : defines passed to to CC for inline C-code
+# -Ixxx : include path passed to CC for inline C-code
+# +optspace : optimized for space
+# +optspace2 : optimized more for space
+# +optspace3 : optimized even more for space
+# +optinline : generate inline code for some ST constructs
+# +inlineNew : additionally inline new
+# +inlineMath : additionally inline some floatPnt math stuff
+#
+# ********** OPTIONAL: MODIFY the next line(s) ***
+# STCLOCALOPTIMIZATIONS=+optinline +inlineNew
+# STCLOCALOPTIMIZATIONS=+optspace3
+STCLOCALOPTIMIZATIONS=+optspace3
+
+
+# Argument(s) to the stc compiler (stc --usage).
+# -warn : no warnings
+# -warnNonStandard : no warnings about ST/X extensions
+# -warnEOLComments : no warnings about EOL comment extension
+# -warnPrivacy : no warnings about privateClass extension
+# -warnUnused : no warnings about unused variables
+#
+# ********** OPTIONAL: MODIFY the next line(s) ***
+# STCWARNINGS=-warn
+# STCWARNINGS=-warnNonStandard
+# STCWARNINGS=-warnEOLComments
+STCWARNINGS=-warnNonStandard
+
+COMMON_CLASSES= \
+ FcPatternTests \
+ FormTests \
+ stx_libview_tests \
+
+
+
+
+COMMON_OBJS= \
+ $(OUTDIR_SLASH)FcPatternTests.$(O) \
+ $(OUTDIR_SLASH)FormTests.$(O) \
+ $(OUTDIR_SLASH)stx_libview_tests.$(O) \
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/Makefile.init Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,27 @@
+#
+# DO NOT EDIT
+#
+# make uses this file (Makefile) only, if there is no
+# file named "makefile" (lower-case m) in the same directory.
+# My only task is to generate the real makefile and call make again.
+# Thereafter, I am no longer used and needed.
+#
+# MACOSX caveat:
+# as filenames are not case sensitive (in a default setup),
+# we cannot use the above trick. Therefore, this file is now named
+# "Makefile.init", and you have to execute "make -f Makefile.init" to
+# get the initial makefile. This is now also done by the toplevel CONFIG
+# script.
+
+.PHONY: run
+
+run: makefile
+ $(MAKE) -f makefile
+
+#only needed for the definition of $(TOP)
+include Make.proto
+
+makefile: mf
+
+mf:
+ $(TOP)/rules/stmkmf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/abbrev.stc Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,6 @@
+# automagically generated by the project definition
+# this file is needed for stc to be able to compile modules independently.
+# it provides information about a classes filename, category and especially namespace.
+FcPatternTests FcPatternTests stx:libview/tests 'Graphics-Support-FontConfig-Tests' 1
+FormTests FormTests stx:libview/tests 'Compatibility-ST80-Graphics-Display Objects-Tests' 1
+stx_libview_tests stx_libview_tests stx:libview/tests '* Projects & Packages *' 3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/bc.mak Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,88 @@
+# $Header$
+#
+# DO NOT EDIT
+# automagically generated from the projectDefinition: stx_libview_tests.
+#
+# Warning: once you modify this file, do not rerun
+# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
+#
+# Notice, that the name bc.mak is historical (from times, when only borland c was supported).
+# This file contains make rules for the win32 platform using either borland-bcc or visual-c.
+# It shares common definitions with the unix-make in Make.spec.
+# The bc.mak supports the following targets:
+# bmake - compile all st-files to a classLib (dll)
+# bmake clean - clean all temp files
+# bmake clobber - clean all
+#
+# Historic Note:
+# this used to contain only rules to make with borland
+# (called via bmake, by "make.exe -f bc.mak")
+# this has changed; it is now also possible to build using microsoft visual c
+# (called via vcmake, by "make.exe -f bc.mak -DUSEVC")
+#
+TOP=..\..
+INCLUDE_TOP=$(TOP)\..
+
+
+
+!INCLUDE $(TOP)\rules\stdHeader_bc
+
+!INCLUDE Make.spec
+
+LIBNAME=libstx_libview_tests
+MODULE_PATH=libview\tests
+RESFILES=tests.$(RES)
+
+
+
+LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libview
+LOCALDEFINES=
+
+STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -varPrefix=$(LIBNAME)
+LOCALLIBS=
+
+OBJS= $(COMMON_OBJS) $(WIN32_OBJS)
+
+ALL:: classLibRule
+
+classLibRule: $(OUTDIR) $(OUTDIR)$(LIBNAME).dll
+
+!INCLUDE $(TOP)\rules\stdRules_bc
+
+# build all mandatory prerequisite packages (containing superclasses) for this package
+prereq:
+ pushd ..\..\libbasic & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\libbasic2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd .. & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\libview2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+ pushd ..\..\goodies\sunit & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+
+
+
+
+
+
+
+test: $(TOP)\goodies\builder\reports\NUL
+ pushd $(TOP)\goodies\builder\reports & $(MAKE_BAT)
+ $(TOP)\goodies\builder\reports\report-runner.bat -D . -r Builder::TestReport -p $(PACKAGE)
+
+clean::
+ del *.$(CSUFFIX)
+
+
+# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
+$(OUTDIR)FcPatternTests.$(O) FcPatternTests.$(C) FcPatternTests.$(H): FcPatternTests.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)FormTests.$(O) FormTests.$(C) FormTests.$(H): FormTests.st $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)stx_libview_tests.$(O) stx_libview_tests.$(C) stx_libview_tests.$(H): stx_libview_tests.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
+
+# ENDMAKEDEPEND --- do not remove this line
+
+# **Must be at end**
+
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+!IFDEF HGROOT
+$(OUTDIR)stx_libview_tests.$(O): $(HGROOT)\.hg\dirstate
+!ENDIF
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/bmake.bat Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,16 @@
+@REM -------
+@REM make using Borland bcc32
+@REM type bmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+@SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
+@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
+
+make.exe -N -f bc.mak %DEFINES% %*
+
+
+@IF "%1" EQU "test" exit /b 0
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/libInit.cc Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,41 @@
+/*
+ * $Header$
+ *
+ * DO NOT EDIT
+ * automagically generated from the projectDefinition: stx_libview_tests.
+ */
+#define __INDIRECTVMINITCALLS__
+#include <stc.h>
+
+#ifdef WIN32
+# pragma codeseg INITCODE "INITCODE"
+#endif
+
+#if defined(INIT_TEXT_SECTION) || defined(DLL_EXPORT)
+DLL_EXPORT void _libstx_libview_tests_Init() INIT_TEXT_SECTION;
+DLL_EXPORT void _libstx_libview_tests_InitDefinition() INIT_TEXT_SECTION;
+#endif
+
+extern void _FcPatternTests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
+extern void _FormTests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
+extern void _stx_137libview_137tests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);
+
+
+void _libstx_libview_tests_InitDefinition(int pass, struct __vmData__ *__pRT__, OBJ snd)
+{
+ __BEGIN_PACKAGE2__("libstx_libview_tests__DFN", _libstx_libview_tests_InitDefinition, "stx:libview/tests");
+ _stx_137libview_137tests_Init(pass,__pRT__,snd);
+
+ __END_PACKAGE__();
+}
+
+void _libstx_libview_tests_Init(int pass, struct __vmData__ *__pRT__, OBJ snd)
+{
+ __BEGIN_PACKAGE2__("libstx_libview_tests", _libstx_libview_tests_Init, "stx:libview/tests");
+ _FcPatternTests_Init(pass,__pRT__,snd);
+ _FormTests_Init(pass,__pRT__,snd);
+ _stx_137libview_137tests_Init(pass,__pRT__,snd);
+
+
+ __END_PACKAGE__();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/mingwmake.bat Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,19 @@
+@REM -------
+@REM make using mingw gnu compiler
+@REM type mingwmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+@SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
+@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
+
+@pushd ..\..\rules
+@call find_mingw.bat
+@popd
+make.exe -N -f bc.mak %DEFINES% %USEMINGW_ARG% %*
+
+
+@IF "%1" EQU "test" exit /b 0
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/stx_libview_tests.st Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,122 @@
+"{ Package: 'stx:libview/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+LibraryDefinition subclass:#stx_libview_tests
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'* Projects & Packages *'
+!
+
+
+!stx_libview_tests class methodsFor:'description'!
+
+excludedFromPreRequisites
+ "list packages which are to be explicitely excluded from the automatic constructed
+ prerequisites list. If empty, everything that is found along the inheritance of any of
+ my classes is considered to be a prerequisite package."
+
+ ^ #(
+ )
+!
+
+mandatoryPreRequisites
+ "list packages which are mandatory as a prerequisite.
+ This are packages containing superclasses of my classes and classes which
+ are extended by myself.
+ They are mandatory, because we need these packages as a prerequisite for loading and compiling.
+ This method is generated automatically,
+ by searching along the inheritance chain of all of my classes."
+
+ ^ #(
+ #'stx:goodies/sunit' "TestAsserter - superclass of FcPatternTests"
+ #'stx:libbasic' "LibraryDefinition - superclass of stx_libview_tests"
+ )
+!
+
+referencedPreRequisites
+ "list packages which are a prerequisite, because they contain
+ classes which are referenced by my classes.
+ We do not need these packages as a prerequisite for compiling or loading,
+ however, a class from it may be referenced during execution and having it
+ unloaded then may lead to a runtime doesNotUnderstand error, unless the caller
+ includes explicit checks for the package being present.
+ This method is generated automatically,
+ by searching all classes (and their packages) which are referenced by my classes."
+
+ ^ #(
+ #'stx:libview' "Color - referenced by FormTests>>test_issue_82"
+ )
+!
+
+subProjects
+ "list packages which are known as subprojects.
+ The generated makefile will enter those and make there as well.
+ However: they are not forced to be loaded when a package is loaded;
+ for those, redefine requiredPrerequisites."
+
+ ^ #(
+ )
+! !
+
+!stx_libview_tests class methodsFor:'description - contents'!
+
+classNamesAndAttributes
+ "lists the classes which are to be included in the project.
+ Each entry in the list may be: a single class-name (symbol),
+ or an array-literal consisting of class name and attributes.
+ Attributes are: #autoload or #<os> where os is one of win32, unix,..."
+
+ ^ #(
+ "<className> or (<className> attributes...) in load order"
+ FcPatternTests
+ FormTests
+ #'stx_libview_tests'
+ )
+!
+
+extensionMethodNames
+ "list class/selector pairs of extensions.
+ A correponding method with real names must be present in my concrete subclasses"
+
+ ^ #(
+ )
+! !
+
+!stx_libview_tests class methodsFor:'description - project information'!
+
+companyName
+ "Returns a company string which will appear in <lib>.rc.
+ Under win32, this is placed into the dlls file-info"
+
+ ^ 'eXept Software AG'
+!
+
+description
+ "Returns a description string which will appear in nt.def / bc.def"
+
+ ^ 'Smalltalk/X Class library'
+!
+
+legalCopyright
+ "Returns a copyright string which will appear in <lib>.rc.
+ Under win32, this is placed into the dlls file-info"
+
+ ^ 'Copyright Claus Gittinger 1988-2016\nCopyright eXept Software AG 2016'
+!
+
+productName
+ "Returns a product name which will appear in <lib>.rc.
+ Under win32, this is placed into the dlls file-info.
+ This method is usually redefined in a concrete application definition"
+
+ ^ 'Smalltalk/X'
+! !
+
+!stx_libview_tests class methodsFor:'documentation'!
+
+version_HG
+ ^ '$Changeset: <not expanded> $'
+! !
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/tests.rc Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,37 @@
+//
+// DO NOT EDIT
+// automagically generated from the projectDefinition: stx_libview_tests.
+//
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 6,2,32767,32767
+ PRODUCTVERSION 6,2,5,0
+#if (__BORLANDC__)
+ FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE
+ FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD
+ FILEOS VOS_NT_WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE VS_USER_DEFINED
+#endif
+
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ BEGIN
+ VALUE "CompanyName", "eXept Software AG\0"
+ VALUE "FileDescription", "Smalltalk/X Class library (LIB)\0"
+ VALUE "FileVersion", "6.2.32767.32767\0"
+ VALUE "InternalName", "stx:libview/tests\0"
+ VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2016\nCopyright eXept Software AG 2016\0"
+ VALUE "ProductName", "Smalltalk/X\0"
+ VALUE "ProductVersion", "6.2.5.0\0"
+ VALUE "ProductDate", "Wed, 17 Feb 2016 14:16:56 GMT\0"
+ END
+
+ END
+
+ BLOCK "VarFileInfo"
+ BEGIN // Language | Translation
+ VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual
+ END
+END
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/vcmake.bat Thu Jan 05 21:04:46 2017 +0000
@@ -0,0 +1,23 @@
+@REM -------
+@REM make using Microsoft Visual C compiler
+@REM type vcmake, and wait...
+@REM do not edit - automatically generated from ProjectDefinition
+@REM -------
+
+@if not defined VSINSTALLDIR (
+ pushd ..\..\rules
+ call vcsetup.bat
+ popd
+)
+@SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
+@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
+
+
+make.exe -N -f bc.mak -DUSEVC=1 %DEFINES% %*
+
+
+@IF "%1" EQU "test" exit /b 0
+
+
--- a/vcmake.bat Tue Jan 03 14:45:53 2017 +0100
+++ b/vcmake.bat Thu Jan 05 21:04:46 2017 +0000
@@ -10,6 +10,10 @@
popd
)
@SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
+@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
+
make.exe -N -f bc.mak -DUSEVC=1 %DEFINES% %*