--- a/GLXWorkstation.st Thu Nov 02 12:37:30 1995 +0100
+++ b/GLXWorkstation.st Thu Nov 02 19:54:11 1995 +0100
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.29 1995-09-19 14:58:21 claus Exp $
+$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.30 1995-11-02 18:53:32 cg Exp $
'!
!GLXWorkstation class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.29 1995-09-19 14:58:21 claus Exp $
+$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.30 1995-11-02 18:53:32 cg Exp $
"
!
@@ -173,6 +173,7 @@
* put/pack them into corresponding c variables.
*
*/
+#ifdef OLD
#if defined(hpux) && defined(POSITIVE_ADDRESSES)
# define MKDPY(o) (Display *)((int)(o) & ~TAG_INT)
# define MKWIN(o) (Window)((int)(o) & ~TAG_INT)
@@ -180,6 +181,12 @@
# define MKDPY(o) (Display *)(__intVal(o))
# define MKWIN(o) (Window)(__intVal(o))
#endif
+#else
+# undef MKOBJ
+# define MKOBJ(ptr) (__MKEXTERNALADDRESS(ptr))
+# define MKDPY(o) (Display *)(__externalAddressVal(o))
+# define MKWIN(o) (Window)(__externalAddressVal(o))
+#endif
#define myDpy MKDPY(_INST(displayId))
#define ISCONNECTED (_INST(displayId) != nil)
@@ -193,7 +200,7 @@
if (! ISCONNECTED ) { \
RETURN (false); \
} \
- if (! __isSmallInteger(aGLXWindowId)) { \
+ if (! __isExternalAddress(aGLXWindowId)) { \
RETURN (false); \
} \
if (GLXwinset(myDpy, MKWIN(aGLXWindowId)) < 0) { \
@@ -1267,7 +1274,7 @@
if (__isSmallInteger(xpos) && __isSmallInteger(ypos)
&& __isSmallInteger(wwidth) && __isSmallInteger(wheight)) {
- if (__isSmallInteger(wsuperViewId)) {
+ if (__isExternalAddress(wsuperViewId)) {
parentWindow = MKWIN(wsuperViewId);
} else {
parentWindow = RootWindow(dpy, screen);
@@ -1298,8 +1305,7 @@
windowId = MKOBJ(newWindow);
}
-%}
-.
+%}.
windowId notNil ifTrue:[
self addKnownView:aView withId:windowId.
].
@@ -1309,7 +1315,7 @@
unlinkGLXView:aGLXWindowId
"remove X/GLX link"
%{
- if (__isSmallInteger(aGLXWindowId)) {
+ if (__isExternalAddress(aGLXWindowId)) {
ENTERGLX;
GLXUnlinkWindow(myDpy, MKWIN(aGLXWindowId));
LEAVEGLX;
@@ -7654,7 +7660,7 @@
int mode;
Window win;
- if (ISCONNECTED && __isSmallInteger(aWindowId)) {
+ if (ISCONNECTED && __isExternalAddress(aWindowId)) {
win = _WindowVal(aWindowId);
mode = XSGIQueryStereoMode(myDpy, win);
switch (mode) {
@@ -7699,7 +7705,7 @@
if (ISCONNECTED
&& __bothSmallInteger(h, o)
- && __isSmallInteger(aWindowId)) {
+ && __isExternalAddress(aWindowId)) {
win = _WindowVal(aWindowId);
if ((aModeSymbol == nil)
|| (aModeSymbol == false)
@@ -7746,7 +7752,7 @@
Window win;
if (ISCONNECTED
- && __isSmallInteger(aWindowId)) {
+ && __isExternalAddress(aWindowId)) {
win = _WindowVal(aWindowId);
if (aBufferSymbol == @symbol(left)) {
buffer = STEREO_BUFFER_LEFT;