--- a/XWorkstation.st Fri Aug 02 21:07:46 1996 +0200
+++ b/XWorkstation.st Fri Aug 02 22:39:59 1996 +0200
@@ -3412,240 +3412,240 @@
__INST(altDown) = (ke->state & __intVal(__INST(altModifierMask))) ? true : false;
__INST(metaDown) = (ke->state & __intVal(__INST(metaModifierMask))) ? true : false;
#endif
- __INST(shiftDown) = (ewe->state & ShiftMask) ? true : false;
- __INST(ctrlDown) = (ewe->state & ControlMask) ? true : false;
-
- (*peS.ilc_func)(self,
- @symbol(pointerEnter:x:y:view:)
- COMMA_CON, nil, &peS,
- __MKSMALLINT(ewe->state),
- __MKSMALLINT(ewe->x),
- __MKSMALLINT(ewe->y),
- theView);
- break;
-
- case LeaveNotify:
- (*plS.ilc_func)(self,
- @symbol(pointerLeave:view:)
- COMMA_CON, nil, &plS,
- __MKSMALLINT(lwe->state),
- theView);
- break;
-
- case GraphicsExpose:
- (*gexpS.ilc_func)(self,
- @symbol(graphicExposeX:y:width:height:view:)
- COMMA_CON, nil, &gexpS,
- __MKSMALLINT(ee->x),
- __MKSMALLINT(ee->y),
- __MKSMALLINT(ee->width),
- __MKSMALLINT(ee->height),
- theView);
-
- if (ee->count != 0) {
- break;
- }
- /* fall into */
-
- case NoExpose:
- (*nexpS.ilc_func)(self,
- @symbol(noExposeView:)
- COMMA_CON, nil, &nexpS,
- theView);
- break;
-
- case Expose:
- (*expS.ilc_func)(self,
- @symbol(exposeX:y:width:height:view:)
- COMMA_CON, nil, &expS,
- __MKSMALLINT(ee->x),
- __MKSMALLINT(ee->y),
- __MKSMALLINT(ee->width),
- __MKSMALLINT(ee->height),
- theView);
- break;
-
- case ConfigureNotify:
- if (ce->above != None) {
- siblingID = __MKOBJ(ce->above);
- sibling = (*vid.ilc_func)(self, @symbol(viewFromId:)
- COMMA_CON, nil, &vid, siblingID);
- }
-
- (*confS.ilc_func)(self,
- @symbol(configureX:y:width:height:view:)
- COMMA_CON, nil, &confS,
- __MKSMALLINT(ce->x),
- __MKSMALLINT(ce->y),
- __MKSMALLINT(ce->width),
- __MKSMALLINT(ce->height),
- theView);
- if (sibling != nil) {
- (*coveredS.ilc_func)(self,
- @symbol(coveredBy:view:)
- COMMA_CON, nil, &coveredS,
- theView,
- sibling);
- }
- break;
-
- case ClientMessage:
- if (ev->xclient.message_type == (int) _AtomVal(__INST(protocolsAtom))) {
- if ((ev->xclient.data.l[0] == (int) _AtomVal(__INST(quitAppAtom)))
- || (ev->xclient.data.l[0] == (int) _AtomVal(__INST(deleteWindowAtom)))) {
- (*termS.ilc_func)(self,
- @symbol(terminateView:)
- COMMA_CON, nil, &termS, theView);
- break;
- }
- if (ev->xclient.data.l[0] == (int) _AtomVal(__INST(saveYourselfAtom))) {
- (*savtermS.ilc_func)(self,
- @symbol(saveAndTerminateView:)
- COMMA_CON, nil, &savtermS, theView);
- break;
- }
- }
- break;
-
- case DestroyNotify:
- (*destrS.ilc_func)(self, @symbol(destroyedView:)
- COMMA_CON, nil, &destrS, theView);
- break;
-
- case UnmapNotify:
- (*unmapS.ilc_func)(self, @symbol(unmappedView:)
- COMMA_CON, nil, &unmapS, theView);
- break;
-
- case MapNotify:
- (*mapS.ilc_func)(self,
- @symbol(mappedView:)
- COMMA_CON, nil, &mapS, theView);
- break;
-
- case KeymapNotify:
- (*keymap.ilc_func)(theView,
- @symbol(keyMapChange)
- COMMA_CON, nil, &keymap);
- break;
-
- case VisibilityNotify:
- switch (ve->state) {
- case VisibilityUnobscured:
- arg = @symbol(unobscured);
- break;
- case VisibilityPartiallyObscured:
- arg = @symbol(partiallyObscured);
- break;
- case VisibilityFullyObscured:
- arg = @symbol(fullyObscured);
- break;
- }
- (*vis.ilc_func)(theView, @symbol(visibilityChange:) COMMA_CON, nil, &vis, arg);
- break;
-
- case CreateNotify:
- (*created.ilc_func)(theView, @symbol(created) COMMA_CON, nil, &created);
- break;
-
- case MapRequest:
- (*mapReq.ilc_func)(theView, @symbol(mapRequest) COMMA_CON, nil, &mapReq);
- break;
-
- case ReparentNotify:
- (*repar.ilc_func)(theView, @symbol(reparented) COMMA_CON, nil, &repar);
- break;
-
- case ConfigureRequest:
- (*confReq.ilc_func)(theView, @symbol(configRequest) COMMA_CON, nil, &confReq);
- break;
-
- case GravityNotify:
- case ResizeRequest:
- (*resReq.ilc_func)(theView, @symbol(resizeRequest) COMMA_CON, nil, &resReq);
- break;
-
- case CirculateNotify:
- case CirculateRequest:
- break;
-
- case PropertyNotify:
- (*prop.ilc_func)(theView,
- @symbol(propertyChange)
- COMMA_CON, nil, &prop);
- break;
-
- case SelectionClear:
- selectionID = __MKATOMOBJ(ev->xselectionclear.selection);
- (*selClear.ilc_func)(theView,
- @symbol(selectionClear:)
- COMMA_CON, nil, &selClear,
- selectionID);
- break;
-
- case SelectionNotify:
- /*
- * returned selection value (answer from SelectionRequest)
- */
- DPRINTF(("SelectionNotify prop=%x target=%x selection= %x requestor=%x\n",
- ev->xselection.property, ev->xselection.target,
- ev->xselection.selection, ev->xselection.requestor));
-
- propertyID = __MKATOMOBJ(ev->xselection.property);
- targetID = __MKATOMOBJ(ev->xselection.target);
- selectionID = __MKATOMOBJ(ev->xselection.selection);
- requestorID = __MKOBJ(ev->xselection.requestor);
- (*selNotify.ilc_func)(theView,
- @symbol(selectionNotify:target:selection:from:)
- COMMA_CON, nil, &selNotify,
- propertyID, targetID, selectionID, requestorID);
- break;
-
- case SelectionRequest:
- /*
- * someone wants the selection
- */
- DPRINTF(("SelectionRequest prop=%x target=%x selection=%x requestor=%x\n",
- ev->xselectionrequest.property,
- ev->xselectionrequest.target,
- ev->xselectionrequest.selection,
- ev->xselectionrequest.requestor));
-
- propertyID = __MKATOMOBJ(ev->xselectionrequest.property);
- targetID = __MKATOMOBJ(ev->xselectionrequest.target);
- selectionID = __MKATOMOBJ(ev->xselectionrequest.selection);
- requestorID = __MKOBJ(ev->xselectionrequest.requestor);
- (*selReq.ilc_func)(theView,
- @symbol(selectionRequest:target:selection:from:)
- COMMA_CON, nil, &selReq,
- propertyID, targetID, selectionID, requestorID);
- break;
-
- case ColormapNotify:
- (*colormap.ilc_func)(theView,
- @symbol(colorMapChange)
- COMMA_CON, nil, &colormap);
- break;
-
- case MappingNotify:
- switch(mape->request) {
- case MappingModifier:
- arg = @symbol(mappingModifier);
- break;
- case MappingKeyboard:
- arg = @symbol(mappingKeyboard);
- break;
- case MappingPointer:
- arg = @symbol(mappingPointer);
- break;
- default:
- arg = nil;
- break;
- }
- (*mapping.ilc_func)(self,
- @symbol(mappingChanged:event:)
- COMMA_CON, nil, &mapping, arg, eB);
- break;
+ __INST(shiftDown) = (ewe->state & ShiftMask) ? true : false;
+ __INST(ctrlDown) = (ewe->state & ControlMask) ? true : false;
+
+ (*peS.ilc_func)(self,
+ @symbol(pointerEnter:x:y:view:)
+ COMMA_CON, nil, &peS,
+ __MKSMALLINT(ewe->state),
+ __MKSMALLINT(ewe->x),
+ __MKSMALLINT(ewe->y),
+ theView);
+ break;
+
+ case LeaveNotify:
+ (*plS.ilc_func)(self,
+ @symbol(pointerLeave:view:)
+ COMMA_CON, nil, &plS,
+ __MKSMALLINT(lwe->state),
+ theView);
+ break;
+
+ case GraphicsExpose:
+ (*gexpS.ilc_func)(self,
+ @symbol(graphicExposeX:y:width:height:view:)
+ COMMA_CON, nil, &gexpS,
+ __MKSMALLINT(ee->x),
+ __MKSMALLINT(ee->y),
+ __MKSMALLINT(ee->width),
+ __MKSMALLINT(ee->height),
+ theView);
+
+ if (ee->count != 0) {
+ break;
+ }
+ /* fall into */
+
+ case NoExpose:
+ (*nexpS.ilc_func)(self,
+ @symbol(noExposeView:)
+ COMMA_CON, nil, &nexpS,
+ theView);
+ break;
+
+ case Expose:
+ (*expS.ilc_func)(self,
+ @symbol(exposeX:y:width:height:view:)
+ COMMA_CON, nil, &expS,
+ __MKSMALLINT(ee->x),
+ __MKSMALLINT(ee->y),
+ __MKSMALLINT(ee->width),
+ __MKSMALLINT(ee->height),
+ theView);
+ break;
+
+ case ConfigureNotify:
+ if (ce->above != None) {
+ siblingID = __MKOBJ(ce->above);
+ sibling = (*vid.ilc_func)(self, @symbol(viewFromId:)
+ COMMA_CON, nil, &vid, siblingID);
+ }
+
+ (*confS.ilc_func)(self,
+ @symbol(configureX:y:width:height:view:)
+ COMMA_CON, nil, &confS,
+ __MKSMALLINT(ce->x),
+ __MKSMALLINT(ce->y),
+ __MKSMALLINT(ce->width),
+ __MKSMALLINT(ce->height),
+ theView);
+ if (sibling != nil) {
+ (*coveredS.ilc_func)(self,
+ @symbol(coveredBy:view:)
+ COMMA_CON, nil, &coveredS,
+ theView,
+ sibling);
+ }
+ break;
+
+ case ClientMessage:
+ if (ev->xclient.message_type == (int) _AtomVal(__INST(protocolsAtom))) {
+ if ((ev->xclient.data.l[0] == (int) _AtomVal(__INST(quitAppAtom)))
+ || (ev->xclient.data.l[0] == (int) _AtomVal(__INST(deleteWindowAtom)))) {
+ (*termS.ilc_func)(self,
+ @symbol(terminateView:)
+ COMMA_CON, nil, &termS, theView);
+ break;
+ }
+ if (ev->xclient.data.l[0] == (int) _AtomVal(__INST(saveYourselfAtom))) {
+ (*savtermS.ilc_func)(self,
+ @symbol(saveAndTerminateView:)
+ COMMA_CON, nil, &savtermS, theView);
+ break;
+ }
+ }
+ break;
+
+ case DestroyNotify:
+ (*destrS.ilc_func)(self, @symbol(destroyedView:)
+ COMMA_CON, nil, &destrS, theView);
+ break;
+
+ case UnmapNotify:
+ (*unmapS.ilc_func)(self, @symbol(unmappedView:)
+ COMMA_CON, nil, &unmapS, theView);
+ break;
+
+ case MapNotify:
+ (*mapS.ilc_func)(self,
+ @symbol(mappedView:)
+ COMMA_CON, nil, &mapS, theView);
+ break;
+
+ case KeymapNotify:
+ (*keymap.ilc_func)(theView,
+ @symbol(keyMapChange)
+ COMMA_CON, nil, &keymap);
+ break;
+
+ case VisibilityNotify:
+ switch (ve->state) {
+ case VisibilityUnobscured:
+ arg = @symbol(unobscured);
+ break;
+ case VisibilityPartiallyObscured:
+ arg = @symbol(partiallyObscured);
+ break;
+ case VisibilityFullyObscured:
+ arg = @symbol(fullyObscured);
+ break;
+ }
+ (*vis.ilc_func)(theView, @symbol(visibilityChange:) COMMA_CON, nil, &vis, arg);
+ break;
+
+ case CreateNotify:
+ (*created.ilc_func)(theView, @symbol(created) COMMA_CON, nil, &created);
+ break;
+
+ case MapRequest:
+ (*mapReq.ilc_func)(theView, @symbol(mapRequest) COMMA_CON, nil, &mapReq);
+ break;
+
+ case ReparentNotify:
+ (*repar.ilc_func)(theView, @symbol(reparented) COMMA_CON, nil, &repar);
+ break;
+
+ case ConfigureRequest:
+ (*confReq.ilc_func)(theView, @symbol(configRequest) COMMA_CON, nil, &confReq);
+ break;
+
+ case GravityNotify:
+ case ResizeRequest:
+ (*resReq.ilc_func)(theView, @symbol(resizeRequest) COMMA_CON, nil, &resReq);
+ break;
+
+ case CirculateNotify:
+ case CirculateRequest:
+ break;
+
+ case PropertyNotify:
+ (*prop.ilc_func)(theView,
+ @symbol(propertyChange)
+ COMMA_CON, nil, &prop);
+ break;
+
+ case SelectionClear:
+ selectionID = __MKATOMOBJ(ev->xselectionclear.selection);
+ (*selClear.ilc_func)(theView,
+ @symbol(selectionClear:)
+ COMMA_CON, nil, &selClear,
+ selectionID);
+ break;
+
+ case SelectionNotify:
+ /*
+ * returned selection value (answer from SelectionRequest)
+ */
+ DPRINTF(("SelectionNotify prop=%x target=%x selection= %x requestor=%x\n",
+ ev->xselection.property, ev->xselection.target,
+ ev->xselection.selection, ev->xselection.requestor));
+
+ propertyID = __MKATOMOBJ(ev->xselection.property);
+ targetID = __MKATOMOBJ(ev->xselection.target);
+ selectionID = __MKATOMOBJ(ev->xselection.selection);
+ requestorID = __MKOBJ(ev->xselection.requestor);
+ (*selNotify.ilc_func)(theView,
+ @symbol(selectionNotify:target:selection:from:)
+ COMMA_CON, nil, &selNotify,
+ propertyID, targetID, selectionID, requestorID);
+ break;
+
+ case SelectionRequest:
+ /*
+ * someone wants the selection
+ */
+ DPRINTF(("SelectionRequest prop=%x target=%x selection=%x requestor=%x\n",
+ ev->xselectionrequest.property,
+ ev->xselectionrequest.target,
+ ev->xselectionrequest.selection,
+ ev->xselectionrequest.requestor));
+
+ propertyID = __MKATOMOBJ(ev->xselectionrequest.property);
+ targetID = __MKATOMOBJ(ev->xselectionrequest.target);
+ selectionID = __MKATOMOBJ(ev->xselectionrequest.selection);
+ requestorID = __MKOBJ(ev->xselectionrequest.requestor);
+ (*selReq.ilc_func)(theView,
+ @symbol(selectionRequest:target:selection:from:)
+ COMMA_CON, nil, &selReq,
+ propertyID, targetID, selectionID, requestorID);
+ break;
+
+ case ColormapNotify:
+ (*colormap.ilc_func)(theView,
+ @symbol(colorMapChange)
+ COMMA_CON, nil, &colormap);
+ break;
+
+ case MappingNotify:
+ switch(mape->request) {
+ case MappingModifier:
+ arg = @symbol(mappingModifier);
+ break;
+ case MappingKeyboard:
+ arg = @symbol(mappingKeyboard);
+ break;
+ case MappingPointer:
+ arg = @symbol(mappingPointer);
+ break;
+ default:
+ arg = nil;
+ break;
+ }
+ (*mapping.ilc_func)(self,
+ @symbol(mappingChanged:event:)
+ COMMA_CON, nil, &mapping, arg, eB);
+ break;
}
#undef ae
#undef ee
@@ -4173,26 +4173,6 @@
!XWorkstation methodsFor:'font stuff'!
-ascentOf:aFontId
- "the normal ascent"
-
-%{ /* NOCONTEXT */
-
- XFontStruct *f;
-
- if (ISCONNECTED) {
- if (__isExternalAddress(aFontId)) {
- f = _FontVal(aFontId);
- if (f) {
- RETURN ( __MKSMALLINT(f->ascent) );
- }
- }
- }
-%}.
- self primitiveFailed.
- ^ nil
-!
-
createFontFor:aFontName
"a basic method for X-font allocation; this method allows
any font to be aquired (even those not conforming to
@@ -4348,26 +4328,6 @@
"Modified: 4.7.1996 / 11:12:25 / stefan"
!
-descentOf:aFontId
- "the normal descent"
-
-%{ /* NOCONTEXT */
-
- XFontStruct *f;
-
- if (ISCONNECTED) {
- if (__isExternalAddress(aFontId)) {
- f = _FontVal(aFontId);
- if (f) {
- RETURN ( __MKSMALLINT(f->descent) );
- }
- }
- }
-%}.
- self primitiveFailed.
- ^ nil
-!
-
encodingOf:aFontId
"the fonts encoding - if the font does not provide that info,
return nil (and assume #ascii, which is a subset of #iso8859)."
@@ -4958,85 +4918,6 @@
"Modified: 17.4.1996 / 15:27:57 / cg"
!
-maxAscentOf:aFontId
- "the max ascent"
-
-%{ /* NOCONTEXT */
-
- XFontStruct *f;
-
- if (ISCONNECTED) {
- if (__isExternalAddress(aFontId)) {
- f = _FontVal(aFontId);
- if (f) {
- RETURN ( __MKSMALLINT(f->max_bounds.ascent) );
- }
- }
- }
-%}.
- self primitiveFailed.
- ^ nil
-!
-
-maxDescentOf:aFontId
- "the max descent"
-
-%{ /* NOCONTEXT */
-
- XFontStruct *f;
-
- if (ISCONNECTED) {
- if (__isExternalAddress(aFontId)) {
- f = _FontVal(aFontId);
- if (f) {
- RETURN ( __MKSMALLINT(f->max_bounds.descent) );
- }
- }
- }
-%}.
- self primitiveFailed.
- ^ nil
-!
-
-maxWidthOfFont:aFontId
- "the width of the widest character"
-
-%{ /* NOCONTEXT */
-
- XFontStruct *f;
-
- if (ISCONNECTED) {
- if (__isExternalAddress(aFontId)) {
- f = _FontVal(aFontId);
- if (f) {
- RETURN ( __MKSMALLINT(f->max_bounds.width) );
- }
- }
- }
-%}.
- self primitiveFailed.
- ^ nil
-!
-
-minWidthOfFont:aFontId
-
-%{ /* NOCONTEXT */
-
- XFontStruct *f;
-
- if (ISCONNECTED) {
- if (__isExternalAddress(aFontId)) {
- f = _FontVal(aFontId);
- if (f) {
- RETURN ( __MKSMALLINT(f->min_bounds.width) );
- }
- }
- }
-%}.
- self primitiveFailed.
- ^ nil
-!
-
releaseFont:aFontId
%{ /* NOCONTEXT */
@@ -8156,6 +8037,6 @@
!XWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.163 1996-08-01 16:05:44 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.164 1996-08-02 20:39:05 cg Exp $'
! !
XWorkstation initialize!