195 gcForWGraphics: nativeContext |
195 gcForWGraphics: nativeContext |
196 |jGraphics gc orgX orgY trans tX tY| |
196 |jGraphics gc orgX orgY trans tX tY| |
197 |
197 |
198 jGraphics := nativeContext receiver. |
198 jGraphics := nativeContext receiver. |
199 O_WGgraphics_pData isNil ifTrue:[ |
199 O_WGgraphics_pData isNil ifTrue:[ |
200 O_WGgraphics_pData := (jGraphics class instVarOffsetOf:'pData'). |
200 O_WGgraphics_pData := (jGraphics class instVarIndexFor:'pData'). |
201 ]. |
201 ]. |
202 O_WGgraphics_originX isNil ifTrue:[ |
202 O_WGgraphics_originX isNil ifTrue:[ |
203 O_WGgraphics_originX := (jGraphics class instVarOffsetOf:'originX'). |
203 O_WGgraphics_originX := (jGraphics class instVarIndexFor:'originX'). |
204 ]. |
204 ]. |
205 O_WGgraphics_originY isNil ifTrue:[ |
205 O_WGgraphics_originY isNil ifTrue:[ |
206 O_WGgraphics_originY := (jGraphics class instVarOffsetOf:'originY'). |
206 O_WGgraphics_originY := (jGraphics class instVarIndexFor:'originY'). |
207 ]. |
207 ]. |
208 gc := jGraphics instVarAt:O_WGgraphics_pData. |
208 gc := jGraphics instVarAt:O_WGgraphics_pData. |
209 |
209 |
210 trans := gc translation. |
210 trans := gc translation. |
211 tX := trans x. |
211 tX := trans x. |
214 "/ tY := gc translationY. |
214 "/ tY := gc translationY. |
215 |
215 |
216 orgX := jGraphics instVarAt:O_WGgraphics_originX. |
216 orgX := jGraphics instVarAt:O_WGgraphics_originX. |
217 orgY := jGraphics instVarAt:O_WGgraphics_originY. |
217 orgY := jGraphics instVarAt:O_WGgraphics_originY. |
218 ((orgX ~~ tX) or:[orgY ~~ tY]) ifTrue:[ |
218 ((orgX ~~ tX) or:[orgY ~~ tY]) ifTrue:[ |
219 gc translation:orgX@orgY |
219 gc translation:orgX@orgY |
220 ]. |
220 ]. |
221 ^ gc |
221 ^ gc |
222 |
222 |
223 "Created: / 8.1.1998 / 00:16:38 / cg" |
223 "Created: / 8.1.1998 / 00:16:38 / cg" |
224 "Modified: / 23.12.1998 / 20:27:35 / cg" |
224 "Modified: / 23.12.1998 / 20:27:35 / cg" |
321 |
321 |
322 jPeer := nativeContext receiver. |
322 jPeer := nativeContext receiver. |
323 |
323 |
324 "/ sigh; pData was renamed to pNativeWidget in jdk1.2 ... |
324 "/ sigh; pData was renamed to pNativeWidget in jdk1.2 ... |
325 O_FramePeer_pNativeWidget isNil ifTrue:[ |
325 O_FramePeer_pNativeWidget isNil ifTrue:[ |
326 O_FramePeer_pNativeWidget := (jPeer class instVarOffsetOf:'pNativeWidget'). |
326 O_FramePeer_pNativeWidget := (jPeer class instVarIndexFor:'pNativeWidget'). |
327 O_FramePeer_pNativeWidget isNil ifTrue:[ |
327 O_FramePeer_pNativeWidget isNil ifTrue:[ |
328 O_FramePeer_pNativeWidget := 0. |
328 O_FramePeer_pNativeWidget := 0. |
329 O_FramePeer_pData isNil ifTrue:[ |
329 O_FramePeer_pData isNil ifTrue:[ |
330 O_FramePeer_pData := (jPeer class instVarOffsetOf:'pData'). |
330 O_FramePeer_pData := (jPeer class instVarIndexFor:'pData'). |
331 ]. |
331 ]. |
332 ] |
332 ] |
333 ]. |
333 ]. |
334 O_FramePeer_pNativeWidget > 0 ifTrue:[ |
334 O_FramePeer_pNativeWidget > 0 ifTrue:[ |
335 "/ ok, we are < 1.2 |
335 "/ ok, we are < 1.2 |
4971 "/ for now: a kludge to create an embedded frame for |
4971 "/ for now: a kludge to create an embedded frame for |
4972 "/ mozillaFrames |
4972 "/ mozillaFrames |
4973 |
4973 |
4974 jFrame := jFramePeer instVarNamed:'target'. |
4974 jFrame := jFramePeer instVarNamed:'target'. |
4975 (jFrame notNil |
4975 (jFrame notNil |
4976 and:[(pDataIdx := jFrame class instVarOffsetOf:'pData') notNil]) |
4976 and:[(pDataIdx := jFrame class instVarIndexFor:'pData') notNil]) |
4977 ifTrue:[ |
4977 ifTrue:[ |
4978 ((frame := jFrame instVarAt:pDataIdx) notNil |
4978 ((frame := jFrame instVarAt:pDataIdx) notNil |
4979 and:[frame ~~ 0]) ifTrue:[ |
4979 and:[frame ~~ 0]) ifTrue:[ |
4980 WindowCreationTrace == true ifTrue:[ |
4980 WindowCreationTrace == true ifTrue:[ |
4981 Logger |
4981 Logger |
4982 log:'JAVA: targetFrame view already created: ' |
4982 log:'JAVA: targetFrame view already created: ' |
4983 severity:Logger severityTRACE |
4983 severity:Logger severityTRACE |
4984 facility:#JVM. |
4984 facility:#JVM. |
4985 ]. |
4985 ]. |
4986 "/ sigh; pData was renamed to pNativeWidget in jdk1.2 ... |
4986 "/ sigh; pData was renamed to pNativeWidget in jdk1.2 ... |
4987 pDataIdx := jFramePeer class instVarOffsetOf:'pNativeWidget'. |
4987 pDataIdx := jFramePeer class instVarIndexFor:'pNativeWidget'. |
4988 pDataIdx isNil ifTrue:[ |
4988 pDataIdx isNil ifTrue:[ |
4989 "/ ok, we are < 1.2 |
4989 "/ ok, we are < 1.2 |
4990 pDataIdx := jFramePeer class instVarOffsetOf:'pData'. |
4990 pDataIdx := jFramePeer class instVarIndexFor:'pData'. |
4991 ]. |
4991 ]. |
4992 jFramePeer instVarAt:pDataIdx put:frame. |
4992 jFramePeer instVarAt:pDataIdx put:frame. |
4993 ] |
4993 ] |
4994 ] ifFalse:[ |
4994 ] ifFalse:[ |
4995 frame := jFramePeer instVarNamed:'pData' |
4995 frame := jFramePeer instVarNamed:'pData' |