JavaNativeMethodImpl_OpenJDK6.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 30 Jan 2013 18:02:21 +0000
branchrefactoring-vmdata
changeset 2012 70b8ba5c825e
parent 2011 d23c9902d6a6
child 2016 6afb298c7403
permissions -rw-r--r--
Ported rest of IO natives not to use nativeContext.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1969
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
 New code and modifications done at SWING Research Group [1]:
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
                            SWING Research Group, Czech Technical University in Prague
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
 This software is furnished under a license and may be used
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
 only in accordance with the terms of that license and with the
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
 inclusion of the above copyright notice.   This software may not
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
 be provided or otherwise made available to, or used by, any
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
 other person.  No title to or ownership of the software is
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
 hereby transferred.
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
 [1] Code written at SWING Research Group contains a signature
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
     of one of the above copright owners. For exact set of such code,
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
     see the differences between this version and version stx:libjava
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
     as of 1.9.2010
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
"
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
"{ Package: 'stx:libjava' }"
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
Object subclass:#JavaNativeMethodImpl_OpenJDK6
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
	instanceVariableNames:''
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
	classVariableNames:''
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
	poolDictionaries:'JavaVMData'
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
	category:'Languages-Java-Support-OpenJDK6'
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
!
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'documentation'!
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
copyright
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
"
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
 New code and modifications done at SWING Research Group [1]:
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    37
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    39
                            SWING Research Group, Czech Technical University in Prague
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
 This software is furnished under a license and may be used
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
 only in accordance with the terms of that license and with the
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
 inclusion of the above copyright notice.   This software may not
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
 be provided or otherwise made available to, or used by, any
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
 other person.  No title to or ownership of the software is
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
 hereby transferred.
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
 [1] Code written at SWING Research Group contains a signature
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
     of one of the above copright owners. For exact set of such code,
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    50
     see the differences between this version and version stx:libjava
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    51
     as of 1.9.2010
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
"
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
!
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
documentation
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    57
"
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
    This class implements all native methods of Open JDK 6.
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    59
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
    [author:]
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    61
        Jan Vrany <jan.vrany@fit.cvut.cz>
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    62
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    63
    [instance variables:]
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    64
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    65
    [class variables:]
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    66
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    67
    [see also:]
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    68
        JavaVM
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    69
        JavaVMData
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    70
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    71
"
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    72
! !
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    73
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    74
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'helpers'!
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    75
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    76
nativeContext
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    77
    "Return a context (JavaContext) of the native method
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    78
     being executed. Should be used only by certain methods
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    79
     like getCallingClassLoader or so"
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    80
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    81
    | ctx |
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    82
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    83
    ctx := thisContext sender.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    84
    [ ctx isJavaContext ] whileFalse:[
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    85
        ctx := ctx sender.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    86
    ].
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    87
    self assert: ctx method notNil.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    88
    self assert: ctx method isJavaMethod.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    89
    self assert: ctx method isNative.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    90
    ^ctx.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    91
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    92
    "Created: / 30-01-2013 / 14:11:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    93
! !
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
    94
2011
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
    95
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'helpers - awt - UNPORTED'!
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
    96
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
    97
commonReshapeComponent: nativeContext
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
    98
    |view x y width height ext menu|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
    99
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   100
    view := self viewForWPeer: nativeContext.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   101
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   102
    x := nativeContext argAt:1.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   103
    y := nativeContext argAt:2.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   104
    width := nativeContext argAt:3.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   105
    height := nativeContext argAt:4.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   106
    ext := width@height.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   107
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   108
"/    'pReshape ' print. view print.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   109
"/    ' ' print. x print. '/' print. y print.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   110
"/    ' extent: ' print. ext printNL.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   111
    view isPopUpView ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   112
	view origin:x@y extent:ext.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   113
    ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   114
	(view isTopView
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   115
	or:[view isMemberOf:JavaEmbeddedFrameView]) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   116
	    "/
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   117
	    "/ dont allow setting the origin
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   118
	    "/
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   119
	    menu := self topViewsMenu:view.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   120
	    menu notNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   121
		"/ must add the menus height
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   122
		height := height + menu height.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   123
		ext := width@height.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   124
	    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   125
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   126
	    "/ to prevent a view from not being visible/closable
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   127
	    "/ in case Java goes mad ..
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   128
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   129
	    (width < 30
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   130
	    or:[height < 10]) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   131
		"/ self halt.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   132
		width := 30.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   133
		height := 20.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   134
		ext := width@height.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   135
	    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   136
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   137
	    view extent:ext.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   138
	    (view isKindOf:ModalBox) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   139
		view preferredExtent:ext
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   140
	    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   141
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   142
	    "/ adjust non-resizable views min/max
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   143
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   144
	    view isTopView ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   145
		view minExtent notNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   146
		    view minExtent:ext.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   147
		    view maxExtent:ext
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   148
		].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   149
	    ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   150
	] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   151
	    (view superView notNil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   152
	    and:[view superView isTopView]) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   153
		menu := self topViewsMenu:view superView.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   154
		menu notNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   155
		    "/ must add menus height to yPos
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   156
		    y := y + menu height.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   157
		]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   158
	    ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   159
		"/ post a configuration event
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   160
		EventTrace == true ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   161
		    'JAVA: configure: need event' printCR.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   162
		]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   163
	    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   164
	    (x isNil or:[y isNil]) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   165
		Transcript showCR:'bad args to reshape'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   166
	    ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   167
		view origin:x@y extent:ext.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   168
	    ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   169
	].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   170
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   171
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   172
    view isJavaView ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   173
	view invalidate.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   174
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   175
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   176
    ^ nil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   177
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   178
    "Created: / 4.1.1998 / 18:00:52 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   179
    "Modified: / 5.12.1998 / 13:34:20 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   180
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   181
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   182
createdWindowsView:aView for:aJavaPeer
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   183
    "this is only sent with the sun.awt.windows toolkit"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   184
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   185
    aJavaPeer instVarNamed:'pData' put:aView.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   186
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   187
    JavaWindowGroup isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   188
	JavaWindowGroup := WindowGroup new.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   189
	JavaWindowGroup isForModalSubview:true.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   190
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   191
    aView windowGroup:JavaWindowGroup.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   192
    JavaWindowGroup addView:aView.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   193
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   194
    KnownWindows isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   195
	KnownWindows := IdentityDictionary new.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   196
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   197
    KnownWindows at:aJavaPeer put:aView.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   198
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   199
    FirstWindowCreationSemaphore signalIf.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   200
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   201
"/'*** ' print. aJavaPeer print. ' -> ' print. aView printCR.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   202
"/(aView isKindOf:ModalBox) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   203
"/    self halt.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   204
"/].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   205
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   206
    "Created: / 4.1.1998 / 17:57:16 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   207
    "Modified: / 28.1.1998 / 22:40:19 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   208
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   209
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   210
gcForWGraphics: nativeContext
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   211
    |jGraphics gc orgX orgY trans tX tY|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   212
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   213
    jGraphics := nativeContext receiver.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   214
    O_WGgraphics_pData isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   215
	O_WGgraphics_pData := (jGraphics class instVarOffsetOf:'pData').
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   216
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   217
    O_WGgraphics_originX isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   218
	O_WGgraphics_originX := (jGraphics class instVarOffsetOf:'originX').
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   219
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   220
    O_WGgraphics_originY isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   221
	O_WGgraphics_originY := (jGraphics class instVarOffsetOf:'originY').
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   222
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   223
    gc := jGraphics instVarAt:O_WGgraphics_pData.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   224
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   225
    trans := gc translation.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   226
    tX := trans x.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   227
    tY := trans y.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   228
"/    tX := gc translationX.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   229
"/    tY := gc translationY.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   230
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   231
    orgX := jGraphics instVarAt:O_WGgraphics_originX.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   232
    orgY := jGraphics instVarAt:O_WGgraphics_originY.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   233
    ((orgX ~~ tX) or:[orgY ~~ tY]) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   234
	gc translation:orgX@orgY
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   235
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   236
    ^ gc
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   237
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   238
    "Created: / 8.1.1998 / 00:16:38 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   239
    "Modified: / 23.12.1998 / 20:27:35 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   240
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   241
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   242
jPeerForView:aView
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   243
    ^ KnownWindows keyAtValue:aView ifAbsent:nil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   244
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   245
    "Created: / 15.1.1998 / 13:48:01 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   246
    "Modified: / 15.1.1998 / 13:48:43 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   247
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   248
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   249
pReshape: nativeContext
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   250
    |jFramePeer view x y width height menu|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   251
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   252
    jFramePeer := nativeContext receiver.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   253
    view := jFramePeer instVarNamed:'pData'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   254
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   255
    x := nativeContext argAt:1.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   256
    y := nativeContext argAt:2.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   257
    width := nativeContext argAt:3.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   258
    height := nativeContext argAt:4.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   259
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   260
"/    'pReshape ' print. view print.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   261
"/    ' ' print. x print. '/' print. y print.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   262
"/    ' extent: ' print. width print. '/' print. height printNL.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   263
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   264
    view isPopUpView ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   265
	self halt.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   266
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   267
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   268
    (view isTopView
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   269
    or:[view isMemberOf:JavaEmbeddedFrameView]) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   270
	"/
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   271
	"/ dont allow setting the origin
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   272
	"/
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   273
	menu := self topViewsMenu:view.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   274
	menu notNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   275
	    "/ must add the menus height
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   276
	    height := height + menu height
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   277
	].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   278
	view extent:width@height.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   279
    ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   280
	(view superView notNil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   281
	and:[view superView isTopView]) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   282
	    menu := self topViewsMenu:view superView.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   283
	    menu notNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   284
		"/ must add menus height to yPos
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   285
		y := y + menu height.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   286
	    ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   287
	].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   288
	view origin:x@y extent:width@height.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   289
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   290
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   291
    ^ nil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   292
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   293
    "Created: / 7.1.1998 / 21:47:11 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   294
    "Modified: / 5.12.1998 / 13:47:52 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   295
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   296
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   297
replacementFontFor:name style:styleNr size:size
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   298
    |font family style|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   299
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   300
    style := 'roman'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   301
    styleNr = 0 ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   302
        style := 'roman'
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   303
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   304
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   305
    font := Font family:name style:style size:size.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   306
    font notNil ifTrue:[^ font].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   307
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   308
    name = 'Dialog' ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   309
        family := 'helvetica'
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   310
    ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   311
        family := 'courier'
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   312
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   313
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   314
    ^ Font family:name style:style size:size.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   315
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   316
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   317
topViewsMenu:view
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   318
    |idx|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   319
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   320
    view isTopView ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   321
	view subViews size > 0 ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   322
	    (idx := view subViews findFirst:[:v | v isMemberOf:MenuPanel]) ~~ 0 ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   323
		"/ must add the menus height
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   324
		^ view subViews at:idx
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   325
	    ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   326
	].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   327
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   328
    ^ nil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   329
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   330
    "Modified: / 4.8.1997 / 01:23:06 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   331
    "Created: / 4.1.1998 / 18:01:42 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   332
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   333
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   334
viewForWPeer: nativeContext
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   335
    |jPeer|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   336
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   337
    jPeer := nativeContext receiver.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   338
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   339
    "/ sigh; pData was renamed to pNativeWidget in jdk1.2 ...
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   340
    O_FramePeer_pNativeWidget isNil ifTrue:[
2011
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
   341
        O_FramePeer_pNativeWidget := (jPeer class instVarOffsetOf:'pNativeWidget').
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
   342
        O_FramePeer_pNativeWidget isNil ifTrue:[
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
   343
            O_FramePeer_pNativeWidget := 0.
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
   344
            O_FramePeer_pData isNil ifTrue:[
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
   345
                O_FramePeer_pData := (jPeer class instVarOffsetOf:'pData').
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
   346
            ].
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
   347
        ]
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   348
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   349
    O_FramePeer_pNativeWidget > 0 ifTrue:[
2011
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
   350
        "/ ok, we are < 1.2
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
   351
        ^ jPeer instVarAt:O_FramePeer_pNativeWidget.
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   352
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   353
    ^ jPeer instVarAt:O_FramePeer_pData.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   354
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   355
    "Modified: / 19.11.1998 / 01:43:20 / cg"
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   356
! !
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   357
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   358
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'helpers - io'!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   359
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   360
addOpenFile:aStream
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   361
    "Given a stream, adds it into the open file table. Returns a
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   362
     (fake) file descriptor number"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   363
    | fd |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   364
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   365
    OpenFileTableLock critical:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   366
        fd := OpenFileTable indexOf: nil.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   367
        fd ~~ 0 ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   368
            OpenFileTable at: fd put: aStream.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   369
            fd := fd - 1.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   370
        ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   371
            OpenFileTable add:aStream.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   372
            fd := OpenFileTable size - 1.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   373
        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   374
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   375
    ^fd
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   376
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   377
    "Created: / 02-01-1998 / 18:32:59 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   378
    "Modified (comment): / 18-07-2012 / 23:00:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   379
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   380
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   381
anyStream_read: jstream bytes: bytes offset: offset count: count
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   382
    | stream nRead|
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   383
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   384
    stream := self validateFile: jstream.
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   385
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   386
    "/ should always be bytes
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   387
    bytes class isBytes ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   388
        self halt.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   389
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   390
    stream == Stdin ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   391
        stream := StdinReplacementFileQuerySignal raiseRequest.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   392
        stream isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   393
            ^ -1 "/ 0  EOF
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   394
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   395
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   396
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   397
    FileIOTrace ifTrue:[
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   398
        ('JAVA: read ' , count printString , ' bytes from ' , stream pathName) infoPrintCR.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   399
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   400
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   401
    stream isPositionable ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   402
        "/ mhmh - some kind of socket or pipe
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   403
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   404
        stream readWait.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   405
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   406
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   407
    count == 0 ifTrue:[^0].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   408
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   409
    Stream readErrorSignal handle:[:ex |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   410
        nRead := -1
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   411
    ] do:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   412
        nRead := stream nextAvailableBytes:count into:bytes startingAt:offset+1.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   413
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   414
    nRead == 0 ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   415
        stream atEnd ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   416
            FileIOTrace ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   417
                ('JAVA: at EOF ' , nRead printString) infoPrintCR.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   418
            ].
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   419
            ^ -1
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   420
        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   421
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   422
    count ~~ nRead ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   423
        FileIOTrace ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   424
            ('JAVA: only got ' , nRead printString) infoPrintCR.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   425
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   426
    ].
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   427
    ^ nRead
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   428
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   429
    "Created: / 30-01-2013 / 17:55:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   430
!
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   431
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   432
anyStream_write: jstream bytes: bytes offset: offset count: count
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   433
    | stream |
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   434
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   435
    stream := self validateFile:jstream.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   436
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   437
    FileIOTrace ifTrue:[
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   438
        stream isFileStream ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   439
            Logger log: ('write ' , count printString , ' bytes to ' , stream pathName) severity: #info facility: 'JVM'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   440
        ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   441
            stream ~~ Stdout ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   442
                stream ~~ Stderr ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   443
                    Logger log: ('write ' , count printString , ' bytes to ' , stream displayString) severity: #info facility: 'JVM'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   444
                ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   445
            ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   446
        ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   447
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   448
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   449
    "/ should always be bytes
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   450
    Stream writeErrorSignal handle:[:ex |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   451
        ex return
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   452
    ] do:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   453
        Socket brokenConnectionSignal handle:[:ex |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   454
            ex return
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   455
        ] do:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   456
            stream isBinary ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   457
                stream nextPutBytes:count from:bytes startingAt:offset+1
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   458
            ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   459
                stream nextPutAll: (bytes asString copyFrom: offset + 1 to: offset + count).
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   460
            ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   461
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   462
        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   463
        stream == Transcript ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   464
            Transcript endEntry
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   465
        ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   466
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   467
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   468
    "Created: / 30-01-2013 / 17:58:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   469
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   470
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   471
checkWritePermissionOfDirectory:dir message:msg
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   472
    |answer|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   473
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   474
    (PermittedDirectories notNil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   475
    and:[PermittedDirectories includes:dir]) ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   476
	FileOpenConfirmation ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   477
	    answer := Dialog
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   478
		    confirmWithCancel:msg withCRs
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   479
			       labels:#('no' 'grant')
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   480
			       values:#(false true)
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   481
			      default:2.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   482
	    answer == false ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   483
		^ false
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   484
	    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   485
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   486
	    (self confirm:('JAVA Security check\\Always permit writes in this directory (''' , dir pathName , ''') ?') withCRs)
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   487
	    ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   488
		PermittedDirectories isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   489
		    PermittedDirectories := Set new
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   490
		].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   491
		PermittedDirectories add:dir.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   492
	    ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   493
	]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   494
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   495
    ^ true
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   496
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   497
    "Created: / 3.12.1998 / 15:07:56 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   498
    "Modified: / 3.12.1998 / 15:16:55 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   499
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   500
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   501
commonClose: jstream
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   502
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   503
    | fdobj fd stream |
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   504
    fdobj := (jstream instVarNamed: #fd).
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   505
    fd    := fdobj instVarNamed: #fd.
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   506
    fd == -1 ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   507
        "Never opened or already closed"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   508
        ^self.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   509
    ].
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   510
    stream := self getOpenFileAt:fd.
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   511
    stream notNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   512
        stream isView ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   513
            "Some applications close stdout/stderr (such as Apache Tomcat).
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   514
             We don't want that, so ignore a close in that case"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   515
            stream ~~ Transcript ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   516
                self breakPoint: #jv.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   517
            ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   518
        ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   519
            (stream ~~ Stdout and:[stream ~~ Stderr and:[stream ~~ Stdin]]) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   520
                stream close.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   521
            ]
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   522
        ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   523
    ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   524
        self breakPoint: #jv.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   525
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   526
    self setOpenFile: nil at: fd.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   527
    fdobj instVarNamed:#fd put: -1.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   528
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   529
    "Created: / 10-08-2011 / 14:02:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   530
    "Modified: / 30-01-2013 / 17:50:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   531
!
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   532
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   533
commonOpen: fs path: path forAppend:forAppend
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   534
    | fd fn nm dir stream fileNo readonly|
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   535
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   536
    fd := fs instVarNamed:'fd'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   537
    (fd instVarNamed:'fd') ~~ -1 ifTrue:[
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   538
        "/self halt:'file already open'.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   539
        self internalError:'file already open'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   540
        ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   541
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   542
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   543
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   544
    nm := Java as_ST_String:path.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   545
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   546
    FileOpenTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   547
        ('JAVA: opening ' , nm) infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   548
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   549
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   550
    fn := nm utf8Decoded asFilename.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   551
    dir := fn directory pathName.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   552
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   553
    readonly := false.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   554
"/    (PermittedDirectories notNil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   555
"/    and:[PermittedDirectories includes:dir]) ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   556
"/        FileOpenConfirmation ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   557
"/            answer := Dialog
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   558
"/                    confirmWithCancel:('JAVA Security check\\Opening ''' , name , ''' for read/write.\Grant permission ?') withCRs
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   559
"/                               labels:#('no' 'grant' 'readonly')
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   560
"/                               values:#(false true #readonly)
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   561
"/                              default:3.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   562
"/            answer == false ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   563
"/                self throwIOExceptionWithMessage:('no permission to open ' , name , ' for writing').
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   564
"/                ^ self
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   565
"/            ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   566
"/            readonly := (answer == #readonly).
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   567
"/
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   568
"/            readonly ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   569
"/                (self confirm:('JAVA Security check\\Always permit writes in this directory (''' , dir , ''') ?') withCRs)
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   570
"/                ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   571
"/                    PermittedDirectories isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   572
"/                        PermittedDirectories := Set new
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   573
"/                    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   574
"/                    PermittedDirectories add:dir.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   575
"/                ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   576
"/            ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   577
"/        ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   578
"/    ].
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   579
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   580
    readonly ifTrue:[
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   581
        (fn exists and:[fn isReadable not]) ifTrue:[
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   582
            ^JavaVM throwFileNotFoundException: 'File is not readable'
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   583
        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   584
        stream := fn readStream.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   585
    ] ifFalse:[
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   586
"/        fn exists ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   587
"/            ^self throwFileNotFoundException: 'File does not exist'
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   588
"/        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   589
        fn isDirectory ifTrue:[
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   590
             ^JavaVM throwFileNotFoundException: 'File is directory'
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   591
        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   592
        (fn exists and:[fn isWritable not]) ifTrue:[
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   593
            ^JavaVM throwFileNotFoundException: 'File does not writable'
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   594
        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   595
        forAppend ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   596
            stream := self commonOpenStreamUsing:[fn appendingWriteStream].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   597
        ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   598
            stream := self commonOpenStreamUsing:[fn writeStream].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   599
        ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   600
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   601
    stream isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   602
        JavaVM throwIOExceptionWithMessage:('cannot open ' , nm , ' for writing').
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   603
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   604
    stream binary.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   605
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   606
    fileNo := self addOpenFile:stream.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   607
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   608
    FileOpenTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   609
        ('JAVA: opened ' , nm , ' as FD ' , fileNo printString , ' for writing') infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   610
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   611
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   612
    fd instVarNamed:'fd' put:fileNo.
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   613
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   614
    "Kludge for finalization..."
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   615
    fs finalizationLobby registerChange: fs
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   616
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
   617
    "Created: / 30-01-2013 / 17:53:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   618
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   619
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   620
commonOpenStreamUsing: aBlock
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   621
    "Helper for opening a stream. Catches 'too many files' open error
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   622
     and tries to GC to cleanup if necessary"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   623
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   624
    | stream retry |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   625
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   626
    retry := false.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   627
    [ stream := aBlock value ] on:OpenError do:[:ex|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   628
        (ex errorCode) == (OperatingSystem errorNumberFor:#EMFILE) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   629
            "Worst case, try to cleanup"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   630
            Logger log: 'maximum number of open files reached, forcing finalization...' severity: #warn facility: #JVM.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   631
            [
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   632
                FinalizationLobby finalizeNow.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   633
                Delay waitForSeconds: 5. "/Give Java finalization thread a chance to clean up
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   634
                ObjectMemory garbageCollect.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   635
                retry := true.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   636
                JavaVM performance printOpenExternalStreamsOn: Stderr.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   637
            ] on: Error do:[:ex|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   638
                Logger log: 'failed to force finalization: ', ex description severity: #error facility: #JVM
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   639
            ].
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   640
        ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   641
            ex pass.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   642
        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   643
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   644
    retry ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   645
        stream := aBlock value.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   646
        Logger log: 'good, forced finalization solved the problem' severity: #info facility: #JVM
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   647
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   648
    ^stream
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   649
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   650
    "Created: / 23-07-2012 / 19:33:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   651
    "Modified: / 14-08-2012 / 02:25:06 / jv"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   652
    "Modified: / 16-01-2013 / 20:56:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   653
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   654
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   655
fileStreamForReading:name
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   656
    |fn stream tryAlongClassPath|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   657
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   658
    FileOpenTrace ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   659
        ('JAVA: opening for read:' , name) infoPrintCR.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   660
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   661
    fn := name asFilename.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   662
    fn exists  ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   663
        ^self throwFileNotFoundException: 'File does not exists'
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   664
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   665
    fn isDirectory ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   666
        ^self throwFileNotFoundException: 'File is directory'
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   667
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   668
    fn isReadable  ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   669
        ^self throwFileNotFoundException: 'File is not readable'
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   670
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   671
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   672
    stream := self commonOpenStreamUsing:[fn readStream].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   673
    stream notNil ifTrue:[^ stream].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   674
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   675
    fn isAbsolute ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   676
        "/ if not absolute, try along classPath
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   677
        "/ This allows classes to open local files (JEdit)
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   678
        "/ even if they have NOT been loaded by a Java classLoader.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   679
        "/ Only do this for image files
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   680
        "/ (and maybe some other config files in the future),
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   681
        "/ to avoid security holes.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   682
        tryAlongClassPath := true.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   683
"/        tryAlongClassPath := false.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   684
"/        (fn hasSuffix:'gif') ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   685
"/            tryAlongClassPath := true.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   686
"/        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   687
"/        (fn hasSuffix:'jpg') ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   688
"/            tryAlongClassPath := true.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   689
"/        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   690
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   691
        tryAlongClassPath ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   692
            Java effectiveClassPath do:[:dirName |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   693
                |fn|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   694
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   695
                (fn := dirName asFilename construct:name) exists ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   696
                    fn isReadable ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   697
                        self throwFileNotFoundException: 'File is not readable'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   698
                        ^nil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   699
                    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   700
                    stream := fn readStream.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   701
                    stream notNil ifTrue:[^ stream].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   702
                ]
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   703
            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   704
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   705
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   706
    ^ nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   707
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   708
    "Modified: / 27-01-1999 / 18:54:46 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   709
    "Modified: / 23-07-2012 / 19:37:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   710
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   711
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   712
fixFilename:path
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   713
    OperatingSystem isMSDOSlike ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   714
	(#($/ $\) includes:(path at:1)) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   715
	    (path at:3) == $: ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   716
		^ path copyFrom:2
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   717
	    ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   718
	]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   719
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   720
    ^ path
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   721
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   722
    "Created: / 20.10.1998 / 20:58:45 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   723
    "Modified: / 20.10.1998 / 21:06:49 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   724
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   725
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   726
getOpenFileAt:idx
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   727
    ^ OpenFileTable at:idx+1 ifAbsent:nil.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   728
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   729
    "Created: / 2.1.1998 / 18:28:01 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   730
    "Modified: / 2.1.1998 / 18:33:06 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   731
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   732
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   733
setOpenFile:aStream at:idx
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   734
    OpenFileTable size < (idx+1) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   735
        OpenFileTable grow:idx+1.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   736
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   737
    OpenFileTable at:idx+1 put:aStream.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   738
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   739
"/    Do not shrink OpenFileTable now, make debugging easier
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   740
"/    aStream isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   741
"/        [ OpenFileTable last isNil ] whileTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   742
"/            OpenFileTable removeLast.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   743
"/        ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   744
"/    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   745
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   746
    "Modified: / 02-01-1998 / 18:33:21 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   747
    "Modified: / 14-11-2011 / 19:53:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   748
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   749
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   750
validateFile:javaStream
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   751
    |fileNo file|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   752
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   753
    fileNo := self validateFileNo:javaStream.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   754
    file := self getOpenFileAt:fileNo.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   755
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   756
    file isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   757
        JavaVM 
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   758
    throwIOExceptionWithMessage:('stream with file descriptor %1 closed or was never open' 
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   759
            bindWith:fileNo).
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   760
        ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   761
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   762
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   763
    ^ file
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   764
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   765
    "Created: / 04-01-1998 / 16:50:38 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   766
    "Modified: / 28-07-2012 / 02:44:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   767
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   768
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   769
validateFileDescriptor: jFileDescriptor
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   770
    "Validates given instance of java.io.FileDescriptor.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   771
     If it is valid, return underlying Smalltalk stream,
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   772
     otherwise, throws java.io.IOException"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   773
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   774
    | fileNo stream |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   775
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   776
    fileNo := jFileDescriptor instVarNamed:'fd'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   777
    ((fileNo == -1) and:[OperatingSystem isMSWINDOWSlike]) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   778
        fileNo := jFileDescriptor instVarNamed:'handle'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   779
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   780
    fileNo isInteger ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   781
        JavaVM throwIOExceptionWithMessage:'Invalid fd in java.io.FileDescriptor'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   782
        ^ nil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   783
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   784
    fileNo == -1 ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   785
        JavaVM throwIOExceptionWithMessage:'java.io.FileDescriptor not open'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   786
        ^ nil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   787
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   788
    stream := self getOpenFileAt:fileNo.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   789
    stream isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   790
        JavaVM 
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   791
    throwIOExceptionWithMessage:'Stale descriptor in java.io.FileDescriptor (VM stream does not exists)'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   792
        ^nil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   793
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   794
    ^ stream.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   795
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   796
    "Created: / 06-07-2012 / 23:02:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   797
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   798
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   799
validateFileNo:javaStream
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   800
    |fileNo descriptor|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   801
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   802
    "/ JDK 1.1.3 has fileDescriptor wrapped
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   803
    "/ JDK 1.0 has it directly as integer
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   804
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   805
    fileNo := javaStream instVarNamed:'fd'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   806
    fileNo isInteger ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   807
        descriptor := fileNo.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   808
        descriptor notNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   809
            fileNo := descriptor instVarNamed:'fd'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   810
            ((fileNo == -1) and:[OperatingSystem isMSWINDOWSlike]) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   811
                fileNo := descriptor instVarNamed:'handle'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   812
            ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   813
            fileNo isInteger ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   814
                JavaVM 
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   815
    throwIOExceptionWithMessage:('invalid fd value in FileDescriptor (%1 [%2])' 
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   816
            bindWith:fileNo
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   817
            with:fileNo class).
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   818
                ^self
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   819
            ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   820
            ^fileNo
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   821
        ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   822
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   823
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   824
    fileNo isInteger ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   825
"/        self halt:'invalid fileNo in read'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   826
"/        self internalError:'invalid fileNo in read'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   827
        JavaVM 
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   828
    throwIOExceptionWithMessage:('invalid fd value in stream object (%1 [%2])' 
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   829
            bindWith:fileNo
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   830
            with:fileNo class).
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   831
        ^ nil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   832
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   833
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   834
    ^ fileNo.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   835
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   836
    "Created: / 04-01-1998 / 17:49:08 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   837
    "Modified: / 13-01-1998 / 14:07:47 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   838
    "Modified: / 18-08-2011 / 20:03:37 / jv"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   839
    "Modified: / 28-07-2012 / 02:42:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   840
! !
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   841
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   842
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'helpers - reflection'!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   843
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   844
invoke: jmethod receiver: obj arguments: args context: context "of the native method" constructor: isConstructor
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   845
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   846
    "Common helper for invoking methods and ctors. Performs
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   847
     (type) checks and unboxing. Return (possibly boxed) return value."
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   848
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   849
    | method parameterTypes bargs bargss retval retcls bi executionEx |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   850
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   851
    method := Reflection methodForJavaConstructorObject: jmethod.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   852
    parameterTypes := jmethod instVarNamed: #parameterTypes.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   853
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   854
    (obj isNil and:[method isStatic not]) ifTrue:[
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   855
        JavaVM throwNullPointerException.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   856
        ^nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   857
    ].
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   858
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   859
    "Possibly box/unbox arguments"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   860
    args notEmptyOrNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   861
        bargs := Array new: (bargss := method numArgs).
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   862
        bi := 1.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   863
        1 to: args size do:[:i|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   864
            | cls |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   865
            bi > bargss ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   866
"/                self breakPoint: #jv.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   867
                JavaVM throwIllegalArgumentException: 'passed more arguments than expected'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   868
            ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   869
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   870
            cls := Reflection classForJavaClassObject: (parameterTypes at: i).
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   871
            cls isJavaPrimitiveType ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   872
                bargs at: bi put: (cls javaUnbox: (args at:i) onError:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   873
"/                    self breakPoint: #jv.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   874
                    JavaVM throwIllegalArgumentException:'illegal unbox'. ^nil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   875
                ]).
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   876
                (cls == LargeInteger or:[cls == Float]) ifTrue:[bi := bi + 1].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   877
            ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   878
                ((args at:i) isNil or:[(JavaVM canCast: (args at:i) class to: cls)]) ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   879
                    self breakPoint: #jv.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   880
                    JavaVM throwIllegalArgumentException:'incomplatible argument types'. ^nil.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   881
                ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   882
                bargs at: bi put: (args at:i).
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   883
            ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   884
            bi := bi + 1.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   885
       ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   886
        bi <= bargss ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   887
"/             self breakPoint: #jv.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   888
             JavaVM throwExceptionClassName: 'java.lang.reflect.InvocationTargetException'
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   889
                              withMessage: 'not enough arguments'
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   890
        ].
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   891
    ] ifFalse:[
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   892
        bargs := #()
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   893
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   894
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   895
    "Check number of arguments"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   896
    method numArgs ~= bargs size ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   897
        JavaVM throwIllegalArgumentException:'Invalid number of arguments'.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   898
        ^nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   899
    ].
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   900
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   901
    "Lookup the method here - hack, because of those stupid package private methods"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
   902
    method isStatic ifFalse:[
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   903
        method := JavaLookup instance
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   904
                    lookupMethodForSelector: method selector
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   905
                                 directedTo: obj class
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   906
                                        for: obj
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   907
                              withArguments: bargs
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   908
                                       from: context
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   909
                                        ilc: nil.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   910
        method isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   911
            JavaVM throwIllegalArgumentException:'Message not understood - invalid class for ''this'''.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   912
            ^nil.
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   913
        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   914
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   915
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   916
    "Fire the method"
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   917
    [
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   918
        method isStatic ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   919
            retval := method valueWithReceiver: method javaClass arguments: bargs.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   920
        ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   921
            retval := method valueWithReceiver: obj arguments: bargs.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   922
        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   923
    ] on: (JavaVM classForName:'java.lang.Throwable') do:[:ex |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   924
        executionEx := ex.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   925
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   926
    executionEx notNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   927
        JavaVM throwInvocationTargetException: 'An exception occured during invocation' target: executionEx.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   928
        ^nil.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   929
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   930
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   931
    isConstructor ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   932
        retcls := jmethod instVarNamed: #returnType.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   933
        retcls notNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   934
            retcls := JavaVM classForJavaClassObject: retcls.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   935
            retcls ~~ UndefinedObject ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   936
                retval := retcls javaBox: retval.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   937
            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   938
        ].
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   939
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   940
    ^retval.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   941
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   942
    "Created: / 05-07-2012 / 23:48:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
   943
    "Modified: / 30-01-2013 / 14:00:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   944
! !
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   945
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   946
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - UNPORTED'!
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
   947
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
   948
_AccessController_beginPrivileged: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   949
    "/ introduced with jdk1.2
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   950
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   951
    "Created: / 27.1.1998 / 18:18:11 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   952
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   953
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
   954
_AccessController_endPrivileged: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   955
    "/ introduced with jdk1.2
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   956
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   957
    "Created: / 27.1.1998 / 18:18:32 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   958
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   959
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
   960
_AudioDevice_audioClose: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   961
    |device fd stream|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   962
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   963
    device := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   964
    device notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   965
        fd := device instVarNamed:'dev'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   966
        (fd notNil and:[fd > 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   967
            stream := self getOpenFileAt:fd.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   968
            stream notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   969
                stream close.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   970
                device instVarNamed:'dev' put:0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   971
            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   972
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   973
    ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   974
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   975
    "Created: / 10.1.1998 / 15:45:16 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   976
    "Modified: / 13.1.1998 / 18:08:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   977
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   978
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
   979
_AudioDevice_audioOpen: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   980
    |f stream fileNo|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   981
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   982
    NoAudio ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   983
        Transcript showCR:'JAVA: audio disabled'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   984
        ^ -1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   985
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   986
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   987
    Stream streamErrorSignal handle:[:ex |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   988
        Stream streamErrorSignal handle:[:ex |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   989
            stream := nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   990
            ex return.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   991
        ] do:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   992
            stream := SoundStream writing.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   993
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   994
    ] do:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   995
        stream := SoundStream writing.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   996
        stream notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   997
            stream setSampleRate:8000.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   998
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   999
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1000
    stream isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1001
"/        ^ -1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1002
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1003
        f := '/dev/audio' asFilename.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1004
        f exists ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1005
            Transcript showCR:'JAVA: neither SoundStream nor /dev/audio available'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1006
            ^ -1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1007
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1008
        stream := self commonOpenStreamUsing: [f readWriteStream].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1009
        stream isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1010
            Transcript showCR:'JAVA: /dev/audio exists, but cannot be opened'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1011
            ^ -1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1012
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1013
        fileNo := self addOpenFile:stream.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1014
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1015
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1016
    fileNo := self addOpenFile:stream.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1017
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1018
    FileOpenTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1019
        ('JAVA: opened audioDevice as FD ' , fileNo printString) infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1020
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1021
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1022
    ^ fileNo
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1023
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1024
    "Created: / 10-01-1998 / 15:45:30 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1025
    "Modified: / 14-10-1998 / 15:20:52 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1026
    "Modified: / 23-07-2012 / 19:36:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1027
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1028
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1029
_AudioDevice_audioWrite: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1030
    |device fd stream bytes count|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1031
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1032
    device := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1033
    device notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1034
        fd := device instVarNamed:'dev'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1035
        (fd notNil and:[fd > 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1036
            stream := self getOpenFileAt:fd.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1037
            stream notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1038
                bytes := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1039
                count := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1040
                stream nextPutBytes:count from:bytes startingAt:1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1041
            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1042
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1043
    ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1044
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1045
    "Created: / 10.1.1998 / 15:45:16 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1046
    "Modified: / 13.1.1998 / 18:07:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1047
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1048
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1049
_BigInteger_plumbInit: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1050
    JavaVM unimplementedNativeMethodSignal raiseRequest
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1051
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1052
    "Modified: / 12.11.1998 / 19:23:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1053
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1054
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1055
_ColorModel_deletepData: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1056
    "/ void deletepData ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1057
    JavaVM unimplementedNativeMethodSignal raiseRequest
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1058
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1059
    "Created: / 12.11.1998 / 19:22:05 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1060
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1061
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1062
_ColorModel_initIDs: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1063
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1064
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1065
    "Created: / 28.1.1998 / 22:19:23 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1066
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1067
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1068
_Constructor_getModifiers: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1069
    "/ int getModifiers ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1070
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1071
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1072
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1073
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1074
    "Created: / 27.1.2000 / 02:54:38 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1075
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1076
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1077
_Constructor_newInstance: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1078
    "/ java.lang.Object newInstance (java.lang.Object[])
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1079
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1080
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1081
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1082
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1083
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1084
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1085
_Field_get: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1086
    "/ java.lang.Object get (java.lang.Object)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1087
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1088
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1089
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1090
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1091
    "Created: / 27.1.2000 / 03:04:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1092
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1093
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1094
_Field_getBoolean: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1095
    "/ boolean getBoolean (java.lang.Object)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1096
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1097
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1098
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1099
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1100
    "Created: / 27.1.2000 / 03:05:16 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1101
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1102
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1103
_Field_getByte: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1104
    "/ byte getByte (java.lang.Object)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1105
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1106
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1107
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1108
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1109
    "Created: / 27.1.2000 / 03:05:30 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1110
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1111
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1112
_Field_getChar: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1113
    "/ char getChar (java.lang.Object)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1114
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1115
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1116
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1117
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1118
    "Created: / 27.1.2000 / 03:03:37 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1119
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1120
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1121
_Field_getDouble: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1122
    "/ double getDouble (java.lang.Object)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1123
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1124
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1125
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1126
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1127
    "Created: / 27.1.2000 / 03:07:49 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1128
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1129
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1130
_Field_getFloat: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1131
    "/ float getFloat (java.lang.Object)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1132
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1133
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1134
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1135
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1136
    "Created: / 27.1.2000 / 03:05:41 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1137
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1138
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1139
_Field_getInt: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1140
    "/ int getInt (java.lang.Object)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1141
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1142
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1143
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1144
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1145
    "Created: / 27.1.2000 / 03:04:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1146
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1147
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1148
_Field_getLong: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1149
    "/ long getLong (java.lang.Object)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1150
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1151
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1152
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1153
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1154
    "Created: / 27.1.2000 / 03:05:54 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1155
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1156
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1157
_Field_getModifiers: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1158
    "/ int getModifiers ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1159
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1160
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1161
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1162
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1163
    "Created: / 27.1.2000 / 03:07:03 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1164
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1165
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1166
_Field_getShort: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1167
    "/ unsigned short getShort (java.lang.Object)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1168
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1169
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1170
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1171
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1172
    "Created: / 27.1.2000 / 03:07:35 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1173
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1174
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1175
_Field_set: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1176
    "/ void set (java.lang.Object java.lang.Object)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1177
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1178
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1179
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1180
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1181
    "Created: / 27.1.2000 / 03:04:33 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1182
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1183
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1184
_Field_setBoolean: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1185
    "/ void setBoolean (java.lang.Object boolean)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1186
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1187
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1188
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1189
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1190
    "Created: / 27.1.2000 / 03:06:06 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1191
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1192
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1193
_Field_setByte: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1194
    "/ void setByte (java.lang.Object byte)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1195
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1196
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1197
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1198
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1199
    "Created: / 27.1.2000 / 03:06:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1200
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1201
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1202
_Field_setChar: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1203
    "/ void setChar (java.lang.Object char)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1204
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1205
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1206
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1207
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1208
    "Created: / 27.1.2000 / 03:03:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1209
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1210
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1211
_Field_setDouble: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1212
    "/ void setDouble (java.lang.Object double)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1213
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1214
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1215
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1216
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1217
    "Created: / 27.1.2000 / 03:04:02 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1218
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1219
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1220
_Field_setFloat: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1221
    "/ void setFloat (java.lang.Object float)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1222
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1223
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1224
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1225
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1226
    "Created: / 27.1.2000 / 03:06:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1227
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1228
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1229
_Field_setInt: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1230
    "/ void setInt (java.lang.Object int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1231
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1232
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1233
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1234
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1235
    "Created: / 27.1.2000 / 03:05:04 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1236
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1237
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1238
_Field_setLong: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1239
    "/ void setLong (java.lang.Object long)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1240
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1241
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1242
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1243
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1244
    "Created: / 27.1.2000 / 03:06:37 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1245
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1246
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1247
_Field_setShort: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1248
    "/ void setShort (java.lang.Object unsigned short)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1249
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1250
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1251
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1252
    "Modified: / 27.1.2000 / 02:53:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1253
    "Created: / 27.1.2000 / 03:03:23 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1254
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1255
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1256
_FileDescriptor_initSystemFD: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1257
    |descriptor fileNo myStream|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1258
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1259
    descriptor := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1260
    fileNo := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1261
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1262
    fileNo == 0 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1263
        myStream := Stdin
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1264
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1265
        fileNo == 1 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1266
           myStream := JavaConsoleStream ? Stdout
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1267
        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1268
            fileNo == 2 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1269
                myStream := JavaConsoleStream ? Stderr
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1270
            ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1271
                self halt:'invalid fileNo given'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1272
                self internalError:'invalid fileNo given'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1273
            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1274
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1275
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1276
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1277
    self setOpenFile:myStream at:fileNo.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1278
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1279
    descriptor instVarNamed:'fd' put:fileNo.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1280
    ^ descriptor
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1281
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1282
    "Modified: / 27-01-1998 / 18:15:28 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1283
    "Modified (format): / 28-07-2012 / 02:46:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1284
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1285
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1286
_FileDescriptor_valid: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1287
    "/ boolean valid ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1288
    |descriptor fileNo stream|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1289
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1290
    descriptor := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1291
    fileNo := descriptor instVarNamed:'fd'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1292
    stream := self getOpenFileAt:fileNo.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1293
    stream isNil ifTrue:[^ 0]. "/ FALSE
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1294
    stream isOpen ifFalse:[^ 0].  "/ FALSE
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1295
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1296
    ^ 1 "/ TRUE
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1297
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1298
    "Modified: / 11.12.1998 / 13:02:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1299
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1300
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1301
_FileInputStream_close: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1302
    ^ self anyStream_close: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1303
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1304
    "Created: / 4.1.1998 / 17:45:23 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1305
    "Modified: / 4.2.1998 / 15:20:46 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1306
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1307
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1308
_FileOutputStream_close: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1309
    ^ self anyStream_close: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1310
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1311
    "Created: / 13.1.1998 / 09:33:16 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1312
    "Modified: / 4.2.1998 / 15:20:53 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1313
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1314
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1315
_File_canonPath: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1316
    "/ introduced with jdk1.2 ... (sigh)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1317
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1318
    |jPath path realPath|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1319
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1320
    jPath := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1321
    jPath isNil ifTrue:[^ jPath].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1322
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1323
    path := Java as_ST_String:jPath.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1324
    realPath := path asFilename pathName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1325
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1326
    ^ Java as_String:realPath
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1327
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1328
    "Created: / 27.1.1998 / 18:35:58 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1329
    "Modified: / 27.1.1998 / 21:36:03 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1330
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1331
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1332
_File_initIDs: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1333
    "/ introduced with jdk1.2 ... (sigh)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1334
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1335
    "Created: / 27.1.1998 / 18:25:19 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1336
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1337
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1338
_File_rmdir0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1339
    "/ boolean rmdir0 ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1340
    JavaVM unimplementedNativeMethodSignal raiseRequest
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1341
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1342
    "Modified: / 12.11.1998 / 19:01:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1343
    "Created: / 12.11.1998 / 19:03:52 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1344
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1345
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1346
_Float_floatToIntBits: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1347
    |f i|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1348
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1349
    f := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1350
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1351
    UninterpretedBytes isBigEndian ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1352
        i := f basicAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1353
        i := i bitOr:((f basicAt:3) bitShift:8).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1354
        i := i bitOr:((f basicAt:2) bitShift:16).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1355
        i := i bitOr:((f basicAt:1) bitShift:24).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1356
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1357
        i := f basicAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1358
        i := i bitOr:((f basicAt:2) bitShift:8).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1359
        i := i bitOr:((f basicAt:3) bitShift:16).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1360
        i := i bitOr:((f basicAt:4) bitShift:24).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1361
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1362
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1363
    ^ i.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1364
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1365
    "Created: / 4.1.1998 / 01:25:50 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1366
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1367
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1368
_FontDescriptor_initIDs: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1369
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1370
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1371
    "Created: / 28.1.1998 / 22:30:52 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1372
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1373
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1374
_Font_initIDs: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1375
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1376
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1377
    "Created: / 27.1.1998 / 21:43:25 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1378
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1379
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1380
_GifImageDecoder_parseImage: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1381
    |decoder width height bool1 depth subHdrBytes dstBytes i1 i2 colorModel
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1382
     stream byte compressedData compressedSize index count data
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1383
     leftOffs topOffs codeLen flags pixelStore clrModel t buffSize
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1384
     countGot countGot2|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1385
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1386
    decoder := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1387
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1388
    i1 := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1389
    i2 := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1390
    width := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1391
    height := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1392
    bool1 := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1393
    depth := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1394
    subHdrBytes := nativeContext argAt:7.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1395
    dstBytes := nativeContext argAt:8.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1396
    colorModel := nativeContext argAt:9.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1397
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1398
    leftOffs := subHdrBytes wordAt:1 MSB:false.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1399
    topOffs := subHdrBytes wordAt:3 MSB:false.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1400
    width := subHdrBytes wordAt:5 MSB:false.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1401
    height := subHdrBytes wordAt:7 MSB:false.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1402
    flags := subHdrBytes at:9.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1403
    codeLen := subHdrBytes at:10.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1404
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1405
    stream := decoder instVarNamed:'input'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1406
    pixelStore := decoder instVarNamed:'store'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1407
    pixelStore isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1408
        ^ 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1409
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1410
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1411
    buffSize := (width * height // 2) max:4096.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1412
    compressedData := ByteArray uninitializedNew:buffSize.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1413
    "get compressed data"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1414
    index := 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1415
    count := stream perform:#'read()I'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1416
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1417
    [count notNil and:[count > 0]] whileTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1418
        (index + count) > buffSize ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1419
            t := ByteArray uninitializedNew:(buffSize * 2).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1420
            t replaceFrom:1 to:buffSize with:compressedData startingAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1421
            compressedData := t.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1422
            buffSize := buffSize * 2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1423
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1424
        [count ~~ 0] whileTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1425
            countGot := stream
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1426
                        perform:#'read([BII)I'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1427
                        with:compressedData
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1428
                        with:index-1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1429
                        with:count.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1430
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1431
            countGot > 0 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1432
                count := count - countGot.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1433
                index := index + countGot.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1434
            ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1435
                count := -1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1436
            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1437
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1438
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1439
        count >= 0 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1440
            count := stream perform:#read.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1441
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1442
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1443
    compressedSize := index - 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1444
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1445
    data := pixelStore perform:#'allocateLines(I)Ljava/lang/Object;' with:height.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1446
    (data isMemberOf:ByteArray) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1447
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1448
        ^ 0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1449
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1450
"/    'GIFReader: decompressing ...' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1451
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1452
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1453
    GIFReader
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1454
        decompressGIFFrom:compressedData
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1455
        count:compressedSize
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1456
        into:data
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1457
        startingAt:1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1458
        codeLen:(codeLen + 1).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1459
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1460
    clrModel := pixelStore instVarNamed:'colormodel'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1461
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1462
    pixelStore
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1463
        perform:#'setPixels(IIII[BII)Z'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1464
        withArguments:
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1465
            (Array
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1466
                with:0        "/ x
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1467
                with:0        "/ y
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1468
                with:width    "/ w
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1469
                with:height   "/ h
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1470
                with:data
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1471
                with:0        "/ offs
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1472
                with:width).   "/ scanSize
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1473
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1474
    pixelStore  perform:#'imageComplete()V'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1475
"/        perform:#'imageComplete(I)V'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1476
"/        with:((Java at:'java.awt.image.ImageConsumer') instVarNamed:'STATICIMAGEDONE').
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1477
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1478
"/ self internalError:'breakPoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1479
    ^ 1 "/ true
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1480
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1481
    "Modified: / 10.4.1998 / 14:31:59 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1482
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1483
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1484
_ImageRepresentation_disposeImage: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1485
    |imgRep img|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1486
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1487
    imgRep := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1488
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1489
    img := imgRep instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1490
    (img notNil and:[img ~~ 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1491
        ImageStretchCache notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1492
            ImageStretchCache removeKey:img ifAbsent:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1493
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1494
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1495
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1496
    imgRep instVarNamed:'pData' put:0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1497
"/    self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1498
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1499
    "Created: / 7.1.1998 / 22:31:46 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1500
    "Modified: / 17.1.1998 / 13:26:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1501
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1502
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1503
_ImageRepresentation_finish: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1504
    |imgRep bool|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1505
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1506
    imgRep := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1507
    bool := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1508
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1509
"/    'JAVA: ImageRepresentation_finish ignored for now' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1510
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1511
    ^ 1 "/ true
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1512
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1513
    "Created: / 8.1.1998 / 00:11:40 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1514
    "Modified: / 6.2.1998 / 02:12:54 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1515
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1516
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1517
_ImageRepresentation_imageDraw: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1518
    |imgRep x y img deviceImage jGraphics gc clr|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1519
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1520
    imgRep := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1521
    img := imgRep instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1522
    (img isNil or:[img == 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1523
        "/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1524
        ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1525
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1526
    jGraphics := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1527
    gc := jGraphics instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1528
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1529
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1530
    x := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1531
    y := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1532
    clr := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1533
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1534
    deviceImage := img onDevice:gc device.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1535
    deviceImage ~~ img ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1536
        imgRep instVarNamed:'pData' put:deviceImage.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1537
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1538
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1539
    deviceImage displayOn:gc x:x y:y.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1540
    ^ 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1541
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1542
    "Created: / 13.1.1998 / 13:32:28 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1543
    "Modified: / 25.11.1998 / 15:36:38 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1544
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1545
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1546
_ImageRepresentation_imageStretch: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1547
    |imgRep x1 y1 x2 y2 srcX1 srcY1 w h
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1548
     img deviceImage jGraphics gc clr stretchWidth stretchHeight|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1549
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1550
    imgRep := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1551
    img := imgRep instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1552
    (img isNil or:[img == 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1553
        "/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1554
        ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1555
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1556
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1557
    jGraphics := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1558
    gc := jGraphics instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1559
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1560
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1561
    x1 := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1562
    y1 := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1563
    x2 := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1564
    y2:= nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1565
    srcX1 := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1566
    srcY1 := nativeContext argAt:7.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1567
    w := nativeContext argAt:8.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1568
    h := nativeContext argAt:9.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1569
    clr := nativeContext argAt:10.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1570
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1571
    (srcX1 ~~ 0 or:[srcY1 ~~ 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1572
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1573
        ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1574
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1575
    (w ~~ img width or:[h ~~ img height]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1576
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1577
        ^ self
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1578
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1579
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1580
    "/ TODO: remember magnified images somewhere for a while,
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1581
    "/ to avoid repeated action ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1582
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1583
    stretchWidth := (x2-x1).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1584
    stretchHeight := (y2-y1).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1585
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1586
    (stretchWidth == img width
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1587
    and:[stretchHeight == img height]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1588
        deviceImage := img onDevice:gc device.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1589
        deviceImage ~~ img ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1590
            imgRep instVarNamed:'pData' put:deviceImage.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1591
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1592
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1593
        ImageStretchCache notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1594
            deviceImage := ImageStretchCache at:img ifAbsent:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1595
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1596
        (deviceImage isNil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1597
        or:[deviceImage width ~~ stretchWidth
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1598
        or:[deviceImage height ~~ stretchHeight]]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1599
            deviceImage := (img magnifiedTo:stretchWidth@stretchHeight) onDevice:gc device.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1600
            ImageStretchCache isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1601
                ImageStretchCache := WeakIdentityDictionary new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1602
            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1603
            ImageStretchCache at:img put:deviceImage
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1604
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1605
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1606
    deviceImage displayOn:gc x:x1 y:y1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1607
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1608
    "Created: / 13.1.1998 / 13:32:28 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1609
    "Modified: / 15.1.1998 / 13:14:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1610
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1611
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1612
_ImageRepresentation_offscreenInit: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1613
    |imgRep jclr w h form screenDevice|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1614
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1615
    imgRep := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1616
    jclr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1617
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1618
    w := imgRep instVarNamed:'width'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1619
    h := imgRep instVarNamed:'height'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1620
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1621
    screenDevice := Screen current.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1622
    form := Form width:w height:h depth:(screenDevice depth) on:screenDevice.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1623
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1624
    imgRep instVarNamed:'pData' put:form.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1625
    "/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1626
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1627
    "Created: / 7.1.1998 / 22:31:46 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1628
    "Modified: / 17.1.1998 / 12:36:43 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1629
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1630
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1631
_ImageRepresentation_setBytePixels: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1632
    |imgRep x y w h clrModel bytes offs i2
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1633
     img depth cmap rgbMap opaque transparentColorIndex
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1634
     scanLineWidth nBytes srcIdx dstIdx|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1635
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1636
    imgRep := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1637
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1638
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1639
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1640
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1641
    clrModel := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1642
    bytes := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1643
    offs := nativeContext argAt:7.  "/ offset ??
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1644
    scanLineWidth := nativeContext argAt:8.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1645
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1646
    depth := clrModel instVarNamed:'pixel_bits'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1647
    (clrModel instVarNamed:'map_size') ~~ 0 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1648
        rgbMap := clrModel instVarNamed:'rgb'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1649
        cmap := Array new:rgbMap size.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1650
        rgbMap
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1651
            keysAndValuesDo:[:idx :rgb |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1652
                cmap at:idx put:(Color rgbValue:(rgb bitAnd:16rFFFFFF))
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1653
            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1654
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1655
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1656
    opaque := (clrModel instVarNamed:'opaque') ~~ 0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1657
    opaque ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1658
        transparentColorIndex := clrModel instVarNamed:'transparent_index'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1659
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1660
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1661
    img := imgRep instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1662
    (img isNil or:[img == 0]) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1663
"/        self halt
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1664
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1665
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1666
    (offs ~~ 0 or:[scanLineWidth ~~ w]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1667
        nBytes := ByteArray new:w*h.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1668
        srcIdx := offs+1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1669
        dstIdx := 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1670
        1 to:h do:[:y |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1671
            nBytes replaceFrom:dstIdx to:(dstIdx+w-1) with:bytes startingAt:srcIdx.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1672
            srcIdx := srcIdx + scanLineWidth.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1673
            dstIdx := dstIdx + w.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1674
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1675
        bytes := nBytes.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1676
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1677
    img := Image width:w height:h depth:depth fromArray:bytes.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1678
    cmap notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1679
        img colorMap:cmap.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1680
        img photometric:#palette
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1681
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1682
    opaque ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1683
        img mask:(ImageReader
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1684
                    buildMaskFromColor:transparentColorIndex
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1685
                    for:bytes
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1686
                    width:w
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1687
                    height:h)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1688
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1689
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1690
    imgRep instVarNamed:'pData' put:img.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1691
    ^ 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1692
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1693
    "Created: / 7.1.1998 / 22:31:46 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1694
    "Modified: / 21.10.1998 / 00:35:45 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1695
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1696
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1697
_ImageRepresentation_setIntPixels: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1698
    |imgRep x y w h clrModel ints offs scanLineWidth
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1699
     img depth cmap rgbMap opaque transparentColorIndex
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1700
     bytes srcIdx dstIdx val red green blue
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1701
     redMask greenMask blueMask redShift greenShift blueShift|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1702
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1703
    imgRep := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1704
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1705
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1706
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1707
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1708
    clrModel := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1709
    ints := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1710
    offs := nativeContext argAt:7.  "/ offset ??
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1711
    scanLineWidth := nativeContext argAt:8.  "/ scanLineWidth ??
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1712
    opaque := false.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1713
offs ~~ 0 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1714
 self halt
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1715
].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1716
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1717
    depth := clrModel instVarNamed:'pixel_bits'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1718
    clrModel class == (Java at:'java.awt.image.DirectColorModel') ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1719
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1720
        (clrModel instVarNamed:'map_size') ~~ 0 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1721
            rgbMap := clrModel instVarNamed:'rgb'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1722
            cmap := Array new:rgbMap size.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1723
            rgbMap
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1724
                keysAndValuesDo:[:idx :rgb |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1725
                    cmap at:idx put:(Color rgbValue:(rgb bitAnd:16rFFFFFF))
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1726
                ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1727
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1728
        opaque := (clrModel instVarNamed:'opaque') ~~ 0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1729
        opaque ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1730
            transparentColorIndex := clrModel instVarNamed:'transparent_index'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1731
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1732
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1733
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1734
    img := imgRep instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1735
    (img isNil or:[img == 0]) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1736
"/        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1737
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1738
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1739
    depth == 32 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1740
        "/ temporary kludge - ony use 24 bits/pixel
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1741
        bytes := ByteArray new:w*h*3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1742
        srcIdx := 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1743
        dstIdx := 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1744
        redMask := clrModel instVarNamed:'red_mask'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1745
        greenMask := clrModel instVarNamed:'green_mask'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1746
        blueMask := clrModel instVarNamed:'blue_mask'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1747
        redShift := (clrModel instVarNamed:'red_offset') negated.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1748
        greenShift := (clrModel instVarNamed:'green_offset') negated.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1749
        blueShift := (clrModel instVarNamed:'blue_offset') negated.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1750
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1751
        1 to:h do:[:y |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1752
            1 to:w do:[:x |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1753
                val := ints at:srcIdx.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1754
                red := (val bitAnd:redMask) bitShift:redShift.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1755
                green := (val bitAnd:greenMask) bitShift:greenShift.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1756
                blue := (val bitAnd:blueMask) bitShift:blueShift.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1757
                bytes at:dstIdx put:red.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1758
                bytes at:dstIdx+1 put:green.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1759
                bytes at:dstIdx+2 put:blue.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1760
                dstIdx := dstIdx + 3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1761
                srcIdx := srcIdx + 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1762
            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1763
            srcIdx := srcIdx + (scanLineWidth - w).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1764
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1765
        img := Depth24Image width:w height:h depth:24 fromArray:bytes.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1766
        img photometric:#rgb.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1767
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1768
        scanLineWidth ~~ w ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1769
            self halt
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1770
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1771
        img := Image width:w height:h depth:depth fromArray:ints.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1772
        cmap notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1773
            img colorMap:cmap.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1774
            img photometric:#palette
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1775
        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1776
            img photometric:#rgb
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1777
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1778
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1779
    opaque ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1780
        img mask:(ImageReader
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1781
                    buildMaskFromColor:transparentColorIndex
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1782
                    for:ints
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1783
                    width:w
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1784
                    height:h)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1785
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1786
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1787
    imgRep instVarNamed:'pData' put:img.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1788
    ^ 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1789
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1790
    "Created: / 1.2.1998 / 17:38:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1791
    "Modified: / 21.10.1998 / 00:35:37 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1792
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1793
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1794
_InetAddressImpl_getHostByAddr: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1795
    "/ java.lang.String getHostByAddr (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1796
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1797
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1798
    "Created: / 12.11.1998 / 19:08:04 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1799
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1800
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1801
_InetAddressImpl_getInetFamily: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1802
    "/ self unimplementedNativeMethod.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1803
    ^ 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1804
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1805
    "Modified: / 15.8.1997 / 17:04:43 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1806
    "Created: / 5.1.1998 / 02:05:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1807
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1808
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1809
_InetAddressImpl_getLocalHostName: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1810
    ""
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1811
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1812
    |hostName|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1813
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1814
    hostName := OperatingSystem getHostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1815
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1816
    ^ (Java as_String:hostName).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1817
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1818
    "Modified: / 7.8.1997 / 21:16:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1819
    "Created: / 5.1.1998 / 02:07:03 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1820
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1821
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1822
_InetAddressImpl_lookupAllHostAddr: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1823
    ""
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1824
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1825
    |jAddrImpl jHostName hostName addrBytes|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1826
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1827
    jAddrImpl := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1828
    jHostName := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1829
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1830
    hostName := Java as_ST_String:jHostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1831
    addrBytes := Socket ipAddressOfHost:hostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1832
    addrBytes isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1833
        addrBytes := #[0 0 0 0] copy
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1834
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1835
    ^ Array with:addrBytes
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1836
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1837
    "Modified: / 8.8.1997 / 12:04:25 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1838
    "Created: / 7.1.1998 / 18:51:31 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1839
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1840
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1841
_InetAddressImpl_makeAnyLocalAddress: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1842
    ""
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1843
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1844
    |jAddrImpl jAddr hostName addrBytes address|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1845
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1846
    jAddrImpl := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1847
    jAddr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1848
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1849
    hostName := OperatingSystem getHostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1850
    addrBytes := Socket ipAddressOfHost:hostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1851
    addrBytes isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1852
        addrBytes := #[127 0 0 0].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1853
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1854
    "/ MSB first into an integer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1855
    address := (addrBytes at:1).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1856
    address := (address bitShift:8) bitOr:(addrBytes at:2).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1857
    address := (address bitShift:8) bitOr:(addrBytes at:3).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1858
    address := (address bitShift:8) bitOr:(addrBytes at:4).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1859
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1860
    jAddr instVarNamed:'hostName' put:(Java as_String:hostName).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1861
    jAddr instVarNamed:'address' put:address.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1862
    jAddr instVarNamed:'family' put:0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1863
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1864
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1865
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1866
    "Created: / 5.1.1998 / 02:06:27 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1867
    "Modified: / 21.10.1998 / 03:30:29 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1868
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1869
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1870
_InetAddress_getInetFamily: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1871
    "/ self unimplementedNativeMethod.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1872
    ^ 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1873
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1874
    "Modified: / 15.8.1997 / 17:04:43 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1875
    "Created: / 17.11.1998 / 23:54:38 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1876
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1877
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1878
_InetAddress_getLocalHostName: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1879
    ""
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1880
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1881
    |hostName|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1882
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1883
    hostName := OperatingSystem getHostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1884
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1885
    ^ Java as_String:hostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1886
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1887
    "Modified: / 7.8.1997 / 21:16:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1888
    "Created: / 17.11.1998 / 23:54:54 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1889
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1890
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1891
_InetAddress_lookupAllHostAddr: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1892
    ""
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1893
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1894
    |jAddrImpl jHostName hostName addrBytes|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1895
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1896
    jAddrImpl := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1897
    jHostName := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1898
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1899
    hostName := Java as_ST_String:jHostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1900
    addrBytes := Socket ipAddressOfHost:hostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1901
    addrBytes isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1902
        addrBytes := #[0 0 0 0] copy
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1903
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1904
    ^ Array with:addrBytes
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1905
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1906
    "Modified: / 8.8.1997 / 12:04:25 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1907
    "Created: / 17.11.1998 / 23:56:10 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1908
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1909
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1910
_InetAddress_lookupHostByAddr: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1911
    "java.lang.Object[] lookupHostByAddr (int)"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1912
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1913
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1914
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1915
    "Created: / 27.1.2000 / 02:59:22 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1916
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1917
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1918
_InetAddress_lookupHostByName: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1919
    "java.lang.Object[] lookupHostByName (java.lang.String)"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1920
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1921
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1922
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1923
    "Modified: / 27.1.2000 / 02:58:53 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1924
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1925
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1926
_InetAddress_makeAnyLocalAddress: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1927
    ""
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1928
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1929
    |jAddrImpl jAddr hostName addrBytes address|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1930
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1931
    jAddrImpl := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1932
    jAddr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1933
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1934
    hostName := OperatingSystem getHostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1935
    addrBytes := Socket ipAddressOfHost:hostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1936
    addrBytes isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1937
        addrBytes := #[127 0 0 0].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1938
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1939
    "/ MSB first into an integer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1940
    address := (addrBytes at:1).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1941
    address := (address bitShift:8) bitOr:(addrBytes at:2).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1942
    address := (address bitShift:8) bitOr:(addrBytes at:3).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1943
    address := (address bitShift:8) bitOr:(addrBytes at:4).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1944
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1945
    jAddr instVarNamed:'hostName' put:(Java as_String:hostName).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1946
    jAddr instVarNamed:'address' put:address.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1947
    jAddr instVarNamed:'family' put:0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1948
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1949
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1950
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1951
    "Modified: / 21.10.1998 / 03:30:29 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1952
    "Created: / 17.11.1998 / 23:54:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1953
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1954
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1955
_Inflater_end0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1956
    "/ void end0 ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1957
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1958
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1959
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1960
    "Modified: / 27.1.2000 / 03:08:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1961
    "Created: / 27.1.2000 / 03:11:21 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1962
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1963
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1964
_Inflater_getAdler0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1965
    "/ int getAdler0 ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1966
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1967
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1968
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1969
    "Modified: / 27.1.2000 / 03:08:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1970
    "Created: / 27.1.2000 / 03:12:15 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1971
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1972
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1973
_Inflater_getTotalIn0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1974
    "/ int getTotalIn0 ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1975
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1976
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1977
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1978
    "Created: / 27.1.2000 / 03:10:50 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1979
    "Modified: / 27.1.2000 / 03:11:08 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1980
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1981
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1982
_Inflater_getTotalOut0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1983
    "/ int getTotalOut0 ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1984
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1985
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1986
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1987
    "Modified: / 27.1.2000 / 03:08:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1988
    "Created: / 27.1.2000 / 03:12:01 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1989
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1990
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1991
_Inflater_inflate0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1992
    "/ int inflate0 (byte[] int int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1993
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1994
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1995
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1996
    "Modified: / 27.1.2000 / 03:08:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1997
    "Created: / 27.1.2000 / 03:11:39 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1998
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1999
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2000
_Inflater_reset0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2001
    "/ void reset0 ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2002
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2003
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2004
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2005
    "Modified: / 27.1.2000 / 03:08:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2006
    "Created: / 27.1.2000 / 03:11:02 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2007
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2008
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2009
_Inflater_setDictionary0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2010
    "/ void setDictionary0 (byte[] int int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2011
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2012
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2013
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2014
    "Modified: / 27.1.2000 / 03:08:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2015
    "Created: / 27.1.2000 / 03:10:33 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2016
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2017
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2018
_InputThread_run: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2019
    self _WToolkit_eventLoop: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2020
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2021
    "Created: / 28.1.1998 / 22:34:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2022
    "Modified: / 28.1.1998 / 22:35:16 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2023
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2024
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2025
_Introspector_getMethodDescriptor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2026
    "java.lang.String getMethodDescriptor (java.lang.reflect.Method)"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2027
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2028
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2029
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2030
    "Created: / 27.1.2000 / 02:47:43 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2031
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2032
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2033
_Introspector_getMethodParameterCount: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2034
    "int getMethodParameterCount (java.lang.reflect.Method)"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2035
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2036
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2037
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2038
    "Created: / 27.1.2000 / 02:49:15 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2039
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2040
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2041
_Introspector_getPublicDeclaredMethods0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2042
    "java.lang.reflect.Method[] getPublicDeclaredMethods0 (java.lang.Class)"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2043
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2044
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2045
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2046
    "Created: / 27.1.2000 / 02:48:49 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2047
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2048
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2049
_JPEGImageDecoder_readImage: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2050
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2051
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2052
    "Created: / 12.11.1998 / 18:53:30 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2053
    "Modified: / 12.11.1998 / 18:53:40 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2054
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2055
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2056
_MButtonPeer_create: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2057
    ^ self _WButtonPeer_create: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2058
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2059
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2060
_MCanvasPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2061
    |jCanvasPeer jFrame frame subView|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2062
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2063
    jCanvasPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2064
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2065
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2066
    jFrame isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2067
        self halt:'no frame in canvasPeer create'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2068
        self internalError:'no frame in canvasPeer create'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2069
        ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2070
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2071
    frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2072
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2073
    subView := JavaView in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2074
    subView delegate:self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2075
    subView javaPeer:jCanvasPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2076
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2077
    self createdWindowsView:subView for:jCanvasPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2078
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2079
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2080
        'WCanvasPeer_create: ' print. frame print. ' -> ' print. subView printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2081
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2082
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2083
    "Modified: / 16.1.1998 / 13:40:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2084
    "Created: / 18.11.1998 / 00:14:44 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2085
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2086
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2087
_MComponentPeer_cacheInit: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2088
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2089
    "Created: / 28.1.1998 / 22:22:30 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2090
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2091
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2092
_MComponentPeer_handleEvent: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2093
    ^ self _WComponentPeer_handleEvent: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2094
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2095
    "Created: / 18.11.1998 / 00:21:17 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2096
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2097
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2098
_MComponentPeer_nativeHandleEvent: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2099
    ^ self _WComponentPeer_nativeHandleEvent: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2100
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2101
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2102
_MComponentPeer_pHide: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2103
    ^ self _WComponentPeer_hide: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2104
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2105
    "Created: / 18.11.1998 / 00:15:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2106
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2107
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2108
_MComponentPeer_pInitialize: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2109
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2110
    "Created: / 28.1.1998 / 22:27:25 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2111
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2112
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2113
_MComponentPeer_pReshape: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2114
    self commonReshapeComponent: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2115
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2116
    "Created: / 18.11.1998 / 00:18:17 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2117
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2118
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2119
_MComponentPeer_pSetBackground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2120
    |view jClr rgb clr|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2121
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2122
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2123
    jClr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2124
    rgb := jClr instVarNamed:'value'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2125
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2126
    clr := Color rgbValue:rgb.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2127
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2128
    clr := clr on:(view device).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2129
    (view isKindOf:ScrollableView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2130
        view := view scrolledView
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2131
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2132
    view viewBackground:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2133
    view backgroundPaint:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2134
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2135
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2136
_MComponentPeer_pSetFont: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2137
    |view jFont stFont name style size|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2138
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2139
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2140
    jFont := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2141
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2142
    stFont := jFont instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2143
    (stFont isNil or:[stFont == 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2144
        name := jFont instVarNamed:'name'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2145
        style := jFont instVarNamed:'style'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2146
        size := jFont instVarNamed:'size'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2147
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2148
        stFont := self replacementFontFor:(Java as_ST_String:name) style:style size:size.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2149
        jFont instVarNamed:'pData' put:stFont.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2150
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2151
    view font:stFont.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2152
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2153
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2154
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2155
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2156
_MComponentPeer_pSetForeground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2157
    |view jClr rgb clr|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2158
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2159
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2160
    jClr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2161
    rgb := jClr instVarNamed:'value'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2162
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2163
    clr := Color rgbValue:rgb.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2164
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2165
    clr := clr on:(view device).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2166
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2167
    (view isKindOf:ScrollableView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2168
        view := view scrolledView
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2169
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2170
    view foregroundColor:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2171
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2172
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2173
_MComponentPeer_pShow: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2174
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2175
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2176
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2177
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2178
    "/ frame views are under my browsers own control
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2179
    (view isMemberOf:JavaEmbeddedFrameView) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2180
        view beVisible.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2181
        view realize.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2182
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2183
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2184
"/    view windowGroup notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2185
"/        windowServer addGroup:(view windowGroup)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2186
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2187
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2188
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2189
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2190
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2191
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2192
    "Modified: / 25.1.1998 / 09:54:07 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2193
    "Created: / 18.11.1998 / 00:21:51 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2194
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2195
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2196
_MComponentPeer_setBackground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2197
    |jClr rgb clr view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2198
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2199
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2200
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2201
    jClr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2202
    rgb := jClr instVarNamed:'value'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2203
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2204
    clr := Color rgbValue:rgb.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2205
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2206
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2207
    clr := clr on:(view device).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2208
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2209
    (view isKindOf:ScrollableView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2210
        view := view scrolledView
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2211
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2212
    view viewBackground:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2213
    view backgroundPaint:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2214
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2215
    "Created: / 17.11.1998 / 23:49:41 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2216
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2217
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2218
_MComponentPeer_setCursor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2219
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2220
    "Created: / 28.1.1998 / 22:27:35 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2221
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2222
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2223
_MComponentPeer_setFont: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2224
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2225
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2226
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2227
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2228
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2229
    "Modified: / 25.1.1998 / 01:22:19 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2230
    "Created: / 17.11.1998 / 23:43:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2231
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2232
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2233
_MComponentPeer_setForeground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2234
    |jClr rgb clr view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2235
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2236
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2237
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2238
    jClr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2239
    rgb := jClr instVarNamed:'value'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2240
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2241
    clr := Color rgbValue:rgb.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2242
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2243
    clr := clr on:(view device).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2244
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2245
    view paint:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2246
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2247
    "Created: / 17.11.1998 / 23:50:31 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2248
    "Modified: / 17.11.1998 / 23:57:29 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2249
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2250
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2251
_MFramePeer_create: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2252
    ^ self _WFramePeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2253
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2254
    "Created: / 28.1.1998 / 22:25:44 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2255
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2256
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2257
_MFramePeer_getWindowBackgroundColor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2258
    ^ View defaultViewBackgroundColor rgbValue.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2259
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2260
    "Created: / 17.11.1998 / 23:55:42 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2261
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2262
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2263
_MFramePeer_pHide: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2264
    ^ self _WComponentPeer_hide: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2265
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2266
    "Created: / 28.1.1998 / 22:27:04 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2267
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2268
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2269
_MFramePeer_pReshape: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2270
    self commonReshapeComponent: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2271
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2272
    "Created: / 28.1.1998 / 22:28:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2273
    "Modified: / 28.1.1998 / 22:29:34 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2274
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2275
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2276
_MFramePeer_pSetTitle: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2277
    self _WWindowPeer__setTitle: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2278
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2279
    "Created: / 28.1.1998 / 22:30:23 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2280
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2281
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2282
_MFramePeer_pShow: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2283
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2284
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2285
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2286
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2287
    "/ frame views are under my browsers own control
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2288
    (view isMemberOf:JavaEmbeddedFrameView) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2289
        view beVisible.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2290
        view realize.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2291
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2292
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2293
"/    view windowGroup notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2294
"/        windowServer addGroup:(view windowGroup)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2295
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2296
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2297
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2298
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2299
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2300
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2301
    "Modified: / 25.1.1998 / 09:54:07 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2302
    "Created: / 18.11.1998 / 00:19:59 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2303
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2304
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2305
_MFramePeer_setInsets: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2306
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2307
    "Created: / 17.11.1998 / 23:55:32 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2308
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2309
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2310
_MFramePeer_setResizable: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2311
    |view onOff|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2312
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2313
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2314
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2315
    onOff := (nativeContext argAt:1) == 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2316
    view isTopView ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2317
        onOff ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2318
            view minExtent:10@10.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2319
            view maxExtent:(Screen current extent).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2320
        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2321
            view minExtent:view extent.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2322
            view maxExtent:view extent.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2323
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2324
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2325
        (view isMemberOf:JavaEmbeddedFrameView) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2326
            self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2327
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2328
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2329
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2330
"/ 'JAVA: WWindowPeer_setResizable: ' print. view print. ' yes/no: ' print. onOff printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2331
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2332
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2333
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2334
    "Modified: / 16.1.1998 / 18:08:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2335
    "Created: / 17.11.1998 / 23:51:45 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2336
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2337
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2338
_MToolkit_callbackLoop: nativeContext
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2339
    | toolKit |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2340
    toolKit := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2341
    ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2342
    self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2343
        self halt: 'monitors has changer, update me if you know how and why'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2344
    "self wakeup: toolKit."
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2345
    self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2346
    (JavaEventThread notNil and: [ JavaEventThread isDead not ]) ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2347
        'JavaVM [warning]: oops - two threads executing eventLoop' errorPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2348
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2349
    JavaEventThread := Processor activeProcess.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2350
    [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2351
        [ true ] whileTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2352
            AbortSignal handle: [:ex | ex return ] do: [ self doWindowsEventThread. ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2353
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2354
    ] valueNowOrOnUnwindDo: [ JavaEventThread := nil. ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2355
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2356
    "Created: / 17-11-1998 / 23:58:33 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2357
    "Modified: / 08-01-1999 / 17:08:35 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2358
    "Modified: / 22-11-2011 / 13:25:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2359
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2360
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2361
_MToolkit_eventLoop: nativeContext
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2362
    | toolKit |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2363
    (JavaEventThread notNil and: [ JavaEventThread isDead not ]) ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2364
        'JavaVM [warning]: oops - two threads executing eventLoop' errorPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2365
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2366
    toolKit := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2367
    self halt: 'monitors has changer, update me if you know how and why'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2368
    "self wakeup: toolKit."
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2369
    self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2370
    JavaEventThread := Processor activeProcess.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2371
    [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2372
        [ true ] whileTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2373
            AbortSignal handle: [:ex | ex return ] do: [ self doWindowsEventThread. ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2374
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2375
    ] valueNowOrOnUnwindDo: [ JavaEventThread := nil. ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2376
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2377
    "Created: / 17-11-1998 / 23:04:29 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2378
    "Modified: / 08-01-1999 / 17:08:21 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2379
    "Modified: / 22-11-2011 / 13:24:56 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2380
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2381
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2382
_MToolkit_init: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2383
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2384
    "Created: / 28.1.1998 / 22:21:54 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2385
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2386
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2387
_MToolkit_loadSystemColors: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2388
    ^ self _WToolkit_loadSystemColors: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2389
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2390
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2391
_MToolkit_run: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2392
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2393
    "Created: / 28.1.1998 / 22:22:10 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2394
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2395
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2396
_Math_IEEEremainder: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2397
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2398
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2399
    "Created: / 12.11.1998 / 18:52:36 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2400
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2401
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2402
_Math_acos: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2403
    "arc cosine"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2404
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2405
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2406
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2407
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2408
"/    (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2409
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2410
"/            'JAVAVM [info]: missing double flag in Math>>acos' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2411
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2412
"/            self halt:'expected double arg'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2413
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2414
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2415
    ^ dVal arcCos
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2416
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2417
    "Created: / 7.5.1998 / 00:34:50 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2418
    "Modified: / 11.11.1998 / 15:08:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2419
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2420
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2421
_Math_asin: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2422
    "arc sine"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2423
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2424
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2425
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2426
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2427
"/    (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2428
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2429
"/            'JAVAVM [info]: missing double flag in Math>>asin' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2430
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2431
"/            self halt:'expected double arg'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2432
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2433
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2434
    ^ dVal arcSin
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2435
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2436
    "Created: / 7.5.1998 / 00:34:26 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2437
    "Modified: / 11.11.1998 / 15:08:15 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2438
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2439
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2440
_Math_atan2: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2441
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2442
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2443
    "Created: / 12.11.1998 / 18:52:52 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2444
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2445
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2446
_Math_atan: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2447
    "arc tangens"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2448
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2449
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2450
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2451
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2452
"/    (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2453
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2454
"/            'JAVAVM [info]: missing double flag in Math>>atan' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2455
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2456
"/            self halt:'expected double arg'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2457
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2458
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2459
    ^ dVal arcTan
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2460
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2461
    "Created: / 6.2.1998 / 01:24:12 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2462
    "Modified: / 11.11.1998 / 15:08:11 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2463
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2464
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2465
_Math_ceil: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2466
    "ceiling"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2467
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2468
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2469
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2470
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2471
"/    (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2472
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2473
"/            'JAVAVM [info]: missing double flag in Math>>ceil' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2474
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2475
"/            self halt:'expected double arg'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2476
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2477
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2478
    ^ dVal ceilingAsFloat
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2479
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2480
    "Created: / 7.1.1998 / 15:43:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2481
    "Modified: / 11.11.1998 / 15:08:04 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2482
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2483
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2484
_Math_cos: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2485
    "cosine"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2486
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2487
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2488
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2489
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2490
"/    (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2491
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2492
"/            'JAVAVM [info]: missing double flag in Math>>cos' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2493
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2494
"/            self halt:'expected double arg'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2495
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2496
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2497
    ^ dVal cos
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2498
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2499
    "Created: / 7.1.1998 / 15:41:30 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2500
    "Modified: / 11.11.1998 / 15:07:59 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2501
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2502
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2503
_Math_exp: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2504
    "exponential"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2505
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2506
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2507
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2508
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2509
"/    (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2510
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2511
"/            'JAVAVM [info]: missing double flag in Math>>exp' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2512
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2513
"/            self halt:'expected double arg'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2514
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2515
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2516
    ^ dVal exp
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2517
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2518
    "Created: / 7.5.1998 / 00:36:19 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2519
    "Modified: / 11.11.1998 / 15:07:50 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2520
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2521
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2522
_Math_floor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2523
    "floor"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2524
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2525
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2526
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2527
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2528
"/    (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2529
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2530
"/            'JAVAVM [info]: missing double flag in Math>>floor' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2531
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2532
"/            self halt:'expected double arg'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2533
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2534
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2535
    ^ dVal floorAsFloat
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2536
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2537
    "Created: / 7.1.1998 / 19:09:21 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2538
    "Modified: / 11.11.1998 / 15:07:45 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2539
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2540
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2541
_Math_log: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2542
    "natural logarithm"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2543
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2544
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2545
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2546
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2547
"/    (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2548
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2549
"/            'JAVAVM [info]: missing double flag in Math>>log' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2550
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2551
"/            self halt:'expected double arg'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2552
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2553
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2554
    ^ dVal ln
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2555
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2556
    "Created: / 7.1.1998 / 15:42:19 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2557
    "Modified: / 30.12.1998 / 17:41:42 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2558
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2559
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2560
_Math_pow: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2561
    "power"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2562
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2563
    |dVal1 dVal2|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2564
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2565
    dVal1 := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2566
"/    (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2567
"/        dVal1 isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2568
"/            'JAVAVM [info]: missing double flag in Math>>pow' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2569
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2570
"/            self halt:'expected double arg'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2571
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2572
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2573
    dVal2 := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2574
"/    (nativeContext argAt:4) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2575
"/        dVal2 isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2576
"/            'JAVAVM [info]: missing double flag in Math>>pow' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2577
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2578
"/            self halt:'expected double arg'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2579
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2580
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2581
    ^ dVal1 raisedTo:dVal2
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2582
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2583
    "Created: / 7.1.1998 / 15:44:13 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2584
    "Modified: / 11.11.1998 / 15:07:33 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2585
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2586
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2587
_Math_rint: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2588
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2589
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2590
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2591
    ^ dVal rounded asFloat.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2592
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2593
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2594
_Math_sin: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2595
    "sine"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2596
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2597
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2598
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2599
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2600
"/    (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2601
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2602
"/            'JAVAVM [info]: missing double flag in Math>>sin' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2603
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2604
"/            self halt:'expected double arg'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2605
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2606
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2607
    ^ dVal sin
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2608
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2609
    "Created: / 7.1.1998 / 15:41:40 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2610
    "Modified: / 11.11.1998 / 15:07:09 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2611
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2612
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2613
_Math_sqrt: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2614
    "square root"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2615
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2616
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2617
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2618
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2619
"/    (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2620
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2621
"/            'JAVAVM [info]: missing double flag in Math>>sqrt' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2622
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2623
"/            self halt:'expected double arg'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2624
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2625
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2626
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2627
    "/ how about domain errors ?
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2628
    dVal < 0 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2629
        ^ 0.0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2630
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2631
    ^ dVal sqrt
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2632
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2633
    "Created: / 7.1.1998 / 15:42:40 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2634
    "Modified: / 29.12.1998 / 13:22:36 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2635
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2636
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2637
_Math_tan: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2638
    "tangent"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2639
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2640
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2641
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2642
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2643
"/    (nativeContext argAt:2) ~~ DUMMY_DOUBLE_HIGHWORD ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2644
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2645
"/            'JAVAVM [info]: missing double flag in Math>>tan' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2646
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2647
"/            self halt:'expected double arg'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2648
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2649
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2650
    ^ dVal tan
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2651
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2652
    "Created: / 7.5.1998 / 00:34:03 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2653
    "Modified: / 11.11.1998 / 15:07:14 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2654
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2655
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2656
_MemoryAdvice_register0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2657
    "private native void register0()"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2658
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2659
    "/ UnimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2660
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2661
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2662
_Method_getModifiers: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2663
    |jMethod mthd retVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2664
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2665
    jMethod := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2666
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2667
    mthd := JavaMethods at:jMethod ifAbsent:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2668
    mthd isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2669
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2670
        ^ 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2671
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2672
    ^ mthd accessFlags
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2673
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2674
    "Modified: / 9.4.1998 / 17:50:01 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2675
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2676
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2677
_MozillaAppletContext_pMochaOnLoad: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2678
    |id|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2679
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2680
    id := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2681
"/ 'JAVA: MozillaAppletContext_pMochaOnLoad: ' print. id printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2682
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2683
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2684
    "Created: / 6.1.1998 / 20:37:13 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2685
    "Modified: / 6.2.1998 / 02:13:09 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2686
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2687
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2688
_MozillaAppletContext_pShowDocument: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2689
    |jAppletContext s1 s2 s3 js|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2690
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2691
    jAppletContext := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2692
    js := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2693
    s1 := Java as_ST_String:js.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2694
    js := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2695
    s2 := Java as_ST_String:js.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2696
    js := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2697
    s2 := Java as_ST_String:js.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2698
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2699
    "/ somehow pass it to the html browser ....
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2700
Transcript show:'pShowDocument: '; show:s1; show:' / ';
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2701
           show:s2; show:' / '; showCR:s3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2702
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2703
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2704
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2705
    "Created: / 29.3.1998 / 15:53:17 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2706
    "Modified: / 29.12.1998 / 13:32:41 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2707
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2708
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2709
_MozillaAppletContext_pShowStatus: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2710
    |s js|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2711
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2712
    js := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2713
    js isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2714
        s := ''
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2715
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2716
        s := Java as_ST_String:js.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2717
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2718
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2719
    self activityNotification:s.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2720
"/ Transcript showCR:s.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2721
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2722
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2723
    "Created: / 6.1.1998 / 18:31:34 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2724
    "Modified: / 22.10.1998 / 01:17:46 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2725
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2726
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2727
_MozillaAppletContext_setConsoleState0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2728
    "/ void setConsoleState0 (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2729
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2730
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2731
    "Created: / 12.11.1998 / 19:23:22 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2732
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2733
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2734
_ObjectInputStream_allocateNewArray: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2735
    "/ java.lang.Object allocateNewArray (java.lang.Class int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2736
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2737
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2738
    "Modified: / 12.11.1998 / 19:01:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2739
    "Created: / 12.11.1998 / 19:02:52 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2740
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2741
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2742
_ObjectInputStream_allocateNewObject: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2743
    "/ java.lang.Object allocateNewObject (java.lang.Class java.lang.Class)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2744
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2745
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2746
    "Modified: / 12.11.1998 / 19:01:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2747
    "Created: / 12.11.1998 / 19:02:40 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2748
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2749
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2750
_ObjectInputStream_inputClassFields: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2751
    "/ void inputClassFields (java.lang.Object java.lang.Class int[])
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2752
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2753
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2754
    "Modified: / 12.11.1998 / 19:01:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2755
    "Created: / 12.11.1998 / 19:02:22 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2756
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2757
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2758
_ObjectInputStream_invokeDefaultReadObject: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2759
    "/ void invokeDefaultReadObject (java.lang.Object java.lang.Class)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2760
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2761
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2762
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2763
    "Created: / 27.1.2000 / 03:00:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2764
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2765
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2766
_ObjectInputStream_invokeObjectReader: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2767
    "/ boolean invokeObjectReader (java.lang.Object java.lang.Class)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2768
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2769
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2770
    "Modified: / 12.11.1998 / 19:01:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2771
    "Created: / 12.11.1998 / 19:03:06 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2772
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2773
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2774
_ObjectInputStream_invokeReadObject: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2775
    "/ void invokeReadObject (java.lang.Object java.lang.Class)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2776
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2777
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2778
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2779
    "Created: / 27.1.2000 / 03:01:02 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2780
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2781
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2782
_ObjectInputStream_loadClass0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2783
    "/ java.lang.Class loadClass0 (java.lang.Class java.lang.String)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2784
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2785
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2786
    "Created: / 12.11.1998 / 19:01:15 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2787
    "Modified: / 12.11.1998 / 19:01:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2788
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2789
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2790
_ObjectOutputStream_invokeDefaultWriteObject: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2791
    "/ void invokeDefaultWriteObject (java.lang.Object java.lang.Class)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2792
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2793
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2794
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2795
    "Created: / 27.1.2000 / 03:01:36 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2796
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2797
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2798
_ObjectOutputStream_invokeObjectWriter: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2799
    "/ boolean invokeObjectWriter (java.lang.Object java.lang.Class)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2800
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2801
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2802
    "Created: / 12.11.1998 / 19:00:36 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2803
    "Modified: / 12.11.1998 / 19:01:45 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2804
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2805
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2806
_ObjectOutputStream_invokeWriteObject: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2807
    "/ void invokeWriteObject (java.lang.Object java.lang.Class)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2808
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2809
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2810
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2811
    "Created: / 27.1.2000 / 03:01:52 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2812
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2813
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2814
_ObjectOutputStream_outputClassFields: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2815
    "/ void outputClassFields (java.lang.Object java.lang.Class int[])
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2816
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2817
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2818
    "Created: / 12.11.1998 / 19:00:09 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2819
    "Modified: / 12.11.1998 / 19:01:42 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2820
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2821
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2822
_ObjectStreamClass_doMismatchedRead: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2823
    "/ void doMismatchedRead (java.io.ObjectInputStream java.lang.Object)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2824
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2825
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2826
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2827
    "Created: / 27.1.2000 / 02:50:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2828
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2829
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2830
_ObjectStreamClass_findObjectMethod0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2831
    "/ boolean findObjectMethod0 (java.lang.Class int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2832
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2833
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2834
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2835
    "Created: / 27.1.2000 / 02:51:50 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2836
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2837
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2838
_ObjectStreamClass_getClassAccess: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2839
    "/ int getClassAccess (java.lang.Class)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2840
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2841
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2842
    "Modified: / 12.11.1998 / 19:01:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2843
    "Created: / 12.11.1998 / 19:04:19 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2844
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2845
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2846
_ObjectStreamClass_getClassDefinedUID: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2847
    "/ long getClassDefinedUID (java.lang.Class)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2848
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2849
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2850
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2851
    "Created: / 27.1.2000 / 02:51:33 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2852
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2853
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2854
_ObjectStreamClass_getFieldAccess: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2855
    "/ int getFieldAccess (java.lang.Class java.lang.String)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2856
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2857
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2858
    "Modified: / 12.11.1998 / 19:01:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2859
    "Created: / 12.11.1998 / 19:05:19 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2860
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2861
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2862
_ObjectStreamClass_getFieldSignatures: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2863
    "/ java.lang.String[] getFieldSignatures (java.lang.Class)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2864
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2865
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2866
    "Modified: / 12.11.1998 / 19:01:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2867
    "Created: / 12.11.1998 / 19:05:04 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2868
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2869
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2870
_ObjectStreamClass_getFields0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2871
    "/ java.io.ObjectStreamField[] getFields0 (java.lang.Class)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2872
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2873
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2874
    "Modified: / 12.11.1998 / 19:01:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2875
    "Created: / 12.11.1998 / 19:05:32 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2876
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2877
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2878
_ObjectStreamClass_getMethodAccess: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2879
    "/ int getMethodAccess (java.lang.Class java.lang.String)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2880
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2881
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2882
    "Modified: / 12.11.1998 / 19:01:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2883
    "Created: / 12.11.1998 / 19:04:51 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2884
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2885
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2886
_ObjectStreamClass_getMethodSignatures: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2887
    "/ java.lang.String[] getMethodSignatures (java.lang.Class)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2888
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2889
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2890
    "Modified: / 12.11.1998 / 19:01:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2891
    "Created: / 12.11.1998 / 19:04:34 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2892
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2893
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2894
_ObjectStreamClass_getSerialVersionUID: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2895
    "/ long getSerialVersionUID (java.lang.Class)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2896
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2897
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2898
    "Modified: / 12.11.1998 / 19:01:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2899
    "Created: / 12.11.1998 / 19:05:43 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2900
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2901
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2902
_ObjectStreamClass_hasWriteObject: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2903
    "/ boolean hasWriteObject (java.lang.Class)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2904
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2905
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2906
    "Modified: / 12.11.1998 / 19:01:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2907
    "Created: / 12.11.1998 / 19:05:53 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2908
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2909
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2910
_OffScreenImageSource_sendPixels: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2911
    "/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2912
    "/ UnimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2913
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2914
    "Modified: / 16.1.1998 / 18:22:23 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2915
    "Created: / 17.1.1998 / 12:36:25 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2916
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2917
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2918
_PackedColorModel_initIDs: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2919
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2920
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2921
    "Created: / 28.1.1998 / 22:19:35 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2922
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2923
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2924
_PlainDatagramSocketImpl_bind: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2925
    |jsock jaddr port sock hostName ok err|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2926
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2927
    jsock := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2928
    port := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2929
    jaddr := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2930
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2931
    hostName := jaddr instVarNamed:'hostName'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2932
    hostName isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2933
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2934
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2935
        hostName := Java as_ST_String:hostName
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2936
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2937
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2938
    sock := self validateFile:jsock.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2939
    sock notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2940
        FileIOTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2941
            ('JAVA: socket bind to ' , hostName printString, ' port ' , port printString) infoPrintCR
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2942
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2943
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2944
        ok := sock bindTo:port address:nil "hostName".
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2945
        ok ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2946
            err := OperatingSystem lastErrorString.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2947
            Transcript showCR:'sock err: ' , err printString.
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2948
            JavaVM throwIOExceptionWithMessage:'bind failed'.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2949
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2950
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2951
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2952
    "Created: / 4.2.1998 / 15:06:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2953
    "Modified: / 30.12.1998 / 20:10:16 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2954
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2955
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2956
_PlainDatagramSocketImpl_join: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2957
    "/ native void join (InetAddress arg1)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2958
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2959
    |jsock addr sock ok err|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2960
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2961
    jsock := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2962
    addr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2963
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2964
    sock := self validateFile:jsock.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2965
    sock notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2966
        FileIOTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2967
            ('JAVA: socket join ' , addr printString) infoPrintCR
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2968
        ].
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2969
        JavaVM throwIOExceptionWithMessage:'unimplemented: join'.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2970
self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2971
        ^ nil.  "/ void
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2972
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2973
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2974
    "Created: / 4.2.1998 / 15:06:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2975
    "Modified: / 30.12.1998 / 20:10:16 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2976
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2977
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2978
_PlainDatagramSocketImpl_receive: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2979
    |jsock jdatagramPacket sock ok|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2980
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2981
    jsock := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2982
    jdatagramPacket := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2983
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2984
    sock := self validateFile:jsock.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2985
    sock notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2986
        FileIOTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2987
            ('JAVA: socket receive') infoPrintCR
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2988
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2989
        ^ -1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2990
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2991
    ^ -1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2992
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2993
    "Created: / 4.2.1998 / 15:06:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2994
    "Modified: / 30.12.1998 / 20:10:16 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2995
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2996
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2997
_PlainDatagramSocketImpl_socketGetOption: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2998
    |jsock opt port sock hostName ok err|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2999
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3000
    jsock := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3001
    opt := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3002
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3003
    sock := self validateFile:jsock.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3004
    sock notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3005
        FileIOTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3006
            ('JAVA: socket getOption ' , opt printString) infoPrintCR
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3007
        ].
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3008
        JavaVM throwIOExceptionWithMessage:'unimplemented: getOption'.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3009
self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3010
        ^ -1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3011
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3012
    ^ -1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3013
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3014
    "Created: / 4.2.1998 / 15:06:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3015
    "Modified: / 30.12.1998 / 20:10:16 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3016
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3017
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3018
_PlainSocketImpl_socketAvailable: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3019
    |jSock sock n|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3020
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3021
    jSock := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3022
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3023
    sock := self validateFile:jSock.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3024
    sock isNil ifTrue:[
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3025
        JavaVM throwIOExceptionWithMessage:'socketAvailable on closed socket'.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3026
        ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3027
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3028
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3029
    n := sock numAvailable.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3030
    ^ n
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3031
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3032
    "Created: / 4.2.1998 / 16:58:49 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3033
    "Modified: / 30.12.1998 / 20:10:08 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3034
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3035
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3036
_PlainSocketImpl_socketClose: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3037
    |jsock sock|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3038
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3039
    jsock := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3040
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3041
    sock := self validateFile:jsock.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3042
    sock notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3043
        FileIOTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3044
            'JAVA: close socket' infoPrintCR
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3045
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3046
        sock close.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3047
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3048
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3049
    "Modified: / 21.8.1997 / 17:09:40 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3050
    "Created: / 25.1.1998 / 20:04:24 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3051
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3052
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3053
_PlatformFont_initIDs: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3054
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3055
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3056
    "Created: / 28.1.1998 / 22:30:41 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3057
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3058
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3059
_PrintStream_isOutputStreamLocalised: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3060
    "/ boolean isOutputStreamLocalised (java.io.DataOutputStream)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3061
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3062
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3063
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3064
    "Created: / 27.1.2000 / 03:00:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3065
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3066
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3067
_RandomAccessFile_close: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3068
    ^ self anyStream_close: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3069
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3070
    "Created: / 4.2.1998 / 13:26:53 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3071
    "Modified: / 4.2.1998 / 15:21:08 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3072
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3073
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3074
_Runtime_buildLibName: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3075
    |jPath jFileName path fileName libName|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3076
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3077
    jPath := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3078
    jFileName := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3079
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3080
    path := Java as_ST_String:jPath.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3081
    fileName := Java as_ST_String:jFileName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3082
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3083
    path = '__builtIn__' ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3084
        libName := path , '/' , fileName
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3085
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3086
        libName := path , '/lib' , fileName , '.so'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3087
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3088
    ^ Java as_String:libName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3089
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3090
    "Modified: / 8.8.1997 / 12:05:05 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3091
    "Created: / 4.1.1998 / 19:07:14 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3092
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3093
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3094
_Runtime_execInternal: nativeContext
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3095
    "Run a unix-command; return a process object."
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3096
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3097
    | cmdAndArgArray  envArray  cmd  jProcessClass  jProcess |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3098
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3099
    cmdAndArgArray := nativeContext argAt: 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3100
    envArray := nativeContext argAt: 2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3101
    cmd := cmdAndArgArray at: 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3102
    OperatingSystem isUNIXlike ifTrue: [
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3103
        jProcessClass := JavaVM classForName:'java.lang.UNIXProcess'.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3104
    ] ifFalse: [ jProcessClass := Java classForName: 'java.lang.Win32Process'. ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3105
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3106
"/
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3107
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3108
    jProcessClass notNil ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3109
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3110
        jProcess := jProcessClass newCleared.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3111
        jProcess
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3112
            perform: #'<init>([Ljava/lang/String;[Ljava/lang/String;)V'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3113
            with: cmdAndArgArray
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3114
            with: envArray.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3115
        ^ jProcess
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3116
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3117
    self halt.
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3118
    JavaVM 
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3119
    throwIOExceptionWithMessage:'Process execution disabled/unimplemented'.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3120
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3121
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3122
    "Created: / 15.1.1998 / 01:50:31 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3123
    "Modified: / 11.12.1998 / 13:09:36 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3124
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3125
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3126
_Runtime_initializeLinkerInternal: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3127
    "init sharedLib linker, return searchPath as javaString"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3128
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3129
    |path|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3130
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3131
    "/ mhmh - what is done here ?
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3132
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3133
    path := ''.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3134
    LibPath do:[:comp | path size == 0 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3135
                            path := path , comp
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3136
                        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3137
                            path := path , ':' , comp
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3138
                        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3139
               ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3140
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3141
    ^ Java as_String:path
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3142
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3143
    "Modified: / 7.8.1997 / 21:17:03 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3144
    "Created: / 4.1.1998 / 17:53:15 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3145
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3146
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3147
_Runtime_isInputStreamLocalised: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3148
    "/ boolean isInputStreamLocalised (java.io.DataInputStream)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3149
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3150
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3151
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3152
    "Created: / 27.1.2000 / 03:03:01 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3153
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3154
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3155
_Runtime_isOutputStreamLocalised: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3156
    "/ boolean isOutputStreamLocalised (java.io.DataOutputStream)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3157
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3158
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3159
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3160
    "Created: / 27.1.2000 / 03:02:49 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3161
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3162
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3163
_Runtime_loadFileInternal: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3164
    "load a sharedLib, return boolean 0 (false) if fail; 1 (true) if ok"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3165
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3166
    |ret|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3167
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3168
    ret := self _Runtime_loadFileInternalI: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3169
    ret < 0 ifTrue:[ ret := 0 ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3170
    ^ ret
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3171
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3172
    "Created: / 4.1.1998 / 19:10:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3173
    "Modified: / 4.1.1998 / 19:11:04 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3174
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3175
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3176
_Runtime_loadFileInternalI: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3177
    "1.1b3 change; load a sharedLib like 'loadFileInternal',
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3178
     but return integer:
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3179
        -1   outOfMemory error
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3180
        0    failed to load
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3181
        1    loaded or already loaded (i.e. ok)"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3182
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3183
    |jLibName libName libHandle|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3184
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3185
    jLibName := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3186
    libName := Java as_ST_String:jLibName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3187
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3188
    (SimulatedLibs includes:libName) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3189
"/        ('JAVA: builtIn libLoad simulated: ' , libName) printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3190
        ^ 1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3191
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3192
    (LoadedLibs notNil and:[LoadedLibs includesKey:libName]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3193
"/        ('JAVA: already loaded: ' , libName) printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3194
        ^ 1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3195
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3196
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3197
    libName asFilename exists ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3198
        ('JAVA: no file to load: ' , libName) printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3199
        ^ 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3200
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3201
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3202
    (self confirm:'permission to load native library: ' , libName , ' ?') ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3203
        ^ 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3204
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3205
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3206
    libHandle := ObjectFileLoader loadLibrary:libName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3207
    libHandle isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3208
        ('JAVA: failed to load: ' , libName) printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3209
        ^ 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3210
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3211
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3212
    LoadedLibs isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3213
        LoadedLibs := Dictionary new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3214
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3215
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3216
    LoadedLibs at:libName put:libHandle.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3217
    ^ 1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3218
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3219
    "Created: / 4.1.1998 / 19:10:54 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3220
    "Modified: / 6.2.1998 / 03:11:59 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3221
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3222
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3223
_Runtime_runFinalization: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3224
    "/ void runFinalization ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3225
"/    UnimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3226
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3227
    "Modified: / 12.11.1998 / 18:52:07 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3228
    "Created: / 12.11.1998 / 18:59:01 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3229
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3230
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3231
_Runtime_runFinalizersOnExit0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3232
    ""
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3233
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3234
    |onOff|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3235
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3236
    onOff := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3237
    ^ 1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3238
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3239
    "Modified: / 6.2.1998 / 03:11:59 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3240
    "Created: / 15.10.1998 / 23:34:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3241
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3242
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3243
_Runtime_setInputStreamLocalised: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3244
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3245
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3246
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3247
    "Modified: / 27.1.2000 / 03:02:27 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3248
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3249
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3250
_Runtime_setOutputStreamLocalised: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3251
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3252
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3253
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3254
    "Modified: / 27.1.2000 / 03:02:32 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3255
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3256
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3257
_Runtime_totalMemory: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3258
    "free memory - Returns the total number of bytes"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3259
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3260
    ^ ObjectMemory oldSpaceSize + ObjectMemory newSpaceSize
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3261
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3262
    "Created: / 12.1.1998 / 12:59:23 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3263
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3264
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3265
_Runtime_traceInstructions: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3266
    "/ void traceInstructions (boolean)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3267
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3268
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3269
    "Modified: / 12.11.1998 / 18:52:07 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3270
    "Created: / 12.11.1998 / 18:59:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3271
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3272
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3273
_Runtime_traceMethodCalls: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3274
    "/ void traceMethodCalls (boolean)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3275
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3276
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3277
    "Modified: / 12.11.1998 / 18:52:07 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3278
    "Created: / 12.11.1998 / 18:59:37 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3279
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3280
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3281
_ScrollPane_initIDs: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3282
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3283
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3284
    "Created: / 28.1.1998 / 22:19:23 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3285
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3286
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3287
_SecurityManager_classDepth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3288
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3289
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3290
    "Modified: / 12.11.1998 / 18:52:07 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3291
    "Created: / 12.11.1998 / 18:56:27 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3292
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3293
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3294
_SecurityManager_classLoaderDepth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3295
    |con depth|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3296
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3297
    con := thisContext sender.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3298
    depth := 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3299
    [con notNil] whileTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3300
        con receiver == JavaClassReader classLoaderQuerySignal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3301
            con selector == #handle:do: ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3302
                depth := depth + 1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3303
            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3304
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3305
        con := con sender.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3306
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3307
'JAVA: classLoaderDepth -> ' infoPrint. depth infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3308
    ^ depth.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3309
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3310
    "Created: / 13.1.1998 / 09:21:46 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3311
    "Modified: / 13.1.1998 / 09:33:43 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3312
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3313
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3314
_SecurityManager_currentClassLoader: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3315
    |loader|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3316
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3317
    loader := JavaClassReader classLoaderQuerySignal query.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3318
"/ 'JAVA: currentClassLoader -> ' infoPrint. loader displayString infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3319
    ^ loader.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3320
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3321
    "Created: / 13.1.1998 / 09:23:28 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3322
    "Modified: / 11.12.1998 / 12:39:59 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3323
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3324
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3325
_SecurityManager_currentLoadedClass0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3326
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3327
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3328
    "Modified: / 12.11.1998 / 18:52:07 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3329
    "Created: / 12.11.1998 / 18:56:41 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3330
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3331
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3332
_SocketInputStream_socketRead: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3333
    ^ self anyStream_readBytes: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3334
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3335
    "Created: / 25.1.1998 / 20:56:53 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3336
    "Modified: / 4.2.1998 / 15:52:31 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3337
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3338
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3339
_SocketOutputStream_socketWrite: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3340
    ^ self anyStream_writeBytes: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3341
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3342
    "Created: / 25.1.1998 / 21:06:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3343
    "Modified: / 4.2.1998 / 15:52:40 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3344
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3345
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3346
_String_compareTo: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3347
    "int compareTo (java.lang.String)"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3348
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3349
    |jString1 jString2|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3350
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3351
    jString1 := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3352
    jString2 := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3353
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3354
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3355
    "Created: / 27.1.2000 / 02:28:59 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3356
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3357
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3358
_String_equals: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3359
    |jString1 jString2|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3360
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3361
    jString1 := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3362
    jString2 := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3363
    ^ (jString1 instVarAt:1) = (jString2 instVarAt:1)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3364
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3365
    "Created: / 18.11.1998 / 00:52:03 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3366
    "Modified: / 18.11.1998 / 00:53:01 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3367
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3368
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3369
_String_equalsIgnoreCase: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3370
    "boolean equalsIgnoreCase (java.lang.String)"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3371
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3372
    |jString1 jString2|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3373
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3374
self halt:'untested'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3375
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3376
    jString1 := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3377
    jString2 := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3378
    ^ (jString1 instVarAt:1) sameAs: (jString2 instVarAt:1)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3379
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3380
    "Modified: / 18.11.1998 / 00:53:01 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3381
    "Created: / 27.1.2000 / 02:27:46 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3382
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3383
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3384
_String_indexOf: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3385
    "int indexOf (java.lang.String int)"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3386
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3387
    |jString1 jString2 idx|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3388
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3389
    jString1 := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3390
    jString2 := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3391
    idx := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3392
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3393
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3394
    "Created: / 27.1.2000 / 02:30:22 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3395
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3396
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3397
_String_lastIndexOf: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3398
    "int lastIndexOf (java.lang.String int)"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3399
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3400
    |jString1 jString2 idx|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3401
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3402
    jString1 := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3403
    jString2 := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3404
    idx := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3405
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3406
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3407
    "Created: / 27.1.2000 / 02:33:59 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3408
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3409
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3410
_String_length: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3411
    |jString|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3412
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3413
    jString := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3414
    ^ (jString instVarAt:3)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3415
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3416
    "Created: / 18.11.1998 / 00:53:50 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3417
    "Modified: / 18.11.1998 / 00:54:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3418
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3419
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3420
_String_regionMatches2: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3421
    "boolean regionMatches (boolean int java.lang.String int int)"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3422
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3423
    |jString1 bool jString2 idx1 idx2|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3424
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3425
    jString1 := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3426
    bool := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3427
    jString2 := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3428
    idx1 := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3429
    idx2 := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3430
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3431
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3432
    "Created: / 27.1.2000 / 02:33:40 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3433
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3434
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3435
_String_regionMatches: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3436
    "boolean regionMatches (int java.lang.String int int)"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3437
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3438
    |jString1 jString2 idx1 idx2|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3439
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3440
    jString1 := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3441
    jString2 := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3442
    idx1 := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3443
    idx2 := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3444
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3445
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3446
    "Created: / 27.1.2000 / 02:32:29 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3447
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3448
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3449
_String_startsWith: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3450
    "boolean startsWith (java.lang.String int)"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3451
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3452
    |jString1 jString2 idx|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3453
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3454
    jString1 := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3455
    jString2 := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3456
    idx := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3457
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3458
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3459
    "Created: / 27.1.2000 / 02:31:40 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3460
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3461
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3462
_SystemColor_GetSysColor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3463
    "/ int GetSysColor (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3464
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3465
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3466
    "Created: / 27.1.2000 / 02:44:41 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3467
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3468
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3469
_SystemResourceManager_getEntryFromKey: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3470
    "get a resource by name"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3471
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3472
    |key s|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3473
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3474
    key := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3475
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3476
    s := Java effectiveClassPath at:(key+1) ifAbsent:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3477
    s isNil ifTrue:[^ nil].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3478
    ^ Java as_String:s
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3479
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3480
    "Modified: / 22-11-2010 / 13:44:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3481
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3482
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3483
_SystemResourceManager_validateSystemResource: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3484
    "check a resource"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3485
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3486
    |bool str1 str2|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3487
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3488
    bool := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3489
    str1 := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3490
    str2 := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3491
    ^ 1 "/ true
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3492
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3493
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3494
_System_getCallerClass: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3495
    "/ introduced with jdk1.2
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3496
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3497
    |senderContext cls|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3498
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3499
    senderContext := nativeContext sender.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3500
    [senderContext receiver == (Java at:'java.lang.System')] whileTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3501
        senderContext := senderContext sender.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3502
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3503
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3504
    senderContext method isStatic ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3505
        cls := senderContext receiver
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3506
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3507
        cls := senderContext receiver class
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3508
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3509
    cls isJavaClass ifTrue:[
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3510
        ^ Reflection javaClassObjectForClass:cls
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3511
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3512
    (cls isMemberOf:(Java at:'java.lang.Class')) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3513
        ^ Java at:'java.lang.Class'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3514
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3515
    self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3516
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3517
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3518
    "Modified: / 27.1.1998 / 18:33:13 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3519
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3520
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3521
_System_validateSecurityManager: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3522
    "void validateSecurityManager (java.lang.SecurityManager)"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3523
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3524
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3525
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3526
    "Created: / 27.1.2000 / 02:43:25 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3527
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3528
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3529
_ThreadGroup_initMainThreadGroup0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3530
    "void initMainThreadGroup0 (java.lang.ThreadGroup)"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3531
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3532
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3533
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3534
    "Created: / 27.1.2000 / 02:45:52 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3535
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3536
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3537
_Thread_countStackFrames: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3538
    "/ int countStackFrames ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3539
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3540
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3541
    "Created: / 12.11.1998 / 19:06:21 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3542
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3543
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3544
_Thread_start: nativeContext
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3545
    "start the thread"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3546
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3547
    | jThread  jName  name  stProcess |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3548
    jThread := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3549
    (jThread instVarNamed: 'priority') < 1 ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3550
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3551
        jThread instVarNamed: 'priority' put: 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3552
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3553
    stProcess := JavaProcess
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3554
                for: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3555
                    | procName |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3556
                    Object abortSignal
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3557
                        handle: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3558
                            :ex |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3559
                            procName := stProcess name.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3560
                            (procName startsWith: 'JAVA-AWT-EventQueue') ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3561
                                ('JAVA [info]: thread ' , procName , ' aborted - restarting process.')
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3562
                                    infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3563
                                ex restart.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3564
                            ] ifFalse: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3565
                                (stProcess == JavaScreenUpdaterThread
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3566
                                    or: [ stProcess == JavaEventQueueThread ])
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3567
                                        ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3568
                                            ('JAVA [info]: thread ' , procName , ' aborted - restarting process.')
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3569
                                                infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3570
                                            ex restart
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3571
                                        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3572
                                        ifFalse: [ ('JAVA [info]: thread ' , procName , ' aborted.') infoPrintCR. ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3573
                            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3574
                        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3575
                        do: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3576
                            [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3577
                                JavaVM javaExceptionSignal
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3578
                                    handle: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3579
                                        :ex |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3580
                                        | exClass |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3581
                                        procName := stProcess name.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3582
                                        exClass := ex parameter class.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3583
                                        exClass == (Java at: 'java.lang.ThreadDeath') ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3584
                                            ('JAVA: thread ' , procName , ' terminated') infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3585
                                        ] ifFalse: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3586
                                            Transcript
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3587
                                                showCR: ('JAVA: thread ''' , procName , ''' terminated with exception: '
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3588
                                                        , exClass name).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3589
                                        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3590
                                        ex return.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3591
                                    ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3592
                                    do: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3593
                                        Object messageNotUnderstoodSignal
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3594
                                            handle: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3595
                                                :ex |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3596
                                                |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3597
                                                "/ remap doesNotUnderstand with nil-receiver to
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3598
                                                "/ a nullPointerException ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3599
                                                 con  m |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3600
                                                con := ex suspendedContext.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3601
                                                con receiver isNil ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3602
                                                    ((m := con sender method) notNil and: [ m isJavaMethod ]) ifTrue: [
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3603
                                                        JavaVM throwNullPointerException.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3604
                                                        AbortSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3605
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3606
                                                        "/ ex proceed.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3607
                                                    ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3608
                                                ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3609
                                                ex reject.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3610
                                            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3611
                                            do: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3612
                                                "/ Transcript showCR:(Timestamp now printString , 'start thread: ', stProcess name).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3613
                                                jThread perform: #'run()V'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3614
                                                ThreadTrace == true ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3615
                                                    ('JAVA: thread ' , stProcess name , ' terminated') infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3616
                                                ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3617
                                                jThread perform: #'exit()V'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3618
                                                ThreadTrace == true ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3619
                                                    ('JAVA: after exit of thread ' , stProcess name) infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3620
                                                ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3621
                                            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3622
                                    ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3623
                            ] ensure: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3624
                                | monitors |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3625
                                monitors := EnteredMonitorsPerProcess at: stProcess ifAbsent: nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3626
                                monitors notNil ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3627
                                    monitors do: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3628
                                        :obj |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3629
                                        | mon |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3630
                                        mon := obj getJavaMonitorFor.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3631
                                        mon notNil ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3632
                                            mon owningProcess == stProcess ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3633
                                                ('JAVA: release monitor owned by dying thread: ' , stProcess name)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3634
                                                    infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3635
                                                mon exit
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3636
                                            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3637
                                        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3638
                                    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3639
                                    EnteredMonitorsPerProcess removeKey: stProcess.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3640
                                    stProcess == JavaScreenUpdaterThread ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3641
                                        JavaScreenUpdaterThread := nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3642
                                    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3643
                                    stProcess == JavaEventQueueThread ifTrue: [ JavaEventQueueThread := nil. ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3644
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3645
"/                                    screenUpdaterClass := Java at:'sun.awt.ScreenUpdater'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3646
"/                                    screenUpdaterClass notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3647
"/                                        screenUpdaterClass instVarNamed:'updater' put:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3648
"/                                    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3649
                                ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3650
                                Java removeThread: jThread ifAbsent: [].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3651
                            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3652
                        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3653
                ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3654
                priority: (Processor activePriority).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3655
    jName := jThread instVarNamed: 'name'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3656
    jName isString ifFalse: [ name := Java as_ST_String: jName. ] ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3657
        name := jName
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3658
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3659
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3660
    "/ kludge - remember the ScreenUpdater ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3661
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3662
    name = 'Screen Updater' ifTrue: [ JavaScreenUpdaterThread := stProcess. ] ifFalse: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3663
        name = 'AWT-Windows' ifTrue: [ JavaEventThread := stProcess. ] ifFalse: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3664
            (name startsWith: 'AWT-EventQueue') ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3665
                JavaEventQueueThread := stProcess.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3666
            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3667
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3668
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3669
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3670
"/name = 'UserDialogShowThread' ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3671
"/self halt
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3672
"/].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3673
    "/ when that process terminates, wakup any waiters
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3674
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3675
    stProcess addExitAction: [ self notify: jThread ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3676
    stProcess name: 'JAVA-' , name.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3677
    stProcess restartable: true.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3678
    stProcess resume.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3679
    Java addThread: jThread for: stProcess.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3680
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3681
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3682
    "Created: / 03-01-1998 / 02:05:52 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3683
    "Modified: / 24-12-1999 / 03:14:33 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3684
    "Modified: / 09-12-2011 / 12:52:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3685
    "Modified: / 27-08-2012 / 11:36:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3686
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3687
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3688
_Thread_suspend0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3689
    "yield"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3690
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3691
    |jThread stProcess|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3692
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3693
    jThread := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3694
    stProcess := JavaVM stProcessForJavaThread:jThread.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3695
    stProcess isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3696
        ThreadTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3697
            ('JAVA: no stProcess for javaThread: ' , jThread displayString) printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3698
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3699
        ^ nil "void"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3700
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3701
    stProcess suspend
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3702
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3703
    "Created: / 8.1.1998 / 01:05:49 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3704
    "Modified: / 6.2.1998 / 02:15:23 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3705
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3706
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3707
_Throwable_printStackTrace0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3708
    |out outStream exceptionObject contextList|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3709
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3710
    outStream := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3711
    exceptionObject := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3712
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3713
    contextList := exceptionObject instVarNamed:'backtrace'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3714
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3715
    out := self javaConsoleStream.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3716
    out cr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3717
    out nextPutLine:'JAVA: stackTrace:'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3718
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3719
    contextList do:[:con |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3720
        out
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3721
            nextPutAll:'  ';
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3722
            nextPutAll:(con method javaClass fullName);
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3723
            nextPutAll:'.';
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3724
            nextPutAll:(con method selector);
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3725
            nextPutAll:' [';
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3726
            nextPutAll:(con method javaClass sourceFile);
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3727
            nextPutAll:' ';
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3728
            nextPutAll:(con quickLineNumber displayString);
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3729
            nextPutAll:']'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3730
        out cr
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3731
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3732
    out nextPutLine:'----------------------------------------------------'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3733
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3734
    "Created: / 4.1.1998 / 14:27:40 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3735
    "Modified: / 10.11.1998 / 14:19:32 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3736
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3737
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3738
_URLConnection_close: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3739
    "/ void close ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3740
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3741
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3742
    "Created: / 12.11.1998 / 19:26:03 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3743
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3744
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3745
_URLConnection_finalize: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3746
    "/ void finalize ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3747
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3748
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3749
    "Created: / 12.11.1998 / 19:25:22 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3750
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3751
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3752
_URLConnection_getContentLength0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3753
    "/ int getContentLength0 ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3754
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3755
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3756
    "Created: / 12.11.1998 / 19:25:34 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3757
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3758
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3759
_URLConnection_getContentType0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3760
    "/ java.lang.String getContentType0 ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3761
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3762
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3763
    "Created: / 12.11.1998 / 19:25:42 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3764
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3765
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3766
_URLConnection_getHeaderField0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3767
    "/ java.lang.String getHeaderField0 (java.lang.String)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3768
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3769
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3770
    "Created: / 12.11.1998 / 19:25:53 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3771
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3772
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3773
_URLConnection_pCreate: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3774
    "/ void pCreate (java.lang.String java.lang.String)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3775
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3776
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3777
    "Created: / 12.11.1998 / 19:25:14 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3778
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3779
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3780
_URLInputStream_available: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3781
    "/ int available ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3782
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3783
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3784
    "Created: / 12.11.1998 / 19:24:26 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3785
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3786
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3787
_URLInputStream_open: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3788
    "/ void open ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3789
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3790
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3791
    "Created: / 12.11.1998 / 19:24:01 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3792
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3793
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3794
_URLInputStream_read: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3795
    "/ int read (byte[] int int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3796
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3797
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3798
    "Created: / 12.11.1998 / 19:24:12 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3799
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3800
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3801
_URLOutputStream_open: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3802
    "/ void open ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3803
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3804
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3805
    "Created: / 12.11.1998 / 19:24:38 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3806
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3807
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3808
_URLOutputStream_pClose: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3809
    "/ void pClose ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3810
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3811
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3812
    "Created: / 12.11.1998 / 19:25:02 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3813
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3814
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3815
_URLOutputStream_write: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3816
    "/ void write (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3817
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3818
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3819
    "Created: / 12.11.1998 / 19:24:45 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3820
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3821
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3822
_URLOutputStream_writeBytes: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3823
    "/ void writeBytes (byte[] int int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3824
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3825
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3826
    "Created: / 12.11.1998 / 19:24:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3827
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3828
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3829
_URLStreamHandlerFactory_pInit: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3830
    "/ self unimplementedNativeMethod.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3831
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3832
    "Created: / 10.1.1998 / 15:47:24 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3833
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3834
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3835
_URLStreamHandlerFactory_pSupportsProtocol: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3836
    "/ boolean pSupportsProtocol (java.lang.String)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3837
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3838
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3839
    "Created: / 12.11.1998 / 19:23:43 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3840
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3841
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3842
_VM_getState: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3843
    "/ int getState ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3844
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3845
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3846
    "Created: / 12.11.1998 / 19:06:44 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3847
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3848
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3849
_VM_resetJavaMonitor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3850
    "/ void resetJavaMonitor ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3851
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3852
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3853
    "Created: / 14.11.1998 / 10:43:23 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3854
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3855
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3856
_VM_resumeJavaMonitor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3857
    "/ void resumeJavaMonitor ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3858
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3859
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3860
    "Created: / 14.11.1998 / 10:42:49 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3861
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3862
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3863
_VM_suspendJavaMonitor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3864
    "/ void suspendJavaMonitor ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3865
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3866
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3867
    "Created: / 14.11.1998 / 10:43:07 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3868
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3869
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3870
_VM_threadsSuspended: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3871
    "/ boolean threadsSuspended ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3872
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3873
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3874
    "Created: / 12.11.1998 / 19:07:10 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3875
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3876
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3877
_VM_unsuspendSomeThreads: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3878
    "/ void unsuspendSomeThreads ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3879
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3880
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3881
    "Created: / 12.11.1998 / 19:07:29 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3882
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3883
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3884
_VM_unsuspendThreads: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3885
    "/ void unsuspendThreads ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3886
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3887
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3888
    "Created: / 12.11.1998 / 19:07:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3889
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3890
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3891
_VM_writeJavaMonitorReport: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3892
    "/ void writeJavaMonitorReport ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3893
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3894
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3895
    "Created: / 14.11.1998 / 10:43:37 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3896
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3897
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3898
_WButtonPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3899
    |jButtonPeer jButton jFrame frame button
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3900
     lbl|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3901
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3902
    jButtonPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3903
    jButton := jButtonPeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3904
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3905
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3906
    frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3907
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3908
    button := Button in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3909
    button sizeFixed:true.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3910
    button action:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3911
                        jButtonPeer perform:#'handleAction()V'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3912
                  ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3913
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3914
    lbl := jButton instVarNamed:'label'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3915
    lbl notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3916
        lbl := Java as_ST_String:lbl.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3917
        button label:lbl
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3918
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3919
    self createdWindowsView:button for:jButtonPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3920
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3921
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3922
        'WButtonPeer_create: ' print. frame print. ' -> ' print. button printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3923
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3924
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3925
    "Created: / 5.1.1998 / 01:53:30 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3926
    "Modified: / 11.12.1998 / 00:19:22 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3927
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3928
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3929
_WButtonPeer_setLabel: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3930
    |label jString|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3931
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3932
    jString := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3933
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3934
    label := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3935
    label label:(Java as_ST_String:jString)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3936
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3937
    "Modified: / 8.1.1998 / 17:35:50 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3938
    "Created: / 1.2.1998 / 17:05:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3939
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3940
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3941
_WCanvasPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3942
    |jCanvasPeer jFrame frame subView|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3943
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3944
    jCanvasPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3945
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3946
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3947
    jFrame isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3948
        self halt:'no frame in canvasPeer create'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3949
        subView := JavaView new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3950
"/        self internalError:'no frame in canvasPeer create'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3951
"/        ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3952
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3953
        frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3954
        subView := JavaView in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3955
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3956
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3957
    subView delegate:self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3958
    subView javaPeer:jCanvasPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3959
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3960
    self createdWindowsView:subView for:jCanvasPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3961
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3962
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3963
        'WCanvasPeer_create: ' print. frame print. ' -> ' print. subView printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3964
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3965
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3966
    "Created: / 5.1.1998 / 00:59:19 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3967
    "Modified: / 16.1.1998 / 13:40:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3968
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3969
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3970
_WCheckboxMenuItemPeer_setState: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3971
    "/ void setState (boolean)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3972
"/    UnimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3973
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3974
    "Created: / 12.11.1998 / 19:14:35 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3975
    "Modified: / 3.12.1998 / 21:41:13 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3976
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3977
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3978
_WCheckboxPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3979
    |jCheckboxPeer jCheckbox jFrame frame checkBox lbl|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3980
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3981
    jCheckboxPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3982
    jCheckbox := jCheckboxPeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3983
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3984
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3985
    frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3986
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3987
    checkBox := CheckBox in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3988
    checkBox action:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3989
                        jCheckboxPeer
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3990
                            perform:#'handleAction(Z)V'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3991
                            with:(checkBox isOn ifTrue:[1] ifFalse:[0])
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3992
                    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3993
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3994
    lbl := jCheckbox instVarNamed:'label'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3995
    lbl notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3996
        lbl := Java as_ST_String:lbl.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3997
        checkBox label:lbl
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3998
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3999
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4000
    self createdWindowsView:checkBox for:jCheckboxPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4001
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4002
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4003
        'WCheckboxPeer_create: ' print. frame print. ' -> ' print. checkBox printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4004
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4005
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4006
    "Created: / 7.1.1998 / 21:48:03 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4007
    "Modified: / 15.1.1998 / 12:27:04 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4008
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4009
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4010
_WCheckboxPeer_setCheckboxGroup: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4011
    |checkBox jGroup|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4012
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4013
    checkBox := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4014
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4015
    jGroup := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4016
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4017
    "Created: / 7.1.1998 / 21:48:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4018
    "Modified: / 25.1.1998 / 01:20:42 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4019
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4020
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4021
_WCheckboxPeer_setLabel: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4022
    "/ void setLabel (java.lang.String)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4023
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4024
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4025
    "Created: / 12.11.1998 / 19:14:53 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4026
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4027
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4028
_WCheckboxPeer_setState: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4029
    |checkBox state|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4030
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4031
    checkBox := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4032
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4033
    state := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4034
    state ~~ 0 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4035
        checkBox turnOn
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4036
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4037
        checkBox turnOff
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4038
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4039
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4040
    "Created: / 7.1.1998 / 21:49:13 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4041
    "Modified: / 25.1.1998 / 01:26:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4042
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4043
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4044
_WChoicePeer_addItem: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4045
    |jString index comboBox|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4046
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4047
    comboBox := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4048
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4049
    jString := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4050
    index := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4051
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4052
    comboBox model list addLast:(Java as_ST_String:jString).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4053
    comboBox model changed:#list.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4054
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4055
    "Created: / 7.1.1998 / 21:45:12 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4056
    "Modified: / 24.1.1998 / 18:51:32 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4057
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4058
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4059
_WChoicePeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4060
    |jChoicePeer jChoice jFrame frame comboBox|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4061
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4062
    jChoicePeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4063
    jChoice := jChoicePeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4064
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4065
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4066
    frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4067
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4068
    comboBox := ComboListView in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4069
    comboBox model:(SelectionInList new list:(OrderedCollection new)).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4070
    comboBox action:[:index |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4071
                        jChoicePeer
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4072
                            perform:#'handleAction(I)V'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4073
                            with:(comboBox model selectionIndex - 1)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4074
                    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4075
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4076
    self createdWindowsView:comboBox for:jChoicePeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4077
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4078
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4079
        'WChoicePeer_create: ' print. frame print. ' -> ' print. comboBox printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4080
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4081
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4082
    "Created: / 7.1.1998 / 21:44:31 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4083
    "Modified: / 28.1.1998 / 23:19:17 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4084
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4085
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4086
_WChoicePeer_remove: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4087
    "/ void remove (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4088
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4089
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4090
    "Created: / 12.11.1998 / 19:12:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4091
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4092
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4093
_WChoicePeer_reshape: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4094
    self commonReshapeComponent: nativeContext.
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4095
"/    self pReshape: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4096
    ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4097
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4098
    "Created: / 7.1.1998 / 21:46:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4099
    "Modified: / 23.12.1998 / 19:08:07 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4100
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4101
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4102
_WChoicePeer_select: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4103
    |comboBox index|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4104
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4105
    comboBox := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4106
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4107
    index := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4108
    comboBox model selectionIndex:(index + 1).  "/ JAVA indexing starts at 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4109
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4110
    "Created: / 7.1.1998 / 21:45:43 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4111
    "Modified: / 25.1.1998 / 09:55:05 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4112
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4113
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4114
_WClipboard_getClipboardText: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4115
    "/ java.lang.String getClipboardText ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4116
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4117
    |str|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4118
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4119
    str := Screen current rootView getTextSelection.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4120
    str isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4121
        str := ''.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4122
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4123
    ^ Java as_String:''.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4124
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4125
    "Modified: / 10.12.1998 / 21:28:29 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4126
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4127
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4128
_WClipboard_init: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4129
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4130
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4131
    "Modified: / 18.3.1997 / 18:43:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4132
    "Created: / 4.1.1998 / 19:03:59 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4133
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4134
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4135
_WClipboard_setClipboardText: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4136
    "/ void setClipboardText (java.awt.datatransfer.StringSelection)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4137
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4138
    |strSel data|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4139
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4140
    strSel := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4141
    data := strSel instVarNamed:'data'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4142
    data class == (Java at:'java.lang.String') ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4143
        Screen current rootView setTextSelection:(Java as_ST_String:data)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4144
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4145
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4146
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4147
    "Created: / 12.11.1998 / 19:15:31 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4148
    "Modified: / 10.12.1998 / 21:25:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4149
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4150
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4151
_WColor_getDefaultColor: nativeContext
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4152
    | clrIndex  jClr  clr |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4153
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4154
    clrIndex := nativeContext argAt: 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4155
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4156
    "/ windows defaults:
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4157
    "/  1: view background
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4158
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4159
    clrIndex == 1 ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4160
        clr := View defaultViewBackgroundColor.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4161
        clr isColor ifFalse: [ clr := Color gray: 50. ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4162
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4163
    clrIndex == 2 ifTrue: [ clr := Color black. ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4164
    clr isNil ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4165
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4166
        self internalError: 'breakpoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4167
        ^ nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4168
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4169
    clr := clr on: (Screen current).
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4170
    jClr := (JavaVM classForName:'java.awt.Color') new.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4171
    jClr instVarNamed: 'pData' put: clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4172
    jClr instVarNamed: 'value' put: (clr rgbValue).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4173
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4174
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4175
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4176
    ^ jClr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4177
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4178
    "Created: / 15.8.1997 / 15:38:10 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4179
    "Modified: / 4.1.1998 / 18:06:51 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4180
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4181
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4182
_WComponentPeer__beginValidate: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4183
    "/ void _beginValidate ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4184
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4185
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4186
    "Created: / 12.11.1998 / 19:10:08 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4187
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4188
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4189
_WComponentPeer__dispose: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4190
    |view jPeer|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4191
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4192
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4193
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4194
    Object errorSignal catch:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4195
        view destroy.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4196
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4197
    JavaWindowGroup removeView:view.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4198
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4199
    jPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4200
    jPeer instVarNamed:'pData' put:0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4201
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4202
    "Created: / 7.1.1998 / 22:36:25 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4203
    "Modified: / 25.1.1998 / 16:43:06 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4204
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4205
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4206
_WComponentPeer__setBackground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4207
    |rgb clr view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4208
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4209
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4210
    view isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4211
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4212
    rgb := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4213
    clr := Color rgbValue:rgb.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4214
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4215
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4216
"/ self internalError:'breakPoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4217
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4218
    clr := clr on:(view device).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4219
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4220
"/    (view superView isMemberOf:JavaEmbeddedFrameView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4221
"/        view viewBackground:(view superView viewBackground).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4222
"/        view backgroundPaint:(view superView viewBackground).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4223
"/    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4224
"/        (view isMemberOf:JavaView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4225
"/            view viewBackground:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4226
"/            view backgroundPaint:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4227
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4228
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4229
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4230
    (view isKindOf:ScrollableView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4231
        view := view scrolledView
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4232
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4233
    view viewBackground:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4234
    view backgroundPaint:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4235
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4236
    "Created: / 4.1.1998 / 18:07:39 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4237
    "Modified: / 4.12.1998 / 17:26:06 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4238
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4239
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4240
_WComponentPeer__setForeground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4241
    |rgb clr view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4242
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4243
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4244
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4245
    rgb := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4246
    clr := Color rgbValue:rgb.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4247
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4248
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4249
"/ self internalError:'breakPoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4250
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4251
    clr := clr on:(view device).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4252
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4253
    view paint:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4254
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4255
    "Created: / 4.1.1998 / 18:08:13 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4256
    "Modified: / 8.1.1998 / 17:32:45 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4257
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4258
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4259
_WComponentPeer_disable: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4260
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4261
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4262
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4263
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4264
    Object errorSignal handle:[:ex |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4265
    ] do:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4266
        view disable
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4267
    ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4268
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4269
    "Created: / 6.1.1998 / 18:26:36 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4270
    "Modified: / 8.1.1998 / 17:32:53 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4271
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4272
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4273
_WComponentPeer_enable: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4274
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4275
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4276
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4277
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4278
    Object errorSignal handle:[:ex |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4279
    ] do:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4280
        view enable
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4281
    ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4282
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4283
    "Modified: / 8.1.1998 / 17:32:53 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4284
    "Created: / 13.1.1998 / 23:08:05 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4285
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4286
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4287
_WComponentPeer_endValidate: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4288
    "/ void endValidate ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4289
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4290
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4291
    "Created: / 12.11.1998 / 19:10:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4292
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4293
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4294
_WComponentPeer_getLocationOnScreen: nativeContext
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4295
    "/ java.awt.Point getLocationOnScreen ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4296
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4297
    | view  p  jP |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4298
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4299
    view := self viewForWPeer: nativeContext.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4300
    view isNil ifTrue: [ ^ nil ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4301
    p := view originRelativeTo: nil.
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4302
    jP := (JavaVM classForName:'java.awt.Point') basicNew.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4303
    jP instVarNamed: 'x' put: p x.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4304
    jP instVarNamed: 'y' put: p y.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4305
    ^ jP
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4306
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4307
    "Modified: / 5.12.1998 / 14:44:31 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4308
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4309
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4310
_WComponentPeer_handleEvent: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4311
    "this is invoked by java, to let a widget handle any event which
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4312
     was not consumed (eaten) by java.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4313
     If the view in question is some ST-widget, forward it.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4314
     Ignore for JavaViews."
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4315
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4316
    |view jEv stEv ignore|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4317
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4318
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4319
    view notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4320
        jEv := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4321
        stEv := jEv instVarNamed:'data'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4322
        (stEv notNil and:[stEv ~~ 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4323
            ignore := true.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4324
            view isJavaView ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4325
                ignore := false
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4326
            ] ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4327
                view isTopView ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4328
                    stEv type == #terminate ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4329
                        ignore := false
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4330
                    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4331
                ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4332
            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4333
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4334
            ignore ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4335
                EventTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4336
                    ('JAVA: WComponent - handleEvent: ' , stEv type , ' for ' , view printString) infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4337
                ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4338
                view dispatchEvent:stEv.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4339
                ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4340
            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4341
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4342
            EventTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4343
                ('JAVA: WComponent - handleEvent ignored:' , stEv type) infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4344
            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4345
            ^ self
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4346
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4347
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4348
    EventTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4349
        ('JAVA: WComponent - handleEvent ignored') infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4350
    ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4351
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4352
    "Created: / 6.1.1998 / 21:10:17 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4353
    "Modified: / 11.12.1998 / 01:04:14 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4354
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4355
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4356
_WComponentPeer_hide: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4357
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4358
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4359
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4360
"/ view isPopUpView ifTrue:[self halt].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4361
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4362
    Object errorSignal handle:[:ex |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4363
    ] do:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4364
        view beInvisible
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4365
    ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4366
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4367
    "Created: / 7.1.1998 / 22:35:32 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4368
    "Modified: / 4.12.1998 / 17:53:41 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4369
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4370
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4371
_WComponentPeer_nativeHandleEvent: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4372
    "this is invoked by java, to let a widget handle any event which
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4373
     was not consumed (eaten) by java.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4374
     If the view in question is some ST-widget, forward it.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4375
     Ignore for JavaViews."
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4376
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4377
    |view jEv stEv|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4378
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4379
^self.
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4380
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4381
    view notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4382
        (view isKindOf:JavaView) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4383
            jEv := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4384
            stEv := jEv instVarNamed:'data'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4385
            (stEv notNil and:[stEv ~~ 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4386
                EventTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4387
                    ('JAVA: WComponent - handleEvent: ' , stEv type , ' for ' , view printString) infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4388
                ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4389
                stEv sendEventWithFocusOn:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4390
                ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4391
            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4392
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4393
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4394
    EventTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4395
        ('JAVA: WComponent - handleEvent ignored') infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4396
    ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4397
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4398
    "Created: / 19.10.1998 / 21:26:16 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4399
    "Modified: / 19.10.1998 / 23:26:37 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4400
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4401
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4402
_WComponentPeer_requestFocus: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4403
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4404
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4405
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4406
"/ 'getFocus - ' print. view displayString printCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4407
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4408
"/    view getKeyboardFocus
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4409
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4410
    "Created: / 7.1.1998 / 22:30:03 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4411
    "Modified: / 4.12.1998 / 19:42:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4412
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4413
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4414
_WComponentPeer_reshape: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4415
    self commonReshapeComponent: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4416
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4417
    "Modified: / 18.3.1997 / 19:30:21 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4418
    "Created: / 4.1.1998 / 18:01:11 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4419
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4420
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4421
_WComponentPeer_setBackground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4422
    |jClr rgb clr view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4423
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4424
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4425
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4426
    jClr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4427
    rgb := jClr instVarNamed:'value'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4428
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4429
    clr := Color rgbValue:rgb.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4430
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4431
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4432
    clr := clr on:(view device).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4433
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4434
"/    (view superView isMemberOf:JavaEmbeddedFrameView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4435
"/        view viewBackground:(view superView viewBackground).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4436
"/        view backgroundPaint:(view superView viewBackground).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4437
"/    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4438
"/        (view isMemberOf:JavaView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4439
"/            view viewBackground:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4440
"/            view backgroundPaint:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4441
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4442
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4443
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4444
    (view isKindOf:ScrollableView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4445
        view := view scrolledView
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4446
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4447
    view viewBackground:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4448
    view backgroundPaint:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4449
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4450
    "Created: / 16.10.1998 / 02:16:31 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4451
    "Modified: / 16.10.1998 / 02:26:29 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4452
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4453
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4454
_WComponentPeer_setCursor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4455
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4456
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4457
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4458
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4459
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4460
    "Created: / 5.1.1998 / 01:52:30 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4461
    "Modified: / 25.1.1998 / 01:21:52 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4462
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4463
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4464
_WComponentPeer_setFont: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4465
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4466
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4467
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4468
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4469
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4470
    "Created: / 5.1.1998 / 00:55:17 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4471
    "Modified: / 25.1.1998 / 01:22:19 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4472
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4473
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4474
_WComponentPeer_setForeground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4475
    |jClr rgb clr view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4476
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4477
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4478
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4479
    jClr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4480
    rgb := jClr instVarNamed:'value'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4481
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4482
    clr := Color rgbValue:rgb.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4483
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4484
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4485
    clr := clr on:(view device).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4486
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4487
    (view isKindOf:ScrollableView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4488
        view := view scrolledView
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4489
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4490
    view paint:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4491
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4492
    "Created: / 16.10.1998 / 02:18:58 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4493
    "Modified: / 16.10.1998 / 02:26:37 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4494
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4495
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4496
_WComponentPeer_setZOrderPosition: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4497
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4498
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4499
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4500
"/    self unimplementedNativeMethod.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4501
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4502
"/ self internalError:'breakPoint'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4503
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4504
    "Created: / 4.1.1998 / 17:59:26 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4505
    "Modified: / 25.1.1998 / 01:22:32 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4506
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4507
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4508
_WComponentPeer_show: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4509
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4510
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4511
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4512
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4513
    "/ frame views are under my browsers own control
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4514
    (view isMemberOf:JavaEmbeddedFrameView) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4515
        view beVisible.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4516
        view realize.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4517
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4518
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4519
"/    view windowGroup notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4520
"/        windowServer addGroup:(view windowGroup)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4521
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4522
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4523
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4524
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4525
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4526
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4527
    "Created: / 5.1.1998 / 01:26:22 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4528
    "Modified: / 4.12.1998 / 17:43:53 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4529
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4530
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4531
_WComponentPeer_start: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4532
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4533
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4534
    "Modified: / 18.3.1997 / 18:43:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4535
    "Created: / 5.1.1998 / 00:58:40 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4536
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4537
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4538
_WContainerPeer_calculateInsets: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4539
    "/ new with ns4.0 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4540
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4541
    "Created: / 16.10.1998 / 02:12:59 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4542
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4543
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4544
_WDefaultFontCharset_canConvert: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4545
    ^ 1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4546
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4547
    "Modified: / 21.8.1997 / 15:56:57 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4548
    "Created: / 5.1.1998 / 01:55:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4549
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4550
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4551
_WDialogPeer__hide: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4552
    |dialog|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4553
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4554
    dialog := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4555
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4556
    dialog hide.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4557
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4558
    "Created: / 7.1.1998 / 22:34:10 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4559
    "Modified: / 8.1.1998 / 17:34:10 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4560
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4561
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4562
_WDialogPeer__show: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4563
    |dialog|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4564
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4565
    dialog := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4566
"/
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4567
"/ show does not work (yet); must setup windowgroup
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4568
"/ for it to get events ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4569
"/    dialog realize.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4570
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4571
dialog show.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4572
"/dialog fixSize.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4573
"/dialog makeFullyVisible.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4574
"/dialog openModal:[true] inGroup:JavaWindowGroup
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4575
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4576
    "Created: / 7.1.1998 / 21:52:15 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4577
    "Modified: / 11.12.1998 / 14:43:05 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4578
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4579
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4580
_WDialogPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4581
    |jDialogPeer dialog|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4582
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4583
    jDialogPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4584
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4585
    dialog := ModalBox new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4586
    jDialogPeer instVarNamed:'pData' put:dialog.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4587
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4588
    self createdWindowsView:dialog for:jDialogPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4589
    dialog windowGroup:JavaWindowGroup.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4590
    JavaWindowGroup addTopView:dialog.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4591
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4592
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4593
        'WDialogPeer_create: ' print. dialog printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4594
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4595
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4596
    "Created: / 7.1.1998 / 21:51:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4597
    "Modified: / 15.1.1998 / 16:12:44 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4598
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4599
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4600
_WDrawingSurfaceInfo_getDepth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4601
    "/ int getDepth ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4602
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4603
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4604
    "Created: / 12.11.1998 / 19:21:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4605
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4606
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4607
_WDrawingSurfaceInfo_getHBitmap: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4608
    "/ int getHBitmap ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4609
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4610
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4611
    "Created: / 12.11.1998 / 19:20:32 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4612
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4613
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4614
_WDrawingSurfaceInfo_getHDC: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4615
    "/ int getHDC ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4616
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4617
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4618
    "Created: / 12.11.1998 / 19:20:50 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4619
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4620
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4621
_WDrawingSurfaceInfo_getHPalette: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4622
    "/ int getHPalette ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4623
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4624
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4625
    "Created: / 12.11.1998 / 19:21:07 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4626
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4627
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4628
_WDrawingSurfaceInfo_getHWnd: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4629
    "/ int getHWnd ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4630
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4631
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4632
    "Created: / 12.11.1998 / 19:20:23 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4633
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4634
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4635
_WDrawingSurfaceInfo_getPBits: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4636
    "/ int getPBits ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4637
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4638
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4639
    "Created: / 12.11.1998 / 19:20:41 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4640
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4641
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4642
_WDrawingSurfaceInfo_lock: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4643
    "/ int lock ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4644
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4645
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4646
    "Created: / 12.11.1998 / 19:20:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4647
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4648
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4649
_WDrawingSurfaceInfo_unlock: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4650
    "/ void unlock ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4651
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4652
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4653
    "Created: / 12.11.1998 / 19:20:13 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4654
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4655
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4656
_WEmbeddedFramePeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4657
    "/ void create (sun.awt.windows.WComponentPeer)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4658
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4659
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4660
    "Created: / 12.11.1998 / 19:16:09 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4661
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4662
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4663
_WFileDialogPeer_show: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4664
    |jDialogPeer jDialog dialogView stDialog
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4665
     title dir pattern f|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4666
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4667
    jDialogPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4668
    jDialog := jDialogPeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4669
    dialogView := jDialogPeer instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4670
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4671
    stDialog := FileSelectionBox new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4672
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4673
    dir := jDialog instVarNamed:'dir'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4674
    dir notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4675
        stDialog directory:(Java as_ST_String:dir).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4676
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4677
    pattern := jDialog instVarNamed:'file'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4678
    pattern notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4679
        stDialog pattern:(Java as_ST_String:pattern).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4680
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4681
    title := jDialog instVarNamed:'title'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4682
    title notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4683
        stDialog title:(Java as_ST_String:title).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4684
        stDialog label:(Java as_ST_String:title).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4685
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4686
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4687
    stDialog show.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4688
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4689
    stDialog accepted ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4690
        f := stDialog pathName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4691
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4692
        "/ cannot use the one below - it has a builtIn fileSeparator if '\' (sigh)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4693
        "/ jDialogPeer perform:#'handleSelected(Ljava/lang/String;)V' with:(Java as_String:f).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4694
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4695
        jDialog
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4696
            perform:#'setFile(Ljava/lang/String;)V'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4697
            with:(Java as_String:(f asFilename baseName)).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4698
        jDialog
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4699
            perform:#'setDirectory(Ljava/lang/String;)V'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4700
            with:(Java as_String:(f asFilename directoryName , Filename separator asString)).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4701
        jDialog
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4702
            perform:#'setVisible(Z)V'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4703
            with:0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4704
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4705
        jDialogPeer
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4706
            perform:#'handleCancel()V'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4707
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4708
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4709
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4710
    "Created: / 7.1.1998 / 22:38:45 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4711
    "Modified: / 15.1.1998 / 13:04:05 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4712
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4713
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4714
_WFontMetrics_bytesWidth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4715
    "/ int bytesWidth (byte[] int int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4716
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4717
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4718
    "Created: / 12.11.1998 / 19:11:46 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4719
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4720
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4721
_WFontMetrics_getMFCharSegmentWidth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4722
    "get multi-font string-segment width.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4723
     Not yet supported - use standard strings width"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4724
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4725
    |jMetrics jFont jFontDescr stFont w
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4726
     bool1 cp offs lenght bp int1|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4727
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4728
    jMetrics := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4729
    jFont := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4730
    jFontDescr := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4731
    bool1 := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4732
    cp := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4733
    offs := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4734
    lenght := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4735
    bp := nativeContext argAt:7.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4736
    int1 := nativeContext argAt:8.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4737
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4738
    stFont := jFont instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4739
    (stFont isNil or:[stFont == 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4740
        self halt
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4741
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4742
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4743
    stFont device isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4744
        stFont := stFont on:Display.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4745
        jFont instVarNamed:'pData' put:stFont.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4746
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4747
    w := stFont widthOf:cp from:offs+1 to:offs+lenght.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4748
    ^ w.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4749
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4750
    "Created: / 5.1.1998 / 01:57:45 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4751
    "Modified: / 13.1.1998 / 23:44:03 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4752
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4753
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4754
_WFontMetrics_init: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4755
    |jMetrics jFont stFont widths family name style size|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4756
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4757
    jMetrics := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4758
    jFont := jMetrics instVarNamed:'font'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4759
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4760
    family := jFont instVarNamed:'family'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4761
    family := Java as_ST_String:family.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4762
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4763
    name := jFont instVarNamed:'name'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4764
    name := Java as_ST_String:name.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4765
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4766
    style := jFont instVarNamed:'style'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4767
    size := jFont instVarNamed:'size'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4768
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4769
    stFont := Font family:family size:size.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4770
    stFont isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4771
        stFont := Font family:'helvetica' size:size.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4772
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4773
    stFont := stFont on:Display.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4774
self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4775
"/    stFont := jFont instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4776
"/    stFont isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4777
"/        self halt
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4778
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4779
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4780
    stFont := stFont on:Display.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4781
    jFont instVarNamed:'pData' put:stFont.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4782
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4783
    jMetrics instVarNamed:'ascent'     put:stFont ascent.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4784
    jMetrics instVarNamed:'descent'    put:stFont descent.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4785
    jMetrics instVarNamed:'leading'    put:0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4786
    jMetrics instVarNamed:'height'     put:stFont height.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4787
    jMetrics instVarNamed:'maxAscent'  put:stFont maxAscent.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4788
    jMetrics instVarNamed:'maxDescent' put:stFont maxDescent.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4789
    jMetrics instVarNamed:'maxHeight'  put:stFont maxHeight.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4790
    jMetrics instVarNamed:'maxAdvance' put:stFont maxWidth.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4791
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4792
    widths := Array new:256.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4793
    0 to:255 do:[:i |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4794
        widths at:(i+1) put:(stFont widthOf:(Character value:i))
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4795
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4796
    jMetrics instVarNamed:'widths' put:widths.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4797
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4798
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4799
    "Modified: / 8.8.1997 / 12:06:53 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4800
    "Created: / 5.1.1998 / 01:54:29 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4801
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4802
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4803
_WFontMetrics_needsConversion: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4804
    |jFont jFontDescr stFont|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4805
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4806
    jFont := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4807
    jFontDescr := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4808
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4809
    stFont := jFont instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4810
"/    stFont isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4811
"/        self halt
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4812
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4813
"/    stFont device isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4814
"/        stFont := stFont on:Display.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4815
"/        jFont instVarNamed:'pData' put:stFont.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4816
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4817
"/
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4818
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4819
    ^ 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4820
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4821
    "Modified: / 17.8.1997 / 17:16:29 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4822
    "Created: / 5.1.1998 / 01:56:42 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4823
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4824
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4825
_WFramePeer__setIconImage: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4826
    |frame imgRep image|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4827
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4828
    frame := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4829
    imgRep := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4830
    imgRep notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4831
        image := imgRep instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4832
        (image notNil and:[image ~~ 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4833
            frame icon:image.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4834
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4835
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4836
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4837
    "Created: / 27.4.1998 / 17:15:09 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4838
    "Modified: / 27.4.1998 / 17:18:24 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4839
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4840
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4841
_WFramePeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4842
    |jFramePeer jFrame top frame pDataIdx|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4843
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4844
    jFramePeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4845
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4846
    "/ for now: a kludge to create an embedded frame for
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4847
    "/ mozillaFrames
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4848
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4849
    jFrame := jFramePeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4850
    (jFrame notNil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4851
    and:[(pDataIdx := jFrame class instVarOffsetOf:'pData') notNil])
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4852
    ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4853
        ((frame := jFrame instVarAt:pDataIdx) notNil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4854
        and:[frame ~~ 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4855
            WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4856
                'JAVA: targetFrame view already created: ' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4857
            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4858
            "/ sigh; pData was renamed to pNativeWidget in jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4859
            pDataIdx := jFramePeer class instVarOffsetOf:'pNativeWidget'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4860
            pDataIdx isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4861
                "/ ok, we are < 1.2
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4862
                pDataIdx := jFramePeer class instVarOffsetOf:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4863
            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4864
            jFramePeer instVarAt:pDataIdx put:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4865
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4866
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4867
        frame := jFramePeer instVarNamed:'pData'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4868
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4869
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4870
    (frame notNil and:[frame ~~ 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4871
        WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4872
            'JAVA: frame view already created: ' infoPrint.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4873
            jFramePeer class name infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4874
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4875
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4876
"/ OLD
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4877
"/        frame := StandardSystemView new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4878
"/        self createdWindowsView:frame for:jFramePeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4879
"/        JavaWindowGroup addTopView:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4880
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4881
        frame := JavaTopView new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4882
        frame delegate:self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4883
        frame javaPeer:jFramePeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4884
        self createdWindowsView:frame for:jFramePeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4885
        JavaWindowGroup addTopView:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4886
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4887
"/        top := StandardSystemView new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4888
"/        frame := JavaView origin:0.0@0.0 corner:1.0@1.0 in:top.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4889
"/        frame delegate:self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4890
"/        frame javaPeer:jFramePeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4891
"/        self createdWindowsView:frame for:jFramePeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4892
"/        JavaWindowGroup addTopView:top.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4893
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4894
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4895
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4896
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4897
        'JAVA: WFramePeer_create: ' print. jFramePeer displayString print.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4898
        ' frame: ' print. frame printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4899
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4900
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4901
    "Created: / 4.1.1998 / 17:56:39 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4902
    "Modified: / 3.12.1998 / 00:10:21 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4903
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4904
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4905
_WFramePeer_setMenuBar0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4906
    |frame jMenuBarPeer menuPanel|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4907
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4908
    frame := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4909
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4910
    jMenuBarPeer := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4911
    jMenuBarPeer isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4912
        "/ mhmh - JAVA wants to remove the frames menuPanel.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4913
        "/ but I have no handle on it (for destroy).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4914
        "/ search it in subViews of the frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4915
        frame subViews copy do:[:v |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4916
            (v isKindOf:MenuPanel) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4917
                v destroy
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4918
            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4919
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4920
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4921
        menuPanel := jMenuBarPeer instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4922
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4923
        menuPanel origin:0.0@0.0 corner:1.0@(menuPanel preferredExtent y).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4924
        frame addSubView:menuPanel.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4925
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4926
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4927
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4928
    "Created: / 7.1.1998 / 21:41:35 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4929
    "Modified: / 8.1.1998 / 17:35:04 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4930
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4931
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4932
_WFramePeer_setResizable: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4933
    |view onOff|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4934
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4935
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4936
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4937
    onOff := (nativeContext argAt:1) == 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4938
    view isTopView ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4939
        onOff ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4940
            view minExtent:10@10.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4941
            view maxExtent:(Screen current extent).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4942
        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4943
            view minExtent:view extent.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4944
            view maxExtent:view extent.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4945
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4946
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4947
        (view isMemberOf:JavaEmbeddedFrameView) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4948
            self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4949
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4950
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4951
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4952
"/ 'JAVA: WWindowPeer_setResizable: ' print. view print. ' yes/no: ' print. onOff printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4953
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4954
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4955
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4956
    "Modified: / 16.1.1998 / 18:08:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4957
    "Created: / 16.10.1998 / 02:21:34 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4958
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4959
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4960
_WFramePeer_setTitle: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4961
    |view jString string|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4962
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4963
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4964
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4965
    jString := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4966
    string := Java as_ST_String:jString.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4967
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4968
"/ 'JAVA: WFramePeer_pSetTitle: ' print. string print. ' ' print. view printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4969
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4970
    view label:string.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4971
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4972
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4973
    "Modified: / 8.1.1998 / 17:37:41 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4974
    "Created: / 27.1.1998 / 21:42:57 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4975
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4976
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4977
_WGraphics__dispose: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4978
    "/ void _dispose()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4979
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4980
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4981
    "Created: / 12.11.1998 / 19:17:51 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4982
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4983
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4984
_WGraphics_changeClip: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4985
    |gc x y w h r bool|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4986
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4987
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4988
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4989
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4990
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4991
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4992
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4993
    bool := (nativeContext argAt:5) ~~ 0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4994
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4995
    r := Rectangle left:x top:y width:w height:h.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4996
"/ 'WGraphics_changeClip: ' infoPrint. r infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4997
    gc clippingRectangle:r.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4998
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4999
    "Created: / 6.1.1998 / 20:57:21 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5000
    "Modified: / 20.10.1998 / 19:40:10 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5001
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5002
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5003
_WGraphics_clearRect: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5004
    |gc x y w h|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5005
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5006
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5007
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5008
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5009
    gc realized ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5010
        'JAVA: drawing on unrealized gc - ignored' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5011
        ^ self
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5012
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5013
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5014
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5015
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5016
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5017
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5018
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5019
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5020
"/ self internalError:'breakPoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5021
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5022
    gc clearRectangleX:x y:y width:w height:h.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5023
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5024
    "Created: / 8.1.1998 / 00:16:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5025
    "Modified: / 8.1.1998 / 00:21:09 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5026
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5027
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5028
_WGraphics_close: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5029
    "/ void close (sun.awt.windows.WPrintJob)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5030
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5031
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5032
    "Created: / 12.11.1998 / 19:19:40 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5033
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5034
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5035
_WGraphics_copyArea: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5036
    |gc srcX srcY w h deltaX deltaY|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5037
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5038
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5039
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5040
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5041
    gc realized ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5042
        'JAVA: copyArea on unrealized gc - ignored' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5043
        ^ self
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5044
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5045
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5046
    srcX := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5047
    srcY := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5048
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5049
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5050
    deltaX := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5051
    deltaY := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5052
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5053
    gc
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5054
        copyFrom:gc
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5055
        x:srcX y:srcY
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5056
        toX:srcX+deltaX y:srcY+deltaY
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5057
        width:w height:h
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5058
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5059
    "Created: / 8.1.1998 / 00:16:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5060
    "Modified: / 9.4.1998 / 22:01:32 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5061
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5062
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5063
_WGraphics_createFromComponent: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5064
    |jGraphics jWin view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5065
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5066
    jGraphics := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5067
    jWin := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5068
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5069
    view := KnownWindows at:jWin ifAbsent:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5070
    view isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5071
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5072
        ^ self
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5073
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5074
    view clippingRectangle:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5075
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5076
"/    "/ just a consistency check ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5077
"/    (jWin instVarNamed:'xid') ~~ view ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5078
"/        self halt:'consistency check'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5079
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5080
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5081
    jGraphics instVarNamed:'pData' put:view.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5082
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5083
    "Created: / 6.1.1998 / 20:55:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5084
    "Modified: / 20.10.1998 / 19:38:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5085
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5086
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5087
_WGraphics_createFromGraphics: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5088
    |jGraphics graphics gc|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5089
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5090
    jGraphics := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5091
    graphics := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5092
    gc := graphics instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5093
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5094
    jGraphics instVarNamed:'pData' put:gc.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5095
    gc clippingRectangle:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5096
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5097
    "Created: / 8.1.1998 / 00:47:39 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5098
    "Modified: / 20.10.1998 / 19:37:58 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5099
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5100
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5101
_WGraphics_createFromHDC: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5102
    "/ void createFromHDC (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5103
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5104
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5105
    "Created: / 12.11.1998 / 19:17:32 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5106
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5107
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5108
_WGraphics_createFromPrintJob: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5109
    "/ void createFromPrintJob (sun.awt.windows.WPrintJob)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5110
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5111
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5112
    "Created: / 12.11.1998 / 19:17:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5113
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5114
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5115
_WGraphics_dispose: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5116
    |gc|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5117
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5118
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5119
    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5120
    gc clippingRectangle:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5121
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5122
    "Created: / 6.1.1998 / 20:58:38 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5123
    "Modified: / 20.10.1998 / 19:35:05 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5124
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5125
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5126
_WGraphics_drawArc: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5127
    |gc x y w h startAngle endAngle|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5128
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5129
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5130
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5131
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5132
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5133
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5134
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5135
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5136
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5137
    startAngle := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5138
    endAngle := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5139
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5140
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5141
        'drawArc x/y= ' print. x print. '@' print. y print.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5142
               ' w/h= ' print. w print. '@' print. h print.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5143
               ' startAngle= ' print. startAngle print. ' endAngle= ' print. endAngle printCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5144
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5145
    gc
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5146
        displayArcX:x y:y
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5147
        width:w height:h
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5148
        from:startAngle angle:(endAngle - startAngle).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5149
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5150
    "Created: / 6.1.1998 / 21:00:15 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5151
    "Modified: / 28.1.1999 / 17:38:45 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5152
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5153
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5154
_WGraphics_drawBytes: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5155
    "/ void drawBytes (byte[] int int int int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5156
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5157
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5158
    "Created: / 12.11.1998 / 19:18:56 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5159
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5160
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5161
_WGraphics_drawLine: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5162
    |gc x y x2 y2|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5163
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5164
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5165
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5166
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5167
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5168
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5169
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5170
    x2 := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5171
    y2 := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5172
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5173
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5174
        'drawLine x/y= ' print. x print. '@' print. y print. ' x2/y2= ' print. x2 print. '@' print. y2 printCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5175
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5176
    gc displayLineFromX:x y:y toX:x2 y:y2
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5177
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5178
    "Created: / 6.1.1998 / 20:59:27 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5179
    "Modified: / 8.1.1998 / 00:34:23 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5180
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5181
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5182
_WGraphics_drawMFCharsConvertedSegment: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5183
    "/ int drawMFCharsConvertedSegment (java.awt.Font sun.awt.FontDescriptor byte[] int int int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5184
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5185
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5186
    "Created: / 12.11.1998 / 19:18:44 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5187
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5188
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5189
_WGraphics_drawMFCharsSegment: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5190
    |jFont jFontDescr s gc x y offs len|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5191
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5192
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5193
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5194
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5195
    jFont := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5196
    jFontDescr := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5197
    s := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5198
    offs := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5199
    len := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5200
    x := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5201
    y := nativeContext argAt:7.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5202
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5203
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5204
        'drawMFCharsSegment x/y= ' print. x print. '@' print. y print. ' s= ' print. s printCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5205
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5206
    gc displayString:s from:offs+1 to:offs+len x:x y:y.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5207
    ^ (gc font onDevice:(gc graphicsDevice)) widthOf:s.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5208
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5209
    "Created: / 6.1.1998 / 21:01:07 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5210
    "Modified: / 25.1.1998 / 20:45:55 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5211
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5212
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5213
_WGraphics_drawOval: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5214
    |gc x y w h|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5215
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5216
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5217
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5218
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5219
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5220
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5221
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5222
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5223
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5224
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5225
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5226
        'drawOval x/y= ' print. x print. '@' print. y print.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5227
                ' w/h= ' print. w print. '@' print. h printCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5228
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5229
    gc displayArcX:x y:y width:w height:h from:0 angle:360.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5230
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5231
    "Created: / 8.1.1998 / 00:44:31 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5232
    "Modified: / 9.4.1998 / 22:10:23 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5233
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5234
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5235
_WGraphics_drawPolygon: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5236
    |gc xVector yVector count points|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5237
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5238
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5239
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5240
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5241
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5242
    xVector := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5243
    yVector := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5244
    count := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5245
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5246
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5247
        'drawPolgon' printCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5248
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5249
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5250
    points := (1 to:count) collect:[:i | (xVector at:i) @ (yVector at:i)].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5251
    gc displayPolygon:points
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5252
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5253
    "Created: / 8.1.1998 / 00:57:28 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5254
    "Modified: / 8.1.1998 / 00:57:49 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5255
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5256
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5257
_WGraphics_drawPolyline: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5258
    "/ void drawPolyline (int[] int[] int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5259
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5260
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5261
    "Created: / 12.11.1998 / 19:19:07 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5262
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5263
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5264
_WGraphics_drawRect: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5265
    |gc x y w h|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5266
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5267
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5268
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5269
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5270
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5271
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5272
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5273
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5274
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5275
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5276
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5277
"/ self internalError:'breakPoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5278
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5279
    gc displayRectangleX:x y:y width:w height:h.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5280
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5281
    "Modified: / 8.1.1998 / 00:34:33 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5282
    "Created: / 8.1.1998 / 00:59:05 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5283
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5284
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5285
_WGraphics_drawRoundRect: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5286
    |gc x y w h|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5287
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5288
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5289
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5290
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5291
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5292
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5293
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5294
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5295
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5296
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5297
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5298
"/ self internalError:'breakPoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5299
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5300
    gc displayRectangleX:x y:y width:w height:h.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5301
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5302
    "Modified: / 8.1.1998 / 00:34:33 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5303
    "Created: / 8.1.1998 / 00:59:26 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5304
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5305
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5306
_WGraphics_drawSFChars: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5307
    "/ void drawSFChars (char[]s, int pos1, int len, int x, int y)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5308
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5309
    |gc str x y idx1 nChars|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5310
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5311
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5312
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5313
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5314
    str := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5315
    idx1 := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5316
    nChars := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5317
    x := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5318
    y := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5319
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5320
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5321
        'drawSFChars x/y= ' print. x print. '@' print. y print.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5322
               ' s= ' print. str printCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5323
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5324
    gc displayString:str from:idx1+1 to:idx1+nChars x:x y:y
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5325
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5326
    "Created: / 6.1.1998 / 21:11:31 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5327
    "Modified: / 8.1.1998 / 00:33:59 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5328
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5329
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5330
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5331
_WGraphics_fillArc: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5332
    |gc x y w h startAngle endAngle|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5333
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5334
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5335
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5336
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5337
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5338
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5339
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5340
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5341
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5342
    startAngle := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5343
    endAngle := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5344
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5345
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5346
        'fillArc x/y= ' print. x print. '@' print. y print.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5347
               ' w/h= ' print. w print. '@' print. h print.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5348
               ' startAngle= ' print. startAngle print. ' endAngle= ' print. endAngle printCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5349
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5350
    gc fillArcX:x y:y width:w height:h from:startAngle angle:(endAngle - startAngle)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5351
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5352
    "Created: / 6.1.1998 / 21:11:31 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5353
    "Modified: / 8.1.1998 / 00:33:59 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5354
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5355
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5356
_WGraphics_fillOval: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5357
    |gc x y w h|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5358
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5359
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5360
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5361
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5362
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5363
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5364
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5365
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5366
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5367
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5368
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5369
        'drawOval x/y= ' print. x print. '@' print. y print.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5370
                ' w/h= ' print. w print. '@' print. h printCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5371
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5372
    gc fillArcX:x y:y width:w height:h from:0 angle:360
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5373
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5374
    "Created: / 8.1.1998 / 00:46:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5375
    "Modified: / 8.1.1998 / 00:46:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5376
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5377
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5378
_WGraphics_fillPolygon: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5379
    |gc xVector yVector count points|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5380
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5381
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5382
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5383
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5384
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5385
    xVector := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5386
    yVector := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5387
    count := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5388
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5389
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5390
        'fillPolgon' printCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5391
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5392
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5393
    points := (1 to:count) collect:[:i | (xVector at:i) @ (yVector at:i)].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5394
    gc fillPolygon:points
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5395
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5396
    "Created: / 8.1.1998 / 00:58:09 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5397
    "Modified: / 25.1.1998 / 11:03:19 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5398
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5399
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5400
_WGraphics_fillRect: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5401
    |gc x y w h|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5402
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5403
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5404
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5405
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5406
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5407
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5408
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5409
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5410
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5411
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5412
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5413
"/ self internalError:'breakPoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5414
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5415
    gc fillRectangleX:x y:y width:w height:h.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5416
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5417
    "Created: / 15.8.1997 / 15:43:10 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5418
    "Modified: / 8.1.1998 / 00:34:33 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5419
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5420
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5421
_WGraphics_fillRoundRect: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5422
    |gc x y w h|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5423
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5424
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5425
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5426
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5427
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5428
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5429
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5430
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5431
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5432
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5433
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5434
"/ self internalError:'breakPoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5435
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5436
    gc displayRectangleX:x y:y width:w height:h.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5437
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5438
    "Modified: / 8.1.1998 / 00:34:33 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5439
    "Created: / 8.1.1998 / 00:59:36 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5440
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5441
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5442
_WGraphics_getClipBounds: nativeContext
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5443
    | gc  rect  r  x  y  w  h |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5444
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5445
    gc := self gcForWGraphics: nativeContext.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5446
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5447
"/    gc isNil ifTrue:[^ nil].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5448
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5449
    rect := (JavaVM classForName:'java.awt.Rectangle') basicNew.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5450
    (gc isMemberOf: JavaView) ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5451
        "/ r := gc clippingRectangleOrNil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5452
        r := gc getNextUpdateRectangle.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5453
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5454
    r isNil ifTrue: [ r := gc clippingRectangleOrNil. ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5455
    r isNil ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5456
        x := y := 0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5457
        w := (gc width).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5458
        h := (gc height).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5459
    ] ifFalse: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5460
        x := (r left).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5461
        y := (r top).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5462
        w := (r width).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5463
        h := (r height).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5464
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5465
    rect instVarNamed: 'x' put: x.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5466
    rect instVarNamed: 'y' put: y.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5467
    rect instVarNamed: 'width' put: w.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5468
    rect instVarNamed: 'height' put: h.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5469
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5470
"/ 'WGraphics__getClipBounds ' infoPrint. (x@y extent:w@h) infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5471
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5472
    ^ rect
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5473
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5474
    "Created: / 6.1.1998 / 20:58:07 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5475
    "Modified: / 23.12.1998 / 20:14:09 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5476
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5477
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5478
_WGraphics_imageCreate: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5479
    |jGraphics imgRep|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5480
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5481
    jGraphics := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5482
    imgRep := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5483
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5484
    jGraphics instVarNamed:'pData' put:(imgRep instVarNamed:'pData').
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5485
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5486
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5487
    "Created: / 11.1.1998 / 16:34:30 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5488
    "Modified: / 17.1.1998 / 12:37:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5489
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5490
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5491
_WGraphics_pSetFont: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5492
    |gc jFont stFont|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5493
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5494
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5495
    jFont := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5496
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5497
    stFont := jFont instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5498
    (stFont isNil or:[stFont == 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5499
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5500
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5501
        gc font:stFont
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5502
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5503
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5504
    "Created: / 6.1.1998 / 20:56:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5505
    "Modified: / 15.1.1998 / 12:31:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5506
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5507
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5508
_WGraphics_pSetForeground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5509
    |gc rgb clr|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5510
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5511
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5512
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5513
    rgb := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5514
    rgb isInteger ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5515
        "/ its a java.awt.Color
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5516
        rgb := rgb instVarNamed:'value'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5517
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5518
    clr := Color rgbValue:rgb.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5519
    gc paint:(clr nearestOn:gc device).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5520
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5521
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5522
"/ self internalError:'breakPoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5523
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5524
    "Created: / 6.1.1998 / 20:56:14 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5525
    "Modified: / 23.12.1998 / 20:10:49 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5526
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5527
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5528
_WGraphics_print: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5529
    "/ void print (sun.awt.windows.WComponentPeer)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5530
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5531
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5532
    "Created: / 12.11.1998 / 19:19:25 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5533
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5534
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5535
_WGraphics_removeClip: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5536
    "/ void removeClip ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5537
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5538
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5539
    "Created: / 12.11.1998 / 19:18:05 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5540
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5541
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5542
_WGraphics_setPaintMode: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5543
    |gc|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5544
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5545
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5546
    gc function:#copy.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5547
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5548
    true "DrawOPTrace" ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5549
        'copyMode' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5550
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5551
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5552
    "Created: / 8.1.1998 / 00:33:44 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5553
    "Modified: / 28.1.1998 / 23:25:56 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5554
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5555
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5556
_WGraphics_setXORMode: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5557
    |gc jColor rgb invColor device|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5558
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5559
    gc := self gcForWGraphics: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5560
    jColor := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5561
    device := gc graphicsDevice.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5562
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5563
"/    "/ on trueColor systems, use the provided
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5564
"/    "/ rgb value for inverting.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5565
"/    "/ on palette systems, use white ^ black
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5566
"/
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5567
"/    device visualType == #TrueColor ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5568
"/        rgb := jColor instVarNamed:'value'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5569
"/        rgb := rgb bitAnd:16rFFFFFF.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5570
"/        rgb == 0 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5571
"/            rgb := 16rFFFFFF.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5572
"/        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5573
"/        invColor := rgb
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5574
"/    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5575
"/        invColor := device blackpixel bitXor:device whitepixel.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5576
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5577
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5578
    invColor := device blackpixel bitXor:device whitepixel.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5579
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5580
"/    gc foreground:(Color colorId:invColor)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5581
"/       background:device blackColor.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5582
    device
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5583
        setForeground:invColor background:0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5584
        in:gc gcId.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5585
    gc function:#xor.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5586
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5587
    true "DrawOPTrace" ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5588
        'xorMode' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5589
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5590
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5591
    "Created: / 8.1.1998 / 00:36:17 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5592
    "Modified: / 28.1.1998 / 23:45:03 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5593
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5594
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5595
_WLabelPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5596
    |jLabelPeer jLabel jFrame frame label
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5597
     lbl|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5598
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5599
    jLabelPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5600
    jLabel := jLabelPeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5601
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5602
    lbl := jLabel instVarNamed:'text'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5603
    lbl notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5604
        lbl := Java as_ST_String:lbl
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5605
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5606
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5607
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5608
    frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5609
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5610
    label := Label in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5611
    label sizeFixed:true.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5612
    lbl notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5613
        label label:lbl
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5614
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5615
    self createdWindowsView:label for:jLabelPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5616
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5617
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5618
        'WLabelPeer_create: ' print. frame print. ' -> ' print. label printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5619
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5620
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5621
    "Created: / 7.1.1998 / 21:42:31 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5622
    "Modified: / 13.1.1998 / 22:10:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5623
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5624
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5625
_WLabelPeer_setAlignment: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5626
    |label alignNr|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5627
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5628
    alignNr := nativeContext argAt:1.
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5629
    label := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5630
    label notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5631
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5632
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5633
    "Created: / 7.1.1998 / 21:43:12 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5634
    "Modified: / 8.1.1998 / 17:35:29 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5635
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5636
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5637
_WLabelPeer_setText: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5638
    |label jString str|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5639
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5640
    jString := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5641
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5642
    label := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5643
    jString notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5644
        str := Java as_ST_String:jString
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5645
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5646
    label label:str
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5647
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5648
    "Created: / 7.1.1998 / 21:43:51 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5649
    "Modified: / 3.12.1998 / 14:59:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5650
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5651
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5652
_WListPeer__addItem: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5653
    |jString index1 length selListView m|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5654
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5655
    selListView := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5656
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5657
    jString := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5658
    index1 := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5659
    length := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5660
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5661
    (m := selListView model) notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5662
        m list addLast:(Java as_ST_String:jString).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5663
        m changed:#list.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5664
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5665
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5666
    "Created: / 26.10.1998 / 20:11:30 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5667
    "Modified: / 14.11.1998 / 01:21:03 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5668
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5669
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5670
_WListPeer_addItem: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5671
    |jString index selListView m|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5672
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5673
    selListView := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5674
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5675
    jString := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5676
    index := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5677
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5678
    m := selListView model.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5679
    m isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5680
        Transcript showCR:'JAVA: access to listModel of closed view'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5681
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5682
        m list addLast:(Java as_ST_String:jString).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5683
        m changed:#list.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5684
    ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5685
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5686
    "Created: / 24.1.1998 / 21:10:05 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5687
    "Modified: / 2.11.1998 / 17:12:52 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5688
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5689
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5690
_WListPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5691
    |jListPeer jFrame frame selectionInListView|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5692
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5693
    jListPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5694
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5695
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5696
    frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5697
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5698
    selectionInListView := ScrollableView for:SelectionInListView in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5699
    selectionInListView action:[:index | jListPeer perform:#'handleListChanged(I)V' with:(index - 1)].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5700
    selectionInListView doubleClickAction:[:index | jListPeer perform:#'handleAction(I)V' with:(index - 1)].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5701
    selectionInListView model:(SelectionInList new list:(List new)).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5702
    selectionInListView useIndex:true.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5703
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5704
    self createdWindowsView:selectionInListView for:jListPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5705
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5706
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5707
        'WTextAreaPeer_create: ' print. frame print. ' -> ' print. selectionInListView printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5708
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5709
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5710
    "Created: / 24.1.1998 / 19:58:54 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5711
    "Modified: / 9.4.1998 / 22:19:07 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5712
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5713
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5714
_WListPeer_delItems: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5715
    |jString index1 index2 selListView model list|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5716
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5717
    selListView := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5718
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5719
    index1 := (nativeContext argAt:1) + 1. "/ java indices are 0-based.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5720
    index2 := (nativeContext argAt:2) + 1. "/ st indices are 1-based.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5721
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5722
    model := selListView model.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5723
    model isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5724
    list := model list.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5725
    list size >= index1 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5726
        list removeFromIndex:index1 toIndex:(index2 min:list size).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5727
        model changed:#list.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5728
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5729
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5730
    "Created: / 9.4.1998 / 22:19:25 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5731
    "Modified: / 30.12.1998 / 20:00:50 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5732
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5733
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5734
_WListPeer_deselect: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5735
    "/ void deselect (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5736
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5737
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5738
    "Created: / 12.11.1998 / 19:15:10 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5739
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5740
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5741
_WListPeer_getMaxWidth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5742
    "/ int getMaxWidth ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5743
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5744
    ^ 1000 "/ a dummy value
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5745
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5746
"/    UnimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5747
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5748
    "Created: / 14.11.1998 / 10:44:29 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5749
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5750
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5751
_WListPeer_isSelected: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5752
    |selectionInListView index model|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5753
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5754
    selectionInListView := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5755
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5756
    index := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5757
    (model := selectionInListView model) notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5758
        (model selectionIndex == (index + 1))  "/ JAVA indexing starts at 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5759
        ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5760
            ^ 1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5761
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5762
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5763
    ^ 0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5764
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5765
    "Created: / 24.1.1998 / 22:42:31 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5766
    "Modified: / 25.1.1998 / 01:35:32 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5767
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5768
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5769
_WListPeer_makeVisible: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5770
    |selectionInListView lineNr|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5771
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5772
    selectionInListView := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5773
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5774
    lineNr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5775
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5776
    selectionInListView makeLineVisible:(lineNr + 1)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5777
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5778
    "Modified: / 24.1.1998 / 20:01:06 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5779
    "Created: / 20.10.1998 / 14:14:50 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5780
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5781
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5782
_WListPeer_select: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5783
    |selectionInListView index model|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5784
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5785
    selectionInListView := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5786
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5787
    index := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5788
    (model := selectionInListView model) notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5789
        model selectionIndex:(index + 1).  "/ JAVA indexing starts at 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5790
    ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5791
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5792
    "Created: / 24.1.1998 / 22:32:35 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5793
    "Modified: / 25.1.1998 / 01:28:46 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5794
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5795
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5796
_WListPeer_setMultipleSelections: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5797
    |selectionInListView onOff|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5798
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5799
    selectionInListView := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5800
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5801
    onOff := (nativeContext argAt:1) ~~ 0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5802
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5803
    selectionInListView multipleSelectOk:onOff.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5804
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5805
    "Modified: / 24.1.1998 / 20:01:06 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5806
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5807
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5808
_WListPeer_updateMaxItemWidth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5809
    |selectionInListView lineNr|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5810
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5811
    selectionInListView := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5812
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5813
    "Created: / 26.10.1998 / 20:09:46 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5814
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5815
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5816
_WMenuBarPeer_addMenu: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5817
    "/ void addMenu (java.awt.Menu)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5818
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5819
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5820
    "Created: / 12.11.1998 / 19:14:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5821
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5822
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5823
_WMenuBarPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5824
    |jMenuBarPeer jMenuBar jFrame frame menuBar|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5825
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5826
    jMenuBarPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5827
    jMenuBar := jMenuBarPeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5828
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5829
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5830
    frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5831
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5832
    menuBar := MenuPanel in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5833
    menuBar verticalLayout:false.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5834
    menuBar realize.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5835
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5836
    self createdWindowsView:menuBar for:jMenuBarPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5837
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5838
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5839
        'WMenuBarPeer_create: ' print. frame print. ' -> ' print. menuBar printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5840
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5841
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5842
    "Created: / 7.1.1998 / 21:38:31 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5843
    "Modified: / 25.1.1998 / 13:19:03 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5844
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5845
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5846
_WMenuBarPeer_delMenu: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5847
    "/ void delMenu (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5848
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5849
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5850
    "Created: / 12.11.1998 / 19:14:11 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5851
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5852
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5853
_WMenuItemPeer__dispose: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5854
    |jMenuItemPeer item|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5855
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5856
    jMenuItemPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5857
    item := jMenuItemPeer instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5858
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5859
"/ what should be done here ?
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5860
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5861
    "Created: / 29.3.1998 / 17:16:05 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5862
    "Modified: / 29.3.1998 / 17:16:35 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5863
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5864
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5865
_WMenuItemPeer__setLabel: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5866
    "/ void _setLabel (java.lang.String)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5867
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5868
    |jMenuItemPeer item label|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5869
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5870
    jMenuItemPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5871
    item := jMenuItemPeer instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5872
    (item isNil or:[item == 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5873
        'JAVA [warning]: NULL menu item in setLabel' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5874
        ^ self
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5875
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5876
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5877
    label := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5878
    label isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5879
        label := ''
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5880
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5881
        label := Java as_ST_String:label
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5882
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5883
    item label:label.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5884
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5885
    "Modified: / 11.12.1998 / 16:40:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5886
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5887
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5888
_WMenuItemPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5889
    |jMenuItemPeer jMenuItem jMenuPeer menu item lbl|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5890
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5891
    jMenuItemPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5892
    jMenuItem := jMenuItemPeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5893
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5894
    jMenuPeer := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5895
    menu := jMenuPeer instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5896
    (menu isNil or:[menu == 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5897
        'JAVA: no menu to create item in' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5898
        ^ self
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5899
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5900
    item := menu createAtIndex:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5901
    item value:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5902
                jMenuItemPeer perform:#'handleAction(I)V' with:0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5903
               ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5904
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5905
    lbl := jMenuItem instVarNamed:'label'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5906
    lbl notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5907
        lbl := Java as_ST_String:lbl.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5908
        item label:lbl
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5909
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5910
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5911
    jMenuItemPeer instVarNamed:'pData' put:item.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5912
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5913
    WindowOPTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5914
        'WMenuItem_create: ' print. menu print. ' -> ' print. item printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5915
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5916
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5917
    "Created: / 7.1.1998 / 21:40:44 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5918
    "Modified: / 3.12.1998 / 20:43:20 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5919
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5920
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5921
_WMenuItemPeer_enable: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5922
    |jMenuItemPeer item state|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5923
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5924
    jMenuItemPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5925
    item := jMenuItemPeer instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5926
    (item isNil or:[item == 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5927
        'JAVA [warning]: NULL menu item in enable' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5928
        ^ self
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5929
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5930
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5931
    state := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5932
    item enabled:(state ~~ 0)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5933
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5934
    "Created: / 7.1.1998 / 22:41:38 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5935
    "Modified: / 11.12.1998 / 16:40:26 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5936
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5937
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5938
_WMenuPeer_addSeparator: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5939
    "/ void addSeparator ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5940
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5941
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5942
    "Created: / 12.11.1998 / 19:13:14 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5943
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5944
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5945
_WMenuPeer_createMenu: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5946
    |jMenuPeer jMenu jMenuBarPeer menuPanel menu
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5947
     lbl item|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5948
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5949
    jMenuPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5950
    jMenu := jMenuPeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5951
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5952
    jMenuBarPeer := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5953
    menuPanel := jMenuBarPeer instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5954
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5955
    item := menuPanel createAtIndex:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5956
    lbl := jMenu instVarNamed:'label'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5957
    lbl notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5958
        lbl := Java as_ST_String:lbl.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5959
        item label:lbl
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5960
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5961
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5962
    menu := MenuPanel new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5963
    item submenu:menu.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5964
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5965
    jMenuPeer instVarNamed:'pData' put:menu.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5966
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5967
'createMenuPeer: ' print. menuPanel print. ' -> ' print. menu printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5968
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5969
    "Created: / 7.1.1998 / 21:39:50 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5970
    "Modified: / 13.1.1998 / 22:11:09 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5971
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5972
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5973
_WMenuPeer_createSubMenu: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5974
    "/ void createSubMenu (sun.awt.windows.WMenuPeer)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5975
"/    UnimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5976
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5977
    "Created: / 12.11.1998 / 19:13:43 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5978
    "Modified: / 3.12.1998 / 21:41:07 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5979
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5980
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5981
_WMenuPeer_delItem: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5982
    "/ void delItem (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5983
    |jMenuPeer jMenu menuPanel itemIndex|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5984
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5985
    jMenuPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5986
    menuPanel := jMenuPeer instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5987
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5988
    itemIndex := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5989
    menuPanel remove:itemIndex.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5990
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5991
"/    UnimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5992
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5993
    "Created: / 12.11.1998 / 19:13:30 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5994
    "Modified: / 10.12.1998 / 21:12:29 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5995
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5996
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5997
_WPanelPeer_calculateInsets: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5998
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5999
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6000
    "Created: / 27.1.1998 / 21:40:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6001
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6002
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6003
_WPopupMenuPeer__show: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6004
    "/ void _show (java.awt.Event)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6005
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6006
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6007
    "Created: / 12.11.1998 / 19:12:53 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6008
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6009
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6010
_WPopupMenuPeer_createMenu: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6011
    "/ void createMenu (sun.awt.windows.WComponentPeer)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6012
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6013
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6014
    "Created: / 12.11.1998 / 19:12:43 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6015
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6016
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6017
_WPrintJob_end: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6018
    "/ void end ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6019
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6020
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6021
    "Created: / 12.11.1998 / 19:11:28 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6022
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6023
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6024
_WScrollPanePeer__getHScrollbarHeight: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6025
    |scrollPane|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6026
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6027
    scrollPane := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6028
    ^ HorizontalScrollBar new preferredExtent y.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6029
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6030
    "Created: / 9.4.1998 / 17:30:56 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6031
    "Modified: / 10.4.1998 / 14:59:28 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6032
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6033
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6034
_WScrollPanePeer__getVScrollbarWidth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6035
    |scrollPane|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6036
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6037
    scrollPane := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6038
    ^ ScrollBar new preferredExtent x.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6039
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6040
    "Created: / 9.4.1998 / 17:29:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6041
    "Modified: / 10.4.1998 / 15:00:33 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6042
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6043
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6044
_WScrollPanePeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6045
    |jScrollPanePeer jScrollPane jFrame frame scrollPane
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6046
     lbl|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6047
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6048
    jScrollPanePeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6049
    jScrollPane := jScrollPanePeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6050
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6051
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6052
    frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6053
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6054
    "/ create with a simple view ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6055
    scrollPane := ScrollableView for:JavaView in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6056
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6057
    self createdWindowsView:scrollPane for:jScrollPanePeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6058
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6059
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6060
        'WScrollPanePeer_create: ' print. frame print. ' -> ' print. scrollPane printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6061
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6062
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6063
    "Created: / 9.4.1998 / 17:25:08 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6064
    "Modified: / 9.4.1998 / 22:06:09 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6065
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6066
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6067
_WScrollPanePeer_getOffset: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6068
    "/ int getOffset (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6069
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6070
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6071
    "Created: / 12.11.1998 / 19:16:29 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6072
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6073
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6074
_WScrollPanePeer_getScrollChild: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6075
    "/ java.awt.Component getScrollChild ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6076
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6077
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6078
    "Created: / 12.11.1998 / 19:17:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6079
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6080
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6081
_WScrollPanePeer_setInsets: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6082
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6083
    "Modified: / 9.4.1998 / 17:26:11 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6084
    "Created: / 9.4.1998 / 17:29:10 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6085
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6086
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6087
_WScrollPanePeer_setScrollPosition: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6088
    "/ void setScrollPosition (int int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6089
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6090
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6091
    "Created: / 12.11.1998 / 19:16:44 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6092
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6093
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6094
_WScrollPanePeer_setSpans: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6095
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6096
    "Created: / 9.4.1998 / 17:31:44 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6097
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6098
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6099
_WScrollbarPeer__setValues: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6100
    |scrollBar value visibleAmount min max|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6101
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6102
    scrollBar := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6103
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6104
    value := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6105
    visibleAmount := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6106
    min := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6107
    max := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6108
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6109
    (min ~~ 0 or:[max ~~ 100]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6110
        scrollBar thumb start:min stop:max.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6111
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6112
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6113
    scrollBar thumbOrigin:value thumbHeight:visibleAmount.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6114
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6115
    "Created: / 13.1.1998 / 22:13:57 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6116
    "Modified: / 14.10.1998 / 14:53:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6117
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6118
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6119
_WScrollbarPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6120
    |jScrollbarPeer jScrollbar jFrame frame scrollBar
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6121
     min max|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6122
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6123
    jScrollbarPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6124
    jScrollbar := jScrollbarPeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6125
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6126
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6127
    frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6128
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6129
    (jScrollbar instVarNamed:'orientation') == 0 "HORIZONTAL" ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6130
        scrollBar := HorizontalScrollBar in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6131
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6132
        scrollBar := ScrollBar in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6133
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6134
    min := jScrollbar instVarNamed:'minimum'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6135
    max := jScrollbar instVarNamed:'maximum'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6136
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6137
    scrollBar scrollDownAction:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6138
                        scrollBar thumbOrigin:(scrollBar thumbOrigin + ((max-min)/10) min:max).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6139
                        jScrollbarPeer perform:#'dragAbsolute(I)V' with:scrollBar thumbOrigin rounded.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6140
                     ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6141
    scrollBar scrollUpAction:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6142
                        scrollBar thumbOrigin:(scrollBar thumbOrigin - ((max-min)/10) max:min).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6143
                        jScrollbarPeer perform:#'dragAbsolute(I)V' with:scrollBar thumbOrigin rounded.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6144
                     ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6145
    scrollBar scrollAction:[:org |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6146
                        jScrollbarPeer perform:#'dragAbsolute(I)V' with:org rounded.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6147
                     ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6148
    self createdWindowsView:scrollBar for:jScrollbarPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6149
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6150
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6151
        'WScrollbarPeer_create: ' print. frame print. ' -> ' print. scrollBar printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6152
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6153
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6154
    "Created: / 5.1.1998 / 01:53:30 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6155
    "Modified: / 14.10.1998 / 15:36:19 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6156
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6157
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6158
_WScrollbarPeer_setLineIncrement: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6159
    |scrollBar inc|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6160
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6161
Transcript showCR:'JavaVM: WScrollbarPeer_setLineIncrement unimplemented'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6162
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6163
    scrollBar := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6164
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6165
    inc := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6166
"/    scrollBar thumb lineIncrement:inc.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6167
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6168
    "Created: / 25.1.1998 / 11:52:19 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6169
    "Modified: / 14.10.1998 / 14:53:56 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6170
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6171
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6172
_WScrollbarPeer_setPageIncrement: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6173
    |scrollBar inc|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6174
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6175
Transcript showCR:'JavaVM: WScrollbarPeer_setPageIncrement unimplemented'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6176
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6177
    scrollBar := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6178
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6179
    inc := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6180
"/    scrollBar thumb pageIncrement:inc.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6181
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6182
    "Created: / 25.1.1998 / 11:52:01 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6183
    "Modified: / 14.10.1998 / 14:54:04 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6184
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6185
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6186
_WTextAreaPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6187
    |jTextAreaPeer jFrame frame editTextView|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6188
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6189
    jTextAreaPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6190
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6191
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6192
    frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6193
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6194
    editTextView := HVScrollableView for:EditTextView in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6195
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6196
    self createdWindowsView:editTextView for:jTextAreaPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6197
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6198
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6199
        'WTextAreaPeer_create: ' print. frame print. ' -> ' print. editTextView printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6200
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6201
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6202
    "Created: / 7.1.1998 / 21:49:49 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6203
    "Modified: / 15.1.1998 / 12:56:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6204
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6205
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6206
_WTextAreaPeer_insertText: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6207
    |textView pos string jstring|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6208
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6209
    textView := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6210
    (textView isKindOf:ScrollableView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6211
        textView := textView scrolledView
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6212
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6213
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6214
    jstring := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6215
    string := Java as_ST_String:jstring.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6216
    pos := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6217
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6218
    textView insert:string at:pos.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6219
    textView cursorToCharacterPosition:pos + string size.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6220
    textView makeCursorVisible.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6221
"/ textView invalidateRepairNow:true.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6222
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6223
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6224
    "Created: / 7.1.1998 / 21:50:23 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6225
    "Modified: / 5.4.1998 / 17:37:24 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6226
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6227
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6228
_WTextAreaPeer_replaceText: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6229
    "/ void replaceText (java.lang.String int int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6230
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6231
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6232
    "Created: / 12.11.1998 / 19:11:14 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6233
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6234
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6235
_WTextComponentPeer_enableEditing: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6236
    |textView enabled|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6237
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6238
    textView := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6239
    enabled := (nativeContext argAt:1) ~~ 0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6240
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6241
    ^ textView readOnly:enabled not
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6242
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6243
    "Created: / 5.1.1998 / 01:29:38 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6244
    "Modified: / 25.1.1998 / 16:29:56 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6245
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6246
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6247
_WTextComponentPeer_getSelectionEnd: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6248
    |textView|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6249
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6250
    textView := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6251
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6252
    ^ textView characterPositionOfSelectionEnd
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6253
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6254
    "Created: / 8.1.1998 / 17:41:56 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6255
    "Modified: / 15.1.1998 / 15:47:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6256
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6257
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6258
_WTextComponentPeer_getSelectionStart: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6259
    |textView|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6260
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6261
    textView := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6262
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6263
    ^ textView characterPositionOfSelection - 1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6264
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6265
    "Created: / 15.8.1997 / 15:45:45 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6266
    "Modified: / 15.1.1998 / 15:46:51 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6267
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6268
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6269
_WTextComponentPeer_getText: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6270
    |textView string jString|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6271
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6272
    textView := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6273
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6274
    string := textView contents asString.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6275
    jString := Java as_String:string.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6276
    ^ jString
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6277
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6278
    "Created: / 6.1.1998 / 21:05:15 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6279
    "Modified: / 8.1.1998 / 17:36:52 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6280
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6281
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6282
_WTextComponentPeer_select: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6283
    |textView selStart selEnd|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6284
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6285
    textView := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6286
    selStart := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6287
    selEnd := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6288
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6289
    selStart == selEnd ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6290
        "/ clear selection
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6291
        textView unselect.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6292
        "/ and set caret
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6293
        textView cursorToCharacterPosition:selStart + 1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6294
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6295
        "/ change selection
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6296
        textView selectFromCharacterPosition:selStart+1 to:selEnd
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6297
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6298
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6299
    "Created: / 15.8.1997 / 15:45:58 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6300
    "Modified: / 15.1.1998 / 21:55:57 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6301
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6302
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6303
_WTextComponentPeer_setText: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6304
    |textView string jstring|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6305
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6306
    textView := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6307
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6308
    jstring := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6309
    jstring notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6310
        string := Java as_ST_String:jstring
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6311
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6312
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6313
    textView contents:string.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6314
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6315
    "Created: / 5.1.1998 / 01:28:23 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6316
    "Modified: / 11.12.1998 / 12:16:46 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6317
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6318
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6319
_WTextFieldPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6320
    |jTextFieldPeer jFrame frame editField|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6321
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6322
    jTextFieldPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6323
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6324
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6325
    frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6326
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6327
    editField := EditField in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6328
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6329
    self createdWindowsView:editField for:jTextFieldPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6330
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6331
    editField crAction:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6332
                        jTextFieldPeer perform:#handleAction.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6333
                  ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6334
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6335
        'WTextFieldPeer_create: ' print. frame print. ' -> ' print. editField printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6336
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6337
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6338
    "Created: / 5.1.1998 / 01:27:37 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6339
    "Modified: / 4.11.1998 / 21:07:30 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6340
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6341
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6342
_WTextFieldPeer_setEchoCharacter: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6343
    |editField char|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6344
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6345
    editField := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6346
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6347
    char := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6348
    editField passwordCharacter:(Character value:char).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6349
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6350
    "Created: / 25.1.1998 / 16:28:30 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6351
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6352
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6353
_WToolkit_beep: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6354
    "/ void beep ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6355
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6356
    Screen current beep
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6357
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6358
    "Created: / 12.11.1998 / 19:09:23 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6359
    "Modified: / 11.12.1998 / 12:15:23 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6360
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6361
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6362
_WToolkit_eventLoop: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6363
    (JavaEventThread notNil and:[JavaEventThread isDead not]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6364
        'JavaVM [warning]: oops - two threads executing eventLoop' errorPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6365
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6366
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6367
    JavaEventThread := Processor activeProcess.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6368
    [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6369
        [true] whileTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6370
            AbortSignal handle:[:ex |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6371
                ex return
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6372
            ] do:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6373
                self doWindowsEventThread.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6374
            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6375
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6376
    ] valueNowOrOnUnwindDo:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6377
        JavaEventThread := nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6378
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6379
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6380
    "Created: / 6.1.1998 / 21:01:44 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6381
    "Modified: / 8.1.1999 / 17:08:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6382
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6383
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6384
_WToolkit_getComboHeightOffset: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6385
    ^ 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6386
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6387
    "Modified: / 20.3.1997 / 13:50:04 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6388
    "Created: / 22.10.1998 / 00:59:14 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6389
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6390
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6391
_WToolkit_getScreenHeight: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6392
    ^ Screen current height
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6393
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6394
    "Modified: / 20.3.1997 / 13:50:04 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6395
    "Created: / 13.1.1998 / 09:24:45 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6396
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6397
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6398
_WToolkit_getScreenResolution: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6399
    ^ Screen current resolution x rounded
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6400
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6401
    "Modified: / 20.3.1997 / 13:50:04 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6402
    "Created: / 17.1.1998 / 21:54:48 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6403
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6404
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6405
_WToolkit_getScreenWidth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6406
    ^ Screen current width
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6407
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6408
    "Modified: / 20.3.1997 / 13:50:04 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6409
    "Created: / 13.1.1998 / 09:24:37 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6410
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6411
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6412
_WToolkit_init: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6413
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6414
    "Created: / 3.1.1998 / 02:30:57 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6415
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6416
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6417
_WToolkit_loadSystemColors: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6418
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6419
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6420
    "Modified: / 18.3.1997 / 18:43:26 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6421
    "Created: / 5.1.1998 / 02:19:09 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6422
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6423
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6424
_WToolkit_makeColorModel: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6425
    "/ java.awt.image.ColorModel makeColorModel ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6426
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6427
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6428
    "Created: / 12.11.1998 / 19:08:47 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6429
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6430
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6431
_WToolkit_sync: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6432
    "/ void sync ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6433
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6434
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6435
    "Created: / 12.11.1998 / 19:09:14 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6436
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6437
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6438
_WWindowPeer__setResizable: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6439
    |view onOff|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6440
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6441
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6442
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6443
    onOff := (nativeContext argAt:1) == 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6444
    view isTopView ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6445
        onOff ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6446
            view minExtent:10@10.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6447
            view maxExtent:(Screen current extent).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6448
        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6449
            view minExtent:view extent.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6450
            view maxExtent:view extent.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6451
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6452
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6453
        (view isMemberOf:JavaEmbeddedFrameView) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6454
            self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6455
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6456
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6457
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6458
"/ 'JAVA: WWindowPeer_setResizable: ' print. view print. ' yes/no: ' print. onOff printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6459
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6460
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6461
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6462
    "Created: / 5.1.1998 / 00:57:59 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6463
    "Modified: / 16.1.1998 / 18:08:00 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6464
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6465
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6466
_WWindowPeer__setTitle: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6467
    |view jString string|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6468
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6469
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6470
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6471
    jString := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6472
    string := Java as_ST_String:jString.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6473
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6474
"/ 'JAVA: WWindowPeer_pSetTitle: ' print. string print. ' ' print. view printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6475
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6476
    view label:string.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6477
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6478
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6479
    "Created: / 5.1.1998 / 00:57:17 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6480
    "Modified: / 8.1.1998 / 17:37:41 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6481
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6482
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6483
_WWindowPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6484
    "/ void create (sun.awt.windows.WComponentPeer)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6485
    |jWindowPeer jWindow top window pDataIdx|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6486
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6487
    jWindowPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6488
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6489
    jWindow := jWindowPeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6490
    window := jWindowPeer instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6491
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6492
    (window notNil and:[window ~~ 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6493
        WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6494
            'JAVA: window view already created: ' infoPrint.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6495
            jWindowPeer class name infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6496
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6497
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6498
"/ OLD
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6499
"/        window := StandardSystemView new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6500
"/        self createdWindowsView:window for:jWindowPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6501
"/        JavaWindowGroup addTopView:window.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6502
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6503
        window := JavaPopUpView new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6504
        window borderWidth:0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6505
        window level:0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6506
        window delegate:self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6507
        window javaPeer:jWindowPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6508
        self createdWindowsView:window for:jWindowPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6509
        JavaWindowGroup addTopView:window.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6510
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6511
"/        top := StandardSystemView new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6512
"/        window := JavaView origin:0.0@0.0 corner:1.0@1.0 in:top.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6513
"/        window delegate:self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6514
"/        window javaPeer:jWindowPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6515
"/        self createdWindowsView:window for:jWindowPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6516
"/        JavaWindowGroup addTopView:top.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6517
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6518
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6519
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6520
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6521
        'JAVA: WWindowPeer_create: ' print. jWindowPeer displayString print.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6522
        ' window: ' print. window printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6523
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6524
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6525
    "Created: / 4.1.1998 / 17:56:39 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6526
    "Modified: / 4.12.1998 / 17:37:59 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6527
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6528
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6529
_WWindowPeer_getContainerElement: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6530
    "/ java.awt.Component getContainerElement (java.awt.Container int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6531
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6532
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6533
    "Created: / 12.11.1998 / 19:10:54 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6534
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6535
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6536
_WWindowPeer_toBack: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6537
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6538
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6539
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6540
    view lower.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6541
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6542
    "Created: / 7.5.1998 / 00:23:03 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6543
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6544
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6545
_WWindowPeer_toFront: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6546
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6547
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6548
    view := self viewForWPeer: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6549
    view raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6550
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6551
    "Created: / 9.4.1998 / 22:17:28 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6552
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6553
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6554
_WWindowPeer_updateInsets: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6555
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6556
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6557
    "Modified: / 18.3.1997 / 18:43:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6558
    "Created: / 4.1.1998 / 18:09:04 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6559
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6560
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6561
_Win32Process_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6562
    "really create a win32 process"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6563
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6564
    |env cmd jProcess p inPipe outPipe errorPipe|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6565
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6566
    jProcess := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6567
    cmd := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6568
    cmd := Java as_ST_String:cmd.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6569
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6570
    env := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6571
    env notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6572
        self halt
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6573
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6574
self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6575
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6576
    p := Win32Process new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6577
    p command:cmd.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6578
    p environment:env.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6579
    p inStream:inPipe.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6580
    p outStream:outPipe.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6581
    p errorStream:errorPipe.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6582
    p directory:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6583
    p startProcess.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6584
self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6585
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6586
    jProcess instVarNamed:'handle' put:p.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6587
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6588
    "Created: / 10.11.1998 / 19:50:31 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6589
    "Modified: / 10.11.1998 / 21:34:18 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6590
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6591
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6592
_X11FontMetrics_getMFCharSegmentWidth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6593
    "get multi-font string-segment width.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6594
     Not yet supported - use standard strings width"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6595
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6596
    |jMetrics jFont jFontDescr stFont w
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6597
     bool1 cp offs lenght bp int1|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6598
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6599
    jMetrics := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6600
    jFont := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6601
    jFontDescr := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6602
    cp := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6603
    lenght := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6604
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6605
    stFont := jFont instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6606
    (stFont isNil or:[stFont == 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6607
        self halt
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6608
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6609
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6610
    stFont device isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6611
        stFont := stFont on:Display.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6612
        jFont instVarNamed:'pData' put:stFont.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6613
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6614
    w := stFont widthOf:cp from:1 to:lenght.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6615
    ^ w.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6616
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6617
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6618
_X11FontMetrics_init: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6619
    ^ self _WFontMetrics_init: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6620
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6621
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6622
_X11GraphicsDevice_getConfigType: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6623
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6624
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6625
    |configNr cls|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6626
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6627
    "/ for now, only one config.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6628
    configNr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6629
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6630
    cls := Java classNamed:'java.awt.GraphicsDevice'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6631
    ^ cls instVarNamed:'TYPE_RASTER_SCREEN'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6632
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6633
    "Created: / 28.1.1998 / 22:19:05 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6634
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6635
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6636
_X11GraphicsDevice_getNumConfigs: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6637
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6638
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6639
    ^ 1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6640
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6641
    "Created: / 28.1.1998 / 22:13:26 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6642
    "Modified: / 28.1.1998 / 22:14:33 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6643
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6644
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6645
_X11GraphicsEnvironment_getNumScreens: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6646
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6647
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6648
    "/ could return the actual number of screens ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6649
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6650
    ^ 1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6651
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6652
    "Created: / 28.1.1998 / 01:50:22 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6653
    "Modified: / 28.1.1998 / 22:12:32 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6654
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6655
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6656
_X11GraphicsEnvironment_initDisplay: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6657
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6658
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6659
    "Created: / 28.1.1998 / 01:50:22 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6660
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6661
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6662
_X11Graphics_changeClip: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6663
    ^ self _WGraphics_changeClip: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6664
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6665
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6666
_X11Graphics_createFromComponent: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6667
    ^ self _WGraphics_createFromComponent: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6668
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6669
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6670
_X11Graphics_disposeImpl: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6671
    ^ self _WGraphics_dispose: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6672
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6673
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6674
_X11Graphics_drawMFCharsSegment: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6675
    ^ self _WGraphics_drawMFCharsSegment: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6676
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6677
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6678
_X11Graphics_drawRect: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6679
    ^ self _WGraphics_drawRect: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6680
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6681
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6682
_X11Graphics_fillOval: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6683
    ^ self _WGraphics_fillOval: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6684
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6685
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6686
_X11Graphics_fillRect: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6687
    ^ self _WGraphics_fillRect: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6688
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6689
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6690
_X11Graphics_pSetFont: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6691
    ^ self _WGraphics_pSetFont: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6692
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6693
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6694
_X11Graphics_pSetForeground: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6695
    ^ self _WGraphics_pSetForeground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6696
! !
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6697
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6698
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - com.sun.management'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6699
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6700
_com_sun_management_UnixOperatingSystem_initialize: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6701
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6702
    <javanative: 'com/sun/management/UnixOperatingSystem' name: 'initialize()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6703
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6704
Logger log: 'mh did not set page_size here, which he should :)' severity:#info facility:#JVM.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6705
^self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6706
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6707
    "Modified: / 03-11-2011 / 18:59:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6708
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6709
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6710
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - java.awt'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6711
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6712
_java_awt_AWTEvent_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6713
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6714
    <javanative: 'java/awt/AWTEvent' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6715
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6716
    "Intentionally left blank"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6717
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6718
    "Modified: / 12-08-2011 / 19:08:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6719
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6720
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6721
_java_awt_Button_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6722
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6723
    <javanative: 'java/awt/Button' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6724
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6725
    "Modified: / 09-02-2012 / 22:54:34 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6726
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6727
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6728
_java_awt_Color_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6729
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6730
    <javanative: 'java/awt/Color' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6731
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6732
        "/ new with jdk1.2 ...
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6733
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6734
    "Created: / 28.1.1998 / 22:19:23 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6735
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6736
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6737
_java_awt_Component_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6738
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6739
    <javanative: 'java/awt/Component' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6740
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6741
        "/ introduced with jdk1.2 ... (sigh)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6742
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6743
    "Created: / 27.1.1998 / 19:53:29 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6744
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6745
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6746
_java_awt_Container_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6747
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6748
    <javanative: 'java/awt/Container' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6749
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6750
    "Intentionally left blank"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6751
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6752
    "Modified: / 12-08-2011 / 19:09:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6753
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6754
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6755
_java_awt_Cursor_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6756
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6757
    <javanative: 'java/awt/Cursor' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6758
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6759
    "Modified: / 09-02-2012 / 22:54:49 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6760
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6761
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6762
_java_awt_Dialog_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6763
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6764
    <javanative: 'java/awt/Dialog' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6765
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6766
    "Modified: / 09-02-2012 / 22:54:09 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6767
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6768
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6769
_java_awt_Dimension_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6770
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6771
    <javanative: 'java/awt/Dimension' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6772
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6773
    "Intentionally left blank"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6774
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6775
    "Modified: / 12-08-2011 / 19:08:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6776
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6777
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6778
_java_awt_Event_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6779
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6780
    <javanative: 'java/awt/Event' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6781
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6782
    "Modified: / 09-02-2012 / 22:53:11 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6783
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6784
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6785
_java_awt_FontMetrics_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6786
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6787
    <javanative: 'java/awt/FontMetrics' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6788
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6789
    ^ JavaVM unimplementedNativeMethodSignal raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6790
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6791
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6792
_java_awt_Frame_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6793
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6794
    <javanative: 'java/awt/Frame' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6795
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6796
    "Modified: / 09-02-2012 / 22:53:52 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6797
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6798
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6799
_java_awt_Insets_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6800
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6801
    <javanative: 'java/awt/Insets' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6802
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6803
    "Modified: / 09-02-2012 / 22:54:54 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6804
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6805
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6806
_java_awt_KeyboardFocusManager_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6807
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6808
    <javanative: 'java/awt/KeyboardFocusManager' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6809
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6810
    "Modified: / 09-02-2012 / 22:55:04 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6811
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6812
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6813
_java_awt_MenuComponent_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6814
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6815
    <javanative: 'java/awt/MenuComponent' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6816
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6817
    "Modified: / 09-02-2012 / 22:53:22 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6818
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6819
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6820
_java_awt_MenuItem_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6821
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6822
    <javanative: 'java/awt/MenuItem' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6823
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6824
    "Modified: / 09-02-2012 / 22:54:40 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6825
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6826
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6827
_java_awt_Rectangle_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6828
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6829
    <javanative: 'java/awt/Rectangle' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6830
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6831
    "Intentionally left blank"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6832
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6833
    "Modified: / 27-10-2011 / 15:07:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6834
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6835
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6836
_java_awt_Toolkit_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6837
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6838
    <javanative: 'java/awt/Toolkit' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6839
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6840
        "/ introduced with jdk1.2 ... (sigh)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6841
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6842
    "Created: / 27.1.1998 / 19:53:50 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6843
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6844
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6845
_java_awt_Window_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6846
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6847
    <javanative: 'java/awt/Window' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6848
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6849
    "Modified: / 09-02-2012 / 22:53:47 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6850
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6851
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6852
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - java.awt.event'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6853
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6854
_java_awt_event_InputEvent_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6855
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6856
    <javanative: 'java/awt/event/InputEvent' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6857
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6858
    "Modified: / 09-02-2012 / 22:53:27 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6859
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6860
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6861
_java_awt_event_KeyEvent_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6862
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6863
    <javanative: 'java/awt/event/KeyEvent' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6864
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6865
    "Modified: / 09-02-2012 / 22:53:33 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6866
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6867
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6868
_java_awt_event_MouseEvent_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6869
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6870
    <javanative: 'java/awt/event/MouseEvent' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6871
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6872
    "Modified: / 09-02-2012 / 22:53:40 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6873
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6874
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6875
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - java.io'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6876
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6877
_java_io_FileDescriptor_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6878
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6879
    <javanative: 'java/io/FileDescriptor' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6880
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6881
        "/ introduced with jdk1.2 ... (sigh)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6882
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6883
    "Created: / 27.1.1998 / 18:16:29 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6884
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6885
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6886
_java_io_FileDescriptor_set: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6887
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6888
    <javanative: 'java/io/FileDescriptor' name: 'set(I)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6889
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6890
    "SunJDK Speciofic method, we don't need handles, so return
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6891
     FD instead"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6892
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6893
    ^a1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6894
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6895
    "Modified: / 18-08-2011 / 19:54:36 / jv"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6896
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6897
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6898
_java_io_FileDescriptor_sync: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6899
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6900
    <javanative: 'java/io/FileDescriptor' name: 'sync()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6901
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6902
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6903
    * Force all system buffers to synchronize with the underlying
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6904
    * device.  This method returns after all modified data and
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6905
    * attributes of this FileDescriptor have been written to the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6906
    * relevant device(s).  In particular, if this FileDescriptor
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6907
    * refers to a physical storage medium, such as a file in a file
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6908
    * system, sync will not return until all in-memory modified copies
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6909
    * of buffers associated with this FileDescriptor have been
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6910
    * written to the physical medium.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6911
    *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6912
    * sync is meant to be used by code that requires physical
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6913
    * storage (such as a file) to be in a known state  For
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6914
    * example, a class that provided a simple transaction facility
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6915
    * might use sync to ensure that all changes to a file caused
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6916
    * by a given transaction were recorded on a storage medium.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6917
    *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6918
    * sync only affects buffers downstream of this FileDescriptor.  If
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6919
    * any in-memory buffering is being done by the application (for
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6920
    * example, by a BufferedOutputStream object), those buffers must
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6921
    * be flushed into the FileDescriptor (for example, by invoking
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6922
    * OutputStream.flush) before that data will be affected by sync.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6923
    *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6924
    * @exception SyncFailedException
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6925
    *        Thrown when the buffers cannot be flushed,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6926
    *        or because the system cannot guarantee that all the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6927
    *        buffers have been synchronized with physical media.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6928
    * @since     JDK1.1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6929
    */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6930
    public native void sync() throws SyncFailedException;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6931
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6932
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6933
    OpenFileTable do:[:stream|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6934
        stream notNil ifTrue:[stream flush].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6935
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6936
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6937
    "Created: / 12-11-1998 / 19:26:25 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6938
    "Modified (format): / 10-08-2011 / 19:04:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6939
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6940
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6941
_java_io_FileInputStream_available: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6942
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6943
    <javanative: 'java/io/FileInputStream' name: 'available()I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6944
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6945
        |file|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6946
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6947
    file := self validateFile:this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6948
    file == Stdin ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6949
        file := StdinReplacementFileQuerySignal raiseRequest.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6950
        file isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6951
            ^ 1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6952
        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6953
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6954
    file isFileStream ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6955
        ^ file size - file position + 1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6956
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6957
    file atEnd ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6958
        ^ 0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6959
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6960
    self halt.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6961
    ^ 1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6962
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6963
    "Modified: / 14-01-1998 / 15:12:52 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6964
    "Modified: / 28-07-2012 / 02:45:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6965
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6966
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6967
_java_io_FileInputStream_close0: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6968
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6969
    <javanative: 'java/io/FileInputStream' name: 'close0()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6970
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  6971
    ^self commonClose: this
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  6972
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  6973
    "Modified: / 30-01-2013 / 17:50:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6974
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6975
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6976
_java_io_FileInputStream_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6977
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6978
    <javanative: 'java/io/FileInputStream' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6979
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6980
        "/ introduced with jdk1.2 ... (sigh)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6981
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6982
    "Created: / 27.1.1998 / 18:15:51 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6983
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6984
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  6985
_java_io_FileInputStream_open: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6986
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6987
    <javanative: 'java/io/FileInputStream' name: 'open(Ljava/lang/String;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6988
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6989
    |fs fd name stream fileNo|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6990
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6991
    fs := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6992
    fd := fs instVarNamed:'fd'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6993
    (fileNo := fd instVarNamed:'fd') ~~ 0 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6994
        fileNo ~~ -1 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6995
            self halt:'file already open'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6996
            self internalError:'file already open'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6997
            ^ self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6998
        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6999
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7000
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7001
    name := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7002
    name := Java as_ST_String:name.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7003
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7004
    name := self fixFilename:name.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7005
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7006
    FileOpenTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7007
        ('JAVA: opening ' , name) infoPrintCR.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7008
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7009
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7010
    stream := self fileStreamForReading:name.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7011
    stream isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7012
        ^ self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7013
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7014
    stream buffered:false.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7015
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7016
"/    FileOpenConfirmation ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7017
"/        (self confirm:('JAVA Security check\\Opening ''' , name , ''' for reading.\Grant permission ?') withCRs)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7018
"/        ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7019
"/            self throwIOExceptionWithMessage:('no permission to open ' , name , ' for reading').
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7020
"/            ^ self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7021
"/        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7022
"/    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7023
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7024
    fileNo := self addOpenFile:stream.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7025
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7026
    FileOpenTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7027
        ('JAVA: opened ' , name , ' as FD ' , fileNo printString) infoPrintCR.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7028
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7029
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7030
    fd instVarNamed:'fd' put:fileNo.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7031
    "Kludge for finalization..."
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7032
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7033
    "Created: / 04-01-1998 / 16:47:12 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7034
    "Modified: / 28-01-1999 / 17:24:07 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7035
    "Modified: / 24-07-2012 / 02:17:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7036
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7037
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7038
_java_io_FileInputStream_read: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7039
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7040
    <javanative: 'java/io/FileInputStream' name: 'read()I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7041
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7042
        |file byte|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7043
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7044
    file := self validateFile:this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7045
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7046
    file == Stdin ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7047
        file := StdinReplacementFileQuerySignal raiseRequest.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7048
        file isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7049
            ^ -1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7050
        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7051
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7052
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7053
    FileIOTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7054
        ('JAVA: read 1 byte from ' , file pathName) infoPrintCR.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7055
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7056
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7057
    byte := file nextByte.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7058
    byte isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7059
        ^ -1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7060
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7061
    "Java bytes are signed"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7062
    byte > 127 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7063
        byte := 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7064
            byte"/ - 255.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7065
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7066
    ^ byte
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7067
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7068
    "Created: / 05-01-1998 / 02:17:08 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7069
    "Modified (format): / 12-12-2012 / 23:53:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7070
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7071
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7072
_java_io_FileInputStream_readBytes: this _:bytes _: offset _: count 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7073
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7074
    <javanative: 'java/io/FileInputStream' name: 'readBytes([BII)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7075
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7076
    ^ self anyStream_read: this bytes: bytes offset: offset count: count.
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7077
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7078
    "Modified: / 04-02-1998 / 15:23:08 / cg"
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7079
    "Modified: / 30-01-2013 / 17:56:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7080
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7081
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7082
_java_io_FileInputStream_skip: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7083
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7084
    <javanative: 'java/io/FileInputStream' name: 'skip(J)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7085
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7086
        "/ long skip (long)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7087
    |file nSkip nSkipped|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7088
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7089
    file := self validateFile:this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7090
    nSkip := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7091
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7092
    file == Stdin ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7093
        file := StdinReplacementFileQuerySignal raiseRequest.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7094
        file isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7095
            ^ -1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7096
        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7097
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7098
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7099
    FileIOTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7100
        (('JAVA: skip %1 byte(s) from ' bindWith:nSkip printString) , file pathName) infoPrintCR.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7101
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7102
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7103
    file skip:nSkip.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7104
    ^ nSkip
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7105
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7106
    "Modified: / 27.1.1999 / 20:36:11 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7107
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7108
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7109
_java_io_FileOutputStream_close0: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7110
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7111
    <javanative: 'java/io/FileOutputStream' name: 'close0()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7112
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7113
    ^self commonClose: this
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7114
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7115
    "Modified: / 30-01-2013 / 17:50:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7116
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7117
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7118
_java_io_FileOutputStream_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7119
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7120
    <javanative: 'java/io/FileOutputStream' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7121
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7122
        "/ introduced with jdk1.2 ... (sigh)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7123
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7124
    "Created: / 27.1.1998 / 18:16:40 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7125
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7126
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7127
_java_io_FileOutputStream_open: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7128
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7129
    <javanative: 'java/io/FileOutputStream' name: 'open(Ljava/lang/String;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7130
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7131
    ^ self commonOpen: this path: a1 forAppend:false
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7132
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7133
    "Modified: / 07-04-1998 / 19:14:31 / cg"
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7134
    "Modified: / 30-01-2013 / 17:53:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7135
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7136
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7137
_java_io_FileOutputStream_openAppend: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7138
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7139
    <javanative: 'java/io/FileOutputStream' name: 'openAppend(Ljava/lang/String;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7140
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7141
    ^ self commonOpen: this path: a1  forAppend:true
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7142
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7143
    "Modified: / 07-04-1998 / 19:13:42 / cg"
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7144
    "Modified: / 30-01-2013 / 17:53:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7145
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7146
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7147
_java_io_FileOutputStream_write: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7148
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7149
    <javanative: 'java/io/FileOutputStream' name: 'write(I)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7150
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7151
     /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7152
     * Writes the specified byte to this file output stream. Implements
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7153
     * the <code>write</code> method of <code>OutputStream</code>.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7154
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7155
     * @param      b   the byte to be written.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7156
     * @exception  IOException  if an I/O error occurs.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7157
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7158
     public native void write(int b) throws IOException;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7159
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7160
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7161
    | fdobj fd stream b |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7162
    b := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7163
    "/Java byte is signed, make it integer in 0-255"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7164
    b < 0 ifTrue:[b := b + 256].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7165
    fdobj := (this instVarNamed: #fd).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7166
    fd    := fdobj instVarNamed: #fd.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7167
    stream := self getOpenFileAt:fd.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7168
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7169
        stream nextPut: b
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7170
    ] on: Error do:[:ex|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7171
        JavaVM throwIOExceptionWithMessage:ex description
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7172
    ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7173
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7174
    "Modified: / 15-12-2012 / 16:31:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7175
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7176
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7177
_java_io_FileOutputStream_writeBytes: this _:bytes _: offset _: count 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7178
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7179
    <javanative: 'java/io/FileOutputStream' name: 'writeBytes([BII)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7180
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7181
        ^ self anyStream_write: this bytes: bytes offset: offset count: count.
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7182
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7183
    "Modified: / 04-02-1998 / 15:24:20 / cg"
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7184
    "Modified: / 30-01-2013 / 17:58:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7185
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7186
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7187
_java_io_FileSystem_getFileSystem: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7188
    <javanative: 'java/io/FileSystem' name: 'getFileSystem()Ljava/io/FileSystem;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7189
    OperatingSystem isUNIXlike ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7190
        ^ (JavaVM classForName:'java.io.UnixFileSystem') new
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7191
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7192
    OperatingSystem isMSWINDOWSlike ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7193
        ^ (Java classForName: 'java.io.WinNTFileSystem') new
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7194
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7195
    self error: 'Unknown/Unsupported platform'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7196
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7197
    "Created: / 09-12-2010 / 17:58:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7198
    "Modified: / 01-04-2011 / 18:09:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7199
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7200
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7201
_java_io_ObjectInputStream_latestUserDefinedLoader: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7202
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7203
    <javanative: 'java/io/ObjectInputStream' name: 'latestUserDefinedLoader()Ljava/lang/ClassLoader;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7204
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7205
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7206
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7207
    * Returns the first non-null class loader (not counting class loaders of
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7208
    * generated reflection implementation classes) up the execution stack, or
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7209
    * null if only code from the null class loader is on the stack.  This
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7210
    * method is also called via reflection by the following RMI-IIOP class:
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7211
    *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7212
    *     com.sun.corba.se.internal.util.JDKClassLoader
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7213
    *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7214
    * This method should not be removed or its signature changed without
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7215
    * corresponding modifications to the above class.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7216
    */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7217
    // REMIND: change name to something more accurate?
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7218
    private static native ClassLoader latestUserDefinedLoader();
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7219
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7220
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7221
    | ctx cl |
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7222
    ctx := self nativeContext.
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7223
    [ ctx notNil ] whileTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7224
        ctx receiver isJavaObject ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7225
            (cl := ctx receiver class classLoader) notNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7226
                "/self breakPoint: #jv info: 'Should not count class loaders of generated reflection implementation classes'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7227
                "/Please check"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7228
                ^cl.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7229
            ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7230
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7231
        ctx := ctx sender.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7232
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7233
    ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7234
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7235
    "Modified: / 30-01-2013 / 14:13:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7236
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7237
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7238
_java_io_ObjectStreamClass_hasStaticInitializer: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7239
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7240
    <javanative: 'java/io/ObjectStreamClass' name: 'hasStaticInitializer(Ljava/lang/Class;)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7241
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7242
    | cls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7243
    cls := Reflection classForJavaClassObject: a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7244
    ^(cls includesSelector: #'<clinit>()V') ifTrue:[1] ifFalse:[0]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7245
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7246
    "Modified: / 10-08-2011 / 01:13:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7247
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7248
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7249
_java_io_ObjectStreamClass_initNative: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7250
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7251
    <javanative: 'java/io/ObjectStreamClass' name: 'initNative()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7252
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7253
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7254
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7255
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7256
     * Initializes native code.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7257
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7258
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7259
    "Nothing to do"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7260
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7261
    "Created: / 20-12-2010 / 17:43:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7262
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7263
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7264
_java_io_RandomAccessFile_close0: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7265
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7266
    <javanative: 'java/io/RandomAccessFile' name: 'close0()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7267
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7268
    ^ self commonClose: this
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7269
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7270
    "Modified: / 30-01-2013 / 17:50:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7271
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7272
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7273
_java_io_RandomAccessFile_getFilePointer: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7274
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7275
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7276
     * Returns the current offset in this file.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7277
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7278
     * @return     the offset from the beginning of the file, in bytes,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7279
     *             at which the next read or write occurs.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7280
     * @exception  IOException  if an I/O error occurs.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7281
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7282
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7283
    <javanative: 'java/io/RandomAccessFile' name: 'getFilePointer()J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7284
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7285
    | file |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7286
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7287
    file := self validateFile:this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7288
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7289
    FileIOTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7290
        ('JAVA: getFilePointer on ' , file pathName) infoPrintCR.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7291
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7292
    ^file position0Based
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7293
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7294
    "Modified: / 06-07-2012 / 12:40:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7295
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7296
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7297
_java_io_RandomAccessFile_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7298
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7299
    <javanative: 'java/io/RandomAccessFile' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7300
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7301
    "Nothing to do"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7302
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7303
    "Modified: / 10-08-2011 / 21:49:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7304
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7305
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7306
_java_io_RandomAccessFile_length: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7307
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7308
    <javanative: 'java/io/RandomAccessFile' name: 'length()J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7309
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7310
        |file sz|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7311
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7312
    file := self validateFile:this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7313
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7314
    FileIOTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7315
        ('JAVA: length of ' , file pathName) infoPrintCR.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7316
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7317
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7318
    sz := file size.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7319
    ^ sz.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7320
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7321
    "Created: / 4.2.1998 / 13:27:58 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7322
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7323
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7324
_java_io_RandomAccessFile_open: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7325
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7326
    <javanative: 'java/io/RandomAccessFile' name: 'open(Ljava/lang/String;I)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7327
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7328
    |fs fd nm mode filename dir stream fileNo answer readonly|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7329
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7330
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7331
    fs := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7332
    fd := fs instVarNamed:'fd'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7333
    (fd instVarNamed:'fd') ~~ -1 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7334
        self halt:'file already open'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7335
        self internalError:'file already open'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7336
        ^ self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7337
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7338
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7339
    nm := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7340
    nm := Java as_ST_String:nm.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7341
    nm := self fixFilename:nm.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7342
    mode := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7343
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7344
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7345
    private static final int O_RDONLY = 1;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7346
    private static final int O_RDWR =   2;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7347
    private static final int O_SYNC =   4;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7348
    private static final int O_DSYNC =  8;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7349
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7350
    readonly := (mode bitAnd:1) == 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7351
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7352
    FileOpenTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7353
        ('JAVA: opening ' , nm) infoPrintCR.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7354
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7355
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7356
    dir := (filename := nm utf8Encoded asFilename) directory pathName.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7357
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7358
    (PermittedDirectories notNil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7359
    and:[PermittedDirectories includes:dir]) ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7360
        FileOpenConfirmation ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7361
            answer := Dialog
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7362
                    confirmWithCancel:('JAVA Security check\\Opening ''' , nm , ''' for read/write.\Grant permission ?') withCRs
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7363
                               labels:#('no' 'grant' 'readonly')
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7364
                               values:#(false true #readonly)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7365
                              default:3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7366
            answer == false ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7367
                JavaVM throwIOExceptionWithMessage:('no permission to open ' , nm 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7368
            , ' for writing').
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7369
                ^ self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7370
            ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7371
            readonly := (answer == #readonly).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7372
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7373
            readonly ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7374
                (self confirm:('JAVA Security check\\Always permit writes in this directory (''' , dir , ''') ?') withCRs)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7375
                ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7376
                    PermittedDirectories isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7377
                        PermittedDirectories := Set new
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7378
                    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7379
                    PermittedDirectories add:dir.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7380
                ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7381
            ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7382
        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7383
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7384
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7385
    (filename exists not and:[readonly]) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7386
        JavaVM throwIOExceptionWithMessage:'File ' , nm , ' does not exist'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7387
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7388
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7389
    readonly ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7390
        stream := self commonOpenStreamUsing:[filename readStream].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7391
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7392
        stream := self commonOpenStreamUsing:[filename readWriteStream].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7393
        stream isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7394
            JavaVM throwIOExceptionWithMessage:('cannot open ' , nm , ' for writing').
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7395
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7396
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7397
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7398
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7399
    fileNo := self addOpenFile:stream.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7400
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7401
    FileOpenTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7402
        ('JAVA: opened ' , nm , ' as FD ' , fileNo printString , ' for writing') infoPrintCR.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7403
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7404
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7405
    fd instVarNamed:'fd' put:fileNo.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7406
    "Kludge for finalization..."
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7407
    fs finalizationLobby registerChange: fs
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7408
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7409
    "Created: / 04-02-1998 / 00:14:48 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7410
    "Modified: / 12-11-1998 / 21:29:46 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7411
    "Modified: / 23-07-2012 / 19:37:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7412
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7413
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7414
_java_io_RandomAccessFile_read: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7415
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7416
    <javanative: 'java/io/RandomAccessFile' name: 'read()I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7417
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7418
        |file byte|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7419
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7420
    file := self validateFile:this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7421
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7422
    FileIOTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7423
        ('JAVA: read 1 byte from ' , file pathName) infoPrintCR.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7424
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7425
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7426
    byte := file nextByte.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7427
    byte isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7428
        ^ -1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7429
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7430
    ^ byte
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7431
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7432
    "Modified: / 5.1.1998 / 02:17:25 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7433
    "Created: / 27.1.1999 / 19:01:15 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7434
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7435
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7436
_java_io_RandomAccessFile_readBytes: this _:bytes _: offset _: count 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7437
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7438
    <javanative: 'java/io/RandomAccessFile' name: 'readBytes([BII)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7439
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7440
    ^ self anyStream_read: this bytes: bytes offset: offset count: count.
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7441
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7442
    "Modified: / 04-02-1998 / 15:23:27 / cg"
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7443
    "Modified: / 30-01-2013 / 17:56:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7444
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7445
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7446
_java_io_RandomAccessFile_seek: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7447
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7448
    <javanative: 'java/io/RandomAccessFile' name: 'seek(J)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7449
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7450
        |file pos|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7451
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7452
    file := self validateFile:this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7453
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7454
    FileIOTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7455
        ('JAVA: seek on ' , file pathName) infoPrintCR.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7456
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7457
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7458
    pos := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7459
    file position0Based:pos
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7460
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7461
    "Created: / 04-02-1998 / 13:25:38 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7462
    "Modified (comment): / 06-07-2012 / 12:39:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7463
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7464
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7465
_java_io_RandomAccessFile_writeBytes: this _:bytes _: offset _: count 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7466
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7467
    <javanative: 'java/io/RandomAccessFile' name: 'writeBytes([BII)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7468
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7469
        ^ self anyStream_write: this bytes: bytes offset: offset count: count.
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7470
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7471
    "Created: / 04-02-1998 / 15:24:35 / cg"
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
  7472
    "Modified: / 30-01-2013 / 17:58:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7473
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7474
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7475
_java_io_UnixFileSystem_canonicalize0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7476
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7477
    <javanative: 'java/io/UnixFileSystem' name: 'canonicalize0(Ljava/lang/String;)Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7478
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7479
    |  path |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7480
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7481
    path := Java as_ST_String: a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7482
    ^(Java as_String: path utf8Encoded asFilename asAbsoluteFilename pathName utf8Decoded)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7483
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7484
    "Created: / 10-12-2010 / 14:40:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7485
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7486
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7487
_java_io_UnixFileSystem_checkAccess: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7488
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7489
    <javanative: 'java/io/UnixFileSystem' name: 'checkAccess(Ljava/io/File;I)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7490
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7491
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7492
     public static final int ACCESS_READ    = 0x04;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7493
     public static final int ACCESS_WRITE   = 0x02;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7494
     public static final int ACCESS_EXECUTE = 0x01;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7495
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7496
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7497
    | fileobj file access result |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7498
    fileobj := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7499
    file := (Java as_ST_String:(fileobj instVarNamed:#path)) asFilename.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7500
    access := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7501
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7502
        access == 16r01 ifTrue:[result := file isExecutable].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7503
        access == 16r02 ifTrue:[result := file isWritable].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7504
        access == 16r04 ifTrue:[result := file isReadable].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7505
    ] on: Error do:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7506
        result := false.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7507
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7508
    ^result ifTrue:[1] ifFalse:[0].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7509
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7510
    "Modified: / 09-08-2011 / 17:09:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7511
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7512
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7513
_java_io_UnixFileSystem_createDirectory: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7514
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7515
    <javanative: 'java/io/UnixFileSystem' name: 'createDirectory(Ljava/io/File;)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7516
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7517
    | fileobj file |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7518
    fileobj := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7519
    file := Java as_ST_String: (fileobj instVarNamed:#path).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7520
    file := file asFilename.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7521
    file exists ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7522
        [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7523
            file recursiveMakeDirectory.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7524
            ^1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7525
        ] on: Error do:[:ex|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7526
            JavaVM throwIOExceptionWithMessage:ex description.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7527
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7528
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7529
    ^0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7530
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7531
    "Modified: / 05-12-2011 / 23:04:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7532
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7533
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7534
_java_io_UnixFileSystem_createFileExclusively: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7535
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7536
    <javanative: 'java/io/UnixFileSystem' name: 'createFileExclusively(Ljava/lang/String;Z)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7537
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7538
    | file |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7539
    file := Java as_ST_String: a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7540
    file := file asFilename.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7541
    file exists ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7542
        [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7543
            file createAsEmptyFile
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7544
        ] on: Error do:[:ex|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7545
            JavaVM throwIOExceptionWithMessage:ex description.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7546
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7547
        ^1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7548
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7549
    ^0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7550
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7551
    "Modified: / 10-08-2011 / 13:42:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7552
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7553
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7554
_java_io_UnixFileSystem_delete0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7555
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7556
    <javanative: 'java/io/UnixFileSystem' name: 'delete0(Ljava/io/File;)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7557
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7558
      /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7559
      * Delete the file or directory denoted by the given abstract pathname,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7560
      * returning <code>true</code> if and only if the operation succeeds.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7561
      */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7562
      public abstract boolean delete(File f);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7563
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7564
    | file |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7565
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7566
    file := (Java as_ST_String: (a1 instVarNamed: #path)) asFilename.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7567
    file exists ifFalse:[^0].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7568
    ^[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7569
        file remove.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7570
        true
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7571
    ] on: Error do:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7572
        false
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7573
    ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7574
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7575
    "Modified: / 09-08-2011 / 17:09:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7576
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7577
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7578
_java_io_UnixFileSystem_getBooleanAttributes0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7579
    <javanative: 'java/io/UnixFileSystem' name: 'getBooleanAttributes0(Ljava/io/File;)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7580
    | file  path  retval  fileSystemClass |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7581
    retval := 0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7582
    file := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7583
    path := Java as_ST_String: (a1 perform: #'getAbsolutePath()Ljava/lang/String;').
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7584
    fileSystemClass := JavaVM classForName:'java.io.FileSystem'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7585
    path asFilename exists ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7586
        retval := retval bitOr: (fileSystemClass instVarNamed: #'BA_EXISTS')
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7587
    ] ifFalse: [ ^ 0. ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7588
    path asFilename isDirectory ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7589
        retval := retval bitOr: (fileSystemClass instVarNamed: #'BA_DIRECTORY')
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7590
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7591
    path asFilename isRegularFile ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7592
        retval := retval bitOr: (fileSystemClass instVarNamed: #'BA_REGULAR')
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7593
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7594
    path asFilename isHidden ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7595
        retval := retval bitOr: (fileSystemClass instVarNamed: #'BA_HIDDEN')
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7596
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7597
    ^ retval
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7598
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7599
    "Modified: / 10-12-2010 / 14:43:31 / Jan Kurs <kurs.jan@post.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7600
    "Created: / 10-12-2010 / 14:46:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7601
    "Modified: / 11-12-2010 / 19:44:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7602
    "Modified: / 03-11-2011 / 11:03:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7603
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7604
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7605
_java_io_UnixFileSystem_getLastModifiedTime: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7606
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7607
    <javanative: 'java/io/UnixFileSystem' name: 'getLastModifiedTime(Ljava/io/File;)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7608
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7609
    | file  filename  |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7610
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7611
    file := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7612
    filename := (Java as_ST_String: (file instVarNamed: #path)) utf8Encoded asFilename.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7613
    ^filename exists ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7614
        filename modificationTime asMilliseconds
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7615
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7616
        0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7617
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7618
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7619
    "Modified: / 10-12-2010 / 14:43:31 / Jan Kurs <kurs.jan@post.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7620
    "Created: / 27-03-2011 / 15:32:59 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7621
    "Modified: / 06-07-2012 / 08:57:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7622
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7623
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7624
_java_io_UnixFileSystem_getLength: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7625
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7626
    <javanative: 'java/io/UnixFileSystem' name: 'getLength(Ljava/io/File;)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7627
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7628
    | file |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7629
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7630
    file := (Java as_ST_String: (a1 instVarNamed: #path)) asFilename.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7631
    file exists ifFalse:[^0].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7632
    ^file fileSize
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7633
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7634
    "Modified: / 09-08-2011 / 15:38:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7635
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7636
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7637
_java_io_UnixFileSystem_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7638
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7639
    <javanative: 'java/io/UnixFileSystem' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7640
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7641
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7642
    self breakPoint: #libjava
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7643
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7644
    "Created: / 10-12-2010 / 14:47:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7645
    "Modified: / 10-12-2010 / 20:58:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7646
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7647
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7648
_java_io_UnixFileSystem_list: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7649
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7650
    <javanative: 'java/io/UnixFileSystem' name: #'list(Ljava/io/File;)[Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7651
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7652
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7653
    * Returns an array of strings naming the files and directories in the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7654
    * directory denoted by this abstract pathname.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7655
    *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7656
    * <p> If this abstract pathname does not denote a directory, then this
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7657
    * method returns {@code null}.  Otherwise an array of strings is
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7658
    * returned, one for each file or directory in the directory.  Names
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7659
    * denoting the directory itself and the directory's parent directory are
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7660
    * not included in the result.  Each string is a file name rather than a
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7661
    * complete path.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7662
    *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7663
    * <p> There is no guarantee that the name strings in the resulting array
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7664
    * will appear in any specific order; they are not, in particular,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7665
    * guaranteed to appear in alphabetical order.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7666
    *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7667
    * @return  An array of strings naming the files and directories in the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7668
    *          directory denoted by this abstract pathname.  The array will be
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7669
    *          empty if the directory is empty.  Returns {@code null} if
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7670
    *          this abstract pathname does not denote a directory, or if an
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7671
    *          I/O error occurs.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7672
    */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7673
   "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7674
    | fileobj file names jnames |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7675
    fileobj := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7676
    file := Java as_ST_String: (fileobj instVarNamed:#path).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7677
    file := file asFilename.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7678
    file exists ifFalse:[^nil].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7679
    file isDirectory ifFalse:[^nil].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7680
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7681
    names := file directoryContents.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7682
    jnames := (Java at:'java.lang.String') javaArrayClass new: names size.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7683
    1 to: names size do:[:i|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7684
        jnames at: i put: (Java as_String:(names at: i))
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7685
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7686
    ^jnames
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7687
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7688
    "Modified: / 23-07-2012 / 21:57:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7689
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7690
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7691
_java_io_UnixFileSystem_rename0: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7692
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7693
    <javanative: 'java/io/UnixFileSystem' name: 'rename0(Ljava/io/File;Ljava/io/File;)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7694
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7695
    | file1 file2 |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7696
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7697
    file1 := (Java as_ST_String: (a1 instVarNamed: #path)) asFilename.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7698
    file2 := (Java as_ST_String: (a2 instVarNamed: #path)) asFilename.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7699
    file1 exists ifFalse:[^0].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7700
    ^[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7701
        file1 moveTo: file2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7702
        true
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7703
    ] on: Error do:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7704
        false
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7705
    ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7706
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7707
    "Modified: / 09-12-2011 / 20:01:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7708
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7709
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7710
_java_io_UnixFileSystem_setLastModifiedTime: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7711
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7712
    <javanative: 'java/io/UnixFileSystem' name: 'setLastModifiedTime(Ljava/io/File;J)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7713
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7714
    | f mtime file |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7715
    f := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7716
    mtime := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7717
    file := (Java as_ST_String: (f instVarNamed: #path)) asFilename.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7718
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7719
    self breakPoint: #jv. "There is no interface for that in St/X"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7720
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7721
    "Modified: / 05-12-2011 / 23:42:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7722
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7723
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7724
_java_io_UnixFileSystem_setPermission: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7725
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7726
    <javanative: 'java/io/UnixFileSystem' name: 'setPermission(Ljava/io/File;IZZ)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7727
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7728
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7729
     * Set on or off the access permission (to owner only or to all) to the file
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7730
     * or directory denoted by the given abstract pathname, based on the parameters
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7731
     * enable, access and oweronly.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7732
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7733
    public abstract boolean setPermission(File f, int access, boolean enable, boolean owneronly);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7734
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7735
    | f access enable owneronly file perms |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7736
    f := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7737
    access := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7738
    enable := a3 == 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7739
    owneronly := a4 == 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7740
    file := (Java as_ST_String: (f instVarNamed: #path)) asFilename.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7741
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7742
    public static final int ACCESS_READ    = 0x04;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7743
    public static final int ACCESS_WRITE   = 0x02;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7744
    public static final int ACCESS_EXECUTE = 0x01;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7745
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7746
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7747
    access == 16r04 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7748
        perms := owneronly ifFalse:[#(readUser readGroup readOthers)] ifTrue:[#(readUser)].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7749
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7750
    access == 16r02 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7751
        perms := owneronly ifFalse:[#(writeUser writeGroup writeOthers)] ifTrue:[#(writeUser)].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7752
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7753
    access == 16r01 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7754
        perms := owneronly ifFalse:[#(executeUser executeGroup executeOthers)] ifTrue:[#(executeUser)].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7755
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7756
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7757
        enable ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7758
            file addAccessRights: perms
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7759
        ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7760
            file removeAccessRights: perms
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7761
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7762
        ^ 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7763
    ] on: Error do:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7764
        ^ 0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7765
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7766
    ^0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7767
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7768
    "Modified: / 09-08-2011 / 17:18:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7769
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7770
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7771
_java_io_UnixFileSystem_setReadOnly: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7772
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7773
    <javanative: 'java/io/UnixFileSystem' name: 'setReadOnly(Ljava/io/File;)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7774
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7775
    | fileobj file |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7776
    fileobj := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7777
    file := Java as_ST_String: (fileobj instVarNamed:#path).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7778
    file := file asFilename.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7779
    file exists ifFalse:[^0].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7780
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7781
        file  removeAccessRights: #(writeUser writeGroup writeOthers).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7782
        ^1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7783
    ] on: Error do:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7784
        ^0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7785
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7786
    ^0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7787
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7788
    "Modified: / 10-08-2011 / 13:40:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7789
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7790
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7791
_java_io_Win32FileSystem_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7792
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7793
    <javanative: 'java/io/Win32FileSystem' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7794
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7795
    "Intentionally left blank"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7796
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7797
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7798
_java_io_WinNTFileSystem_canonicalize0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7799
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7800
    <javanative: 'java/io/WinNTFileSystem' name: 'canonicalize0(Ljava/lang/String;)Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7801
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7802
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7803
    |  path |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7804
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7805
    path := Java as_ST_String: a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7806
    ^(Java as_String: path asFilename asAbsoluteFilename pathName)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7807
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7808
    "Created: / 01-04-2011 / 23:00:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7809
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7810
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7811
_java_io_WinNTFileSystem_canonicalizeWithPrefix0: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7812
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7813
    <javanative: 'java/io/WinNTFileSystem' name: 'canonicalizeWithPrefix0(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7814
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7815
    |  path |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7816
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7817
    path := Java as_ST_String: a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7818
    ^(Java as_String: path utf8Encoded asFilename asAbsoluteFilename pathName utf8Decoded)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7819
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7820
    "Modified: / 01-09-2011 / 21:50:47 / jv"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7821
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7822
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7823
_java_io_WinNTFileSystem_checkAccess: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7824
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7825
    <javanative: 'java/io/WinNTFileSystem' name: 'checkAccess(Ljava/io/File;I)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7826
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7827
    ^ JavaVM unimplementedNativeMethodSignal raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7828
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7829
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7830
_java_io_WinNTFileSystem_createDirectory: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7831
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7832
    <javanative: 'java/io/WinNTFileSystem' name: 'createDirectory(Ljava/io/File;)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7833
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7834
    ^ JavaVM unimplementedNativeMethodSignal raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7835
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7836
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7837
_java_io_WinNTFileSystem_createFileExclusively: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7838
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7839
    <javanative: 'java/io/WinNTFileSystem' name: 'createFileExclusively(Ljava/lang/String;)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7840
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7841
    ^ self _java_io_UnixFileSystem_createFileExclusively: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7842
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7843
    "Modified: / 18-08-2011 / 17:26:11 / jv"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7844
    "Modified: / 30-01-2013 / 14:17:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7845
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7846
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7847
_java_io_WinNTFileSystem_delete0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7848
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7849
    <javanative: 'java/io/WinNTFileSystem' name: 'delete0(Ljava/io/File;)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7850
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7851
    ^ JavaVM unimplementedNativeMethodSignal raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7852
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7853
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7854
_java_io_WinNTFileSystem_getBooleanAttributes: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7855
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7856
    <javanative: 'java/io/WinNTFileSystem' name: 'getBooleanAttributes(Ljava/io/File;)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7857
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7858
    ^ self _java_io_UnixFileSystem_getBooleanAttributes0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7859
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7860
    "Created: / 01-04-2011 / 18:10:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7861
    "Modified: / 30-01-2013 / 14:17:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7862
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7863
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7864
_java_io_WinNTFileSystem_getLastModifiedTime: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7865
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7866
    <javanative: 'java/io/WinNTFileSystem' name: 'getLastModifiedTime(Ljava/io/File;)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7867
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7868
    ^ self _java_io_UnixFileSystem_getLastModifiedTime: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7869
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7870
    "Modified: / 18-08-2011 / 14:12:07 / jv"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7871
    "Modified: / 30-01-2013 / 14:17:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7872
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7873
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7874
_java_io_WinNTFileSystem_getLength: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7875
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7876
    <javanative: 'java/io/WinNTFileSystem' name: 'getLength(Ljava/io/File;)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7877
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7878
    ^ self _java_io_UnixFileSystem_getLength: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7879
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7880
    "Modified: / 18-08-2011 / 14:15:36 / jv"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7881
    "Modified: / 30-01-2013 / 14:17:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7882
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7883
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7884
_java_io_WinNTFileSystem_list: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7885
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7886
    <javanative: 'java/io/WinNTFileSystem' name: 'list(Ljava/io/File;)[Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7887
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7888
    ^ self _java_io_UnixFileSystem_list: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7889
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7890
    "Modified: / 01-09-2011 / 21:46:37 / jv"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7891
    "Modified: / 30-01-2013 / 14:17:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7892
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7893
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7894
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - java.lang'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7895
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7896
_java_lang_ClassLoader_NativeLibrary_load: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7897
    <javanative: 'java/lang/ClassLoader$NativeLibrary' name: 'load(Ljava/lang/String;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7898
    "/ introduced with jdk1.2 ... (sigh)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7899
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7900
    | nativeLoader  jLibName  libName  libHandle  index |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7901
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7902
    nativeLoader := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7903
    jLibName := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7904
    libName := (Java as_ST_String: jLibName) asFilename baseName.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7905
    (index := SimulatedNativeLibs indexOf: libName) ~~ 0 ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7906
        "/        ('JAVA: builtIn nativeLibLoad simulated: ' , libName) printNL.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7907
        nativeLoader instVarNamed: 'handle' put: index.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7908
        ^ self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7909
        "/ void
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7910
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7911
    (LoadedNativeLibs notNil and: [ LoadedNativeLibs includesKey: libName ]) ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7912
        "/        ('JAVA: native library already loaded: ' , libName) printNL.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7913
        nativeLoader instVarNamed: 'handle' put: (LoadedNativeLibs at: libName).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7914
        ^ self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7915
        "/ void
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7916
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7917
    (self confirm: 'permission to load native library: ' , libName , ' ?') ifFalse: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7918
        ^ self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7919
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7920
    self halt.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7921
    libName asFilename exists ifFalse: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7922
        ('JAVA: no file to load nativeLib: ' , libName) printNL.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7923
        ^ self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7924
        "/ void
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7925
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7926
    libHandle := ObjectFileLoader loadLibrary: libName.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7927
    libHandle isNil ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7928
        ('JAVA: failed to load nativeLib: ' , libName) printNL.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7929
        ^ self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7930
        "/ void
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7931
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7932
    LoadedNativeLibs isNil ifTrue: [ LoadedNativeLibs := Dictionary new. ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7933
    LoadedNativeLibs at: libName put: libHandle.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7934
    nativeLoader instVarNamed: 'handle' put: (LoadedNativeLibs at: libName).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7935
    ^ self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7936
    "/ void
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7937
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7938
    "Modified: / 06-02-1998 / 03:12:17 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7939
    "Created: / 10-12-2010 / 15:11:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7940
    "Modified: / 03-11-2011 / 18:25:08 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7941
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7942
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7943
_java_lang_ClassLoader_defineClass1: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7944
    <javanative: 'java/lang/ClassLoader' name: 'defineClass1(Ljava/lang/String;[BIILjava/security/ProtectionDomain;Ljava/lang/String;)Ljava/lang/Class;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7945
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7946
     private native Class defineClass1(String name, byte[] b, int off, int len,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7947
                                      ProtectionDomain pd, String source);"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7948
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7949
    | className  b  off  len  pd  source  bs  cls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7950
    className := Java as_ST_String: a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7951
    "if name starts with java.* or package is signed by something else and we are not signed, throw security exception"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7952
    "ClassLoadersTest>>testEyeOpeningClassLoaderLoadObject"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7953
    "18.11. mh revised - they really test it against java., totally ignoring boot class path.. That surpsised me"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7954
    (className startsWith: 'java.') ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7955
        JavaVM throwSecurityExceptionWith:'className=' , className
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7956
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7957
    cls := nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7958
    b := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7959
    b ifNil: [JavaVM throwNullPointerException].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7960
    off := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7961
    len := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7962
    pd := a5.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7963
    source := Java as_ST_String: a6.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7964
    bs := (off = 0 and: [ len = b size ])
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7965
        ifTrue: [ b readStream ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7966
        ifFalse: [ bs := (b copyFrom: off + 1 to: off + len) readStream ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7967
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7968
        JavaClassReader classLoaderQuerySignal answer: this
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7969
            do: [ cls := JavaClassReader readStream: bs. ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7970
    ] on: JavaClassReader invalidClassFormatSignal
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7971
            do: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7972
        :ex |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7973
        JavaVM throwClassFormatError:ex description.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7974
        ^ nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7975
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7976
    self assert: cls classLoader == this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7977
     "FIXME: What to do with source?"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7978
    ClassRegistry registerClass: cls.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7979
    "JavaClassReader classLoaderQuerySignal answer: nativeContext receiver
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7980
        do: [ cls resolveAll. ]."
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7981
    ^ Reflection javaClassObjectForClass: cls.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7982
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7983
    "Modified: / 08-12-2011 / 20:56:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7984
    "Modified: / 10-09-2012 / 22:21:22 / m"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7985
    "Modified: / 16-01-2013 / 21:28:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7986
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7987
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  7988
_java_lang_ClassLoader_findBootstrapClass: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7989
    <javanative: 'java/lang/ClassLoader' name: 'findBootstrapClass(Ljava/lang/String;)Ljava/lang/Class;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7990
    "Return class loaded by bootstrap (primordial) classloader or null.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7991
     See OpenJDK, file src/jdk7/hostspot/src/share/vm/prims/jvm.cpp"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7992
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7993
    | nm  class |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7994
    nm := Java as_ST_String: a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7995
    class := ClassRegistry
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7996
                classForName: nm asSlashedJavaClassName
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7997
                loader: nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7998
                ifAbsentPut: [ class := JavaVM usePrimordialCLToLoadClassNamed: nm. ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7999
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8000
    ^ class notNil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8001
        ifTrue: [ Reflection javaClassObjectForClass: class ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8002
        ifFalse: [ JavaVM throwClassNotFoundException:nm ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8003
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8004
    "Modified: / 30-10-2011 / 21:45:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8005
    "Modified: / 02-11-2011 / 20:13:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8006
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8007
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8008
_java_lang_ClassLoader_findLoadedClass0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8009
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8010
    <javanative: 'java/lang/ClassLoader' name: 'findLoadedClass0(Ljava/lang/String;)Ljava/lang/Class;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8011
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8012
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8013
    Return java class object for class with given name
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8014
    loaded by the receiver or null if not found.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8015
    See OpenJDK:
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8016
        src/jdk7/hostspot/src/share/vm/classfile/systemDictionary.cpp
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8017
        src/jdk7/hostspot/src/share/vm/prims/jvm.cpp
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8018
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8019
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8020
    | nm class |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8021
    nm := Java as_ST_String: a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8022
    class := ClassRegistry classNamed: nm asSlashedJavaClassName loader: this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8023
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8024
    ^class notNil ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8025
        Reflection javaClassObjectForClass:class
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8026
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8027
        nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8028
    ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8029
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8030
    "Modified: / 30-10-2011 / 21:48:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8031
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8032
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8033
_java_lang_ClassLoader_registerNatives: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8034
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8035
    <javanative: 'java/lang/ClassLoader' name: 'registerNatives()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8036
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8037
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8038
    "Nothing to do"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8039
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8040
    "Created: / 09-11-2010 / 20:55:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8041
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8042
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8043
_java_lang_ClassLoader_resolveClass0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8044
    <javanative: 'java/lang/ClassLoader' name: 'resolveClass0(Ljava/lang/Class;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8045
    "resolve a new class as previously created by defineClass0"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8046
    "or to be more precise - link class"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8047
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8048
    | jClassLoader  jCls  cls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8049
    jClassLoader := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8050
    jCls := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8051
    jCls isNil ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8052
        JavaVM throwNullPointerException.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8053
        ^ nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8054
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8055
    cls := Reflection classForJavaClassObject: jCls.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8056
    self assert: cls notNil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8057
    JavaClassReader classLoaderQuerySignal answer: jClassLoader
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8058
     do: [ "cls resolveAll." ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8059
    ^ cls.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8060
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8061
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8062
        Links the specified class.  This (misleadingly named) method may be
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8063
        * used by a class loader to link a class.  If the class <tt>c</tt> has
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8064
        * already been linked, then this method simply returns. Otherwise, the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8065
        * class is linked as described in the Execution chapter of the <a
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8066
        * href=http://java.sun.com/docs/books/jls/>Java Language
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8067
        * Specification</a>.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8068
        * </p>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8069
        *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8070
        * @param  c
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8071
        *         The class to link
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8072
        *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8073
        * @throws  NullPointerException
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8074
         *          If <tt>c</tt> is <tt>null</tt>."
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8075
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8076
    "Created: / 07-01-1998 / 13:12:27 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8077
    "Modified: / 20-10-1998 / 19:01:57 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8078
    "Modified: / 28-01-2011 / 15:28:18 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8079
    "Modified: / 08-12-2011 / 20:52:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8080
    "Modified: / 12-12-2011 / 14:12:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8081
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8082
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8083
_java_lang_ClassLoader_retrieveDirectives: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8084
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8085
    <javanative: 'java/lang/ClassLoader' name: 'retrieveDirectives()Ljava/lang/AssertionStatusDirectives;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8086
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8087
    | directives |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8088
    directives := (JavaVM classForName:'java.lang.AssertionStatusDirectives') new.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8089
    directives instVarNamed:#classes
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8090
        put: ((JavaVM classForName:'java.lang.String') javaArrayClass new:0).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8091
    directives instVarNamed:#classEnabled
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8092
        put: (Boolean javaArrayClass new:0).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8093
    directives instVarNamed:#packages
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8094
        put: ((JavaVM classForName:'java.lang.String') javaArrayClass new:0).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8095
    directives instVarNamed:#packageEnabled
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8096
        put: (Boolean javaArrayClass new:0).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8097
    directives instVarNamed:#deflt
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8098
        put: ((AssertionsEnabled == true) ifTrue:[1] ifFalse:[0]).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8099
    ^directives
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8100
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8101
    "Modified: / 06-07-2012 / 08:49:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8102
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8103
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8104
_java_lang_Class_desiredAssertionStatus0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8105
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8106
    <javanative: 'java/lang/Class' name: 'desiredAssertionStatus0(Ljava/lang/Class;)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8107
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8108
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8109
    ^AssertionsEnabled == true
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8110
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8111
    "Created: / 24-11-2010 / 08:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8112
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8113
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8114
_java_lang_Class_forName0: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8115
    <javanative: 'java/lang/Class' name: 'forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8116
    |nm initialize loader class descriptor|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8117
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8118
    nm := Java as_ST_String:a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8119
     "Using Class.forName() to get a primitive type is not allowed"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8120
    (nm size == 1 and:[JavaDescriptor baseTypes includesKey:nm first]) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8121
        ^ JavaVM throwClassNotFoundException:nm.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8122
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8123
    (JavaDescriptor baseTypesByTypeName includesKey:nm) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8124
        ^ JavaVM throwClassNotFoundException:nm.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8125
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8126
    initialize := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8127
    loader := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8128
    JavaClassReader classLoaderQuerySignal answer:loader do:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8129
        (nm first == $[) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8130
            |nms|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8131
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8132
            nms := nm readStream.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8133
            descriptor := JavaDescriptor readFrom:nms
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8134
                        onError:[^ JavaVM throwClassNotFoundException:nm].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8135
            nms atEnd ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8136
                ^ JavaVM throwClassNotFoundException:nm
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8137
            ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8138
            class := descriptor javaClass.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8139
        ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8140
            class := JavaVM classForName:nm
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8141
        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8142
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8143
    class isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8144
        ^ JavaVM throwClassNotFoundException:nm
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8145
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8146
    ((initialize ~~ 0)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8147
        and:[class isJavaArrayClass not and:[class isJavaPrimitiveType not]])
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8148
            ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8149
                [class classInit] on:Error do:[self throwExceptionInInitializerError:nm]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8150
            ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8151
    ^ JavaVM javaClassObjectForClass:class.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8152
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8153
    "Created: / 24-11-2010 / 09:03:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8154
    "Modified: / 30-10-2011 / 23:30:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8155
    "Modified: / 02-11-2011 / 19:12:43 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8156
    "Modified (format): / 03-12-2011 / 10:49:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8157
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8158
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8159
_java_lang_Class_getClassLoader0: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8160
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8161
    <javanative: 'java/lang/Class' name: 'getClassLoader0()Ljava/lang/ClassLoader;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8162
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8163
    "get a classes loader"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8164
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8165
    |jClass cls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8166
    jClass := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8167
    cls := Reflection classForJavaClassObject:jClass.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8168
    ^cls javaMirror getClassLoader
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8169
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8170
    "Created: / 19-01-2013 / 23:40:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8171
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8172
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8173
_java_lang_Class_getComponentType: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8174
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8175
    <javanative: 'java/lang/Class' name: 'getComponentType()Ljava/lang/Class;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8176
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8177
        |cls|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8178
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8179
    cls := Reflection classForJavaClassObject:this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8180
    cls isJavaPrimitiveType ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8181
        self breakPoint:#jv.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8182
        ^ nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8183
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8184
    ^ Reflection javaClassObjectForClass:cls javaComponentClass
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8185
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8186
    "Created: / 12-11-1998 / 18:54:46 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8187
    "Modified: / 20-12-2010 / 22:56:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8188
    "Modified: / 28-01-2011 / 15:18:59 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8189
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8190
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8191
_java_lang_Class_getConstantPool: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8192
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8193
    <javanative: 'java/lang/Class' name: 'getConstantPool()Lsun/reflect/ConstantPool;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8194
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8195
        | class |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8196
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8197
    class := Reflection classForJavaClassObject: this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8198
    class isJavaClass ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8199
        ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8200
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8201
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8202
    ^ Reflection javaConstantPoolObjectFor:class constantPool.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8203
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8204
    "Created: / 21-12-2010 / 20:00:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8205
    "Modified: / 28-02-2011 / 18:05:13 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8206
    "Modified: / 31-07-2012 / 00:47:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8207
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8208
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8209
_java_lang_Class_getDeclaredClasses0: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8210
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8211
    <javanative: 'java/lang/Class' name: 'getDeclaredClasses0()[Ljava/lang/Class;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8212
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8213
    | class innerPrefix inners |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8214
    class := Reflection classForJavaClassObject: this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8215
    innerPrefix := class name , '$'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8216
    inners := Set new.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8217
    JAVA allClassesDo:[:cls|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8218
        ((cls name startsWith: innerPrefix) and:[(cls name indexOf: $$ startingAt: innerPrefix size) == 0]) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8219
            inners add: (Reflection javaClassObjectForClass: cls)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8220
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8221
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8222
    ^(Java at: 'java.lang.Class') javaArrayClass withAll: inners
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8223
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8224
    "Created: / 19-01-2013 / 23:41:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8225
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8226
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8227
_java_lang_Class_getDeclaredConstructors0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8228
    <javanative: 'java/lang/Class' name: 'getDeclaredConstructors0(Z)[Ljava/lang/reflect/Constructor;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8229
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8230
    | class publicOnly |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8231
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8232
    class := Reflection classForJavaClassObject:this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8233
    publicOnly := a1 == 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8234
    ^class javaMirror getDeclaredConstructors: publicOnly.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8235
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8236
    "Created: / 24-11-2010 / 09:25:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8237
    "Modified: / 09-02-2011 / 01:24:03 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8238
    "Modified (format): / 01-08-2012 / 11:15:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8239
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8240
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8241
_java_lang_Class_getDeclaredFields0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8242
    <javanative: 'java/lang/Class' name: 'getDeclaredFields0(Z)[Ljava/lang/reflect/Field;'>
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  8243
    |class fields publicOnly|
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8244
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8245
    class := Reflection
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  8246
                classForJavaClassObject:(this).
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8247
    (class isJavaPrimitiveType or:[class isJavaArrayClass]) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8248
        ^(JavaVM classForName:'java.lang.reflect.Field') javaArrayClass new:0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8249
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8250
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8251
    publicOnly := a1 == 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8252
    fields := class javaMirror getDeclaredFields: publicOnly.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8253
    ^fields
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8254
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8255
    "Created: / 10-11-2010 / 16:22:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8256
    "Modified: / 28-01-2011 / 15:19:06 / Marcel Hlopko <hlopik@gmail.com>"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  8257
    "Modified: / 30-01-2013 / 14:15:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8258
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8259
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8260
_java_lang_Class_getDeclaredMethods0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8261
    <javanative: 'java/lang/Class' name: 'getDeclaredMethods0(Z)[Ljava/lang/reflect/Method;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8262
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8263
    | class publicOnly |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8264
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8265
    class := Reflection classForJavaClassObject:this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8266
    publicOnly := a1 == 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8267
    ^class javaMirror getDeclaredMethods: publicOnly.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8268
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8269
    "Created: / 21-12-2010 / 22:39:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8270
    "Modified: / 28-01-2011 / 15:19:09 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8271
    "Modified: / 04-06-2011 / 17:07:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8272
    "Modified: / 01-08-2012 / 11:15:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8273
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8274
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8275
_java_lang_Class_getDeclaringClass: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8276
    <javanative: 'java/lang/Class' name: 'getDeclaringClass()Ljava/lang/Class;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8277
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8278
     /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8279
     * If the class or interface represented by this {@code Class} object
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8280
     * is a member of another class, returns the {@code Class} object
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8281
     * representing the class in which it was declared.  This method returns
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8282
     * null if this class or interface is not a member of any other class.  If
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8283
     * this {@code Class} object represents an array class, a primitive
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8284
     * type, or void,then this method returns null.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8285
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8286
     * @return the declaring class for this class
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8287
     * @since JDK1.1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8288
     */"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8289
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8290
    | cls  enclosingClsName  enclosingCls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8291
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8292
    cls := Reflection classForJavaClassObject: this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8293
    (cls isJavaPrimitiveType or: [ cls isJavaArrayClass ]) ifTrue: [ ^ nil ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8294
    (cls name includes: $$) ifFalse: [ ^ nil ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8295
    enclosingClsName := cls name copyTo: (cls name lastIndexOf: $$) - 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8296
    enclosingCls := JavaVM classForName:enclosingClsName.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8297
    enclosingCls isNil ifTrue: [ self error: 'Cannot fins declaring class' ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8298
    ^ Reflection javaClassObjectForClass: enclosingCls
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8299
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8300
    "Modified: / 13-08-2011 / 02:01:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8301
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8302
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8303
_java_lang_Class_getEnclosingMethod0: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8304
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8305
    <javanative: 'java/lang/Class' name: 'getEnclosingMethod0()[Ljava/lang/Object;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8306
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8307
    ^nil "/Not true"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8308
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8309
    "Modified: / 14-08-2011 / 20:05:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8310
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8311
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8312
_java_lang_Class_getGenericSignature: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8313
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8314
    <javanative: 'java/lang/Class' name: 'getGenericSignature()Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8315
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8316
    |cls sig |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8317
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8318
    cls := Reflection classForJavaClassObject:this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8319
    sig := cls javaMirror getGenericSignature.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8320
    ^sig notNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8321
        Java as_String: sig
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8322
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8323
        nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8324
    ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8325
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8326
    "Modified: / 22-08-2012 / 11:58:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8327
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8328
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8329
_java_lang_Class_getInterfaces: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8330
    <javanative: 'java/lang/Class' name: 'getInterfaces()[Ljava/lang/Class;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8331
    |jClass cls interfaces jInterfaces|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8332
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8333
    jClass := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8334
    cls := Reflection classForJavaClassObject:jClass.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8335
    interfaces := cls javaMirror getInterfaces.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8336
    jInterfaces := (JavaVM classForName:'java.lang.Class') javaArrayClass new:interfaces size.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8337
    interfaces
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8338
        withIndexDo:[:iface :idx | jInterfaces at:idx put:(Reflection javaClassObjectForClass:iface) ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8339
    ^ jInterfaces
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8340
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8341
    "Modified: / 28-01-2011 / 15:19:11 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8342
    "Modified: / 22-08-2012 / 11:08:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8343
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8344
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8345
_java_lang_Class_getModifiers: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8346
    <javanative: 'java/lang/Class' name: 'getModifiers()I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8347
    | cls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8348
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8349
    cls := (Reflection classForJavaClassObject: this).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8350
    ^cls javaMirror getModifiers
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8351
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8352
    "Created: / 12-11-1998 / 18:54:53 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8353
    "Modified: / 28-01-2011 / 15:19:14 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8354
    "Modified: / 22-08-2012 / 11:04:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8355
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8356
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8357
_java_lang_Class_getName0: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8358
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8359
    <javanative: 'java/lang/Class' name: 'getName0()Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8360
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8361
    |class|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8362
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8363
    class := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8364
    class := Reflection classForJavaClassObject: this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8365
    ^ Reflection
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8366
        javaStringObjectForString:class javaMirror getName
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8367
        interned:true.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8368
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8369
    "Modified: / 19-01-2013 / 23:48:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8370
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8371
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8372
_java_lang_Class_getPrimitiveClass: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8373
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8374
    <javanative: 'java/lang/Class' name: 'getPrimitiveClass(Ljava/lang/String;)Ljava/lang/Class;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8375
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8376
        "get a primitive class by name"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8377
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8378
    |jClassName className|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8379
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8380
    jClassName := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8381
    className := Java as_ST_String:jClassName.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8382
    (JavaDescriptor baseTypesByTypeName keys includes: className)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8383
        ifFalse:[JavaVM throwClassNotFoundException:className].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8384
    ^Reflection javaClassObjectForClassNamed: className
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8385
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8386
    "Created: / 04-01-1998 / 00:46:03 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8387
    "Modified: / 28-01-2011 / 15:30:45 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8388
    "Modified: / 03-02-2011 / 21:43:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8389
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8390
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8391
_java_lang_Class_getProtectionDomain0: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8392
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8393
    <javanative: 'java/lang/Class' name: 'getProtectionDomain0()Ljava/security/ProtectionDomain;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8394
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8395
    ^(Reflection classForJavaClassObject: this) javaMirror getProtectionDomain
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8396
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8397
    "Modified: / 22-08-2012 / 12:55:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8398
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8399
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8400
_java_lang_Class_getRawAnnotations: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8401
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8402
    <javanative: 'java/lang/Class' name: 'getRawAnnotations()[B'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8403
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8404
    |class |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8405
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8406
    class := Reflection classForJavaClassObject: this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8407
    class isJavaArrayClass ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8408
        ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8409
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8410
    class isJavaPrimitiveType ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8411
        ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8412
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8413
    class isJavaClass ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8414
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8415
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8416
    ^ class runtimeVisibleAnnotationsAsBytesOrNil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8417
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8418
    "Created: / 21-12-2010 / 19:35:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8419
    "Modified: / 28-01-2011 / 15:19:20 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8420
    "Modified: / 31-07-2012 / 00:46:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8421
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8422
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8423
_java_lang_Class_getSuperclass: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8424
    <javanative: 'java/lang/Class' name: 'getSuperclass()Ljava/lang/Class;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8425
    "return a classes superclass"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8426
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8427
    | jClass  cls  superCls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8428
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8429
    jClass := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8430
    cls := Reflection classForJavaClassObject: jClass.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8431
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8432
    cls isJavaPrimitiveType ifTrue: [ ^ nil ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8433
    cls isJavaArrayClass ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8434
        ^ Reflection javaClassObjectForClass:(Java at:'java.lang.Object')
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8435
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8436
    cls == Object ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8437
        ^ Reflection javaClassObjectForClass:(Java at:'java.lang.Object')
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8438
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8439
    cls isInterface ifTrue: [ ^ nil ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8440
    superCls := cls superclass.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8441
    superCls == JavaObject ifTrue: [ ^ nil. ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8442
    superCls ==     Object ifTrue: [ ^ nil ]. "/for Java
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8443
    ^ Reflection javaClassObjectForClass:superCls
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8444
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8445
    "Created: / 12-01-1998 / 12:38:36 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8446
    "Modified: / 04-02-1998 / 14:51:22 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8447
    "Modified: / 28-01-2011 / 14:12:47 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8448
    "Modified: / 31-07-2012 / 00:50:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8449
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8450
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8451
_java_lang_Class_isArray: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8452
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8453
    <javanative: 'java/lang/Class' name: 'isArray()Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8454
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8455
        ^ (Reflection classForJavaClassObject: this) isJavaArrayClass
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8456
        ifTrue:[1]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8457
        ifFalse:[0]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8458
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8459
    "Created: / 12-11-1998 / 18:54:24 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8460
    "Modified: / 20-12-2010 / 23:20:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8461
    "Modified: / 28-01-2011 / 15:19:24 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8462
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8463
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8464
_java_lang_Class_isAssignableFrom: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8465
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8466
    <javanative: 'java/lang/Class' name: 'isAssignableFrom(Ljava/lang/Class;)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8467
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8468
        "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8469
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8470
     * Determines if the class or interface represented by this
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8471
     * {@code Class} object is either the same as, or is a superclass or
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8472
     * superinterface of, the class or interface represented by the specified
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8473
     * {@code Class} parameter. It returns {@code true} if so;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8474
     * otherwise it returns {@code false}. If this {@code Class}
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8475
     * object represents a primitive type, this method returns
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8476
     * {@code true} if the specified {@code Class} parameter is
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8477
     * exactly this {@code Class} object; otherwise it returns
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8478
     * {@code false}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8479
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8480
     * <p> Specifically, this method tests whether the type represented by the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8481
     * specified {@code Class} parameter can be converted to the type
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8482
     * represented by this {@code Class} object via an identity conversion
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8483
     * or via a widening reference conversion. See <em>The Java Language
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8484
     * Specification</em>, sections 5.1.1 and 5.1.4 , for details.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8485
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8486
     * @param cls the {@code Class} object to be checked
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8487
     * @return the {@code boolean} value indicating whether objects of the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8488
     * type {@code cls} can be assigned to objects of this class
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8489
     * @exception NullPointerException if the specified Class parameter is
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8490
     *            null.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8491
     * @since JDK1.1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8492
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8493
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8494
    | clsObj me other |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8495
    clsObj := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8496
    clsObj ifNil:[^JavaVM throwNullPointerException].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8497
    me := Reflection classForJavaClassObject: this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8498
    other := Reflection classForJavaClassObject: clsObj.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8499
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8500
    "/    Determines if the class or interface represented by this
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8501
    "/    @code Class} object is either the same as, or is a superclass or
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8502
    "/    superinterface of, the class or interface represented by the specified
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8503
    "/    {@code Class} parameter.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8504
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8505
    ^(other includesBehavior: me)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8506
        ifTrue:[1]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8507
        ifFalse:[0]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8508
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8509
    "Created: / 12-11-1998 / 18:54:16 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8510
    "Modified: / 05-02-2011 / 23:38:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8511
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8512
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8513
_java_lang_Class_isInstance: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8514
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8515
    <javanative: 'java/lang/Class' name: 'isInstance(Ljava/lang/Object;)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8516
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8517
        "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8518
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8519
     * Determines if the specified {@code Object} is assignment-compatible
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8520
     * with the object represented by this {@code Class}.  This method is
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8521
     * the dynamic equivalent of the Java language {@code instanceof}
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8522
     * operator. The method returns {@code true} if the specified
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8523
     * {@code Object} argument is non-null and can be cast to the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8524
     * reference type represented by this {@code Class} object without
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8525
     * raising a {@code ClassCastException.} It returns {@code false}
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8526
     * otherwise.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8527
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8528
     * <p> Specifically, if this {@code Class} object represents a
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8529
     * declared class, this method returns {@code true} if the specified
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8530
     * {@code Object} argument is an instance of the represented class (or
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8531
     * of any of its subclasses); it returns {@code false} otherwise. If
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8532
     * this {@code Class} object represents an array class, this method
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8533
     * returns {@code true} if the specified {@code Object} argument
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8534
     * can be converted to an object of the array class by an identity
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8535
     * conversion or by a widening reference conversion; it returns
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8536
     * {@code false} otherwise. If this {@code Class} object
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8537
     * represents an interface, this method returns {@code true} if the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8538
     * class or any superclass of the specified {@code Object} argument
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8539
     * implements this interface; it returns {@code false} otherwise. If
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8540
     * this {@code Class} object represents a primitive type, this method
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8541
     * returns {@code false}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8542
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8543
     * @param   obj the object to check
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8544
     * @return  true if {@code obj} is an instance of this class
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8545
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8546
     * @since JDK1.1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8547
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8548
    public native boolean isInstance(Object obj);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8549
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8550
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8551
    |jClass cls obj|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8552
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8553
    obj := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8554
    obj isNil ifTrue:[^ 0].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8555
    jClass := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8556
    cls := Reflection classForJavaClassObject:jClass.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8557
    ^JavaVM _INSTANCEOF:obj _:cls
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8558
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8559
    "Modified: / 09-02-1998 / 14:56:23 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8560
    "Modified: / 28-01-2011 / 14:12:42 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8561
    "Modified: / 16-01-2013 / 19:46:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8562
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8563
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8564
_java_lang_Class_isInterface: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8565
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8566
    <javanative: 'java/lang/Class' name: 'isInterface()Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8567
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8568
        "return true, if this class is an interface"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8569
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8570
    |jClass cls|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8571
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8572
    jClass := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8573
    cls := Reflection classForJavaClassObject:jClass.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8574
    cls isJavaClass ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8575
        ^ 0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8576
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8577
    cls isInterface ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8578
        ^ 1 "TRUE"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8579
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8580
    ^ 0 "FALSE"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8581
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8582
    "Created: / 12-01-1998 / 12:37:02 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8583
    "Modified: / 28-01-2011 / 14:12:35 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8584
    "Modified: / 03-02-2011 / 21:50:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8585
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8586
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8587
_java_lang_Class_isPrimitive: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8588
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8589
    <javanative: 'java/lang/Class' name: 'isPrimitive()Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8590
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8591
        "return true, if this class is builtin primitive class
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8592
     (i.e. byteArray, array, string etc."
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8593
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8594
    |jClass cls|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8595
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8596
    jClass := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8597
    cls := Reflection classForJavaClassObject:jClass.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8598
    ^cls isJavaPrimitiveType
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8599
        ifTrue:[1"true"]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8600
        ifFalse:[0"false"].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8601
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8602
    "Created: / 09-02-1998 / 14:46:07 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8603
    "Modified: / 28-01-2011 / 14:12:30 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8604
    "Modified: / 04-02-2011 / 11:56:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8605
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8606
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8607
_java_lang_Class_registerNatives: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8608
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8609
    <javanative: 'java/lang/Class' name: 'registerNatives()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8610
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8611
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8612
     "Nothing to do, native method are bound lazily"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8613
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8614
    "Created: / 20-10-2010 / 11:13:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8615
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8616
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8617
_java_lang_Class_setProtectionDomain0: this _: a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8618
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8619
    <javanative: 'java/lang/Class' name: 'setProtectionDomain0()Ljava/security/ProtectionDomain;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8620
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8621
    (Reflection classForJavaClassObject: this) protectionDomain: a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8622
    ^a1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8623
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8624
    "Created: / 21-01-2013 / 17:27:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8625
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8626
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8627
_java_lang_Compiler_disable: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8628
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8629
    <javanative: 'java/lang/Compiler' name: 'disable()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8630
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8631
    "Modified: / 09-02-2012 / 22:56:44 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8632
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8633
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8634
_java_lang_Compiler_enable: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8635
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8636
    <javanative: 'java/lang/Compiler' name: 'enable()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8637
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8638
    "Modified: / 09-02-2012 / 22:57:15 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8639
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8640
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8641
_java_lang_Compiler_registerNatives: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8642
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8643
    <javanative: 'java/lang/Compiler' name: 'registerNatives()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8644
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8645
    "Modified: / 09-02-2012 / 22:56:37 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8646
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8647
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8648
_java_lang_Double_doubleToRawLongBits: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8649
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8650
    <javanative: 'java/lang/Double' name: 'doubleToRawLongBits(D)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8651
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8652
        "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8653
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8654
     * Returns a representation of the specified floating-point value
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8655
     * according to the IEEE 754 floating-point 'double
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8656
     * format' bit layout, preserving Not-a-Number (NaN) values.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8657
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8658
     * <p>Bit 63 (the bit that is selected by the mask
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8659
     * {@code 0x8000000000000000L}) represents the sign of the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8660
     * floating-point number. Bits
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8661
     * 62-52 (the bits that are selected by the mask
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8662
     * {@code 0x7ff0000000000000L}) represent the exponent. Bits 51-0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8663
     * (the bits that are selected by the mask
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8664
     * {@code 0x000fffffffffffffL}) represent the significand
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8665
     * (sometimes called the mantissa) of the floating-point number.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8666
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8667
     * <p>If the argument is positive infinity, the result is
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8668
     * {@code 0x7ff0000000000000L}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8669
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8670
     * <p>If the argument is negative infinity, the result is
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8671
     * {@code 0xfff0000000000000L}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8672
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8673
     * <p>If the argument is NaN, the result is the {@code long}
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8674
     * integer representing the actual NaN value.  Unlike the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8675
     * {@code doubleToLongBits} method,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8676
     * {@code doubleToRawLongBits} does not collapse all the bit
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8677
     * patterns encoding a NaN to a single 'canonical' NaN
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8678
     * value.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8679
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8680
     * <p>In all cases, the result is a {@code long} integer that,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8681
     * when given to the {@link #longBitsToDouble(long)} method, will
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8682
     * produce a floating-point value the same as the argument to
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8683
     * {@code doubleToRawLongBits}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8684
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8685
     * @param   value   a {@code double} precision floating-point number.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8686
     * @return the bits that represent the floating-point number.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8687
     * @since 1.3
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8688
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8689
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8690
      | f b |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8691
    f := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8692
    (f =  0.0) ifTrue:[^0].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8693
    (f = -0.0) ifTrue:[^(1 bitShift: 63)].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8694
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8695
    b := ByteArray streamContents:[:s|Float storeBinaryIEEEDouble:f on:s].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8696
    ^ LargeInteger digitBytes: b MSB: UninterpretedBytes isBigEndian not.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8697
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8698
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8699
"/    | f |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8700
"/    f := nativeContext argAt:1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8701
"/    f class == Float ifFalse:[ ^self throwIllegalArgumentException: 'Not a float'].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8702
"/%{
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8703
"/    __int64__ *i = &(__floatVal(f));
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8704
"/    RETURN (__MKINT64( i ));
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8705
"/%}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8706
"/    self primitiveFailed.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8707
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8708
    "Created: / 10-11-2010 / 14:48:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8709
    "Modified: / 16-12-2012 / 23:23:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8710
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8711
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8712
_java_lang_Double_longBitsToDouble: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8713
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8714
    <javanative: 'java/lang/Double' name: 'longBitsToDouble(J)D'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8715
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8716
    |i aFloat|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8717
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8718
    i := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8719
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8720
    aFloat := Float new.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8721
    UninterpretedBytes isBigEndian ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8722
        aFloat basicAt:1 put:((i bitShift:-56) bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8723
        aFloat basicAt:2 put:((i bitShift:-48) bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8724
        aFloat basicAt:3 put:((i bitShift:-40) bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8725
        aFloat basicAt:4 put:((i bitShift:-32) bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8726
        aFloat basicAt:5 put:((i bitShift:-24) bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8727
        aFloat basicAt:6 put:((i bitShift:-16) bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8728
        aFloat basicAt:7 put:((i bitShift:-8) bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8729
        aFloat basicAt:8 put:(i bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8730
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8731
        aFloat basicAt:1 put:(i bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8732
        aFloat basicAt:2 put:((i bitShift:-8) bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8733
        aFloat basicAt:3 put:((i bitShift:-16) bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8734
        aFloat basicAt:4 put:((i bitShift:-24) bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8735
        aFloat basicAt:5 put:((i bitShift:-32) bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8736
        aFloat basicAt:6 put:((i bitShift:-40) bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8737
        aFloat basicAt:7 put:((i bitShift:-48) bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8738
        aFloat basicAt:8 put:((i bitShift:-56) bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8739
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8740
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8741
    ^ aFloat.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8742
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8743
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8744
"/    | i f|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8745
"/
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8746
"/    i := nativeContext argAt:1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8747
"/    f := Float new.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8748
"/%{
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8749
"/    long long l;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8750
"/    l = __longIntVal(i);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8751
"/    double *d = &l;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8752
"/    __floatVal(f) = *d;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8753
"/%}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8754
"/    ^f
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8755
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8756
    "Modified: / 16-12-2012 / 23:24:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8757
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8758
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8759
_java_lang_Float_floatToRawIntBits: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8760
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8761
    <javanative: 'java/lang/Float' name: 'floatToRawIntBits(F)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8762
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8763
        "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8764
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8765
     * Returns a representation of the specified floating-point value
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8766
     * according to the IEEE 754 floating-point 'single format' bit
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8767
     * layout, preserving Not-a-Number (NaN) values.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8768
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8769
     * <p>Bit 31 (the bit that is selected by the mask
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8770
     * {@code 0x80000000}) represents the sign of the floating-point
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8771
     * number.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8772
     * Bits 30-23 (the bits that are selected by the mask
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8773
     * {@code 0x7f800000}) represent the exponent.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8774
     * Bits 22-0 (the bits that are selected by the mask
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8775
     * {@code 0x007fffff}) represent the significand (sometimes called
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8776
     * the mantissa) of the floating-point number.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8777
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8778
     * <p>If the argument is positive infinity, the result is
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8779
     * {@code 0x7f800000}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8780
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8781
     * <p>If the argument is negative infinity, the result is
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8782
     * {@code 0xff800000}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8783
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8784
     * <p>If the argument is NaN, the result is the integer representing
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8785
     * the actual NaN value.  Unlike the {@code floatToIntBits}
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8786
     * method, {@code floatToRawIntBits} does not collapse all the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8787
     * bit patterns encoding a NaN to a single 'canonical'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8788
     * NaN value.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8789
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8790
     * <p>In all cases, the result is an integer that, when given to the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8791
     * {@link #intBitsToFloat(int)} method, will produce a
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8792
     * floating-point value the same as the argument to
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8793
     * {@code floatToRawIntBits}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8794
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8795
     * @param   value   a floating-point number.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8796
     * @return the bits that represent the floating-point number.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8797
     * @since 1.3
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8798
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8799
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8800
    | f b |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8801
    f := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8802
    f class == ShortFloat ifFalse:[ Reflection throwIllegalArgumentException:'Not a float'].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8803
%{
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8804
        int *ival = &__shortFloatVal(f);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8805
        RETURN (__MKINT(*ival));
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8806
%}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8807
    self primitiveFailed.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8808
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8809
    "Created: / 09-11-2010 / 20:59:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8810
    "Modified: / 16-12-2012 / 11:16:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8811
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8812
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8813
_java_lang_Float_intBitsToFloat: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8814
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8815
    <javanative: 'java/lang/Float' name: 'intBitsToFloat(I)F'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8816
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8817
    | i f|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8818
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8819
    i := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8820
    f := ShortFloat new.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8821
%{
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8822
    int ival = __intVal(i);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8823
    float *fval = &ival;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8824
    __shortFloatVal(f) = *fval;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8825
%}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8826
    ^f
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8827
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8828
    "Modified: / 16-12-2012 / 10:39:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8829
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8830
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8831
_java_lang_Object_clone: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8832
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8833
    <javanative: 'java/lang/Object' name: 'clone()Ljava/lang/Object;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8834
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8835
        "clone an object"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8836
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8837
    |o rslt|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8838
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8839
    o := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8840
    rslt := o shallowCopy.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8841
    ^ rslt
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8842
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8843
    "Created: / 4.1.1998 / 19:39:26 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8844
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8845
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8846
_java_lang_Object_getClass: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8847
    <javanative: 'java/lang/Object' name: 'getClass()Ljava/lang/Class;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8848
    "return an objects class"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8849
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8850
    | o  cls  jClass |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8851
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8852
    o := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8853
    cls := o class.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8854
    jClass := Reflection javaClassObjectForClass:cls.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8855
    ^ jClass
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8856
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8857
    "Created: / 6.1.1998 / 18:28:27 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8858
    "Modified: / 23.1.1998 / 17:48:22 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8859
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8860
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8861
_java_lang_Object_hashCode: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8862
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8863
    <javanative: 'java/lang/Object' name: 'hashCode()I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8864
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8865
        "identityHash"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8866
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8867
    |o rslt|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8868
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8869
    o := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8870
    rslt := o identityHash.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8871
    ^ rslt
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8872
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8873
    "Created: / 4.1.1998 / 19:40:26 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8874
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8875
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8876
_java_lang_Object_notify: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8877
    <javanative: 'java/lang/Object' name: 'notify()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8878
    "wakeup"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8879
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8880
    self notify: this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8881
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8882
    "Created: / 06-01-1998 / 21:09:26 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8883
    "Modified: / 22-11-2011 / 13:24:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8884
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8885
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8886
_java_lang_Object_notifyAll: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8887
    <javanative: 'java/lang/Object' name: 'notifyAll()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8888
    JavaVM notifyAll: this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8889
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8890
    "Created: / 03-01-1998 / 03:06:56 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8891
    "Modified: / 22-11-2011 / 13:27:17 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8892
    "Modified: / 16-01-2013 / 19:47:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8893
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8894
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8895
_java_lang_Object_registerNatives: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8896
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8897
    <javanative: 'java/lang/Object' name: 'registerNatives()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8898
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8899
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8900
    "Nothing to do, native method are bound lazily"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8901
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8902
    "Created: / 19-10-2010 / 12:42:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8903
    "Modified: / 20-10-2010 / 10:57:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8904
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8905
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8906
_java_lang_Object_wait: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8907
    <javanative: 'java/lang/Object' name: 'wait(J)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8908
    | tmo  handle |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8909
    handle := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8910
    tmo := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8911
    tmo < 0 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8912
        Reflection throwIllegalArgumentException:'1'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8913
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8914
    JavaVM
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8915
        waitOn: handle forTimeout: tmo
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8916
        state: #javaWait.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8917
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8918
    "Modified: / 30-12-1998 / 19:20:43 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8919
    "Modified: / 22-11-2011 / 13:17:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8920
    "Modified: / 16-01-2013 / 19:47:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8921
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8922
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8923
_java_lang_Package_getSystemPackage0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8924
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8925
    <javanative: 'java/lang/Package' name: 'getSystemPackage0(Ljava/lang/String;)Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8926
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8927
    "Based on code on OpenJDK, it is ok to return nil here:"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8928
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8929
    | syspkg syspkg_s |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8930
    syspkg := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8931
    syspkg isNil ifTrue:[ ^ nil ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8932
    syspkg_s := Java as_ST_String: syspkg.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8933
    ^(ClassRegistry systemPackage: syspkg_s) notNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8934
        syspkg
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8935
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8936
        nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8937
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8938
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8939
    "Modified: / 16-08-2012 / 17:45:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8940
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8941
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8942
_java_lang_ProcessEnvironment_environ: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8943
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8944
    <javanative: 'java/lang/ProcessEnvironment' name: 'environ()[[B'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8945
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8946
    | env jenv i|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8947
    env := OperatingSystem getEnvironment.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8948
    jenv :=  ByteArray javaArrayClass new: env size * 2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8949
    i := 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8950
    env keysAndValuesDo:
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8951
        [:name :value|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8952
        jenv
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8953
            at: i   put: name  asByteArray;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8954
            at: i+1 put: value asByteArray.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8955
        i := i + 2].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8956
    ^jenv
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8957
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8958
    "Modified: / 25-06-2011 / 08:57:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8959
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8960
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8961
_java_lang_ProcessEnvironment_environmentBlock: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8962
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8963
    <javanative: 'java/lang/ProcessEnvironment' name: 'environmentBlock()Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8964
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8965
    ^ JavaVM unimplementedNativeMethodSignal raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8966
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8967
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8968
_java_lang_Runtime_availableProcessors: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8969
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8970
    <javanative: 'java/lang/Runtime' name: 'availableProcessors()I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8971
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8972
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8973
     * Returns the number of processors available to the Java virtual machine.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8974
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8975
     * <p> This value may change during a particular invocation of the virtual
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8976
     * machine.  Applications that are sensitive to the number of available
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8977
     * processors should therefore occasionally poll this property and adjust
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8978
     * their resource usage appropriately. </p>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8979
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8980
     * @return  the maximum number of processors available to the virtual
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8981
     *          machine; never smaller than one
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8982
     * @since 1.4
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8983
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8984
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8985
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8986
    ^ 1 "/ Since Smalltalk/X is single-thread application
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8987
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8988
    "Modified: / 03-09-2012 / 18:53:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8989
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8990
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  8991
_java_lang_Runtime_freeMemory: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8992
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8993
    <javanative: 'java/lang/Runtime' name: 'freeMemory()J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8994
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8995
        "free memory - Returns the number of free bytes"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8996
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8997
    ^ ObjectMemory freeListSpace + ObjectMemory freeSpace
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8998
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8999
    "Created: / 12.1.1998 / 12:59:53 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9000
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9001
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9002
_java_lang_Runtime_gc: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9003
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9004
    <javanative: 'java/lang/Runtime' name: 'gc()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9005
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9006
        "Runs the garbage collector.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9007
     Ignored, since the ST-gc runs all the time."
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9008
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9009
    ^ self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9010
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9011
    "Modified: / 12.1.1998 / 12:58:32 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9012
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9013
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9014
_java_lang_Runtime_runFinalization0: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9015
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9016
    <javanative: 'java/lang/Runtime' name: 'runFinalization0()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9017
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9018
    Smalltalk garbageCollect
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9019
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9020
    "Modified: / 08-08-2011 / 17:48:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9021
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9022
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9023
_java_lang_SecurityManager_getClassContext: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9024
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9025
    <javanative: 'java/lang/SecurityManager' name: 'getClassContext()[Ljava/lang/Class;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9026
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9027
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9028
     * Returns the current execution stack as an array of classes.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9029
     * <p>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9030
     * The length of the array is the number of methods on the execution
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9031
     * stack. The element at index <code>0</code> is the class of the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9032
     * currently executing method, the element at index <code>1</code> is
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9033
     * the class of that method's caller, and so on.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9034
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9035
     * @return  the execution stack.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9036
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9037
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9038
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9039
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9040
    | classes ctx jclasses |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9041
    classes := OrderedCollection new.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9042
    ctx := thisContext.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9043
    [ ctx notNil ] whileTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9044
        ctx isJavaContext ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9045
            classes add: ctx method javaClass.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9046
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9047
        ctx := ctx sender.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9048
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9049
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9050
    jclasses := (JavaVM classForName:'java.lang.Class') javaArrayClass new: classes size.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9051
    1 to: classes size do:[:i|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9052
        jclasses at: i put: (Reflection javaClassObjectForClass: (classes at: i)).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9053
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9054
    ^jclasses
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9055
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9056
    "Created: / 12-11-1998 / 18:56:06 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9057
    "Modified: / 15-11-2011 / 00:27:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9058
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9059
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9060
_java_lang_Shutdown_halt0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9061
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9062
    <javanative: 'java/lang/Shutdown' name: 'halt0(I)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9063
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9064
    AbortOperationRequest raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9065
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9066
    "Modified: / 06-07-2012 / 13:13:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9067
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9068
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9069
_java_lang_StrictMath_cbrt: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9070
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9071
    <javanative: 'java/lang/StrictMath' name: 'cbrt(D)D'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9072
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9073
    ^ JavaMathSupport cbrt: a1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9074
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9075
    "Modified: / 07-09-2011 / 17:34:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9076
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9077
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9078
_java_lang_StrictMath_ceil: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9079
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9080
    <javanative: 'java/lang/StrictMath' name: 'ceil(D)D'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9081
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9082
    ^ a1 ceiling
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9083
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9084
    "Modified: / 21-08-2012 / 18:01:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9085
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9086
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9087
_java_lang_StrictMath_cos: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9088
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9089
    <javanative: 'java/lang/StrictMath' name: 'cos(D)D'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9090
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9091
    ^ JavaMathSupport cos: a1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9092
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9093
    "Modified: / 07-09-2011 / 17:34:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9094
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9095
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9096
_java_lang_StrictMath_cosh: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9097
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9098
    <javanative: 'java/lang/StrictMath' name: 'cosh(D)D'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9099
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9100
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9101
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9102
     * Returns the hyperbolic cosine of a {@code double} value.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9103
     * The hyperbolic cosine of <i>x</i> is defined to be
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9104
     * (<i>e<sup>x</sup>&nbsp;+&nbsp;e<sup>-x</sup></i>)/2
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9105
     * where <i>e</i> is {@linkplain Math#E Euler's number}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9106
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9107
     * <p>Special cases:
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9108
     * <ul>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9109
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9110
     * <li>If the argument is NaN, then the result is NaN.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9111
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9112
     * <li>If the argument is infinite, then the result is positive
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9113
     * infinity.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9114
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9115
     * <li>If the argument is zero, then the result is {@code 1.0}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9116
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9117
     * </ul>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9118
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9119
     * @param   x The number whose hyperbolic cosine is to be returned.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9120
     * @return  The hyperbolic cosine of {@code x}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9121
     * @since 1.5
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9122
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9123
    public static native double cosh(double x);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9124
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9125
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9126
    ^JavaMathSupport cosh: a1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9127
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9128
    "Modified: / 06-09-2011 / 19:25:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9129
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9130
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9131
_java_lang_StrictMath_expm1: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9132
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9133
    <javanative: 'java/lang/StrictMath' name: 'expm1(D)D'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9134
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9135
    ^ JavaMathSupport expm1: a1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9136
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9137
    "Modified: / 07-09-2011 / 17:34:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9138
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9139
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9140
_java_lang_StrictMath_floor: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9141
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9142
    <javanative: 'java/lang/StrictMath' name: 'floor(D)D'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9143
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9144
   ^ JavaMathSupport floor: a1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9145
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9146
    "Modified: / 07-09-2011 / 17:33:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9147
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9148
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9149
_java_lang_StrictMath_pow: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9150
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9151
    <javanative: 'java/lang/StrictMath' name: 'pow(DD)D'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9152
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9153
    ^JavaMathSupport pow: a1 to: a3
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9154
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9155
    "Modified: / 07-09-2011 / 17:33:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9156
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9157
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9158
_java_lang_StrictMath_sin: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9159
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9160
    <javanative: 'java/lang/StrictMath' name: 'cos(D)D'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9161
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9162
    ^ JavaMathSupport sin: a1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9163
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9164
    "Modified: / 07-09-2011 / 17:32:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9165
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9166
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9167
_java_lang_StrictMath_sinh: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9168
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9169
    <javanative: 'java/lang/StrictMath' name: 'sinh(D)D'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9170
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9171
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9172
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9173
     * Returns the hyperbolic sine of a {@code double} value.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9174
     * The hyperbolic sine of <i>x</i> is defined to be
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9175
     * (<i>e<sup>x</sup>&nbsp;-&nbsp;e<sup>-x</sup></i>)/2
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9176
     * where <i>e</i> is {@linkplain Math#E Euler's number}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9177
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9178
     * <p>Special cases:
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9179
     * <ul>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9180
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9181
     * <li>If the argument is NaN, then the result is NaN.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9182
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9183
     * <li>If the argument is infinite, then the result is an infinity
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9184
     * with the same sign as the argument.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9185
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9186
     * <li>If the argument is zero, then the result is a zero with the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9187
     * same sign as the argument.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9188
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9189
     * </ul>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9190
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9191
     * @param   x The number whose hyperbolic sine is to be returned.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9192
     * @return  The hyperbolic sine of {@code x}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9193
     * @since 1.5
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9194
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9195
    public static native double sinh(double x);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9196
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9197
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9198
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9199
    ^ JavaMathSupport sinh: a1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9200
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9201
    "Modified: / 06-09-2011 / 19:36:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9202
    "Modified (format): / 07-09-2011 / 17:31:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9203
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9204
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9205
_java_lang_StrictMath_sqrt: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9206
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9207
    <javanative: 'java/lang/StrictMath' name: 'sqrt(D)D'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9208
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9209
    ^a1 sqrt
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9210
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9211
    "Modified: / 17-07-2012 / 20:53:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9212
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9213
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9214
_java_lang_StrictMath_tan: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9215
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9216
    <javanative: 'java/lang/StrictMath' name: 'tan(D)D'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9217
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9218
    ^ JavaVM unimplementedNativeMethodSignal raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9219
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9220
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9221
_java_lang_StrictMath_tanh: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9222
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9223
    <javanative: 'java/lang/StrictMath' name: 'tanh(D)D'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9224
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9225
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9226
     * Returns the hyperbolic tangent of a {@code double} value.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9227
     * The hyperbolic tangent of <i>x</i> is defined to be
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9228
     * (<i>e<sup>x</sup>&nbsp;-&nbsp;e<sup>-x</sup></i>)/(<i>e<sup>x</sup>&nbsp;+&nbsp;e<sup>-x</sup></i>),
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9229
     * in other words, {@linkplain Math#sinh
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9230
     * sinh(<i>x</i>)}/{@linkplain Math#cosh cosh(<i>x</i>)}.  Note
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9231
     * that the absolute value of the exact tanh is always less than
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9232
     * 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9233
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9234
     * <p>Special cases:
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9235
     * <ul>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9236
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9237
     * <li>If the argument is NaN, then the result is NaN.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9238
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9239
     * <li>If the argument is zero, then the result is a zero with the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9240
     * same sign as the argument.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9241
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9242
     * <li>If the argument is positive infinity, then the result is
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9243
     * {@code +1.0}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9244
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9245
     * <li>If the argument is negative infinity, then the result is
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9246
     * {@code -1.0}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9247
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9248
     * </ul>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9249
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9250
     * @param   x The number whose hyperbolic tangent is to be returned.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9251
     * @return  The hyperbolic tangent of {@code x}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9252
     * @since 1.5
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9253
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9254
    public static native double tanh(double x);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9255
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9256
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9257
    ^ JavaMathSupport tanh: a1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9258
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9259
    "Modified: / 07-09-2011 / 17:32:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9260
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9261
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9262
_java_lang_String_intern: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9263
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9264
    <javanative: 'java/lang/String' name: 'intern()Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9265
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9266
        |jString|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9267
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9268
    jString := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9269
    ^ Java intern:jString
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9270
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9271
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9272
_java_lang_System_arraycopy: this _:a1 _: a2 _: a3 _: a4 _: a5 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9273
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9274
    <javanative: 'java/lang/System' name: 'arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9275
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9276
    |srcArray srcIdx dstArray dstIdx srcArrayCC dstArrayCC count dstEndIdx|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9277
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9278
    srcArray := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9279
    srcArray isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9280
        ^ JavaVM throwNullPointerException
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9281
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9282
    srcArray isJavaArray ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9283
        ^ JavaVM throwArrayStoreException:srcArray
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9284
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9285
    srcIdx := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9286
    dstArray := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9287
    dstArray isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9288
        ^ JavaVM throwNullPointerException
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9289
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9290
    dstArray isJavaArray ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9291
        ^ JavaVM throwArrayStoreException:dstArray
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9292
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9293
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9294
    srcArrayCC := srcArray class javaComponentClass.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9295
    dstArrayCC := dstArray class javaComponentClass.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9296
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9297
    srcArrayCC isJavaPrimitiveType == dstArrayCC isJavaPrimitiveType
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9298
        ifTrue:
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9299
            [srcArrayCC isJavaPrimitiveType
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9300
                ifTrue:
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9301
                    [srcArrayCC ~~ dstArrayCC ifTrue:
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9302
                        [^ JavaVM throwArrayStoreException:dstArray]].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9303
            ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9304
        ifFalse:
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9305
            [^ JavaVM throwArrayStoreException:dstArray].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9306
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9307
    dstIdx := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9308
    count := a5.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9309
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9310
    count < 0 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9311
        ^ JavaVM throwArrayIndexOutOfBoundsException:(srcIdx + count - 1)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9312
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9313
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9314
    ((srcIdx < 0) or:[srcIdx + count > srcArray size]) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9315
        srcArray size == 0 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9316
            srcArray isVariable ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9317
                ^ JavaVM throwArrayStoreException:srcArray
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9318
            ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9319
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9320
        ^ JavaVM throwArrayIndexOutOfBoundsException:(srcIdx + count - 1)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9321
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9322
    ((dstIdx < 0) or:[dstIdx + count > dstArray size]) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9323
        dstArray size == 0 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9324
            dstArray isVariable ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9325
                ^ JavaVM throwArrayStoreException:dstArray
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9326
            ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9327
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9328
        ^ JavaVM throwArrayIndexOutOfBoundsException:(dstIdx + count - 1)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9329
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9330
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9331
    dstEndIdx := dstIdx + count.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9332
    dstIdx := dstIdx + 1.       "/ ST uses 1-based indexing
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9333
    srcIdx := srcIdx + 1.       "/ ST uses 1-based indexing
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9334
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9335
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9336
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9337
    (srcArray class isBytes and:[dstArray class isBytes]) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9338
        dstArray replaceBytesFrom:dstIdx to:dstEndIdx with:srcArray startingAt:srcIdx.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9339
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9340
        dstArrayCC isJavaPrimitiveType ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9341
            "Copy from array iff src=dst to avoid overwriting a data when copying"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9342
            srcArray == dstArray ifTrue:[srcArray := srcArray copy].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9343
            1 to: count do:[:i|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9344
                | obj |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9345
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9346
                obj := srcArray at:srcIdx + i - 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9347
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9348
                (obj notNil and:[(JavaVM canCast: obj class to: dstArrayCC) not]) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9349
                    ^ JavaVM throwArrayStoreException:dstArray
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9350
                ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9351
                dstArray at: dstIdx + i - 1 put: (srcArray at:srcIdx + i - 1)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9352
            ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9353
        ] ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9354
            dstArray replaceFrom:dstIdx to:dstEndIdx with:srcArray startingAt:srcIdx.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9355
        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9356
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9357
    ^ nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9358
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9359
    "Modified: / 16-01-2013 / 21:22:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9360
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9361
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9362
_java_lang_System_currentTimeMillis: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9363
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9364
    <javanative: 'java/lang/System' name: 'currentTimeMillis()J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9365
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9366
    "return the milliseconds since 1.jan.1970"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9367
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9368
    "Should be OK, see Timestamp>>getMilliseconds & Timestamp>>getSeconds & Timestamp>>utcSecondsSince1970"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9369
    ^ Timestamp now getMilliseconds
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9370
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9371
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9372
     JavaVM _System_currentTimeMillis:nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9373
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9374
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9375
    "Modified: / 23-12-1998 / 21:54:50 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9376
    "Modified: / 19-07-2012 / 11:44:56 / jv"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9377
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9378
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9379
_java_lang_System_identityHashCode: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9380
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9381
    <javanative: 'java/lang/System' name: 'identityHashCode(Ljava/lang/Object;)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9382
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9383
        |obj|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9384
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9385
    obj := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9386
    ^ obj identityHash
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9387
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9388
    "Modified: / 12.11.1998 / 18:52:07 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9389
    "Created: / 12.11.1998 / 18:54:00 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9390
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9391
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9392
_java_lang_System_initProperties: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9393
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9394
    <javanative: 'java/lang/System' name: 'initProperties(Ljava/util/Properties;)Ljava/util/Properties;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9395
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9396
        |props stProps|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9397
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9398
    props := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9399
    stProps := JavaVM systemProperties.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9400
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9401
    "/ recursively invoke myself on the Java HashTable.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9402
    "/ calling 'put' to stuff in the values ...
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9403
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9404
    stProps keysAndValuesDo:[:key :value |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9405
        |keyObj valueObj|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9406
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9407
        keyObj := Java as_String:key.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9408
        valueObj := Java as_String:value.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9409
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9410
        props
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9411
            perform:#'put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9412
            with:keyObj
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9413
            with:valueObj.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9414
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9415
    ^ props
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9416
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9417
    "Created: / 03-01-1998 / 14:25:22 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9418
    "Modified: / 04-01-1998 / 14:23:18 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9419
    "Modified: / 16-01-2013 / 19:47:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9420
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9421
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9422
_java_lang_System_mapLibraryName: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9423
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9424
    <javanative: 'java/lang/System' name: 'mapLibraryName(Ljava/lang/String;)Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9425
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9426
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9427
    | name |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9428
    name := Java as_ST_String: a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9429
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9430
    OperatingSystem isUNIXlike ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9431
        ^Java as_String: ('lib' , name , '.so').
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9432
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9433
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9434
    OperatingSystem isMSWINDOWSlike ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9435
        ^Java as_String: ( name , '.dll').
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9436
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9437
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9438
    self error:'Unknown/Unsupported platform'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9439
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9440
    "Created: / 09-12-2010 / 18:16:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9441
    "Modified: / 01-04-2011 / 18:14:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9442
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9443
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9444
_java_lang_System_nanoTime: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9445
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9446
    <javanative: 'java/lang/System' name: 'nanoTime()J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9447
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9448
    ^ OperatingSystem getMicrosecondTime * 1000
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9449
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9450
    "Modified: / 07-08-2011 / 21:47:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9451
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9452
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9453
_java_lang_System_registerNatives: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9454
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9455
    <javanative: 'java/lang/System' name: 'registerNatives()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9456
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9457
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9458
    "Nothing to do, native method are bound lazily"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9459
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9460
    "Created: / 20-10-2010 / 10:56:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9461
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9462
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9463
_java_lang_System_setErr0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9464
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9465
    <javanative: 'java/lang/System' name: 'setErr0(Ljava/io/PrintStream;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9466
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9467
        |stream|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9468
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9469
    stream := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9470
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9471
    self setOpenFile:(JavaVM javaConsoleStream ? Stderr) at:2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9472
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9473
    this instVarNamed:'err' put:stream.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9474
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9475
    "Created: / 18-03-1997 / 15:02:05 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9476
    "Modified: / 04-01-1998 / 16:21:15 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9477
    "Modified: / 16-01-2013 / 19:48:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9478
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9479
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9480
_java_lang_System_setIn0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9481
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9482
    <javanative: 'java/lang/System' name: 'setIn0(Ljava/io/InputStream;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9483
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9484
        |stream|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9485
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9486
    stream := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9487
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9488
    self setOpenFile:Stdin at:0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9489
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9490
    this instVarNamed:'in' put:stream.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9491
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9492
    "Created: / 4.1.1998 / 16:16:38 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9493
    "Modified: / 4.1.1998 / 16:20:44 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9494
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9495
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9496
_java_lang_System_setOut0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9497
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9498
    <javanative: 'java/lang/System' name: 'setOut0(Ljava/io/PrintStream;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9499
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9500
        |stream|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9501
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9502
    stream := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9503
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9504
    self setOpenFile:(JavaVM javaConsoleStream ? Stdout) at:1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9505
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9506
    this instVarNamed:'out' put:stream.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9507
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9508
    "Created: / 04-01-1998 / 16:18:26 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9509
    "Modified: / 16-01-2013 / 19:48:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9510
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9511
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9512
_java_lang_Thread_currentThread: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9513
    <javanative: 'java/lang/Thread' name: 'currentThread()Ljava/lang/Thread;'>
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  9514
    | t  p nctx |
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9515
    p := Processor activeProcess.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9516
    t := JavaVM javaThreadForSTProcess: p.
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  9517
    (nctx := self nativeContext) sender receiver class name
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9518
        = 'java/util/concurrent/locks/ReentrantLock$NonfairSync'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9519
            ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9520
                | owner |
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  9521
                owner := (nctx sender receiver
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9522
                            perform: #'getExclusiveOwnerThread()Ljava/lang/Thread;').
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9523
                (owner notNil and: [ owner ~= t ]) ifTrue: [ self breakPoint: #mh. ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9524
            ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9525
    t notNil ifTrue: [ ^ t ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9526
    t := JavaVM newThread: p name.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9527
    t instVarNamed: 'tid' put: p id.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9528
    Java addThread: t for: p.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9529
    ^ t
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9530
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9531
    "Modified: / 09-12-2011 / 12:52:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  9532
    "Modified: / 30-01-2013 / 14:17:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9533
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9534
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9535
_java_lang_Thread_holdsLock: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9536
    <javanative: 'java/lang/Thread' name: 'holdsLock(Ljava/lang/Object;)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9537
    | obj  mon  thisProcess |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9538
    obj := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9539
    obj isNil ifTrue: [Reflection 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9540
    throwNullPointerException:'null given to _java_lang_Thread_holdsLock'].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9541
    mon := obj getJavaMonitor.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9542
    thisProcess := Processor activeProcess.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9543
    (mon isOwnedBy: thisProcess) ifTrue: [ ^ 1 ] ifFalse: [ ^ 0 ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9544
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9545
    "Created: / 30-04-2011 / 22:06:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9546
    "Modified: / 09-12-2011 / 11:13:57 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9547
    "Modified: / 27-08-2012 / 11:36:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9548
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9549
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9550
_java_lang_Thread_interrupt0: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9551
    <javanative: 'java/lang/Thread' name: 'interrupt0()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9552
    | jThread  stProcess |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9553
    jThread := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9554
    stProcess := JavaVM stProcessForJavaThread: jThread.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9555
    self assert: stProcess notNil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9556
    stProcess javaInterrupt.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9557
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9558
    "Modified: / 02-01-1998 / 21:49:06 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9559
    "Created: / 10-04-1998 / 15:21:43 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9560
    "Modified: / 30-11-2011 / 13:36:56 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9561
    "Modified: / 16-01-2013 / 19:48:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9562
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9563
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9564
_java_lang_Thread_isAlive: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9565
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9566
    <javanative: 'java/lang/Thread' name: 'isAlive()Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9567
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9568
        "is it alive ?"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9569
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9570
    |jThread stProcess|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9571
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9572
    jThread := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9573
    stProcess := JavaVM stProcessForJavaThread:jThread.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9574
    stProcess isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9575
        ThreadTrace == true ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9576
            ('JAVA: no stProcess for javaThread: ' , jThread displayString) printNL.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9577
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9578
        ^ 0 "FALSE"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9579
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9580
    stProcess isDead ifTrue:[^ 0 "FALSE"].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9581
    ^ 1 "TRUE"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9582
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9583
    "Created: / 5.1.1998 / 02:03:51 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9584
    "Modified: / 6.2.1998 / 02:15:01 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9585
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9586
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9587
_java_lang_Thread_isInterrupted: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9588
    <javanative: 'java/lang/Thread' name: 'isInterrupted(Z)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9589
    "ask if a thread is interrupted (clear interruptState if arg is true)"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9590
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9591
    | jThread  stProcess  clearInterrupt  wasInterrupted |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9592
    jThread := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9593
    stProcess := JavaVM stProcessForJavaThread: jThread.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9594
    self assert: stProcess notNil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9595
    clearInterrupt := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9596
    wasInterrupted := stProcess isInterrupted.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9597
    clearInterrupt ~~ 0 ifTrue: [ stProcess clearInterrupted ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9598
    stProcess isDead ifTrue: [ ^ 0 ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9599
    wasInterrupted ifTrue: [ ^ 1 ] ifFalse: [ ^ 0 ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9600
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9601
    "Modified: / 02-01-1998 / 21:49:06 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9602
    "Created: / 07-01-1998 / 18:50:26 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9603
    "Modified: / 30-11-2011 / 12:22:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9604
    "Modified: / 16-01-2013 / 19:49:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9605
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9606
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9607
_java_lang_Thread_registerNatives: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9608
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9609
    <javanative: 'java/lang/Thread' name: 'registerNatives()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9610
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9611
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9612
    "Nothing to do, native method are bound lazily"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9613
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9614
    "Created: / 20-10-2010 / 11:12:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9615
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9616
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9617
_java_lang_Thread_resume0: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9618
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9619
    <javanative: 'java/lang/Thread' name: 'resume0()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9620
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9621
        "yield"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9622
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9623
    |jThread stProcess|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9624
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9625
    jThread := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9626
    stProcess := JavaVM stProcessForJavaThread:jThread.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9627
    stProcess isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9628
        ThreadTrace == true ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9629
            ('JAVA: no stProcess for javaThread: ' , jThread displayString) printNL.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9630
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9631
        ^ nil "void"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9632
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9633
    stProcess resume
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9634
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9635
    "Created: / 8.1.1998 / 01:06:27 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9636
    "Modified: / 6.2.1998 / 02:15:08 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9637
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9638
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9639
_java_lang_Thread_setPriority0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9640
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9641
    <javanative: 'java/lang/Thread' name: 'setPriority0(I)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9642
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9643
   |t p prio|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9644
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9645
    t := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9646
    p := JavaVM stProcessForJavaThread:t.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9647
    prio := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9648
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9649
    p isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9650
        ThreadTrace == true ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9651
            'JAVA [info]: no process yet (in setPriority)' infoPrintCR.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9652
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9653
        ^ nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9654
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9655
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9656
    "Modified: / 01-05-2011 / 13:25:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9657
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9658
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9659
_java_lang_Thread_sleep: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9660
    <javanative: 'java/lang/Thread' name: 'sleep(J)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9661
    "sleep for some milliseconds "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9662
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9663
    | millis |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9664
    millis := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9665
    millis < 0 ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9666
        Reflection 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9667
    throwIllegalArgumentException:('negative timeout: %1 in Thread.sleep' 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9668
            bindWith:millis)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9669
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9670
    Logger
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9671
        log: ('%1 going to sleep for %2'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9672
                bindWith: Processor activeProcess printString
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9673
                with: millis)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9674
        severity: #debug
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9675
        facility: #JVM.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9676
    JavaVM sleepForTimeout: millis state: #sleep.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9677
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9678
    "Modified: / 08-01-1999 / 16:42:52 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9679
    "Modified: / 30-11-2011 / 13:58:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9680
    "Modified: / 16-01-2013 / 19:49:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9681
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9682
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9683
_java_lang_Thread_start0: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9684
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9685
    <javanative: 'java/lang/Thread' name: 'start0()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9686
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9687
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  9688
    ^JavaVM threadStart: self nativeContext
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9689
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9690
    "Created: / 19-01-2013 / 23:44:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  9691
    "Modified: / 30-01-2013 / 14:16:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9692
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9693
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9694
_java_lang_Thread_stop0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9695
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9696
    <javanative: 'java/lang/Thread' name: 'stop0(Ljava/lang/Object;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9697
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9698
        "terminate a thread"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9699
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9700
    | jThread  stProcess  death |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9701
    jThread := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9702
    stProcess := JavaVM stProcessForJavaThread: jThread.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9703
    stProcess isNil ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9704
        ThreadTrace == true ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9705
            ('JAVA: no stProcess for javaThread: ' , jThread displayString) printNL.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9706
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9707
        ^ nil "void"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9708
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9709
    stProcess == JavaScreenUpdaterThread ifTrue: [ self halt ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9710
    stProcess == JavaEventQueueThread ifTrue: [ self halt ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9711
    death := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9712
    stProcess
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9713
        interruptWith: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9714
            JavaVM javaExceptionSignal
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9715
                handle: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9716
                    :ex |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9717
                    Processor activeProcess == JavaScreenUpdaterThread ifTrue: [ self halt ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9718
                    Processor activeProcess == JavaEventQueueThread ifTrue: [ self halt ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9719
                    Processor activeProcess terminate
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9720
                ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9721
                do: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9722
                    ThreadTrace == true ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9723
                        ('JAVA: thread exit: ' , jThread displayString) infoPrintNL.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9724
                    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9725
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9726
                    jThread perform: #'exit()V'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9727
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9728
                    JavaVM throwException:death.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9729
                ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9730
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9731
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9732
    "Created: / 08-01-1998 / 13:11:17 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9733
    "Modified: / 24-12-1999 / 02:32:45 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9734
    "Modified: / 01-12-2011 / 18:26:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9735
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9736
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9737
_java_lang_Thread_yield: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9738
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9739
    <javanative: 'java/lang/Thread' name: 'yield()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9740
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9741
        "yield"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9742
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9743
    |jThread stProcess|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9744
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9745
    Processor yield.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9746
"/    jThread := nativeContext receiver.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9747
"/    stProcess := JavaVM stProcessForJavaThread:jThread.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9748
"/    stProcess isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9749
"/        ThreadTrace == true ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9750
"/            ('JAVA: no stProcess for javaThread: ' , jThread displayString) printNL.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9751
"/        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9752
"/        ^ nil "void"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9753
"/    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9754
"/    stProcess == Processor activeProcess ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9755
"/        Processor yield.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9756
"/    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9757
"/        self halt.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9758
"/    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9759
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9760
    "Created: / 5.1.1998 / 02:03:51 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9761
    "Modified: / 23.12.1998 / 19:19:17 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9762
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9763
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9764
_java_lang_Throwable_fillInStackTrace: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9765
    <javanative: 'java/lang/Throwable' name: 'fillInStackTrace()Ljava/lang/Throwable;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9766
    | java_lang_Throwable  exceptionObject  list  con |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9767
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9768
    java_lang_Throwable := Java classNamed: 'java/lang/Throwable'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9769
    exceptionObject := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9770
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9771
    "/
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9772
    "/ debugging only
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9773
    "/
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9774
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9775
    (java_lang_Throwable notNil and:[(exceptionObject isKindOf: java_lang_Throwable) not]) ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9776
        self error:'Thrown object is not a java.lang.Throwable'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9777
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9778
    con := thisContext sender.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9779
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9780
    "/
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9781
    "/ we are not interrested in all intermediate Exception frames ...
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9782
    "/
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9783
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9784
    FullExceptionTrace ifFalse: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9785
        "/ first, skip any JavaVM contexts
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9786
        [ con receiver == exceptionObject ] whileFalse: [ con := con sender ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9787
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9788
        "/ then, all exception-init contexts
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9789
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9790
        [ con receiver == exceptionObject ] whileTrue: [ con := con sender ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9791
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9792
    list := OrderedCollection new.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9793
    [ con notNil ] whileTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9794
        (con isJavaContext) ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9795
            "/ add a copy, in case the context continues with some
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9796
            "/ cleanup ...
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9797
            list add: con shallowCopy
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9798
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9799
        con := con sender
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9800
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9801
    exceptionObject instVarNamed: 'backtrace' put: (list asArray).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9802
    ^ nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9803
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9804
    "Created: / 04-01-1998 / 14:27:40 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9805
    "Modified: / 08-05-1998 / 21:29:53 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9806
    "Modified: / 21-10-2011 / 13:41:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9807
    "Modified: / 28-10-2011 / 22:15:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9808
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9809
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9810
_java_lang_Throwable_getStackTraceDepth: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9811
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9812
    <javanative: 'java/lang/Throwable' name: 'getStackTraceDepth()I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9813
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9814
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9815
    ^(this instVarNamed: #backtrace) size
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9816
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9817
    "Modified: / 01-05-2011 / 20:25:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9818
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9819
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9820
_java_lang_Throwable_getStackTraceElement: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9821
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9822
    <javanative: 'java/lang/Throwable' name: 'getStackTraceElement(I)Ljava/lang/StackTraceElement;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9823
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9824
    | throwable index ctx stackTraceElement |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9825
    throwable := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9826
    index :=  a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9827
    ctx := (throwable instVarNamed:#backtrace) at: index + 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9828
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9829
    stackTraceElement := (JavaVM classForName:'java.lang.StackTraceElement') new.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9830
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9831
    stackTraceElement
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9832
        instVarNamed: #declaringClass
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9833
        put: (Java as_String:(ctx method javaClass javaName));
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9834
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9835
        instVarNamed: #methodName
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9836
        put: (Java as_String:"(ctx method printStringForBrowserWithSelector:ctx method selector inClass: ctx method javaClass) asString"ctx method selector);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9837
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9838
        instVarNamed: #lineNumber
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9839
        put: ctx lineNumber.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9840
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9841
    ctx method javaClass sourceFile notNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9842
        stackTraceElement
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9843
            instVarNamed: #fileName
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9844
            put: (Java as_String:(ctx method javaClass sourceFile))
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9845
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9846
    ^ stackTraceElement
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9847
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9848
    "Modified: / 02-12-2011 / 23:36:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9849
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9850
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9851
_java_lang_UNIXProcess_forkAndExec: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _: a8 _: a9 _: a10 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9852
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9853
    <javanative: 'java/lang/UNIXProcess' name: 'forkAndExec([B[BI[BI[BZLjava/io/FileDescriptor;Ljava/io/FileDescriptor;Ljava/io/FileDescriptor;)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9854
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9855
    "^ UnimplementedNativeMethodSignal raise"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9856
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9857
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9858
_java_lang_UNIXProcess_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9859
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9860
    <javanative: 'java/lang/UNIXProcess' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9861
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9862
    "Nothing to do"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9863
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9864
    "Modified: / 25-06-2011 / 10:05:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9865
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9866
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9867
_java_lang_UNIXProcess_waitForProcessExit: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9868
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9869
    <javanative: 'java/lang/UNIXProcess' name: 'waitForProcessExit(I)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9870
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9871
    "^ UnimplementedNativeMethodSignal raise"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9872
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9873
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9874
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9875
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - java.lang.ref'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9876
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9877
_java_lang_ref_Finalizer_invokeFinalizeMethod: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9878
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9879
    <javanative: 'java/lang/ref/Finalizer' name: 'invokeFinalizeMethod(Ljava/lang/Object;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9880
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9881
    | o |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9882
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9883
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9884
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9885
    Logger log: 'Finalizing ' , o printString  severity: #debug facility: 'JVM' .
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9886
    o perform:#'finalize()V'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9887
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9888
    "Modified: / 24-07-2012 / 11:11:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9889
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9890
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9891
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - java.lang.reflect'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9892
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9893
_java_lang_reflect_Array_getLength: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9894
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9895
    <javanative: 'java/lang/reflect/Array' name: 'getLength(Ljava/lang/Object;)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9896
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9897
    ^a1 size
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9898
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9899
    "Modified: / 17-08-2011 / 09:02:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9900
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9901
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9902
_java_lang_reflect_Array_multiNewArray: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9903
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9904
    <javanative: 'java/lang/reflect/Array' name: 'multiNewArray(Ljava/lang/Class;[I)Ljava/lang/Object;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9905
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9906
    |componentClass sizes cls array |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9907
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9908
    a1 isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9909
        JavaVM throwNullPointerException.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9910
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9911
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9912
    a2 isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9913
        JavaVM throwNullPointerException.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9914
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9915
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9916
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9917
    componentClass := Reflection
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9918
                classForJavaClassObject:a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9919
    componentClass == UndefinedObject ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9920
        Reflection throwIllegalArgumentException:'invalid class: void'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9921
        ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9922
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9923
    sizes := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9924
    sizes class == SignedIntegerArray ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9925
        Reflection 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9926
    throwIllegalArgumentException:('sizes arguments not instance of int[] (is: %1)' 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9927
            bindWith:sizes class).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9928
        ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9929
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9930
    sizes size == 0 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9931
        Reflection 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9932
    throwIllegalArgumentException:('sizes argument has no elements').
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9933
        ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9934
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9935
    array := nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9936
    cls := componentClass.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9937
    sizes do:[:size|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9938
        | newArray |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9939
        size > SmallInteger maxVal ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9940
            "This is just for Mauve tests"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9941
            JavaVM throwExceptionClassName:'java.lang.OutOfMemoryError'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9942
    withMessage:'array size too big'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9943
            ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9944
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9945
        size <  0 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9946
            JavaVM throwExceptionClassName:'java.lang.NegativeArraySizeException'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9947
    withMessage:'negative array size not allowed'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9948
            ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9949
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9950
        cls := cls javaArrayClass.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9951
        newArray := cls new: size.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9952
        1 to: size do:[:i|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9953
            newArray at:i put: array copy.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9954
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9955
        array := newArray.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9956
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9957
    ^array.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9958
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9959
    "Modified: / 22-11-2011 / 10:42:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9960
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9961
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9962
_java_lang_reflect_Array_newArray: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9963
    <javanative: 'java/lang/reflect/Array' name: 'newArray(Ljava/lang/Class;I)Ljava/lang/Object;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9964
    |componentClass size|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9965
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9966
    a1 isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9967
        JavaVM throwNullPointerException.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9968
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9969
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9970
    componentClass := Reflection
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9971
                classForJavaClassObject:a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9972
    componentClass == UndefinedObject ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9973
        Reflection throwIllegalArgumentException:'invalid class: void'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9974
        ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9975
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9976
    size := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9977
    size < 0 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9978
        JavaVM throwExceptionClassName:'java.lang.NegativeArraySizeException'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9979
    withMessage:'negative array size not allowed'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9980
        ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9981
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9982
    ^ componentClass javaArrayClass new:size
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9983
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9984
    "Created: / 17-12-2010 / 14:49:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9985
    "Modified: / 28-01-2011 / 15:18:50 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9986
    "Modified: / 04-06-2011 / 17:06:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9987
    "Modified: / 22-11-2011 / 09:13:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9988
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9989
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
  9990
_java_lang_reflect_Array_set: this _: array _: index0 _: value 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9991
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9992
    <javanative: 'java/lang/reflect/Array' name: 'set(Ljava/lang/Object;ILjava/lang/Object;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9993
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  9994
    | index  |
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  9995
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  9996
    index := index0 + 1.
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9997
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9998
    array isJavaArray ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9999
        Reflection throwIllegalArgumentException:'passed object is not an array'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10000
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10001
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10002
    index < 1 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10003
        Reflection throwIllegalArgumentException:'index is negative'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10004
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10005
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10006
    index > array size ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10007
        JavaVM throwArrayIndexOutOfBoundsException:index.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10008
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10009
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10010
    value isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10011
        array at: index put: nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10012
        ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10013
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10014
    (JavaVM canCast: value class to: array class javaComponentClass) ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10015
        Reflection throwIllegalArgumentException:'type-incompatible value'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10016
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10017
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10018
    array at: index put: value.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10019
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 10020
    "Modified: / 30-01-2013 / 13:45:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10021
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10022
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10023
_java_lang_reflect_Proxy_defineClass0: this _:a1 _: a2 _: a3 _: a4 _: a5 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10024
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10025
    <javanative: 'java/lang/reflect/Proxy' name: 'defineClass0(Ljava/lang/ClassLoader;Ljava/lang/String;[BII)Ljava/lang/Class;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10026
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10027
        "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10028
    private static native Class defineClass0(ClassLoader loader, String name,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10029
                                             byte[] b, int off, int len);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10030
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10031
    | loader name b off len  bs cls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10032
    loader := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10033
    name := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10034
    b := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10035
    off := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10036
    len := a5.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10037
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10038
    bs := (off = 0 and: [len = b size])
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10039
            ifTrue:[b readStream]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10040
            ifFalse:[(b copyFrom: off + 1 to: off + len) readStream].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10041
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10042
    cls := JavaClassReader readStream: bs.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10043
    cls classLoader: loader.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10044
    ClassRegistry registerClass: cls.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10045
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10046
    ^Reflection javaClassObjectForClass: cls.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10047
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10048
    "Created: / 06-02-2011 / 16:55:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10049
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10050
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10051
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - java.net'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10052
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10053
_java_net_DatagramPacket_init: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10054
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10055
    <javanative: 'java/net/DatagramPacket' name: 'init()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10056
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10057
    "Nothing to do"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10058
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10059
    "Modified: / 13-09-2011 / 22:33:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10060
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10061
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10062
_java_net_Inet4AddressImpl_getHostByAddr: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10063
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10064
    <javanative: 'java/net/Inet4AddressImpl' name: 'getHostByAddr([B)Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10065
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10066
    ^ JavaVM unimplementedNativeMethodSignal raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10067
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10068
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10069
_java_net_Inet4AddressImpl_getLocalHostName: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10070
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10071
    <javanative: 'java/net/Inet4AddressImpl' name: 'getLocalHostName()Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10072
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10073
    ^Java as_String: OperatingSystem getHostName
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10074
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10075
    "Modified: / 13-09-2011 / 22:36:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10076
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10077
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10078
_java_net_Inet4AddressImpl_lookupAllHostAddr: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10079
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10080
    <javanative: 'java/net/Inet4AddressImpl' name: 'lookupAllHostAddr(Ljava/lang/String;)[Ljava/net/InetAddress;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10081
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10082
    | hostname sockaddr inet4Address |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10083
    hostname := Java as_ST_String: a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10084
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10085
        sockaddr := IPSocketAddress hostName: hostname.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10086
    ] on: HostNameLookupError do: [:ex|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10087
        JavaVM throwExceptionClassName:'java.net.UnknownHostException'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10088
    withMessage:(ex description , '(' , hostname , ')').
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10089
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10090
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10091
    "Bad, here we have an access to just one inet address,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10092
     that's fine for now, however"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10093
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10094
    inet4Address := (JavaVM classForName:'java.net.Inet4Address') newCleared.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10095
    inet4Address
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10096
        instVarNamed: #family put: 1; "/IPv4
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10097
        instVarNamed: #address put: (sockaddr address doubleWordAt: 1 MSB: true);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10098
        instVarNamed: #hostName put: a1;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10099
        instVarNamed: #canonicalHostName put: a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10100
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10101
    ^(JavaVM classForName:'java.net.InetAddress') javaArrayClass with: inet4Address.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10102
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10103
    "Modified: / 08-11-2011 / 10:10:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10104
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10105
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10106
_java_net_Inet4Address_init: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10107
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10108
    <javanative: 'java/net/Inet4Address' name: 'init()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10109
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10110
    "Nothing to do"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10111
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10112
    "Modified: / 13-09-2011 / 22:31:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10113
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10114
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10115
_java_net_Inet6Address_init: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10116
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10117
    <javanative: 'java/net/Inet6Address' name: 'init()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10118
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10119
    "Nothing to do"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10120
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10121
    "Modified: / 13-09-2011 / 22:32:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10122
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10123
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10124
_java_net_InetAddressImplFactory_isIPv6Supported: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10125
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10126
    <javanative: 'java/net/InetAddressImplFactory' name: 'isIPv6Supported()Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10127
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10128
    ^ 0 "IPv6 is not supported!!"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10129
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10130
    "Modified: / 13-09-2011 / 19:43:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10131
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10132
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10133
_java_net_InetAddress_init: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10134
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10135
    <javanative: 'java/net/InetAddress' name: 'init()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10136
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10137
    "Nothing to do"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10138
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10139
    "Created: / 27-01-1998 / 18:16:40 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10140
    "Modified (comment): / 13-09-2011 / 22:32:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10141
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10142
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10143
_java_net_NetworkInterface_getAll: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10144
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10145
    <javanative: 'java/net/NetworkInterface' name: 'getAll()[Ljava/net/NetworkInterface;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10146
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10147
    ^ JavaVM unimplementedNativeMethodSignal raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10148
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10149
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10150
_java_net_NetworkInterface_getByName0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10151
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10152
    <javanative: 'java/net/NetworkInterface' name: 'getByName0(Ljava/lang/String;)Ljava/net/NetworkInterface;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10153
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10154
    ^ JavaVM unimplementedNativeMethodSignal raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10155
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10156
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10157
_java_net_NetworkInterface_init: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10158
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10159
    <javanative: 'java/net/NetworkInterface' name: 'init()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10160
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10161
    "Nothing to do"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10162
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10163
    "Modified: / 13-09-2011 / 22:33:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10164
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10165
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10166
_java_net_PlainDatagramSocketImpl_bind0: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10167
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10168
    <javanative: 'java/net/PlainDatagramSocketImpl' name: 'bind0(ILjava/net/InetAddress;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10169
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10170
    | port addr sock fd |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10171
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10172
    port := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10173
    addr := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10174
    addr isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10175
        JavaVM throwSocketException:'Passed InetAddress object is null'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10176
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10177
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10178
    fd := this instVarNamed: #fd.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10179
    fd isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10180
        JavaVM throwSocketException:'Socket closed'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10181
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10182
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10183
    sock := self validateFile: this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10184
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10185
    addr := addr perform: #'getAddress()[B'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10186
    addr = #[0 0 0 0] ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10187
        addr := nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10188
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10189
        JavaVM 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10190
    throwSocketException:'Only all-interface bind is supported by underlaing socket implementation, sorry'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10191
        ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10192
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10193
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10194
        sock bindTo: port address: addr reuseAddress: true.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10195
        this instVarNamed: #localPort put: sock port.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10196
    ] on: Error do:[:ex|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10197
        JavaVM throwSocketException:'bind0() failed: ' , ex description
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10198
    ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10199
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10200
    "Modified: / 07-11-2011 / 21:45:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10201
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10202
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10203
_java_net_PlainDatagramSocketImpl_datagramSocketClose: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10204
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10205
    <javanative: 'java/net/PlainDatagramSocketImpl' name: 'datagramSocketClose()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10206
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10207
        |jsock sock|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10208
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10209
    jsock := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10210
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10211
    sock := self validateFile:jsock.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10212
    sock notNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10213
        FileIOTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10214
            'JAVA: datagram close socket' infoPrintCR
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10215
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10216
        sock close.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10217
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10218
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10219
    "Modified: / 21.8.1997 / 17:09:40 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10220
    "Created: / 25.1.1998 / 20:04:24 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10221
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10222
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10223
_java_net_PlainDatagramSocketImpl_datagramSocketCreate: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10224
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10225
    <javanative: 'java/net/PlainDatagramSocketImpl' name: 'datagramSocketCreate()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10226
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10227
        |jsock fd sock fileNo|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10228
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10229
    jsock := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10230
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10231
    fd := jsock instVarNamed:'fd'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10232
    (fd instVarNamed:'fd') ~~ -1 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10233
        self halt:'file already open'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10234
        self internalError:'file already open'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10235
        JavaVM throwIOExceptionWithMessage:'file already open in socketCreate'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10236
        ^ self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10237
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10238
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10239
    FileOpenTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10240
        ('JAVA: create datagram socket') infoPrintCR.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10241
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10242
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10243
    sock := self commonOpenStreamUsing:[Socket newUDP].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10244
    sock isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10245
        JavaVM throwIOExceptionWithMessage:'socketCreate failed'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10246
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10247
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10248
    fileNo := self addOpenFile:sock.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10249
    fd instVarNamed:'fd' put:fileNo.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10250
    "Kludge for finalization..."
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10251
    jsock finalizationLobby registerChange: jsock
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10252
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10253
    "Created: / 25-01-1998 / 19:59:25 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10254
    "Modified: / 30-12-1998 / 20:10:38 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10255
    "Modified: / 23-07-2012 / 19:37:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10256
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10257
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10258
_java_net_PlainDatagramSocketImpl_init: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10259
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10260
    <javanative: 'java/net/PlainDatagramSocketImpl' name: 'init()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10261
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10262
    "Nothing to do"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10263
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10264
    "Modified: / 13-09-2011 / 22:36:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10265
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10266
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10267
_java_net_PlainDatagramSocketImpl_receive0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10268
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10269
    <javanative: 'java/net/PlainDatagramSocketImpl' name: 'receive0(Ljava/net/DatagramPacket;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10270
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10271
    ^ JavaVM unimplementedNativeMethodSignal raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10272
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10273
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10274
_java_net_PlainDatagramSocketImpl_send: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10275
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10276
    <javanative: 'java/net/PlainDatagramSocketImpl' name: 'send(Ljava/net/DatagramPacket;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10277
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10278
        |jsock jdatagramPacket sock ok|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10279
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10280
    jsock := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10281
    jdatagramPacket := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10282
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10283
    sock := self validateFile:jsock.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10284
    sock notNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10285
        FileIOTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10286
            ('JAVA: socket send') infoPrintCR
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10287
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10288
        ^ -1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10289
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10290
    ^ -1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10291
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10292
    "Created: / 4.2.1998 / 15:06:20 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10293
    "Modified: / 30.12.1998 / 20:10:16 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10294
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10295
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10296
_java_net_PlainDatagramSocketImpl_socketSetOption: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10297
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10298
    <javanative: 'java/net/PlainDatagramSocketImpl' name: 'socketSetOption(ILjava/lang/Object;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10299
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10300
        "/ native void socketSetOption (int arg1, java.lang.Object arg2)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10301
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10302
    |jsock opt optVal sock ok err jSocketOptions|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10303
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10304
    jsock := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10305
    opt := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10306
    optVal := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10307
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10308
    sock := self validateFile:jsock.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10309
    sock notNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10310
        FileIOTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10311
            ('JAVA: socket setOption ' , opt printString) infoPrintCR
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10312
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10313
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10314
        jSocketOptions := Java at:'java.net.SocketOptions'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10315
        (opt == (jSocketOptions instVarNamed:'TCP_NODELAY')) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10316
        ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10317
            (opt == (jSocketOptions instVarNamed:'SO_BINDADDR')) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10318
            ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10319
                (opt == (jSocketOptions instVarNamed:'SO_REUSEADDR')) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10320
                ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10321
                    (opt == (jSocketOptions instVarNamed:'IP_MULTICAST_IF')) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10322
                    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10323
                        (opt == (jSocketOptions instVarNamed:'SO_LINGER')) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10324
                        ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10325
                            (opt == (jSocketOptions instVarNamed:'SO_TIMEOUT')) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10326
                            ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10327
                                JavaVM throwIOExceptionWithMessage:'bad arg to setOption'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10328
                            ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10329
                        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10330
                    ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10331
                ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10332
            ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10333
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10334
        JavaVM throwIOExceptionWithMessage:'unimplemented: setOption'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10335
self halt.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10336
        ^ nil.  "/ void
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10337
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10338
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10339
    "Created: / 4.2.1998 / 15:06:20 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10340
    "Modified: / 30.12.1998 / 20:10:16 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10341
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10342
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10343
_java_net_PlainSocketImpl_initProto: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10344
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10345
    <javanative: 'java/net/PlainSocketImpl' name: 'initProto()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10346
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10347
    "Nothing to do"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10348
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10349
    "Created: / 12-01-1998 / 12:56:52 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10350
    "Modified (comment): / 13-09-2011 / 22:36:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10351
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10352
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10353
_java_net_PlainSocketImpl_socketAccept: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10354
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10355
    <javanative: 'java/net/PlainSocketImpl' name: 'socketAccept(Ljava/net/SocketImpl;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10356
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10357
    |jsock fd newJSock sock newSock fileNo|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10358
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10359
    jsock := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10360
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10361
    sock := self validateFile:jsock.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10362
    sock isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10363
        JavaVM throwIOExceptionWithMessage:'nil socket in accept'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10364
        ^ self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10365
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10366
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10367
    newJSock := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10368
    fd := newJSock instVarNamed:'fd'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10369
    (fd instVarNamed:'fd') ~~ -1 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10370
        self halt:'file already open'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10371
        self internalError:'file already open'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10372
        JavaVM throwIOExceptionWithMessage:'socket already open in socketAccept'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10373
        ^ self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10374
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10375
    FileIOTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10376
        'JAVA: socket accept' infoPrintCR
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10377
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10378
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10379
        newSock := self commonOpenStreamUsing:[sock accept].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10380
    ] on: Error do:[:ex|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10381
        JavaVM throwSocketException:'accept failed: ' , ex description.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10382
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10383
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10384
    newSock isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10385
        JavaVM throwSocketException:'accept failed'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10386
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10387
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10388
    fileNo := self addOpenFile:newSock.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10389
    fd instVarNamed:'fd' put:fileNo.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10390
    newJSock instVarNamed:'localport' put: newSock port.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10391
    newJSock instVarNamed:'port' put: newSock getPeer port.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10392
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10393
    "Kludge for finalization..."
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10394
    newJSock finalizationLobby registerChange: newJSock.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10395
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10396
    "Created: / 04-02-1998 / 15:26:49 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10397
    "Modified: / 30-12-1998 / 20:10:01 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10398
    "Modified: / 23-07-2012 / 19:37:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10399
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10400
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10401
_java_net_PlainSocketImpl_socketAvailable: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10402
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10403
    <javanative: 'java/net/PlainSocketImpl' name: 'socketAvailable()I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10404
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10405
        |jSock sock n|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10406
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10407
    jSock := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10408
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10409
    sock := self validateFile:jSock.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10410
    sock isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10411
        JavaVM throwIOExceptionWithMessage:'socketAvailable on closed socket'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10412
        ^ self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10413
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10414
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10415
    n := sock numAvailable.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10416
    ^ n
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10417
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10418
    "Created: / 4.2.1998 / 16:58:49 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10419
    "Modified: / 30.12.1998 / 20:10:08 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10420
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10421
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10422
_java_net_PlainSocketImpl_socketBind: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10423
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10424
    <javanative: 'java/net/PlainSocketImpl' name: 'socketBind(Ljava/net/InetAddress;I)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10425
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10426
    |jsock jaddr port sock hostName ok err|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10427
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10428
    jsock := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10429
    jaddr := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10430
    port := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10431
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10432
    hostName := jaddr instVarNamed:'hostName'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10433
    hostName isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10434
        self halt.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10435
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10436
        hostName := Java as_ST_String:hostName
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10437
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10438
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10439
    sock := self validateFile:jsock.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10440
    sock notNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10441
        FileIOTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10442
            ('JAVA: socket bind to ' , hostName printString, ' port ' , port printString) infoPrintCR
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10443
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10444
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10445
        [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10446
            ok := sock bindTo:port address:nil "hostName".
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10447
        ] on: Error do: [:ex|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10448
            JavaVM throwExceptionClassName:'java.net.BindException'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10449
    withMessage:'bind failed: ' , ex description.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10450
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10451
        ok ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10452
            err := OperatingSystem lastErrorString.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10453
            JavaVM throwExceptionClassName:'java.net.BindException'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10454
    withMessage:'bind failed: ' , err.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10455
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10456
       jsock instVarNamed: #localport put: sock port.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10457
       jsock instVarNamed: #address put: jaddr.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10458
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10459
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10460
    "Created: / 04-02-1998 / 15:06:20 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10461
    "Modified: / 30-12-1998 / 20:10:16 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10462
    "Modified: / 19-11-2011 / 00:43:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10463
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10464
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10465
_java_net_PlainSocketImpl_socketClose0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10466
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10467
    <javanative: 'java/net/PlainSocketImpl' name: 'socketClose0(Z)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10468
2012
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
 10469
    ^self commonClose: this
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
 10470
70b8ba5c825e Ported rest of IO natives not to use nativeContext.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2011
diff changeset
 10471
    "Modified: / 30-01-2013 / 17:50:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10472
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10473
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10474
_java_net_PlainSocketImpl_socketConnect: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10475
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10476
    <javanative: 'java/net/PlainSocketImpl' name: 'socketConnect(Ljava/net/InetAddress;II)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10477
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10478
    |jsock jaddr port sock addr hostName ok|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10479
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10480
    jsock := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10481
    jaddr := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10482
    port := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10483
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10484
    hostName := jaddr instVarNamed:'hostName'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10485
    hostName notNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10486
        hostName := Java as_ST_String:hostName
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10487
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10488
        addr := jaddr instVarNamed:'address'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10489
        addr notNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10490
            hostName := ByteArray new:4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10491
            hostName at:4 put:(addr bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10492
            addr := addr bitShift:-8.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10493
            hostName at:3 put:(addr bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10494
            addr := addr bitShift:-8.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10495
            hostName at:2 put:(addr bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10496
            addr := addr bitShift:-8.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10497
            hostName at:1 put:(addr bitAnd:16rFF).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10498
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10499
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10500
    hostName isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10501
        self halt.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10502
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10503
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10504
    sock := self validateFile:jsock.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10505
    sock notNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10506
        FileIOTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10507
            Logger log: ('socket connect to ' , hostName printString , ' port ' , port printString) severity: #trace facility: #JVM.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10508
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10509
        SocketConnectConfirmation ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10510
            (PermittedHostConnects isNil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10511
            or:[(PermittedHostConnects includes:hostName) not]) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10512
                (self confirm:'connect to host: ' , hostName printString , ' - ok ?')
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10513
                ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10514
                    JavaVM throwIOExceptionWithMessage:'connect permission denied'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10515
                ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10516
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10517
                (self confirm:('JAVA Security check\\Always permit connects to this host (''' , hostName printString , ''') ?') withCRs)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10518
                ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10519
                    PermittedHostConnects isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10520
                        PermittedHostConnects := Set new
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10521
                    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10522
                    PermittedHostConnects add:hostName.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10523
                ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10524
            ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10525
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10526
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10527
        [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10528
            ok := sock connectTo:hostName port:port.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10529
            ok ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10530
                JavaVM throwExceptionClassName:'java.net.ConnectException'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10531
    withMessage:'connect failed'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10532
            ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10533
            jsock instVarNamed: #localport put: sock port.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10534
            jsock instVarNamed: #address put: jaddr.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10535
        ] on: Error do:[:ex|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10536
            JavaVM throwExceptionClassName:'java.net.ConnectException'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10537
    withMessage:'connect failed: ' , ex description
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10538
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10539
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10540
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10541
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10542
    "Created: / 25-01-1998 / 20:02:27 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10543
    "Modified: / 30-12-1998 / 20:10:28 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10544
    "Modified: / 13-11-2011 / 23:16:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10545
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10546
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10547
_java_net_PlainSocketImpl_socketCreate: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10548
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10549
    <javanative: 'java/net/PlainSocketImpl' name: 'socketCreate(Z)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10550
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10551
    |jsock isStream fd sock fileNo|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10552
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10553
    jsock := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10554
    isStream := a1 == 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10555
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10556
    fd := jsock instVarNamed:'fd'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10557
    fd isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10558
        JavaVM throwSocketException:'null fd object'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10559
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10560
    (fd instVarNamed:'fd') ~~ -1 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10561
        self halt:'file already open'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10562
        self internalError:'file already open'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10563
        JavaVM throwSocketException:'socket already open in socketCreate'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10564
        ^ self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10565
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10566
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10567
    FileOpenTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10568
        ('JAVA: create socket') infoPrintCR.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10569
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10570
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10571
    isStream ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10572
        sock := self commonOpenStreamUsing:[JavaSocket newTCP].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10573
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10574
        sock := self commonOpenStreamUsing:[JavaSocket newUDP].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10575
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10576
    sock isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10577
        JavaVM throwIOExceptionWithMessage:'socketCreate failed'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10578
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10579
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10580
    (jsock instVarNamed: #serverSocket) notNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10581
        "/If this is a server socket then enable SO_REUSEADDR
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10582
        [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10583
            Object primitiveFailureSignal
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10584
        ] on: Object primitiveFailureSignal do:[:ex|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10585
            JavaVM 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10586
    throwIOExceptionWithMessage:'cannot set SO_REUSEADDR: ' , ex description.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10587
            ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10588
        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10589
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10590
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10591
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10592
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10593
    fileNo := self addOpenFile:sock.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10594
    fd instVarNamed:'fd' put:fileNo.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10595
    "Kludge for finalization..."
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10596
    jsock finalizationLobby registerChange: jsock
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10597
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10598
    "Created: / 25-01-1998 / 19:59:25 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10599
    "Modified: / 30-12-1998 / 20:10:38 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10600
    "Modified: / 23-07-2012 / 19:38:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10601
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10602
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10603
_java_net_PlainSocketImpl_socketGetOption: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10604
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10605
    <javanative: 'java/net/PlainSocketImpl' name: 'socketGetOption(ILjava/lang/Object;)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10606
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10607
    | opt arg sock ret |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10608
    opt := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10609
    arg := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10610
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10611
    sock := self validateFile: this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10612
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10613
"/  TCP_NODELAY = 1;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10614
    opt = 1 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10615
        ret := sock getSocketOption: #TCP_NODELAY.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10616
        ^ret ifTrue:[1] ifFalse:[-1].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10617
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10618
"/  SO_BINDADDR = 15;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10619
    opt = 15 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10620
        self breakPoint: #jv.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10621
        ^-1 "/Unsupported
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10622
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10623
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10624
"/  SO_REUSEADDR = 4;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10625
    opt = 4 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10626
        ret := sock getSocketOption: #SO_REUSEADDR.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10627
        ^ret ifTrue:[1] ifFalse:[-1].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10628
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10629
"/  IP_TOS = 3;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10630
    opt = 3 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10631
        self breakPoint: #jv.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10632
        ^-1 "/Unsupported
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10633
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10634
"/  SO_LINGER = 128;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10635
    opt = 128 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10636
        ret := sock getSocketOption:#SO_LINGER.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10637
        ^ret
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10638
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10639
"/  SO_TIMEOUT = 4102;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10640
    opt = 4102 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10641
        self breakPoint: #jv.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10642
        ^-1 "/Unsupported                   .
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10643
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10644
"/  SO_SNDBUF = 4097;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10645
    opt = 4097 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10646
        ret := sock getSocketOption: #SO_SNDBUF.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10647
        ^ret
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10648
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10649
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10650
"/  SO_RCVBUF = 4098;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10651
    opt = 4098 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10652
        ret := sock getSocketOption: #SO_RCVBUF.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10653
        ^ret
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10654
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10655
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10656
"/  SO_KEEPALIVE = 8;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10657
    opt = 8 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10658
        ret := sock getSocketOption: #SO_KEEPALIVE.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10659
        ^ret ifTrue:[1] ifFalse:[-1].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10660
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10661
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10662
"/  SO_OOBINLINE = 4099;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10663
    opt = 4099 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10664
        ret := sock getSocketOption: #SO_OOBINLINE.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10665
        ^ret ifTrue:[1] ifFalse:[-1].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10666
    ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10667
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10668
    "Modified: / 13-11-2011 / 23:06:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10669
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10670
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10671
_java_net_PlainSocketImpl_socketListen: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10672
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10673
    <javanative: 'java/net/PlainSocketImpl' name: 'socketListen(I)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10674
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10675
        |jSock time sock ok|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10676
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10677
    jSock := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10678
    time := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10679
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10680
    sock := self validateFile:jSock.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10681
    sock notNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10682
        FileIOTrace ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10683
            ('JAVA: socket listen with timeout ' , time printString) infoPrintCR.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10684
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10685
        ok := sock listenFor:5.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10686
        ok ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10687
            JavaVM throwIOExceptionWithMessage:'listen failed'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10688
            ^ self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10689
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10690
        time ~~ 0 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10691
            sock readWaitWithTimeoutMs:time
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10692
        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10693
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10694
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10695
    "Created: / 04-02-1998 / 15:17:48 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10696
    "Modified: / 30-12-1998 / 20:10:46 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10697
    "Modified: / 17-08-2012 / 15:27:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10698
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10699
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10700
_java_net_PlainSocketImpl_socketSetOption: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10701
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10702
    <javanative: 'java/net/PlainSocketImpl' name: 'socketSetOption(IZLjava/lang/Object;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10703
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10704
    | opt on val sock o arg1 arg2 |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10705
    opt := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10706
    on  := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10707
    val := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10708
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10709
    sock := self validateFile: this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10710
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10711
"/  TCP_NODELAY = 1;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10712
    opt = 1 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10713
        o := #TCP_NODELAY.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10714
        arg1 := (on == 1)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10715
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10716
"/  SO_BINDADDR = 15;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10717
    opt = 15 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10718
        ^self "/Unsupported
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10719
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10720
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10721
"/  SO_REUSEADDR = 4;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10722
    opt = 4 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10723
        o := #SO_REUSEADDR.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10724
        arg1 := (on == 1)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10725
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10726
"/  IP_TOS = 3;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10727
    opt = 3 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10728
        ^self "/Unssuported
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10729
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10730
"/  SO_LINGER = 128;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10731
    opt = 128 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10732
        o := #SO_LINGER.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10733
        arg1 := (on == 1).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10734
        arg2 := val instVarNamed: #value.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10735
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10736
"/  SO_TIMEOUT = 4102;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10737
    opt = 4102 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10738
        ^self "/Unssuported
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10739
                   .
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10740
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10741
"/  SO_SNDBUF = 4097;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10742
    opt = 4097 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10743
        o := #SO_SNDBUF.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10744
        arg1 := val instVarNamed: #value.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10745
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10746
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10747
"/  SO_RCVBUF = 4098;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10748
    opt = 4098 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10749
        o := #SO_RCVBUF.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10750
        arg1 := val instVarNamed: #value.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10751
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10752
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10753
"/  SO_KEEPALIVE = 8;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10754
    opt = 8 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10755
        o := #SO_KEEPALIVE.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10756
        arg1 := (on == 1)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10757
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10758
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10759
"/  SO_OOBINLINE = 4099;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10760
    opt = 4099 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10761
        o := #SO_OOBINLINE.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10762
        arg1 := (on == 1)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10763
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10764
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10765
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10766
        sock setSocketOption: o argument: arg1 argument: arg2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10767
    ] on: Error do:[:ex|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10768
        JavaVM 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10769
    throwSocketException:'Error setting socket option: ' , ex description.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10770
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10771
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10772
    "Modified: / 13-11-2011 / 23:05:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10773
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10774
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10775
_java_net_SocketInputStream_init: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10776
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10777
    <javanative: 'java/net/SocketInputStream' name: 'init()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10778
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10779
    "Nothing to do"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10780
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10781
    "Modified: / 09-11-2011 / 22:27:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10782
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10783
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10784
_java_net_SocketInputStream_socketRead0: this _:a1 _: a2 _: a3 _: a4 _: a5 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10785
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10786
    <javanative: 'java/net/SocketInputStream' name: 'socketRead0(Ljava/io/FileDescriptor;[BIII)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10787
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10788
    | fdObj data off len timeout sock nread |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10789
    fdObj   := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10790
    data    := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10791
    off     := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10792
    len     := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10793
    timeout := a5.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10794
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10795
    fdObj isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10796
        JavaVM 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10797
    throwSocketException:'Socket closed (null fdObj passed to socketRead0)'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10798
        ^ -1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10799
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10800
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10801
    sock := self validateFile: fdObj.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10802
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10803
    timeout ~~ 0 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10804
        [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10805
            (sock readWaitWithTimeout: timeout) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10806
                JavaVM throwExceptionClassName:'java.net.SocketTimeoutException'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10807
    withMessage:'Read timed out'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10808
                ^ -1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10809
            ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10810
        ] on: Error do:[:ex|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10811
            JavaVM throwSocketException:'Error when reading: ' , ex description.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10812
        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10813
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10814
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10815
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10816
        nread := sock nextAvailableBytes: len into: data startingAt: off + 1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10817
    ] on: Error do:[:ex|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10818
        JavaVM throwSocketException:'Error when reading: ' , ex description.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10819
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10820
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10821
    ^nread
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10822
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10823
    "Modified: / 04-12-2011 / 20:24:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10824
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10825
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10826
_java_net_SocketOutputStream_init: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10827
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10828
    <javanative: 'java/net/SocketOutputStream' name: 'init()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10829
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10830
    "Nothing to do"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10831
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10832
    "Modified: / 09-11-2011 / 23:44:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10833
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10834
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10835
_java_net_SocketOutputStream_socketWrite0: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10836
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10837
    <javanative: 'java/net/SocketOutputStream' name: 'socketWrite0(Ljava/io/FileDescriptor;[BII)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10838
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10839
    | fdObj data off len  sock |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10840
    fdObj   := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10841
    data    := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10842
    off     := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10843
    len     := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10844
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10845
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10846
    fdObj isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10847
        JavaVM 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10848
    throwSocketException:'Socket closed (null fdObj passed to socketRead0)'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10849
        ^ -1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10850
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10851
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10852
    sock := self validateFile: fdObj.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10853
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10854
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10855
        sock nextPutBytes: len from: data startingAt: off + 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10856
    ] on: Error do:[:ex|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10857
        JavaVM 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10858
    throwIOExceptionWithMessage:'Error when writing: ' , ex description.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10859
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10860
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10861
    "Modified: / 13-11-2011 / 23:53:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10862
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10863
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10864
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - java.nio'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10865
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10866
_java_nio_Bits_copyFromByteArray: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10867
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10868
    static native void copyFromByteArray(Object src, long srcPos, long dstAddr,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10869
                                         long length);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10870
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10871
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10872
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10873
    <javanative: 'java/nio/Bits' name: 'copyFromByteArray(Ljava/lang/Object;JJJ)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10874
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10875
    | src srcPos dstAddr length |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10876
    src := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10877
    srcPos := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10878
    dstAddr := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10879
    length := a6.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10880
    SimulatedNativeMemory  bcopy: dstAddr length: length from: src offset: srcPos.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10881
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10882
    "Modified: / 11-07-2012 / 10:37:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10883
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10884
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10885
_java_nio_Bits_copyToByteArray: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10886
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10887
    static native void copyToByteArray(long srcAddr, Object dst, long dstPos,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10888
                                       long length);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10889
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10890
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10891
    <javanative: 'java/nio/Bits' name: 'copyToByteArray(JLjava/lang/Object;JJ)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10892
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10893
    | srcAddr dst dstPos length |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10894
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10895
    srcAddr := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10896
    dst := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10897
    dstPos := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10898
    length := a6.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10899
    SimulatedNativeMemory bcopy: srcAddr length: length into: dst offset: dstPos.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10900
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10901
    "Modified: / 11-07-2012 / 10:34:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10902
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10903
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10904
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - java.security'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10905
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10906
_java_security_AccessController_doPrivileged: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10907
    <javanative: 'java/security/AccessController' name: 'doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10908
    "we don't care about permissions, we will just allow this. Now it's guaranteed that called code will not perform access permission checks"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10909
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10910
    | retval |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10911
    JavaVM privilegedAccessQuery answer: true
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10912
        do: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10913
            retval := a1 perform: #'run()Ljava/lang/Object;'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10914
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10915
    ^ retval
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10916
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10917
    "Created: / 20-10-2010 / 12:31:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10918
    "Modified: / 09-10-2011 / 23:56:31 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10919
    "Modified: / 18-10-2011 / 23:28:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10920
    "Modified: / 10-09-2012 / 23:22:59 / m"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10921
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10922
2011
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 10923
_java_security_AccessController_doPrivileged: this _: a1 _: a2 
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 10924
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 10925
    <javanative: 'java/security/AccessController' name: ''>
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 10926
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 10927
    | retval |
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 10928
    JavaVM privilegedAccessQuery answer: true
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 10929
        do: [
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 10930
            retval := a1 perform: #'run()Ljava/lang/Object;'.
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 10931
        ].
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 10932
    ^ retval
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 10933
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 10934
    "Modified: / 20-01-2013 / 20:57:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 10935
!
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 10936
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10937
_java_security_AccessController_getStackAccessControlContext: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10938
    <javanative: 'java/security/AccessController' name: 'getStackAccessControlContext()Ljava/security/AccessControlContext;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10939
    "/ introduced with jdk1.2
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10940
    "/ supposed to do more here ...
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10941
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10942
    ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10943
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10944
    "Created: / 27-01-1998 / 18:22:15 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10945
    "Modified: / 09-10-2011 / 23:40:46 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10946
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10947
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10948
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - java.sql'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10949
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10950
_java_sql_DriverManager_getCallerClassLoader: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10951
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10952
    <javanative: 'java/sql/DriverManager' name: 'getCallerClassLoader()Ljava/lang/ClassLoader;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10953
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 10954
    ^self nativeContext
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10955
        sender sender
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10956
        receiver class theNonMetaclass
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10957
        classLoader
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10958
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 10959
    "Modified: / 30-01-2013 / 14:16:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10960
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10961
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10962
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - java.text'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10963
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10964
_java_text_Bidi_nativeBidiChars: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10965
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10966
    <javanative: 'java/text/Bidi' name: 'nativeBidiChars(Ljava/text/Bidi;[CI[BIII)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10967
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10968
    ^ JavaVM unimplementedNativeMethodSignal raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10969
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10970
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10971
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - java.util'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10972
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 10973
_java_util_ResourceBundle_getClassContext: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10974
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10975
    <javanative: 'java/util/ResourceBundle' name: 'getClassContext()[Ljava/lang/Class;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10976
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10977
    "returns an array filled with the contextChain receivers classes.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10978
     What an ugly, messy interface."
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10979
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10980
    |chain con cls jClass|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10981
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10982
    chain := OrderedCollection new.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10983
    con := thisContext sender.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10984
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10985
        con notNil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10986
            and:[con receiver isMethod not or:[con receiver isJavaMethod not]]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10987
    ] whileTrue:[con := con sender.].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10988
    con := con sender sender sender.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10989
    [con notNil] whileTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10990
        (true) "con isJavaContext" ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10991
            cls := con receiver class.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10992
            cls isMeta ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10993
                "/ t'was a static method
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10994
                cls := cls soleInstance
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10995
            ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10996
            cls isJavaClass ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10997
                jClass := Reflection javaClassObjectForClass:cls.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10998
                chain add:jClass.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10999
            ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11000
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11001
        con := con sender.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11002
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11003
    ^(JavaVM classForName:'java.lang.Class') javaArrayClass withAll: chain
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11004
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11005
    "Created: / 05-01-1998 / 02:47:00 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11006
    "Modified: / 24-12-1998 / 00:34:57 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11007
    "Modified: / 28-01-2011 / 15:31:28 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11008
    "Modified: / 09-01-2013 / 18:11:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11009
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11010
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11011
_java_util_TimeZone_getSystemGMTOffsetID: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11012
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11013
    <javanative: 'java/util/TimeZone' name: 'getSystemGMTOffsetID()Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11014
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11015
    ^ Java as_String: 'GMT'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11016
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11017
    "Modified: / 09-01-2013 / 16:18:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11018
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11019
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11020
_java_util_TimeZone_getSystemTimeZoneID: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11021
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11022
    <javanative: 'java/util/TimeZone' name: 'getSystemTimeZoneID(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11023
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11024
    "JV@2011-06-25: TODO: finish, returning nil here means GMT"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11025
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11026
    ^ nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11027
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11028
    "Modified: / 25-06-2011 / 08:26:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11029
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11030
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11031
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - java.util.concurrent.atomic'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11032
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11033
_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11034
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11035
    <javanative: 'java/util/concurrent/atomic/AtomicLong' name: 'VMSupportsCS8()Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11036
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11037
    "Should be safe - say we don't support lockless updates"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11038
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11039
    ^ 0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11040
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11041
    "Modified: / 07-08-2011 / 20:53:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11042
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11043
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11044
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - java.util.jar'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11045
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11046
_java_util_jar_JarFile_getMetaInfEntryNames: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11047
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11048
    <javanative: 'java/util/jar/JarFile' name: 'getMetaInfEntryNames()[Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11049
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11050
    private native String[] getMetaInfEntryNames();
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11051
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11052
    | zipArchive entries jentries |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11053
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11054
    zipArchive := ZipCache at: (this instVarNamed: #jzfile).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11055
    entries := (zipArchive entries select:[:entry|entry size > 9 and:[entry startsWith: 'META-INF/']]) asArray.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11056
    jentries := Java java_lang_String javaArrayClass new: entries size.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11057
    1 to: entries size do:[:i|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11058
        jentries at: i put: (Java as_String: (entries at: i))
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11059
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11060
    ^jentries
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11061
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11062
    "Modified: / 10-12-2012 / 05:42:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11063
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11064
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11065
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - java.util.zip'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11066
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11067
_java_util_zip_Adler32_updateBytes: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11068
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11069
    <javanative: 'java/util/zip/Adler32' name: 'updateBytes(I[BII)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11070
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11071
    ^ JavaVM unimplementedNativeMethodSignal raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11072
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11073
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11074
_java_util_zip_CRC32_update: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11075
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11076
    <javanative: 'java/util/zip/CRC32' name: 'update(II)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11077
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11078
    ^ JavaVM unimplementedNativeMethodSignal raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11079
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11080
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11081
_java_util_zip_CRC32_updateBytes: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11082
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11083
    <javanative: 'java/util/zip/CRC32' name: 'updateBytes(I[BII)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11084
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11085
    | crc b off len |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11086
    crc := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11087
    b   := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11088
    off := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11089
    len := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11090
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11091
    ^ZipStream crc32BytesIn:b from:off + 1  to: off + len crc:crc
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11092
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11093
    "Modified: / 05-12-2011 / 00:41:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11094
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11095
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11096
_java_util_zip_Deflater_deflateBytes: this _:a1 _: a2 _: a3 _: a4 _: a5 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11097
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11098
    <javanative: 'java/util/zip/Deflater' name: 'deflateBytes(J[BII)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11099
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11100
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11101
    private native int deflateBytes(long addr, byte[] b, int off, int len);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11102
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11103
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11104
    | addr b off len deflater ret |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11105
    addr := a1."long takes 2 slots"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11106
    b := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11107
    off := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11108
    len := a5.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11109
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11110
    deflater := ZipInflaters at: addr.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11111
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11112
    ret := deflater deflate: b offset: off length: len flush: 0 deflater: this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11113
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11114
    ^ret.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11115
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11116
    "Modified: / 25-10-2012 / 20:19:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11117
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11118
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11119
_java_util_zip_Deflater_end: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11120
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11121
    <javanative: 'java/util/zip/Deflater' name: 'end(J)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11122
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11123
    | addr deflater |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11124
    addr := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11125
    deflater := ZipInflaters at: addr.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11126
    ZipInflaters at: addr put: nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11127
    deflater end.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11128
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11129
    "Modified: / 25-10-2012 / 20:24:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11130
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11131
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11132
_java_util_zip_Deflater_getBytesRead: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11133
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11134
    <javanative: 'java/util/zip/Deflater' name: 'getBytesRead(J)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11135
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11136
    | addr deflater |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11137
    addr := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11138
    deflater := ZipInflaters at: addr.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11139
    ^deflater bytesRead.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11140
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11141
    "Modified: / 25-10-2012 / 20:19:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11142
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11143
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11144
_java_util_zip_Deflater_getBytesWritten: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11145
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11146
    <javanative: 'java/util/zip/Deflater' name: 'getBytesWritten(J)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11147
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11148
    | addr deflater |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11149
    addr := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11150
    deflater := ZipInflaters at: addr.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11151
    ^deflater bytesWritten.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11152
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11153
    "Modified: / 25-10-2012 / 20:19:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11154
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11155
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11156
_java_util_zip_Deflater_init: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11157
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11158
    <javanative: 'java/util/zip/Deflater' name: 'init(IIZ)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11159
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11160
    | level strategy nowrap deflater |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11161
    level := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11162
    strategy := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11163
    nowrap := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11164
    deflater := JavaZipSupport deflaterFor: self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11165
    deflater init: strategy level: level nowrap: nowrap.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11166
    1 to: ZipInflaters size do:[:i|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11167
        (ZipInflaters at: i) isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11168
            ZipInflaters at: i put: deflater.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11169
            ^i
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11170
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11171
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11172
    ZipInflaters add: deflater.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11173
    ^ZipInflaters size.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11174
    "/^deflater
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11175
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11176
    "Modified: / 25-10-2012 / 20:25:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11177
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11178
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11179
_java_util_zip_Deflater_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11180
    <javanative: 'java/util/zip/Deflater' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11181
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11182
    "Nothing to do here"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11183
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11184
    "Modified: / 08-12-2011 / 21:11:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11185
    "Modified: / 10-05-2012 / 17:03:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11186
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11187
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11188
_java_util_zip_Deflater_reset: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11189
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11190
    <javanative: 'java/util/zip/Deflater' name: 'reset(J)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11191
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11192
    | addr deflater |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11193
    addr := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11194
    deflater := ZipInflaters at: addr.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11195
    deflater reset.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11196
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11197
    "Modified: / 25-10-2012 / 20:19:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11198
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11199
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11200
_java_util_zip_Inflater_end: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11201
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11202
    <javanative: 'java/util/zip/Inflater' name: 'end(J)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11203
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11204
     "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11205
    private native static void reset(long addr);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11206
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11207
    | addr inflater |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11208
    addr := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11209
    inflater := ZipInflaters at: addr.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11210
    ZipInflaters at: addr put: nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11211
    inflater end.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11212
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11213
    "Modified: / 25-10-2012 / 20:24:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11214
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11215
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11216
_java_util_zip_Inflater_getBytesRead: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11217
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11218
    <javanative: 'java/util/zip/Inflater' name: 'getBytesRead(J)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11219
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11220
    | addr inflater |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11221
    addr := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11222
    inflater := ZipInflaters at: addr.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11223
    ^inflater bytesRead.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11224
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11225
    "Modified: / 25-10-2012 / 20:20:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11226
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11227
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11228
_java_util_zip_Inflater_getBytesWritten: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11229
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11230
    <javanative: 'java/util/zip/Inflater' name: 'getBytesWritten(J)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11231
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11232
    | addr inflater |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11233
    addr := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11234
    inflater := ZipInflaters at: addr.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11235
    ^inflater bytesWritten.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11236
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11237
    "Modified: / 25-10-2012 / 20:20:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11238
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11239
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11240
_java_util_zip_Inflater_inflateBytes: this _:a1 _: a2 _: a3 _: a4 _: a5 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11241
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11242
    <javanative: 'java/util/zip/Inflater' name: 'inflateBytes(J[BII)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11243
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11244
    private native int inflateBytes(long addr, byte[] b, int off, int len)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11245
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11246
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11247
    | addr b off len inflater ret |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11248
    addr := a1."long takes 2 slots"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11249
    b := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11250
    off := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11251
    len := a5.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11252
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11253
    inflater := ZipInflaters at: addr.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11254
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11255
    ret := inflater inflate: b offset: off length: len inflater: this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11256
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11257
    ^ret.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11258
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11259
    "Created: / 30-04-2011 / 23:02:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11260
    "Modified: / 25-10-2012 / 20:20:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11261
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11262
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11263
_java_util_zip_Inflater_init: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11264
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11265
    <javanative: 'java/util/zip/Inflater' name: 'init(Z)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11266
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11267
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11268
    | nowrap inflater |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11269
    nowrap := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11270
    inflater := JavaZipSupport inflaterFor: self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11271
    inflater init: nowrap.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11272
    1 to: ZipInflaters size do:[:i|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11273
        (ZipInflaters at: i) isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11274
            ZipInflaters at: i put: inflater.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11275
            ^i
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11276
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11277
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11278
    ZipInflaters add: inflater.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11279
    ^ ZipInflaters size.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11280
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11281
    "Created: / 01-02-1998 / 20:14:01 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11282
    "Modified: / 25-10-2012 / 20:25:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11283
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11284
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11285
_java_util_zip_Inflater_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11286
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11287
    <javanative: 'java/util/zip/Inflater' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11288
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11289
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11290
    "Nothing to do, used only to register natives"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11291
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11292
    "Created: / 30-04-2011 / 21:55:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11293
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11294
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11295
_java_util_zip_Inflater_reset: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11296
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11297
    <javanative: 'java/util/zip/Inflater' name: 'reset(J)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11298
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11299
    private native static void reset(long addr);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11300
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11301
    | addr inflater |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11302
    addr := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11303
    inflater := ZipInflaters at: addr.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11304
    inflater reset.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11305
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11306
    "Created: / 01-02-1998 / 20:14:13 / cg"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11307
    "Modified: / 25-10-2012 / 20:20:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11308
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11309
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11310
_java_util_zip_ZipEntry_initFields: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11311
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11312
    <javanative: 'java/util/zip/ZipEntry' name: 'initFields(J)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11313
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11314
        | entry jzentry zmember |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11315
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11316
    entry := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11317
    jzentry := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11318
    zmember := ZipEntryCache at: jzentry.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11319
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11320
    entry
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11321
        instVarNamed: #name     put: (Java as_String: zmember fileName);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11322
        instVarNamed: #time     put: -1"zmember lastModFileTime";
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11323
        instVarNamed: #crc      put: zmember crc32;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11324
        instVarNamed: #size     put: zmember uncompressedSize;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11325
        instVarNamed: #csize    put: zmember compressedSize;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11326
        instVarNamed: #method   put: zmember compressionMethod;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11327
        instVarNamed: #extra    put: zmember extraField;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11328
        instVarNamed: #comment  put: (zmember fileComment ifNotNil:[Java as_String: zmember fileComment]).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11329
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11330
    "Created: / 01-04-2011 / 13:04:24 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11331
    "Modified: / 05-12-2011 / 23:42:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11332
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11333
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11334
_java_util_zip_ZipEntry_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11335
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11336
    <javanative: 'java/util/zip/ZipEntry' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11337
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11338
        "hopefully nothing to do"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11339
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11340
    "Created: / 01-04-2011 / 13:02:06 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11341
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11342
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11343
_java_util_zip_ZipFile_close: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11344
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11345
    <javanative: 'java/util/zip/ZipFile' name: 'close(J)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11346
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11347
    | jzfile zar |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11348
    jzfile := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11349
    zar := ZipCache at: jzfile.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11350
    zar close.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11351
    ZipCache at: jzfile put: nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11352
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11353
    "Modified: / 03-11-2011 / 22:22:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11354
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11355
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11356
_java_util_zip_ZipFile_freeEntry: this _: jzfile _: dummy1 _: jzentry _: dummy2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11357
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11358
    <javanative: 'java/util/zip/ZipFile' name: 'freeEntry(JJ)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11359
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11360
    jzentry = 0 ifFalse: [ ZipEntryCache at: jzentry put: nil ].
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11361
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11362
    "Modified: / 30-01-2013 / 13:47:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11363
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11364
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11365
_java_util_zip_ZipFile_getCSize: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11366
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11367
    <javanative: 'java/util/zip/ZipFile' name: 'getCSize(J)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11368
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11369
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11370
    | jzentry zmember |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11371
    jzentry := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11372
    zmember := ZipEntryCache at: jzentry.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11373
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11374
    ^zmember compressedSize
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11375
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11376
    "Created: / 30-04-2011 / 21:50:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11377
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11378
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11379
_java_util_zip_ZipFile_getEntry: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11380
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11381
    <javanative: 'java/util/zip/ZipFile' name: 'getEntry(JLjava/lang/String;Z)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11382
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11383
    | zipArchive  filename  member |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11384
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11385
    zipArchive := ZipCache at: a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11386
    filename := Java as_ST_String: a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11387
    member := (zipArchive findMemberAllowForMissingTrailingSlash: filename).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11388
    member isNil ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11389
        ^ 0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11390
    ] ifFalse: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11391
        ^ ZipEntryCache indexOf: member ifAbsent:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11392
            ZipEntryCache add: member.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11393
            ZipEntryCache size.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11394
        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11395
    ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11396
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11397
    "Created: / 27-03-2011 / 16:59:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11398
    "Modified: / 01-04-2011 / 16:03:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11399
    "Modified: / 18-08-2011 / 19:44:56 / jv"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11400
    "Modified: / 20-07-2012 / 19:27:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11401
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11402
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11403
_java_util_zip_ZipFile_getMethod: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11404
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11405
    <javanative: 'java/util/zip/ZipFile' name: 'getMethod(J)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11406
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11407
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11408
    | jzentry zmember |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11409
    jzentry := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11410
    zmember := ZipEntryCache at: jzentry.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11411
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11412
    ^zmember compressionMethod
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11413
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11414
    "Created: / 30-04-2011 / 21:53:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11415
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11416
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11417
_java_util_zip_ZipFile_getNextEntry: this _:jzfile _: dummy1 _: index 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11418
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11419
    <javanative: 'java/util/zip/ZipFile' name: 'getNextEntry(JI)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11420
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11421
    | zipArchive i |
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11422
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11423
    zipArchive := ZipCache at: jzfile.
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11424
    i := 0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11425
    zipArchive zipMembersDo:[:member |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11426
        index == i ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11427
            ^ ZipEntryCache indexOf: member ifAbsent:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11428
                ZipEntryCache add: member.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11429
                ZipEntryCache size.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11430
            ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11431
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11432
        i := i + 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11433
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11434
    ^0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11435
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11436
    "Modified: / 30-01-2013 / 13:48:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11437
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11438
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11439
_java_util_zip_ZipFile_getSize: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11440
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11441
    <javanative: 'java/util/zip/ZipFile' name: 'getSize(J)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11442
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11443
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11444
    | jzentry zmember |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11445
    jzentry := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11446
    zmember := ZipEntryCache at: jzentry.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11447
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11448
    ^zmember uncompressedSize
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11449
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11450
    "Created: / 30-04-2011 / 21:53:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11451
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11452
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11453
_java_util_zip_ZipFile_getTotal: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11454
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11455
    <javanative: 'java/util/zip/ZipFile' name: 'getTotal(J)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11456
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11457
    | zar|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11458
    zar := ZipCache at: a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11459
    ^ zar entries size.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11460
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11461
    "Modified: / 23-07-2012 / 23:35:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11462
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11463
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11464
_java_util_zip_ZipFile_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11465
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11466
    <javanative: 'java/util/zip/ZipFile' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11467
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11468
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11469
    "Nothing to do"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11470
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11471
    "Created: / 23-03-2011 / 19:37:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11472
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11473
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11474
_java_util_zip_ZipFile_open: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11475
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11476
    <javanative: 'java/util/zip/ZipFile' name: 'open(Ljava/lang/String;IJ)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11477
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11478
    | path  mode  lastModTime  result |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11479
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11480
    path := Java as_ST_String: a1.
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11481
    "/(path endsWith:'.jar') ifFalse:[self breakPoint: #jv].
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11482
    mode := a2.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11483
    lastModTime := a3.
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11484
    result := path asFilename.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11485
    result ifNil: [ JavaVM throwZipException ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11486
    ^[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11487
        | i zar |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11488
        zar := ZipArchive readingFrom: result readStream.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11489
        i := ZipCache indexOf: nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11490
        i ~~ 0 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11491
            ZipCache at: i put: zar.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11492
            i
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11493
        ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11494
            ZipCache add: zar.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11495
            ZipCache size.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11496
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11497
    ] on: Error do:[:ex|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11498
        JavaVM throwZipException:'Cannot open zip file: ' , ex description
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11499
    ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11500
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11501
    "Modified: / 01-04-2011 / 15:35:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11502
    "Modified: / 30-01-2013 / 13:55:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11503
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11504
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11505
_java_util_zip_ZipFile_read: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _: a8 _: a9 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11506
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11507
    <javanative: 'java/util/zip/ZipFile' name: 'read(JJJ[BII)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11508
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11509
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11510
    | jzfile jzentry pos b off len zar zmember bytesToRead |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11511
    jzfile := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11512
    jzentry := a3. "first arg is long!!!!!!"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11513
    pos := a5. "jzentry arg is long!!!!!!"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11514
    b := a7.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11515
    off := a8.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11516
    len := a9.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11517
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11518
    zar := ZipCache at: jzfile.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11519
    zmember := ZipEntryCache at: jzentry.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11520
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11521
    bytesToRead := len min: (zmember compressedSize - pos).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11522
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11523
    ^zar nextBytes: bytesToRead of: zmember startingAt: pos into: b startingAt: off + 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11524
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11525
    "Created: / 30-04-2011 / 22:15:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11526
    "Modified: / 01-05-2011 / 16:22:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11527
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11528
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11529
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - stx.libjava'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11530
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11531
_stx_libjava_ClassLoader_findClassS: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11532
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11533
    <javanative: 'stx/libjava/ClassLoader' name: 'findClassS(Ljava/lang/String;)Ljava/lang/Class;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11534
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11535
    | nm cls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11536
    nm := Java as_ST_String: a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11537
    (nm startsWith: 'SMALLTALK.') ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11538
        JavaVM 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11539
    throwClassNotFoundException:('No such smalltalk class (%1)' bindWith:nm).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11540
        ^self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11541
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11542
    nm := nm copyFrom: 'SMALLTALK.' size + 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11543
    cls := Smalltalk at: nm asSymbol.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11544
    cls isNil ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11545
        JavaVM 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11546
    throwClassNotFoundException:('No such smalltalk class (%1)' bindWith:nm).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11547
        ^self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11548
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11549
    ^Reflection javaClassObjectForClass: cls.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11550
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11551
    "Modified: / 19-01-2013 / 18:00:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11552
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11553
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11554
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - stx.libjava.groovy'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11555
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11556
_stx_libjava_groovy_GroovyClassLoader_SystemClassCollector_getDefiningClassLoader: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11557
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11558
    <javanative: 'stx/libjava/groovy/GroovyClassLoader$SystemClassCollector' name: 'getDefiningClassLoader()Lstx/libjava/groovy/GroovyClassLoader;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11559
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11560
    ^ SystemClassLoader
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11561
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11562
    "Modified: / 20-02-2012 / 22:30:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11563
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11564
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11565
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - stx.libjava.tests'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11566
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11567
_stx_libjava_tests_MonitorTests_abort: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11568
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11569
    <javanative: 'stx/libjava/tests/MonitorTests' name: 'abort()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11570
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11571
    AbortOperationRequest raiseRequest.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11572
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11573
    "Modified: / 04-11-2011 / 21:50:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11574
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11575
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11576
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - stx.libjava.tests.lang'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11577
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11578
_stx_libjava_tests_lang_MonitorTests_abort: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11579
    <javanative: 'stx/libjava/tests/lang/MonitorTests' name: 'abort()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11580
        AbortOperationRequest raiseRequest.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11581
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11582
    "Modified: / 10-09-2012 / 22:56:16 / m"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11583
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11584
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11585
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - stx.libjava.tests.vm'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11586
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11587
_stx_libjava_tests_vm_XLOAD_forcePatchupAndUnfix: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11588
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11589
    <javanative: 'stx/libjava/tests/MonitorTests' name: 'abort()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11590
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11591
    | ctx |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11592
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11593
    ctx := thisContext.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11594
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11595
    ObjectMemory garbageCollect.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11596
    [ ctx notNil ] whileTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11597
        1 to: ctx size do:[:i|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11598
                Transcript showCR: i printString , ' -> ', (ctx at: i) printString.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11599
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11600
        ctx := ctx sender.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11601
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11602
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11603
    ObjectMemory garbageCollect.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11604
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11605
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11606
    "Modified: / 04-11-2011 / 21:50:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11607
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11608
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11609
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - sun.font'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11610
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11611
_sun_font_FontManager_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11612
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11613
    <javanative: 'sun/font/FontManager' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11614
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11615
    "Modified: / 09-02-2012 / 22:56:51 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11616
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11617
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11618
_sun_font_FreetypeFontScaler_initIDs: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11619
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11620
    <javanative: 'sun/font/FreetypeFontScaler' name: 'initIDs(Ljava/lang/Class;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11621
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11622
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11623
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11624
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11625
_sun_font_StrikeCache_getGlyphCacheDescription: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11626
    <javanative: 'sun/font/StrikeCache' name: 'getGlyphCacheDescription([J)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11627
    a1 at: 1 put: 4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11628
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11629
    "Modified: / 09-02-2012 / 22:57:08 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11630
    "Modified: / 05-11-2012 / 17:07:52 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11631
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11632
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11633
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - sun.io'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11634
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11635
_sun_io_Win32ErrorMode_setErrorMode: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11636
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11637
    <javanative: 'sun/io/Win32ErrorMode' name: 'setErrorMode(J)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11638
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11639
    "FIXME: Ignored for now"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11640
    ^0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11641
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11642
    "Modified (format): / 14-08-2012 / 11:35:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11643
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11644
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11645
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - sun.java2d'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11646
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11647
_sun_java2d_Disposer_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11648
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11649
    <javanative: 'sun/java2d/Disposer' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11650
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11651
    "Modified: / 09-02-2012 / 22:54:59 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11652
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11653
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11654
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - sun.java2d.cmm.lcms'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11655
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11656
_sun_java2d_cmm_lcms_LCMS_getTagData: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11657
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11658
    <javanative: 'sun/java2d/cmm/lcms/LCMS' name: 'getTagData(JI[B)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11659
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11660
    | profileId tag data |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11661
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11662
    profileId := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11663
    tag := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11664
    data := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11665
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11666
    self assert: a1 = 12344321.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11667
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11668
    tag = 1751474532 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11669
        data replaceBytesFrom:1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11670
                with:#[0  3  146  96  108  99  109  115  4  0  0  0  115  112  97  99  51  67  76  82  88  89  90  32  7  216  0  4  0  10  0  10  0  24  0  22  97  99  115  112  65  80  80  76  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  1  0  0  0  1  0  0  246  214  0  1  0  0  0  0  211  45  108  99  109  115  240  231  92  85  210  30  77  140  137  67  22  250  239  246  146  191  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11671
                startingAt: 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11672
        ^self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11673
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11674
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11675
    self breakPoint: #jv.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11676
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11677
    "Modified: / 18-04-2012 / 08:29:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11678
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11679
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11680
_sun_java2d_cmm_lcms_LCMS_getTagSize: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11681
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11682
    <javanative: 'sun/java2d/cmm/lcms/LCMS' name: 'getTagSize(JI)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11683
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11684
    | profileId tag |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11685
    profileId := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11686
    tag := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11687
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11688
    self assert: a1 = 12344321.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11689
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11690
    "Magic numbers based on trace of real Java code"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11691
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11692
    tag = 1751474532 ifTrue:[ ^ 128 ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11693
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11694
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11695
    self breakPoint: #jv.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11696
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11697
    ^128 "Some magic default"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11698
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11699
    "Modified: / 18-04-2012 / 08:29:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11700
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11701
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11702
_sun_java2d_cmm_lcms_LCMS_initLCMS: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11703
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11704
    <javanative: 'sun/java2d/cmm/lcms/LCMS' name: 'initLCMS(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11705
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11706
    "Nothing to do"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11707
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11708
    "Modified: / 09-12-2011 / 18:25:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11709
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11710
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11711
_sun_java2d_cmm_lcms_LCMS_loadProfile: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11712
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11713
    <javanative: 'sun/java2d/cmm/lcms/LCMS' name: 'loadProfile([B)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11714
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11715
    "FAKE, return some magic"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11716
    ^12344321
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11717
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11718
    "Modified: / 09-12-2011 / 18:56:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11719
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11720
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11721
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - sun.java2d.pipe'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11722
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11723
_sun_java2d_pipe_Region_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11724
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11725
    <javanative: 'sun/java2d/pipe/Region' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11726
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11727
    "Modified: / 09-02-2012 / 22:55:09 / mh <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11728
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11729
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11730
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - sun.management'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11731
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11732
_sun_management_MemoryImpl_getMemoryManagers0: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11733
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11734
    <javanative: 'sun/management/MemoryImpl' name: 'getMemoryManagers0()[Ljava/lang/management/MemoryManagerMXBean;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11735
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11736
    "HACK, we'll see"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11737
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11738
    | beanCls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11739
    beanCls := JavaVM classForName:'java.lang.management.MemoryManagerMXBean'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11740
    ^beanCls javaArrayClass new:0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11741
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11742
    "Modified: / 04-12-2011 / 19:57:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11743
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11744
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11745
_sun_management_MemoryImpl_getMemoryPools0: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11746
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11747
    <javanative: 'sun/management/MemoryImpl' name: 'getMemoryPools0()[Ljava/lang/management/MemoryPoolMXBean;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11748
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11749
    "HACK, we'll see"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11750
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11751
    | beanCls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11752
    beanCls := JavaVM classForName:'java.lang.management.MemoryPoolMXBean'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11753
    ^beanCls javaArrayClass new:0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11754
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11755
    "Modified: / 04-12-2011 / 19:58:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11756
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11757
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11758
_sun_management_VMManagementImpl_getStartupTime: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11759
    <javanative: 'sun/management/VMManagementImpl' name: 'getStartupTime()J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11760
    ^ StartupTime.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11761
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11762
    "Modified: / 03-11-2011 / 19:17:57 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11763
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11764
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11765
_sun_management_VMManagementImpl_getVersion0: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11766
    <javanative: 'sun/management/VMManagementImpl' name: 'getVersion0()Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11767
    ^ Java as_String: '1.2'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11768
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11769
    "Modified: / 03-11-2011 / 18:42:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11770
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11771
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11772
_sun_management_VMManagementImpl_initOptionalSupportFields: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11773
    <javanative: 'sun/management/VMManagementImpl' name: 'initOptionalSupportFields()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11774
    | cls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11775
    cls := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11776
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11777
    cls instVarNamed: #compTimeMonitoringSupport put: 0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11778
    cls instVarNamed: #threadContentionMonitoringSupport put: 0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11779
    cls instVarNamed: #currentThreadCpuTimeSupport put: 0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11780
    cls instVarNamed: #otherThreadCpuTimeSupport put: 0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11781
    cls instVarNamed: #bootClassPathSupport put: 0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11782
    cls instVarNamed: #synchronizerUsageSupport put: 0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11783
    cls instVarNamed: #objectMonitorUsageSupport put: 0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11784
    ^ self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11785
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11786
    "Modified: / 13-12-2011 / 14:35:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11787
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11788
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11789
_sun_management_VMManagementImpl_isThreadCpuTimeEnabled: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11790
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11791
    <javanative: 'sun/management/VMManagementImpl' name: 'isThreadCpuTimeEnabled()Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11792
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11793
    ^ 0 "/false should be safe, we'll see...
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11794
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11795
    "Modified: / 03-11-2011 / 22:45:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11796
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11797
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11798
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - sun.misc'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11799
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11800
_sun_misc_GC_maxObjectInspectionAge: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11801
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11802
    <javanative: 'sun/misc/GC' name: 'maxObjectInspectionAge()J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11803
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11804
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11805
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11806
     * Returns the maximum <em>object-inspection age</em>, which is the number
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11807
     * of real-time milliseconds that have elapsed since the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11808
     * least-recently-inspected heap object was last inspected by the garbage
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11809
     * collector.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11810
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11811
     * <p> For simple stop-the-world collectors this value is just the time
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11812
     * since the most recent collection.  For generational collectors it is the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11813
     * time since the oldest generation was most recently collected.  Other
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11814
     * collectors are free to return a pessimistic estimate of the elapsed
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11815
     * time, or simply the time since the last full collection was performed.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11816
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11817
     * <p> Note that in the presence of reference objects, a given object that
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11818
     * is no longer strongly reachable may have to be inspected multiple times
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11819
     * before it can be reclaimed.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11820
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11821
    public static native long maxObjectInspectionAge();
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11822
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11823
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11824
    ^Random nextIntegerBetween: 0 and: 3600. "Just return some number"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11825
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11826
    "Modified: / 02-12-2011 / 21:56:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11827
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11828
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11829
_sun_misc_Signal_findSignal: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11830
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11831
    <javanative: 'sun/misc/Signal' name: 'findSignal(Ljava/lang/String;)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11832
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11833
        | input signame |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11834
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11835
    input := Java as_ST_String: a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11836
    OperatingSystem isUNIXlike ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11837
        signame := 'SIG', (input asUppercase).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11838
        ^UnixOperatingSystem signalNamed: signame asSymbol.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11839
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11840
    OperatingSystem isMSWINDOWSlike ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11841
        signame := 'sig', (input asUppercase).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11842
        ^Win32OperatingSystem perform: signame asSymbol.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11843
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11844
    self error: 'Unsupported OS'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11845
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11846
    "Created: / 11-12-2010 / 15:22:07 / Jan Kurs <kurs.jan@post.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11847
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11848
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11849
_sun_misc_Signal_handle0: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11850
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11851
    <javanative: 'sun/misc/Signal' name: 'handle0(IJ)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11852
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11853
        self breakPoint: #libjava.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11854
    ^ 0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11855
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11856
    "Created: / 11-12-2010 / 16:33:38 / Jan Kurs <kurs.jan@post.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11857
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11858
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11859
_sun_misc_Unsafe_addressSize: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11860
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11861
    <javanative: 'sun/misc/Unsafe' name: 'addressSize()I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11862
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11863
    ^ExternalAddress pointerSize
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11864
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11865
    "Modified: / 10-07-2012 / 01:19:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11866
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11867
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11868
_sun_misc_Unsafe_allocateInstance: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11869
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11870
    <javanative: 'sun/misc/Unsafe' name: 'allocateInstance(Ljava/lang/Class;)Ljava/lang/Object;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11871
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11872
        "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11873
    /** Allocate an instance but do not run any constructor.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11874
        Initializes the class if it has not yet been. */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11875
    public native Object allocateInstance(Class cls)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11876
        throws InstantiationException;
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11877
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11878
    | cls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11879
    cls := Reflection classForJavaClassObject: a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11880
    cls classInit.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11881
    ^cls newCleared
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11882
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11883
    "Created: / 05-02-2011 / 23:10:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11884
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11885
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11886
_sun_misc_Unsafe_allocateMemory: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11887
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11888
    <javanative: 'sun/misc/Unsafe' name: 'allocateMemory(J)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11889
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11890
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11891
    | size |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11892
    size := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11893
    ^SimulatedNativeMemory malloc: size.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11894
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11895
    "Created: / 07-12-2010 / 21:04:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11896
    "Modified: / 07-12-2010 / 23:46:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11897
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11898
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11899
_sun_misc_Unsafe_arrayBaseOffset: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11900
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11901
    <javanative: 'sun/misc/Unsafe' name: 'arrayBaseOffset(Ljava/lang/Class;)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11902
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11903
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11904
    * Report the offset of the first element in the storage allocation of a
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11905
    * given array class.  If {@link #arrayIndexScale} returns a non-zero value
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11906
    * for the same class, you may use that scale factor, together with this
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11907
    * base offset, to form new offsets to access elements of arrays of the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11908
    * given class.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11909
    *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11910
    * @see #getInt(Object, long)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11911
    * @see #putInt(Object, long, int)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11912
    */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11913
    public native int arrayBaseOffset(Class arrayClass);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11914
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11915
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11916
    ^ 1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11917
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11918
    "Modified (comment): / 10-08-2011 / 01:22:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11919
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11920
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11921
_sun_misc_Unsafe_arrayIndexScale: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11922
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11923
    <javanative: 'sun/misc/Unsafe' name: 'arrayIndexScale(Ljava/lang/Class;)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11924
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11925
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11926
      /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11927
      * Report the scale factor for addressing elements in the storage
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11928
      * allocation of a given array class.  However, arrays of 'narrow' types
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11929
      * will generally not work properly with accessors like {@link
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11930
      * #getByte(Object, int)}, so the scale factor for such classes is reported
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11931
      * as zero.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11932
      *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11933
      * @see #arrayBaseOffset
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11934
      * @see #getInt(Object, long)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11935
      * @see #putInt(Object, long, int)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11936
      */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11937
    public native int arrayIndexScale(Class arrayClass);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11938
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11939
    ^ 1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11940
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11941
    "Modified: / 10-08-2011 / 01:26:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11942
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11943
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11944
_sun_misc_Unsafe_compareAndSwapInt: this _:a1 _: a2 _: a3 _: a4 _: a5 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11945
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11946
    <javanative: 'sun/misc/Unsafe' name: 'compareAndSwapInt(Ljava/lang/Object;JII)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11947
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11948
    ^self _sun_misc_Unsafe_compareAndSwapObject: this _:a1 _: a2 _: a3 _: a4 _: a5 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11949
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11950
    "Created: / 22-11-2010 / 18:40:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11951
    "Modified: / 30-01-2013 / 13:56:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11952
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11953
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11954
_sun_misc_Unsafe_compareAndSwapLong: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11955
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11956
    <javanative: 'sun/misc/Unsafe' name: 'compareAndSwapLong(Ljava/lang/Object;JJJ)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11957
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11958
        "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11959
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11960
     * Atomically update Java variable to <tt>x</tt> if it is currently
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11961
     * holding <tt>expected</tt>.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11962
     * @return <tt>true</tt> if successful
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11963
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11964
    public final native boolean compareAndSwapInt(Object o, long offset,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11965
                                                  long expected,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11966
                                                  long new);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11967
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11968
    | o offset expected real new ok |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11969
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11970
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11971
    "offset is long, so nativeContext at:3 is dummy nil!!!!!!"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11972
    expected := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11973
    new := a6.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11974
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11975
    OperatingSystem blockInterrupts.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11976
    real := o instVarAt: offset.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11977
    (real == expected)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11978
            ifTrue:[o instVarAt: offset put: new. ok := 1]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11979
            ifFalse:[ok := 1].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11980
    OperatingSystem unblockInterrupts.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11981
    ^ok
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11982
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11983
    "Modified: / 18-10-2011 / 21:59:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11984
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11985
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 11986
_sun_misc_Unsafe_compareAndSwapObject: this _:a1 _: a2 _: a3 _: a4 _: a5 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11987
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11988
    <javanative: 'sun/misc/Unsafe' name: 'compareAndSwapInt(Ljava/lang/Object;JII)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11989
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11990
        "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11991
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11992
     * Atomically update Java variable to <tt>x</tt> if it is currently
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11993
     * holding <tt>expected</tt>.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11994
     * @return <tt>true</tt> if successful
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11995
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11996
    public final native boolean compareAndSwapInt(Object o, long offset,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11997
                                                  int expected,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11998
                                                  int new);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11999
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12000
    | o offset expected real new ok |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12001
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12002
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12003
    "offset is long, so nativeContext at:3 is dummy nil!!!!!!"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12004
    expected := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12005
    new := a5.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12006
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12007
    OperatingSystem blockInterrupts.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12008
    o isArray ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12009
        real := o at: offset.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12010
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12011
        real := o instVarAt: offset.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12012
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12013
    (real == expected) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12014
        o isArray ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12015
            o at: offset put: new.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12016
        ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12017
            o instVarAt: offset put: new.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12018
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12019
        ok := 1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12020
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12021
        ok := 0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12022
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12023
    OperatingSystem unblockInterrupts.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12024
    ^ok
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12025
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12026
    "Modified: / 03-09-2012 / 19:02:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12027
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12028
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12029
_sun_misc_Unsafe_copyMemory: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12030
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12031
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12032
     * Sets all bytes in a given block of memory to a copy of another
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12033
     * block.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12034
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12035
    public native void copyMemory(long srcAddress, long destAddress,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12036
                                  long bytes);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12037
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12038
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12039
    <javanative: 'sun/misc/Unsafe' name: 'copyMemory(JJJ)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12040
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12041
    | srcAddress dstAddress bytes |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12042
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12043
    srcAddress := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12044
    dstAddress := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12045
    bytes      := a5.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12046
    SimulatedNativeMemory bcopy: srcAddress to: dstAddress length: bytes.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12047
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12048
    "Modified (format): / 11-07-2012 / 10:25:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12049
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12050
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12051
_sun_misc_Unsafe_defineClass: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12052
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12053
    <javanative: 'sun/misc/Unsafe' name: 'defineClass(Ljava/lang/String;[BIILjava/lang/ClassLoader;Ljava/security/ProtectionDomain;)Ljava/lang/Class;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12054
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12055
        "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12056
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12057
     * Tell the VM to define a class, without security checks.  By default, the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12058
     * class loader and protection domain come from the caller's class.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12059
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12060
    public native Class defineClass(String name, byte[] b, int off, int len,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12061
                                    ClassLoader loader,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12062
                                    ProtectionDomain protectionDomain);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12063
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12064
    | name b off len loader protectionDomain bs cls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12065
    name := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12066
    b := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12067
    off := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12068
    len := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12069
    loader := a5.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12070
    protectionDomain := a6.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12071
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12072
    bs := (off = 0 and: [len = b size])
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12073
            ifTrue:[b readStream]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12074
            ifFalse:[(b copyFrom: off + 1 to: off + len) readStream].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12075
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12076
    cls := JavaClassReader readStream: bs.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12077
    cls classLoader: loader.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12078
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12079
    ^Reflection javaClassObjectForClass: cls.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12080
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12081
    "Created: / 05-02-2011 / 22:57:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12082
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12083
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12084
_sun_misc_Unsafe_ensureClassInitialized: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12085
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12086
    <javanative: 'sun/misc/Unsafe' name: 'ensureClassInitialized(Ljava/lang/Class;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12087
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12088
        |class|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12089
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12090
    class := Reflection classForJavaClassObject:a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12091
     "Sometimes there is a nil. I don't know why, so I did quickfix"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12092
    self breakPoint:#libjava.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12093
    class notNil ifTrue:[class classInit.].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12094
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12095
    "Created: / 11-12-2010 / 15:01:36 / Jan Kurs <kurs.jan@post.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12096
    "Modified: / 08-01-2011 / 15:11:21 / Jan Kurs <kurs.jan@post.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12097
    "Modified: / 28-01-2011 / 15:19:31 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12098
    "Modified: / 16-01-2013 / 19:52:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12099
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12100
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12101
_sun_misc_Unsafe_freeMemory: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12102
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12103
    <javanative: 'sun/misc/Unsafe' name: 'freeMemory(J)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12104
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12105
    | address  |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12106
    address := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12107
    ^SimulatedNativeMemory free: address
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12108
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12109
    "Created: / 09-12-2010 / 17:56:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12110
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12111
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12112
_sun_misc_Unsafe_getBoolean: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12113
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12114
    <javanative: 'sun/misc/Unsafe' name: 'getBoolean(Ljava/lang/Object;J)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12115
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12116
    | o offset |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12117
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12118
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12119
    ^o instVarAt: offset
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12120
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12121
    "Modified: / 19-11-2011 / 10:49:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12122
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12123
2011
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12124
_sun_misc_Unsafe_getByte: this _: a1 _: a2 
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12125
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12126
    <javanative: 'sun/misc/Unsafe' name: 'getByte(J)B'>
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12127
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12128
    | address |
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12129
    address := a1.
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12130
    ^SimulatedNativeMemory byteAt: address
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12131
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12132
    "Modified: / 20-01-2013 / 20:54:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12133
    "Modified (format): / 21-01-2013 / 17:35:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12134
!
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12135
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12136
_sun_misc_Unsafe_getByte: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12137
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12138
    <javanative: 'sun/misc/Unsafe' name: 'getByte(Ljava/lang/Object;J)B'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12139
    <javanative: 'sun/misc/Unsafe' name: 'getByte(J)B'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12140
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12141
    | object offset |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12142
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12143
    "getByte(Ljava/lang/Object;J)V"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12144
    object := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12145
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12146
    ^object instVarAt: offset
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12147
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12148
    "Created: / 09-12-2010 / 17:29:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12149
    "Modified: / 20-01-2013 / 20:55:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12150
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12151
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12152
_sun_misc_Unsafe_getChar: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12153
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12154
    <javanative: 'sun/misc/Unsafe' name: 'getChar(Ljava/lang/Object;J)C'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12155
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12156
    | o offset |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12157
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12158
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12159
    ^o instVarAt: offset
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12160
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12161
    "Modified: / 22-11-2011 / 14:51:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12162
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12163
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12164
_sun_misc_Unsafe_getDouble: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12165
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12166
    <javanative: 'sun/misc/Unsafe' name: 'getDouble(Ljava/lang/Object;J)D'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12167
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12168
    | o offset |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12169
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12170
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12171
    ^o instVarAt: offset
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12172
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12173
    "Modified: / 10-05-2012 / 17:01:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12174
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12175
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12176
_sun_misc_Unsafe_getFloat: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12177
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12178
    <javanative: 'sun/misc/Unsafe' name: 'getFloat(Ljava/lang/Object;J)F'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12179
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12180
    | o offset |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12181
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12182
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12183
    ^o instVarAt: offset
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12184
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12185
    "Modified: / 22-11-2011 / 14:53:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12186
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12187
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12188
_sun_misc_Unsafe_getFloatVolatile: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12189
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12190
    <javanative: 'sun/misc/Unsafe' name: 'getFloatVolatile(Ljava/lang/Object;J)F'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12191
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12192
    | o offset |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12193
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12194
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12195
    ^o instVarAt: offset
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12196
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12197
    "Modified: / 10-05-2012 / 17:01:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12198
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12199
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12200
_sun_misc_Unsafe_getInt: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12201
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12202
    <javanative: 'sun/misc/Unsafe' name: 'getInt(Ljava/lang/Object;J)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12203
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12204
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12205
    * Fetches a integer value from a given Java variable.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12206
    */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12207
    public native int getInt(Object o, long offset);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12208
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12209
    | o offset |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12210
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12211
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12212
    ^o instVarAt: offset
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12213
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12214
    "Modified: / 18-10-2011 / 20:33:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12215
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12216
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12217
_sun_misc_Unsafe_getIntVolatile: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12218
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12219
    <javanative: 'sun/misc/Unsafe' name: 'getIntVolatile(Ljava/lang/Object;J)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12220
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12221
    | o offset |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12222
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12223
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12224
    ^o instVarAt: offset
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12225
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12226
    "Modified: / 28-03-2012 / 15:03:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12227
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12228
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12229
_sun_misc_Unsafe_getLong: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12230
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12231
    <javanative: 'sun/misc/Unsafe' name: 'getLong(Ljava/lang/Object;J)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12232
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12233
    | o offset |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12234
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12235
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12236
    ^o instVarAt: offset
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12237
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12238
    "Modified: / 25-08-2012 / 11:15:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12239
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12240
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12241
_sun_misc_Unsafe_getLongVolatile: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12242
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12243
    <javanative: 'sun/misc/Unsafe' name: 'getLongVolatile(Ljava/lang/Object;J)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12244
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12245
    | o offset |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12246
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12247
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12248
    ^o instVarAt: offset
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12249
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12250
    "Modified: / 31-08-2011 / 23:57:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12251
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12252
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12253
_sun_misc_Unsafe_getObject: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12254
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12255
    <javanative: 'sun/misc/Unsafe' name: 'getObject(Ljava/lang/Object;J)Ljava/lang/Object;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12256
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12257
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12258
    * Fetches a reference value from a given Java variable.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12259
    * @see #getInt(Object, long)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12260
    */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12261
    public native Object getObject(Object o, long offset);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12262
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12263
    | o offset |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12264
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12265
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12266
    ^o isArray ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12267
        o at: offset
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12268
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12269
        o instVarAt: offset
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12270
    ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12271
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12272
    "Modified: / 03-09-2012 / 19:00:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12273
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12274
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12275
_sun_misc_Unsafe_getObjectVolatile: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12276
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12277
    <javanative: 'sun/misc/Unsafe' name: 'getObjectVolatile(Ljava/lang/Object;J)Ljava/lang/Object;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12278
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12279
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12280
    * Fetches a reference value from a given Java variable, with volatile
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12281
    * load semantics. Otherwise identical to {@link #getObject(Object, long)}
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12282
    */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12283
    public native Object getObjectVolatile(Object o, long offset);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12284
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12285
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12286
    ^self _sun_misc_Unsafe_getObject: this _:a1 _: a2 _: a3 
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12287
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12288
    "Modified: / 30-01-2013 / 13:56:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12289
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12290
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12291
_sun_misc_Unsafe_getShort: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12292
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12293
    <javanative: 'sun/misc/Unsafe' name: 'getShort(Ljava/lang/Object;J)S'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12294
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12295
    | o offset |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12296
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12297
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12298
    ^o instVarAt: offset
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12299
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12300
    "Modified: / 22-11-2011 / 14:52:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12301
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12302
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12303
_sun_misc_Unsafe_getShortVolatile: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12304
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12305
    <javanative: 'sun/misc/Unsafe' name: 'getShortVolatile(Ljava/lang/Object;J)S'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12306
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12307
    | o offset |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12308
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12309
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12310
    ^o instVarAt: offset
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12311
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12312
    "Modified: / 29-06-2012 / 19:05:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12313
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12314
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12315
_sun_misc_Unsafe_objectFieldOffset: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12316
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12317
    <javanative: 'sun/misc/Unsafe' name: 'objectFieldOffset(Ljava/lang/reflect/Field;)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12318
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12319
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12320
    | javaFieldObject |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12321
    javaFieldObject := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12322
    ^javaFieldObject instVarNamed: #slot
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12323
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12324
    "Created: / 22-11-2010 / 17:58:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12325
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12326
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12327
_sun_misc_Unsafe_pageSize: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12328
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12329
    <javanative: 'sun/misc/Unsafe' name: 'pageSize()I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12330
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12331
    ^ 4096"4K is the page size on x86, I think... "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12332
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12333
    "Modified: / 25-11-2011 / 19:24:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12334
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12335
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12336
_sun_misc_Unsafe_park: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12337
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12338
    <javanative: 'sun/misc/Unsafe' name: 'park(ZJ)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12339
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12340
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12341
     * Block current thread, returning when a balancing
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12342
     * <tt>unpark</tt> occurs, or a balancing <tt>unpark</tt> has
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12343
     * already occurred, or the thread is interrupted, or, if not
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12344
     * absolute and time is not zero, the given time nanoseconds have
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12345
     * elapsed, or if absolute, the given deadline in milliseconds
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12346
     * since Epoch has passed, or spuriously (i.e., returning for no
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12347
     * 'reason'). Note: This operation is in the Unsafe class only
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12348
     * because <tt>unpark</tt> is, so it would be strange to place it
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12349
     * elsewhere.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12350
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12351
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12352
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12353
    | absolute millis tout process |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12354
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12355
    absolute := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12356
    millis := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12357
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12358
    millis ~~ 0 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12359
        absolute == 1 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12360
            tout := millis - OperatingSystem getOSTime.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12361
            tout < 1 ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12362
                tout := nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12363
            ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12364
        ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12365
            tout := millis.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12366
        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12367
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12368
        tout := nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12369
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12370
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12371
    process := Processor activeProcess.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12372
    self park: process timeout: tout.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12373
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12374
    "Modified: / 16-08-2012 / 21:52:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12375
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12376
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12377
_sun_misc_Unsafe_putBoolean: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12378
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12379
    <javanative: 'sun/misc/Unsafe' name: 'putBoolean(Ljava/lang/Object;JZ)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12380
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12381
    "Like putInt:, see _sun_misc_Unsafe_putInt:"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12382
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12383
    | o offset x |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12384
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12385
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12386
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12387
    x := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12388
    ^o instVarAt: offset put: x.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12389
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12390
    "Modified: / 27-10-2011 / 16:23:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12391
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12392
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12393
_sun_misc_Unsafe_putByte: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12394
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12395
    <javanative: 'sun/misc/Unsafe' name: 'putByte(Ljava/lang/Object;JB)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12396
    <javanative: 'sun/misc/Unsafe' name: 'putByte(JB)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12397
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12398
    | o offset x |
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12399
    o := a1.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12400
    offset := a2.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12401
    x := a4.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12402
    ^o instVarAt: offset put: x.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12403
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12404
    "Modified: / 30-01-2013 / 13:57:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12405
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12406
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12407
_sun_misc_Unsafe_putChar: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12408
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12409
    <javanative: 'sun/misc/Unsafe' name: 'putChar(Ljava/lang/Object;JC)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12410
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12411
    | o offset x |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12412
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12413
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12414
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12415
    x := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12416
    ^o instVarAt: offset put: x.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12417
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12418
    "Modified: / 22-11-2011 / 14:52:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12419
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12420
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12421
_sun_misc_Unsafe_putDouble: this _:a1 _: a2 _: a3 _: a4 _: a5 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12422
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12423
    <javanative: 'sun/misc/Unsafe' name: 'putDouble(Ljava/lang/Object;JD)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12424
    <javanative: 'sun/misc/Unsafe' name: 'putDouble(JD)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12425
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12426
    | o offset x |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12427
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12428
    o := a1.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12429
    offset := a2.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12430
    x := a4.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12431
    o instVarAt: offset put: x.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12432
    ^nil
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12433
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12434
    "Modified: / 30-01-2013 / 13:57:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12435
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12436
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12437
_sun_misc_Unsafe_putFloat: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12438
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12439
    <javanative: 'sun/misc/Unsafe' name: 'putFloat(Ljava/lang/Object;JF)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12440
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12441
    | o offset x |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12442
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12443
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12444
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12445
    x := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12446
    ^o instVarAt: offset put: x.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12447
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12448
    "Modified: / 22-11-2011 / 14:53:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12449
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12450
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12451
_sun_misc_Unsafe_putInt: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12452
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12453
    <javanative: 'sun/misc/Unsafe' name: 'putInt(Ljava/lang/Object;JI)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12454
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12455
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12456
     * Stores a value into a given Java variable.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12457
     * <p>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12458
     * The first two parameters are interpreted exactly as with
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12459
     * {@link #getInt(Object, long)} to refer to a specific
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12460
     * Java variable (field or array element).  The given value
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12461
     * is stored into that variable.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12462
     * <p>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12463
     * The variable must be of the same type as the method
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12464
     * parameter <code>x</code>.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12465
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12466
     * @param o Java heap object in which the variable resides, if any, else
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12467
     *        null
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12468
     * @param offset indication of where the variable resides in a Java heap
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12469
     *        object, if any, else a memory address locating the variable
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12470
     *        statically
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12471
     * @param x the value to store into the indicated Java variable
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12472
     * @throws RuntimeException No defined exceptions are thrown, not even
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12473
     *         {@link NullPointerException}
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12474
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12475
    public native void putInt(Object o, long offset, int x);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12476
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12477
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12478
    | o offset x |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12479
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12480
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12481
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12482
    x := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12483
    ^o instVarAt: offset put: x.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12484
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12485
    "Modified: / 30-08-2011 / 15:48:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12486
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12487
2011
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12488
_sun_misc_Unsafe_putLong: this _:a1 _: a2 _: a3 _: a4 
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12489
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12490
    <javanative: 'sun/misc/Unsafe' name: 'putLong(JJ)V'>
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12491
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12492
    | o x |
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12493
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12494
    "putDouble(JD)V"
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12495
    o := a1.
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12496
    x := a3.
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12497
    SimulatedNativeMemory sint64At: o put: x.
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12498
    ^nil
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12499
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12500
    "Modified: / 20-01-2013 / 20:53:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12501
!
d23c9902d6a6 Moved helpers for unported AWT methods to category 'helpers - awt - UNPORTED'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2010
diff changeset
 12502
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12503
_sun_misc_Unsafe_putLong: this _:a1 _: a2 _: a3 _: a4 _: a5 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12504
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12505
    <javanative: 'sun/misc/Unsafe' name: 'putDouble(Ljava/lang/Object;JJ)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12506
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12507
    | o offset x |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12508
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12509
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12510
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12511
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12512
    x := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12513
    o instVarAt: offset put: x.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12514
    ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12515
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12516
    "Created: / 07-12-2010 / 23:50:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12517
    "Modified: / 20-01-2013 / 20:53:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12518
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12519
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12520
_sun_misc_Unsafe_putObject: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12521
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12522
    <javanative: 'sun/misc/Unsafe' name: 'putObject(Ljava/lang/Object;JLjava/lang/Object;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12523
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12524
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12525
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12526
     * Stores a reference value into a given Java variable.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12527
     * <p>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12528
     * Unless the reference <code>x</code> being stored is either null
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12529
     * or matches the field type, the results are undefined.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12530
     * If the reference <code>o</code> is non-null, car marks or
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12531
     * other store barriers for that object (if the VM requires them)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12532
     * are updated.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12533
     * @see #putInt(Object, int, int)
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12534
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12535
     public native void putObject(Object o, long offset, Object x);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12536
     "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12537
    | o offset x |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12538
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12539
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12540
    x := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12541
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12542
    ^o isArray ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12543
        o at: offset put: x
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12544
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12545
        o instVarAt: offset put: x.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12546
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12547
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12548
    "Modified: / 03-09-2012 / 18:59:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12549
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12550
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12551
_sun_misc_Unsafe_putObjectVolatile: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12552
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12553
    <javanative: 'sun/misc/Unsafe' name: 'putObjectVolatile(Ljava/lang/Object;JLjava/lang/Object;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12554
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12555
    ^self _sun_misc_Unsafe_putObject: this _:a1 _: a2 _: a3 _: a4 
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12556
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12557
    "Modified: / 30-01-2013 / 14:16:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12558
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12559
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12560
_sun_misc_Unsafe_putOrderedObject: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12561
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12562
    <javanative: 'sun/misc/Unsafe' name: 'putOrderedObject(Ljava/lang/Object;JLjava/lang/Object;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12563
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12564
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12565
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12566
     * Version of {@link #putObjectVolatile(Object, long, Object)}
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12567
     * that does not guarantee immediate visibility of the store to
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12568
     * other threads. This method is generally only useful if the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12569
     * underlying field is a Java volatile (or if an array cell, one
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12570
     * that is otherwise only accessed using volatile accesses).
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12571
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12572
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12573
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12574
    ^ self _sun_misc_Unsafe_putObject: this _:a1 _: a2 _: a3 _: a4 
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12575
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12576
    "Modified: / 30-01-2013 / 14:16:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12577
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12578
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12579
_sun_misc_Unsafe_putShort: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12580
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12581
    <javanative: 'sun/misc/Unsafe' name: 'putShort(Ljava/lang/Object;JS)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12582
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12583
    | o offset x |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12584
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12585
    o := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12586
    offset := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12587
    x := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12588
    ^o instVarAt: offset put: x.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12589
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12590
    "Modified: / 22-11-2011 / 14:52:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12591
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12592
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12593
_sun_misc_Unsafe_registerNatives: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12594
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12595
    <javanative: 'sun/misc/Unsafe' name: 'registerNatives()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12596
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12597
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12598
     "Nothing to do, native method are bound lazily"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12599
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12600
    "Created: / 25-10-2010 / 16:14:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12601
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12602
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12603
_sun_misc_Unsafe_setMemory: this _:a1 _: a2 _: a3 _: a4 _: a5 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12604
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12605
    <javanative: 'sun/misc/Unsafe' name: 'setMemory(JJB)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12606
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12607
    | address bytes value|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12608
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12609
    address := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12610
    bytes := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12611
    value := a5.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12612
    SimulatedNativeMemory memset: address value: value length: bytes.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12613
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12614
    "Modified (format): / 11-07-2012 / 10:29:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12615
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12616
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12617
_sun_misc_Unsafe_staticFieldBase: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12618
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12619
    <javanative: 'sun/misc/Unsafe' name: 'staticFieldBase(Ljava/lang/reflect/Field;)Ljava/lang/Object;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12620
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12621
      /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12622
      * Report the location of a given static field, in conjunction with {@link
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12623
      * #staticFieldOffset}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12624
      * <p>Fetch the base 'Object', if any, with which static fields of the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12625
      * given class can be accessed via methods like {@link #getInt(Object,
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12626
      * long)}.  This value may be null.  This value may refer to an object
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12627
      * which is a 'cookie', not guaranteed to be a real Object, and it should
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12628
      * not be used in any way except as argument to the get and put routines in
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12629
      * this class.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12630
      */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12631
      public native Object staticFieldBase(Field f);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12632
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12633
     | javaFieldObject javaClassObject |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12634
     javaFieldObject := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12635
     javaClassObject := javaFieldObject instVarNamed: #clazz.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12636
     ^Reflection classForJavaClassObject:javaClassObject.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12637
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12638
    "Modified: / 17-08-2011 / 09:42:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12639
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12640
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12641
_sun_misc_Unsafe_staticFieldOffset: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12642
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12643
    <javanative: 'sun/misc/Unsafe' name: 'staticFieldOffset(Ljava/lang/reflect/Field;)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12644
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12645
    | javaFieldObject |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12646
    javaFieldObject := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12647
    ^javaFieldObject instVarNamed: #slot
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12648
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12649
    "Modified: / 17-08-2011 / 09:12:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12650
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12651
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12652
_sun_misc_Unsafe_unpark: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12653
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12654
    <javanative: 'sun/misc/Unsafe' name: 'unpark(Ljava/lang/Object;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12655
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12656
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12657
     * Unblock the given thread blocked on <tt>park</tt>, or, if it is
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12658
     * not blocked, cause the subsequent call to <tt>park</tt> not to
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12659
     * block.  Note: this operation is 'unsafe' solely because the
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12660
     * caller must somehow ensure that the thread has not been
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12661
     * destroyed. Nothing special is usually required to ensure this
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12662
     * when called from Java (in which there will ordinarily be a live
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12663
     * reference to the thread) but this is not nearly-automatically
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12664
     * so when calling from native code.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12665
     * @param thread the thread to unpark.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12666
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12667
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12668
    public native void unpark(Object thread);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12669
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12670
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12671
    | thread process |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12672
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12673
    thread := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12674
    process := Java threads at: thread ifAbsent:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12675
        self error: 'No process for given thread'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12676
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12677
    JavaVM unpark: process.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12678
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12679
    "Modified: / 16-01-2013 / 19:54:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12680
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12681
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12682
_sun_misc_VM_initialize: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12683
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12684
    <javanative: 'sun/misc/VM' name: 'initialize()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12685
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12686
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12687
    "Nothing to do"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12688
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12689
    "Created: / 26-11-2010 / 18:43:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12690
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12691
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12692
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - sun.nio.ch'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12693
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12694
_sun_nio_ch_FileChannelImpl_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12695
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12696
    <javanative: 'sun/nio/ch/FileChannelImpl' name: 'initIDs()J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12697
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12698
    ^ 4096 "/page size, see
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12699
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12700
    "Modified: / 10-07-2012 / 01:08:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12701
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12702
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12703
_sun_nio_ch_FileChannelImpl_map0: this _:a1 _: a2 _: a3 _: a4 _: a5 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12704
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12705
    <javanative: 'sun/nio/ch/FileChannelImpl' name: 'map0(IJJ)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12706
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12707
    ^ JavaVM unimplementedNativeMethodSignal raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12708
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12709
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12710
_sun_nio_ch_FileChannelImpl_position0: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12711
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12712
    <javanative: 'sun/nio/ch/FileChannelImpl' name: 'position0(Ljava/io/FileDescriptor;J)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12713
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12714
    | fd position stream |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12715
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12716
    fd := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12717
    position := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12718
    stream := self validateFileDescriptor: fd.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12719
    stream isFileStream ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12720
        JavaVM throwIOExceptionWithMessage:'Not a file stream'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12721
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12722
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12723
    ^position = -1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12724
        ifTrue:[stream position0Based]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12725
        ifFalse:[stream position0Based: position. 0].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12726
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12727
    "Modified: / 10-07-2012 / 01:30:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12728
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12729
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12730
_sun_nio_ch_FileChannelImpl_size0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12731
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12732
    <javanative: 'sun/nio/ch/FileChannelImpl' name: 'size0(Ljava/io/FileDescriptor;)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12733
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12734
    | fd stream |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12735
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12736
    fd := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12737
    stream := self validateFileDescriptor: fd.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12738
    stream isFileStream ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12739
        JavaVM throwIOExceptionWithMessage:'Not a file stream'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12740
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12741
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12742
    ^stream fileSize max: stream position0Based.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12743
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12744
    "Modified: / 10-07-2012 / 01:28:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12745
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12746
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12747
_sun_nio_ch_FileChannelImpl_truncate0: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12748
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12749
    <javanative: 'sun/nio/ch/FileChannelImpl' name: 'truncate0(Ljava/io/FileDescriptor;J)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12750
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12751
    | fd size stream |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12752
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12753
    fd := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12754
    size := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12755
    stream := self validateFileDescriptor: fd.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12756
    stream isFileStream ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12757
        JavaVM throwIOExceptionWithMessage:'Not a file stream'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12758
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12759
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12760
    stream truncateTo: size.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12761
    ^0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12762
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12763
    "Modified: / 10-07-2012 / 01:02:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12764
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12765
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12766
_sun_nio_ch_FileDispatcher_init: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12767
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12768
    <javanative: 'sun/nio/ch/FileDispatcher' name: 'init()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12769
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12770
    ^ JavaNioSupport _sun_nio_ch_FileDispatcher_init
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12771
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12772
    "Modified: / 06-07-2012 / 22:35:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12773
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12774
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12775
_sun_nio_ch_FileDispatcher_preClose0: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12776
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12777
    <javanative: 'sun/nio/ch/FileDispatcher' name: 'preClose0(Ljava/io/FileDescriptor;)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12778
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12779
    "Nothing to do here"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12780
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12781
    "Modified: / 10-07-2012 / 00:47:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12782
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12783
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12784
_sun_nio_ch_FileDispatcher_read0: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12785
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12786
    <javanative: 'sun/nio/ch/FileDispatcher' name: 'read0(Ljava/io/FileDescriptor;JI)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12787
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12788
    | fd address len stream read |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12789
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12790
    fd := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12791
    address := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12792
    len := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12793
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12794
    stream := self validateFileDescriptor: fd.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12795
    stream atEnd ifTrue:[ ^ -1 ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12796
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12797
        self shouldImplement
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12798
        "/WAS: read := stream nextBytes:len into:SimulatedNativeMemory memory startingAt: address
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12799
    ] on: Error do:[:ex|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12800
        JavaVM throwIOExceptionWithMessage:ex description.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12801
        ^0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12802
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12803
    ^read
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12804
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12805
    "Modified (comment): / 11-07-2012 / 10:38:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12806
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12807
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12808
_sun_nio_ch_FileDispatcher_write0: this _:a1 _: a2 _: a3 _: a4 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12809
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12810
    <javanative: 'sun/nio/ch/FileDispatcher' name: 'write0(Ljava/io/FileDescriptor;JI)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12811
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12812
    | fd address len stream writtem |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12813
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12814
    fd := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12815
    address := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12816
    len := a4.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12817
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12818
    stream := self validateFileDescriptor: fd.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12819
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12820
        self shouldImplement.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12821
        "/WAS: writtem := stream nextPutBytes:len from:SimulatedNativeMemory memory startingAt: address
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12822
    ] on: Error do:[:ex|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12823
        JavaVM throwIOExceptionWithMessage:ex description.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12824
        ^0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12825
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12826
    ^writtem
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12827
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12828
    "Modified: / 11-07-2012 / 10:38:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12829
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12830
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12831
_sun_nio_ch_IOUtil_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12832
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12833
    <javanative: 'sun/nio/ch/IOUtil' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12834
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12835
    "Nothing to do here"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12836
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12837
    "Modified: / 06-07-2012 / 22:10:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12838
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12839
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12840
_sun_nio_ch_IOUtil_initPipe: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12841
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12842
    <javanative: 'sun/nio/ch/IOUtil' name: 'initPipe([IZ)V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12843
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12844
    ^ JavaVM unimplementedNativeMethodSignal raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12845
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12846
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12847
_sun_nio_ch_NativeThread_current: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12848
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12849
    <javanative: 'sun/nio/ch/NativeThread' name: 'current()J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12850
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12851
    ^ JavaNioSupport _sun_nio_ch_NativeThread_current
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12852
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12853
    "Modified: / 06-07-2012 / 22:39:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12854
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12855
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12856
_sun_nio_ch_NativeThread_init: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12857
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12858
    <javanative: 'sun/nio/ch/NativeThread' name: 'init()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12859
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12860
    ^ JavaNioSupport _sun_nio_ch_NativeThread_init
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12861
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12862
    "Modified: / 06-07-2012 / 22:38:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12863
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12864
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12865
_sun_nio_ch_Net_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12866
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12867
    <javanative: 'sun/nio/ch/Net' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12868
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12869
    "Nothing to do here"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12870
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12871
    "Modified: / 10-05-2012 / 17:00:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12872
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12873
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12874
_sun_nio_ch_Net_socket0: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12875
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12876
    <javanative: 'sun/nio/ch/Net' name: 'socket0(ZZ)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12877
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12878
    ^ JavaVM unimplementedNativeMethodSignal raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12879
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12880
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12881
_sun_nio_ch_ServerSocketChannelImpl_initIDs: this 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12882
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12883
    <javanative: 'sun/nio/ch/ServerSocketChannelImpl' name: 'initIDs()V'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12884
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12885
    "Nothing to do here"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12886
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12887
    "Modified: / 10-05-2012 / 16:58:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12888
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12889
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12890
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - sun.reflect'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12891
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12892
_sun_reflect_ConstantPool_getDoubleAt0: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12893
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12894
    <javanative: 'sun/reflect/ConstantPool' name: 'getDoubleAt0(Ljava/lang/Object;I)D'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12895
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12896
        | cpool  index  double |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12897
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12898
    cpool := Reflection constantPoolFor:this.
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12899
    index := a2.
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12900
    double := cpool at:index.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12901
    self assert:double isFloat description:'Not a float constant!!'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12902
    ^ double
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12903
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12904
    "Created: / 28-02-2011 / 17:24:17 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12905
    "Modified: / 02-11-2011 / 11:24:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12906
    "Modified: / 30-01-2013 / 13:58:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12907
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12908
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12909
_sun_reflect_ConstantPool_getIntAt0: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12910
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12911
    <javanative: 'sun/reflect/ConstantPool' name: 'getIntAt0(Ljava/lang/Object;I)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12912
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12913
        | cpool  index  int |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12914
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12915
    cpool := Reflection constantPoolFor:this.
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12916
    index := a2.
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12917
    int := cpool at:index.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12918
    self assert:int isInteger description:'Not an integer constant!!'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12919
    ^ int
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12920
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12921
    "Created: / 28-02-2011 / 17:28:10 / Marcel Hlopko <hlopik@gmail.com>"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12922
    "Modified: / 30-01-2013 / 13:58:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12923
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12924
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12925
_sun_reflect_ConstantPool_getLongAt0: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12926
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12927
    <javanative: 'sun/reflect/ConstantPool' name: 'getLongAt0(Ljava/lang/Object;I)J'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12928
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12929
        | cpool  index  long |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12930
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12931
    cpool := Reflection constantPoolFor:this.
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12932
    index := a2.
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12933
    long := cpool at:index.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12934
    self assert:long isInteger description:'Not a float constant!!'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12935
    ^ long
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12936
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12937
    "Modified: / 28-02-2011 / 17:40:02 / Marcel Hlopko <hlopik@gmail.com>"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12938
    "Modified: / 30-01-2013 / 13:59:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12939
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12940
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12941
_sun_reflect_ConstantPool_getUTF8At0: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12942
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12943
    <javanative: 'sun/reflect/ConstantPool' name: 'getUTF8At0(Ljava/lang/Object;I)Ljava/lang/String;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12944
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12945
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12946
    | cpool index string |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12947
    cpool := Reflection constantPoolFor: this.
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12948
    index := a2.
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12949
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12950
    string := cpool at: index.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12951
    self assert: string isString description: 'Not an UTF8 constant!!'.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12952
    ^Java as_String: string
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12953
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12954
    "Created: / 06-02-2011 / 12:56:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12955
    "Modified: / 30-01-2013 / 13:59:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12956
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12957
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12958
_sun_reflect_NativeConstructorAccessorImpl_newInstance0: this _:a1 _: a2 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12959
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12960
    <javanative: 'sun/reflect/NativeConstructorAccessorImpl' name: 'newInstance0(Ljava/lang/reflect/Constructor;[Ljava/lang/Object;)Ljava/lang/Object;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12961
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12962
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12963
    | ctor args method instance class |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12964
    ctor := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12965
    args := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12966
    class := Reflection classForJavaConstructorObject: ctor.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12967
    method := Reflection methodForJavaConstructorObject: ctor.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12968
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12969
    instance := class new.
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12970
    self invoke: ctor receiver: instance arguments: args context: self nativeContext constructor: true.
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12971
    ^instance
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12972
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12973
    "Created: / 26-11-2010 / 11:41:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12974
    "Modified: / 09-02-2011 / 01:12:10 / Marcel Hlopko <hlopik@gmail.com>"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12975
    "Modified: / 30-01-2013 / 14:16:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12976
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12977
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12978
_sun_reflect_NativeMethodAccessorImpl_invoke0: this _:a1 _: a2 _: a3 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12979
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12980
    <javanative: 'sun/reflect/NativeMethodAccessorImpl' name: 'invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12981
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12982
    private static native Object invoke0(Method m, Object obj, Object[] args);
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12983
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12984
    | m obj args method |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12985
    m := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12986
    obj := a2.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12987
    args := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12988
    method := Reflection methodForJavaMethodObject: m.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12989
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12990
    ^ self invoke: m receiver: obj arguments: args context: self nativeContext constructor: false.
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12991
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12992
    "Created: / 06-02-2011 / 00:00:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12993
    "Modified: / 28-02-2011 / 16:57:31 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12994
    "Modified: / 19-08-2011 / 15:06:00 / cg"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12995
    "Modified: / 30-01-2013 / 14:16:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12996
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12997
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 12998
_sun_reflect_Reflection_getCallerClass: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12999
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13000
    <javanative: 'sun/reflect/Reflection' name: 'getCallerClass(I)Ljava/lang/Class;'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13001
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13002
    /** Returns the class of the method <code>realFramesToSkip</code>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13003
        frames up the stack (zero-based), ignoring frames associated
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13004
        with java.lang.reflect.Method.invoke() and its implementation.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13005
        The first frame is that associated with this method, so
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13006
        <code>getCallerClass(0)</code> returns the Class object for
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13007
        sun.reflect.Reflection. Frames associated with
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13008
        java.lang.reflect.Method.invoke() and its implementation are
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13009
        completely ignored and do not count toward the number of 'real'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13010
        frames skipped. */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13011
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13012
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13013
    | framesToSkip framesSkipped frame cls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13014
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13015
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13016
    framesToSkip := a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13017
    framesSkipped := 0.
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 13018
    frame := self nativeContext.
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13019
    [ framesSkipped == framesToSkip ] whileFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13020
        frame := frame sender.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13021
        "Frames for java,lang.reflect.Method.invoke() does not count, sigh.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13022
         What a crappy implementation"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13023
        (frame selector == #'invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;'
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13024
            and:[ frame receiver class name = #'java/lang/reflect/Method']) ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13025
                framesSkipped := framesSkipped + 1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13026
            ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13027
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13028
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13029
    "Returns the __class of the method__, not !!!!!! the class of method's receiver !!!!!!"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13030
    "                  |                                                            "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13031
    "                  V                                                            "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13032
    cls := frame method mclass theNonMetaclass.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13033
    ^cls isJavaClass
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13034
        ifTrue:[JavaVM javaClassObjectForClass:cls]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13035
        ifFalse:[nil]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13036
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13037
    "Created: / 25-10-2010 / 16:32:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 13038
    "Modified: / 30-01-2013 / 14:12:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13039
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13040
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 13041
_sun_reflect_Reflection_getClassAccessFlags: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13042
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13043
    <javanative: 'sun/reflect/Reflection' name: 'getClassAccessFlags(Ljava/lang/Class;)I'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13044
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13045
        |class|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13046
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13047
    class := Reflection classForJavaClassObject:a1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13048
    ^(class isJavaPrimitiveType or:[class isJavaArrayClass]) ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13049
        1041"FIXME: make it symbolic"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13050
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13051
        class accessFlags
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13052
    ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13053
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13054
    "Created: / 26-11-2010 / 10:20:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13055
    "Modified: / 28-01-2011 / 15:19:28 / Marcel Hlopko <hlopik@gmail.com>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13056
    "Modified: / 01-09-2011 / 09:46:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13057
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13058
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13059
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - sun.security.provider'!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13060
2010
9bacff8c53de The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2009
diff changeset
 13061
_sun_security_provider_NativeSeedGenerator_nativeGenerateSeed: this _:a1 
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13062
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13063
    <javanative: 'sun/security/provider/NativeSeedGenerator' name: 'nativeGenerateSeed([B)Z'>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13064
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13065
    ^ JavaVM unimplementedNativeMethodSignal raise
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13066
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13067
1969
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
 13068
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'documentation'!
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
 13069
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
 13070
version_HG
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
 13071
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
 13072
    ^ '$Changeset: <not expanded> $'
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
 13073
! !
1982
8138440bc4ab Ensure that all native methods are properly annotated.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1981
diff changeset
 13074