--- a/JavaVM.st Mon Oct 19 15:07:03 1998 +0000
+++ b/JavaVM.st Mon Oct 19 22:39:53 1998 +0000
@@ -3677,10 +3677,11 @@
"/ workaround win32 bug (use 01:01:01 as base)
delta := AbsoluteTime now millisecondDeltaFrom:(AbsoluteTime day:1 month:1 year:1970 hour:1 minutes:1 seconds:1).
delta := delta - 3600 - 60 - 1.
+delta := delta bitAnd:16r7FFFFFFF.
^ delta max:0
"Created: / 3.1.1998 / 03:25:50 / cg"
- "Modified: / 12.9.1998 / 16:53:09 / cg"
+ "Modified: / 19.10.1998 / 23:33:40 / cg"
!
_System_initProperties:nativeContext
@@ -5662,6 +5663,37 @@
"Modified: / 8.1.1998 / 17:33:08 / cg"
!
+_WComponentPeer_nativeHandleEvent:nativeContext
+ "this is invoked by java, to let a widget handle any event which
+ was not consumed (eaten) by java.
+ If the view in question is some ST-widget, forward it.
+ Ignore for JavaViews."
+
+ |view jEv stEv|
+
+^self.
+ view := self viewForWPeer:nativeContext.
+ view notNil ifTrue:[
+ (view isKindOf:JavaView) ifFalse:[
+ jEv := nativeContext argAt:1.
+ stEv := jEv instVarNamed:'data'.
+ (stEv notNil and:[stEv ~~ 0]) ifTrue:[
+ EventTrace == true ifTrue:[
+ ('JAVA: WComponent - handleEvent: ' , stEv type , ' for ' , view printString) infoPrintCR.
+ ].
+ stEv sendEventWithFocusOn:nil.
+ ^ self.
+ ]
+ ]
+ ].
+ EventTrace == true ifTrue:[
+ ('JAVA: WComponent - handleEvent ignored') infoPrintCR.
+ ]
+
+ "Created: / 19.10.1998 / 21:26:16 / cg"
+ "Modified: / 19.10.1998 / 23:26:37 / cg"
+!
+
_WComponentPeer_requestFocus:nativeContext
|view|
@@ -6043,7 +6075,7 @@
!
_WGraphics_changeClip:nativeContext
- |gc x y w h bool|
+ |gc x y w h r bool|
gc := self gcForWGraphics:nativeContext.
@@ -6057,10 +6089,12 @@
h := nativeContext argAt:4.
bool := (nativeContext argAt:5) ~~ 0.
-"/ gc clipRect:(Rectangle left:x top:y width:w height:h).
+ r := Rectangle left:x top:y width:w height:h.
+"/ 'clip: ' print. r printCR.
+ gc clippingRectangle:r.
"Created: / 6.1.1998 / 20:57:21 / cg"
- "Modified: / 25.1.1998 / 12:51:55 / cg"
+ "Modified: / 19.10.1998 / 23:39:53 / cg"
!
_WGraphics_clearRect:nativeContext
@@ -6436,27 +6470,29 @@
|gc rect r x y w h|
gc := self gcForWGraphics:nativeContext.
-"/ gc isNil ifTrue:[^ self].
+"/ gc isNil ifTrue:[^ nil].
rect := (Java classForName:'java.awt.Rectangle') basicNew.
(gc isMemberOf:JavaView) ifTrue:[
- r := gc getNextUpdateRectangle.
- r isNil ifTrue:[
- x := y := 0.
- w := (gc width).
- h := (gc height).
- ] ifFalse:[
- x := (r left).
- y := (r top).
- w := (r width).
- h := (r height).
- ]
+ "/ r := gc clippingRectangleOrNil.
+ r := gc getNextUpdateRectangle.
+ r isNil ifTrue:[
+"/ ^ nil.
+ x := y := 0.
+ w := (gc width).
+ h := (gc height).
+ ] ifFalse:[
+ x := (r left).
+ y := (r top).
+ w := (r width).
+ h := (r height).
+ ]
] ifFalse:[
- x := y := 0.
+ x := y := 0.
"/ w := h := 9999.
- w := (gc width).
- h := (gc height).
+ w := (gc width).
+ h := (gc height).
].
rect instVarNamed:'x' put:x.
rect instVarNamed:'y' put:y.
@@ -6469,7 +6505,7 @@
^ rect
"Created: / 6.1.1998 / 20:58:07 / cg"
- "Modified: / 17.1.1998 / 12:08:48 / cg"
+ "Modified: / 19.10.1998 / 23:38:14 / cg"
!
_WGraphics_imageCreate:nativeContext
@@ -8004,6 +8040,6 @@
!JavaVM class methodsFor:'documentation'!
version
- ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaVM.st,v 1.42 1998/10/19 15:07:03 cg Exp $'
+ ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaVM.st,v 1.43 1998/10/19 22:38:02 cg Exp $'
! !
JavaVM initialize!
--- a/JavaView.st Mon Oct 19 15:07:03 1998 +0000
+++ b/JavaView.st Mon Oct 19 22:39:53 1998 +0000
@@ -98,24 +98,26 @@
!
exposeX:x y:y width:w height:h
- |ev|
+ |ev rect|
+
+ rect := Rectangle left:x top:y width:w height:h.
"/ 'JavaView expose' printCR.
updateRegions isNil ifTrue:[
updateRegions := OrderedCollection new.
].
- updateRegions add:(Rectangle left:x top:y width:w height:h).
+ updateRegions add:rect.
eventReceiver notNil ifTrue:[
ev := WindowEvent
damageFor:self
- rectangle:(Rectangle left:x top:y width:w height:h).
+ rectangle:rect.
eventReceiver processEvent:ev.
].
- super exposeX:x y:y width:w height:h
+"/ super exposeX:x y:y width:w height:h
"Created: / 18.8.1997 / 15:00:24 / cg"
- "Modified: / 6.2.1998 / 00:57:04 / cg"
+ "Modified: / 19.10.1998 / 23:10:15 / cg"
!
keyPress:key x:x y:y
@@ -181,5 +183,5 @@
!JavaView class methodsFor:'documentation'!
version
- ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaView.st,v 1.12 1998/04/09 20:51:22 cg Exp $'
+ ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaView.st,v 1.13 1998/10/19 22:39:53 cg Exp $'
! !