--- a/XWorkstation.st Tue Jul 23 16:26:17 1996 +0200
+++ b/XWorkstation.st Tue Jul 23 17:10:47 1996 +0200
@@ -11,7 +11,7 @@
"
DeviceWorkstation subclass:#XWorkstation
- instanceVariableNames:'screen hasShapeExtension hasFaxExtension hasShmExtension
+ instanceVariableNames:'screen hasShapeExtension hasShmExtension
hasDPSExtension hasMbufExtension hasXVideoExtension hasSaveUnder
hasPEXExtension hasImageExtension hasInputExtension
ignoreBackingStore blackpixel whitepixel protocolsAtom
@@ -113,14 +113,6 @@
#endif
/*
- * this is a non-standard fax-image decompression extension
- * (only found in megascan servers ported by myself)
- */
-#ifdef FAX
-# include <X11/extensions/XFAXImage.h>
-#endif
-
-/*
* PEX extension - if available
*/
#ifdef PEX5
@@ -774,18 +766,6 @@
"
!
-hasFax
- "return true, if this workstation supports decompression of fax images.
- Both the server must support it, and the feature must have been
- enabled in the smalltalk system, for true to be returned."
-
- ^ hasFaxExtension
-
- "
- Display hasFaxExtension
- "
-!
-
hasImageExtension
"return true, if this workstation supports the X image extension.
Both the server must support it, and the feature must have been
@@ -1088,60 +1068,6 @@
^ nil
!
-createFaxImageFromArray:data width:w height:h type:type k:k msbFirst:msbFirst
- "create a new faxImage in the workstation
- type: 0 -> uncompressed
- 1 -> group3 1D (k is void)
- 2 -> group3 2D
- 3 -> group4 2D (k is void)"
-
- |nBytes|
-
- hasFaxExtension ifFalse:[^ nil].
- nBytes := data size.
-%{
-#ifdef FAX
- Display *dpy = myDpy;
- int screen = __intVal(__INST(screen));
- FAXImage newImage;
- int _type, _msb, _k = 0;
- unsigned char *bits;
-
- if (__bothSmallInteger(w, h)
- && __bothSmallInteger(type, k)
- && __isSmallInteger(nBytes)
- && __isByteArray(data)) {
- if (msbFirst == true)
- _msb = 1;
- else
- _msb = 0;
- _type = __intVal(type);
- if ((_type < 0) || (_type > 3)) {
- RETURN ( nil );
- }
- if (_type == 2) {
- if (! __isSmallInteger(k)) {
- RETURN ( nil );
- }
- _k = __intVal(k);
- }
- bits = __ByteArrayInstPtr(data)->ba_element;
- BEGIN_INTERRUPTSBLOCKED
- newImage = XFAXImageCreateImage(dpy, __intVal(w), __intVal(h),
- _type, _k, _msb,
- __intVal(nBytes), bits);
- END_INTERRUPTSBLOCKED
- RETURN ( (newImage != (FAXImage)0) ? __MKOBJ(newImage) : nil );
- }
-#else
- RETURN ( nil );
-#endif
-%}
-.
- self primitiveFailed.
- ^ nil
-!
-
createPixmapWidth:w height:h depth:d
"allocate a pixmap on the Xserver, the contents is undefined
(i.e. random). Return a bitmap id or nil"
@@ -1505,22 +1431,6 @@
^ windowId
!
-destroyFaxImage:aFaxImageId
-
-%{ /* NOCONTEXT */
-
-#ifdef FAX
- if (__isExternalAddress(aFaxImageId)) {
- BEGIN_INTERRUPTSBLOCKED
- XFAXImageFreeImage(myDpy, (FAXImage)_WindowVal(aFaxImageId));
- END_INTERRUPTSBLOCKED
- RETURN ( self );
- }
-#endif
-%}.
- self primitiveFailed
-!
-
destroyGC:aGCId
%{ /* NOCONTEXT */
@@ -2382,42 +2292,8 @@
!XWorkstation methodsFor:'drawing'!
-copyFromFaxImage:sourceId x:srcX y:srcY to:destId x:dstX y:dstY
- width:w height:h with:aGCId scaleX:scaleX scaleY:scaleY
-
- "do a bit-blt of a compressed FAX image
- - this needs my private FAX extension"
-
-%{ /* NOCONTEXT */
-#ifdef FAX
- GC gc;
- FAXImage source;
- Drawable dest;
-
- if (__isExternalAddress(aGCId)
- && __isExternalAddress(sourceId)
- && __isExternalAddress(destId)
- && __bothSmallInteger(scaleX, scaleY)
- && __bothSmallInteger(w, h)
- && __bothSmallInteger(srcX, srcY)
- && __bothSmallInteger(dstX, dstY)) {
- gc = _GCVal(aGCId);
- source = (FAXImage) _WindowVal(sourceId);
- dest = (Drawable) _WindowVal(destId);
- XFAXImageCopyImage(myDpy, source, dest, gc,
- __intVal(srcX), __intVal(srcY),
- __intVal(w), __intVal(h),
- __intVal(dstX), __intVal(dstY),
- __intVal(scaleX), __intVal(scaleY));
- RETURN ( self );
- }
-#endif
-%}.
- self primitiveFailed
-!
-
-copyFromId:sourceId x:srcX y:srcY to:destId x:dstX y:dstY
- width:w height:h with:aGCId
+copyFromId:sourceId x:srcX y:srcY gc:srcGCId to:destId x:dstX y:dstY gc:dstGCId
+ width:w height:h
"do a bit-blt; copy bits from the rectangle defined by
srcX/srcY and w/h from the sourceId drawable to the rectangle
below dstX/dstY in the destId drawable. Trigger an error if any
@@ -2428,13 +2304,13 @@
GC gc;
Drawable source, dest;
- if (__isExternalAddress(aGCId)
+ if (__isExternalAddress(dstGCId)
&& __isExternalAddress(sourceId)
&& __isExternalAddress(destId)
&& __bothSmallInteger(w, h)
&& __bothSmallInteger(srcX, srcY)
&& __bothSmallInteger(dstX, dstY)) {
- gc = _GCVal(aGCId);
+ gc = _GCVal(dstGCId);
source = (Drawable) _WindowVal(sourceId);
dest = (Drawable) _WindowVal(destId);
XCopyArea(myDpy, source, dest, gc,
@@ -2450,8 +2326,8 @@
self primitiveFailed
!
-copyPlaneFromId:sourceId x:srcX y:srcY to:destId x:dstX y:dstY
- width:w height:h with:aGCId
+copyPlaneFromId:sourceId x:srcX y:srcY gc:srcGCId to:destId x:dstX y:dstY gc:dstGCId
+ width:w height:h
"do a bit-blt, but only copy the low-bit plane;
copy bits from the rectangle defined by
srcX/srcY and w/h from the sourceId drawable to the rectangle
@@ -2463,13 +2339,13 @@
GC gc;
Drawable source, dest;
- if (__isExternalAddress(aGCId)
+ if (__isExternalAddress(dstGCId)
&& __isExternalAddress(sourceId)
&& __isExternalAddress(destId)
&& __bothSmallInteger(w, h)
&& __bothSmallInteger(srcX, srcY)
&& __bothSmallInteger(dstX, dstY)) {
- gc = _GCVal(aGCId);
+ gc = _GCVal(dstGCId);
source = (Drawable) _WindowVal(sourceId);
dest = (Drawable) _WindowVal(destId);
XCopyPlane(myDpy, source, dest, gc,
@@ -6137,13 +6013,6 @@
#endif
__INST(hasShmExtension) = false;
-#ifdef FAX
- if (XFAXImageQueryExtension(dpy, &faxEventBase, &faxErrorBase))
- __INST(hasFaxExtension) = true;
- else
-#endif
- __INST(hasFaxExtension) = false;
-
#ifdef DPS
if (XQueryExtension(dpy, "DPSExtension", &dummy, &dummy, &dummy))
__INST(hasDPSExtension) = true;
@@ -8219,6 +8088,6 @@
!XWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.156 1996-07-23 14:26:17 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.157 1996-07-23 15:10:47 cg Exp $'
! !
XWorkstation initialize!