JavaNativeMethodImpl_OpenJDK6.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 30 Jan 2013 14:24:21 +0000
branchrefactoring-vmdata
changeset 2009 d904ed10c6b7
parent 1994 ad1a490462ed
child 2010 9bacff8c53de
permissions -rw-r--r--
Make rest of native methods not using nativeContext parameter.
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
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
    95
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'helpers - awt'!
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:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   341
	O_FramePeer_pNativeWidget := (jPeer class instVarOffsetOf:'pNativeWidget').
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   342
	O_FramePeer_pNativeWidget isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   343
	    O_FramePeer_pNativeWidget := 0.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   344
	    O_FramePeer_pData isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   345
		O_FramePeer_pData := (jPeer class instVarOffsetOf:'pData').
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   346
	    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   347
	]
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:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   350
	"/ ok, we are < 1.2
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   351
	^ jPeer instVarAt:O_FramePeer_pNativeWidget.
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
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   381
anyStream_close: nativeContext
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   382
    |jStream fileNo file|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   383
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   384
    jStream := nativeContext receiver.
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
    file := self validateFile:jStream.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   387
    file == Stdin ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   388
        file := StdinReplacementFileQuerySignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   389
        file isNil ifTrue:[
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   390
            file := Stdin
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   391
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   392
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   393
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   394
    "/ should always be bytes
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   395
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   396
    (file ~~ Stdin
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   397
    and:[file ~~ Stdout
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   398
    and:[file ~~ Stderr
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   399
    and:[file ~~ Transcript]]]) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   400
        file close.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   401
    ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   402
        self breakPoint: #jv.
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
    self setOpenFile:nil at:fileNo.
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
    fileNo := jStream instVarNamed:'fd'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   407
    fileNo isInteger ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   408
        "/ JDK 1.1.3
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   409
        fileNo instVarNamed:'fd' put:0.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   410
    ] ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   411
        "/ JDK 1.0
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   412
        jStream instVarNamed:'fd' put:0
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
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   415
    "Created: / 04-02-1998 / 15:22:03 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   416
    "Modified: / 14-10-1998 / 15:10:07 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   417
    "Modified: / 28-07-2012 / 02:45:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   418
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   419
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   420
anyStream_readBytes: nativeContext
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   421
    |bytes offset count stream nRead|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   422
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   423
    bytes := nativeContext argAt:1.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   424
    offset := nativeContext argAt:2.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   425
    count := nativeContext argAt:3.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   426
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   427
    stream := self validateFile:(nativeContext receiver).
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   428
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   429
    "/ should always be bytes
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   430
    bytes class isBytes ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   431
        self halt.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   432
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   433
    stream == Stdin ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   434
        stream := StdinReplacementFileQuerySignal raiseRequest.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   435
        stream isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   436
            ^ -1 "/ 0  EOF
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   437
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   438
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   439
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   440
    FileIOTrace ifTrue:[
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   441
        ('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
   442
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   443
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   444
    stream isPositionable ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   445
        "/ mhmh - some kind of socket or pipe
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
        stream readWait.
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
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   450
    count == 0 ifTrue:[^0].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   451
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   452
    Stream readErrorSignal handle:[:ex |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   453
        nRead := -1
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   454
    ] do:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   455
        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
   456
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   457
    nRead == 0 ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   458
        stream atEnd ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   459
            FileIOTrace ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   460
                ('JAVA: at EOF ' , nRead printString) infoPrintCR.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   461
            ].
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   462
            ^ -1
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   463
        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   464
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   465
    count ~~ nRead ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   466
        FileIOTrace ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   467
            ('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
   468
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   469
    ].
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   470
    ^ nRead
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   471
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   472
    "Created: / 04-02-1998 / 15:20:00 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   473
    "Modified: / 10-11-1998 / 19:56:47 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   474
    "Modified: / 10-08-2011 / 21:35:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   475
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   476
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   477
anyStream_writeBytes: nativeContext
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   478
    |bytes offset count stream|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   479
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   480
    bytes := nativeContext argAt:1.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   481
    offset := nativeContext argAt:2.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   482
    count := nativeContext argAt:3.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   483
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   484
    stream := self validateFile:(nativeContext receiver).
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   485
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   486
    FileIOTrace ifTrue:[
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   487
        stream isFileStream ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   488
            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
   489
        ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   490
            stream ~~ Stdout ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   491
                stream ~~ Stderr ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   492
                    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
   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
        ]
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
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   498
    "/ should always be bytes
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   499
    Stream writeErrorSignal handle:[:ex |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   500
        ex return
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   501
    ] do:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   502
        Socket brokenConnectionSignal handle:[:ex |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   503
            ex return
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   504
        ] do:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   505
            stream isBinary ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   506
                stream nextPutBytes:count from:bytes startingAt:offset+1
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   507
            ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   508
                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
   509
            ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   510
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   511
        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   512
        stream == Transcript ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   513
            Transcript endEntry
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   514
        ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   515
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   516
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   517
    "Created: / 04-02-1998 / 15:23:58 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   518
    "Modified: / 16-02-1999 / 11:32:45 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   519
    "Modified: / 14-09-2011 / 22:05:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   520
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   521
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   522
checkWritePermissionOfDirectory:dir message:msg
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   523
    |answer|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   524
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   525
    (PermittedDirectories notNil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   526
    and:[PermittedDirectories includes:dir]) ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   527
	FileOpenConfirmation ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   528
	    answer := Dialog
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   529
		    confirmWithCancel:msg withCRs
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   530
			       labels:#('no' 'grant')
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   531
			       values:#(false true)
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   532
			      default:2.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   533
	    answer == false ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   534
		^ false
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   535
	    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   536
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   537
	    (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
   538
	    ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   539
		PermittedDirectories isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   540
		    PermittedDirectories := Set new
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   541
		].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   542
		PermittedDirectories add:dir.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   543
	    ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   544
	]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   545
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   546
    ^ true
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   547
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   548
    "Created: / 3.12.1998 / 15:07:56 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   549
    "Modified: / 3.12.1998 / 15:16:55 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   550
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   551
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   552
commonClose: nativeContext
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   553
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   554
    | fdobj fd stream |
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   555
    fdobj := (nativeContext receiver instVarNamed: #fd).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   556
    fd    := fdobj instVarNamed: #fd.
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   557
    fd == -1 ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   558
        "Never opened or already closed"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   559
        ^self.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   560
    ].
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   561
    stream := self getOpenFileAt:fd.
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   562
    stream notNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   563
        stream isView ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   564
            "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
   565
             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
   566
            stream ~~ Transcript ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   567
                self breakPoint: #jv.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   568
            ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   569
        ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   570
            (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
   571
                stream close.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   572
            ]
1991
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
    ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   575
        self breakPoint: #jv.
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
    self setOpenFile: nil at: fd.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   578
    fdobj instVarNamed:#fd put: -1.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   579
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   580
    "Created: / 10-08-2011 / 14:02:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   581
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   582
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   583
commonOpen: nativeContext forAppend:forAppend
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   584
    |fs fd fn nm dir stream fileNo readonly|
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   585
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   586
    fs := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   587
    fd := fs instVarNamed:'fd'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   588
    (fd instVarNamed:'fd') ~~ -1 ifTrue:[
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   589
        "/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
   590
        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
   591
        ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   592
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   593
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   594
    nm := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   595
    nm := Java as_ST_String:nm.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   596
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   597
    FileOpenTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   598
        ('JAVA: opening ' , nm) infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   599
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   600
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   601
    fn := nm utf8Decoded asFilename.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   602
    dir := fn directory pathName.
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
    readonly := false.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   605
"/    (PermittedDirectories notNil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   606
"/    and:[PermittedDirectories includes:dir]) ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   607
"/        FileOpenConfirmation ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   608
"/            answer := Dialog
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   609
"/                    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
   610
"/                               labels:#('no' 'grant' 'readonly')
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   611
"/                               values:#(false true #readonly)
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   612
"/                              default:3.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   613
"/            answer == false ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   614
"/                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
   615
"/                ^ self
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   616
"/            ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   617
"/            readonly := (answer == #readonly).
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
"/            readonly ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   620
"/                (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
   621
"/                ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   622
"/                    PermittedDirectories isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   623
"/                        PermittedDirectories := Set new
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   624
"/                    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   625
"/                    PermittedDirectories add:dir.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   626
"/                ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   627
"/            ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   628
"/        ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   629
"/    ].
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   630
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   631
    readonly ifTrue:[
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   632
        (fn exists and:[fn isReadable not]) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   633
            ^self throwFileNotFoundException: 'File is not readable'
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   634
        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   635
        stream := fn readStream.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   636
    ] ifFalse:[
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   637
"/        fn exists ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   638
"/            ^self throwFileNotFoundException: 'File does not exist'
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   639
"/        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   640
        fn isDirectory ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   641
             ^self throwFileNotFoundException: 'File is directory'
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
        (fn exists and:[fn isWritable not]) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   644
            ^self throwFileNotFoundException: 'File does not writable'
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   645
        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   646
        forAppend ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   647
            stream := self commonOpenStreamUsing:[fn appendingWriteStream].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   648
        ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   649
            stream := self commonOpenStreamUsing:[fn writeStream].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   650
        ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   651
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   652
    stream isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   653
        JavaVM throwIOExceptionWithMessage:('cannot open ' , nm , ' for writing').
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
    stream binary.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   656
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   657
    fileNo := self addOpenFile:stream.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   658
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   659
    FileOpenTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   660
        ('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
   661
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   662
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   663
    fd instVarNamed:'fd' put:fileNo.
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   664
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   665
    "Kludge for finalization..."
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   666
    fs finalizationLobby registerChange: fs
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   667
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   668
    "Created: / 07-04-1998 / 19:14:09 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   669
    "Modified: / 04-01-1999 / 14:34:42 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   670
    "Modified: / 12-12-2012 / 23:43:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
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
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   673
commonOpenStreamUsing: aBlock
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   674
    "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
   675
     and tries to GC to cleanup if necessary"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   676
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   677
    | stream retry |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   678
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   679
    retry := false.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   680
    [ stream := aBlock value ] on:OpenError do:[:ex|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   681
        (ex errorCode) == (OperatingSystem errorNumberFor:#EMFILE) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   682
            "Worst case, try to cleanup"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   683
            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
   684
            [
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   685
                FinalizationLobby finalizeNow.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   686
                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
   687
                ObjectMemory garbageCollect.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   688
                retry := true.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   689
                JavaVM performance printOpenExternalStreamsOn: Stderr.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   690
            ] on: Error do:[:ex|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   691
                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
   692
            ].
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   693
        ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   694
            ex pass.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   695
        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   696
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   697
    retry ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   698
        stream := aBlock value.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   699
        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
   700
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   701
    ^stream
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   702
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   703
    "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
   704
    "Modified: / 14-08-2012 / 02:25:06 / jv"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   705
    "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
   706
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   707
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   708
fileStreamForReading:name
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   709
    |fn stream tryAlongClassPath|
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
    FileOpenTrace ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   712
        ('JAVA: opening for read:' , name) infoPrintCR.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   713
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   714
    fn := name asFilename.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   715
    fn exists  ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   716
        ^self throwFileNotFoundException: 'File does not exists'
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
    fn isDirectory ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   719
        ^self throwFileNotFoundException: 'File is directory'
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   720
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   721
    fn isReadable  ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   722
        ^self throwFileNotFoundException: 'File is not readable'
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   723
    ].
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
    stream := self commonOpenStreamUsing:[fn readStream].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   726
    stream notNil ifTrue:[^ stream].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   727
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   728
    fn isAbsolute ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   729
        "/ if not absolute, try along classPath
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   730
        "/ This allows classes to open local files (JEdit)
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   731
        "/ 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
   732
        "/ Only do this for image files
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   733
        "/ (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
   734
        "/ to avoid security holes.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   735
        tryAlongClassPath := true.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   736
"/        tryAlongClassPath := false.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   737
"/        (fn hasSuffix:'gif') ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   738
"/            tryAlongClassPath := true.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   739
"/        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   740
"/        (fn hasSuffix:'jpg') ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   741
"/            tryAlongClassPath := true.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   742
"/        ].
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
        tryAlongClassPath ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   745
            Java effectiveClassPath do:[:dirName |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   746
                |fn|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   747
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   748
                (fn := dirName asFilename construct:name) exists ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   749
                    fn isReadable ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   750
                        self throwFileNotFoundException: 'File is not readable'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   751
                        ^nil
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
                    stream := fn readStream.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   754
                    stream notNil ifTrue:[^ stream].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   755
                ]
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   756
            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   757
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   758
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   759
    ^ nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   760
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   761
    "Modified: / 27-01-1999 / 18:54:46 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   762
    "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
   763
!
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
fixFilename:path
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   766
    OperatingSystem isMSDOSlike ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   767
	(#($/ $\) includes:(path at:1)) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   768
	    (path at:3) == $: ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   769
		^ path copyFrom:2
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   770
	    ]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   771
	]
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   772
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   773
    ^ path
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   774
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   775
    "Created: / 20.10.1998 / 20:58:45 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   776
    "Modified: / 20.10.1998 / 21:06:49 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   777
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   778
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   779
getOpenFileAt:idx
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   780
    ^ OpenFileTable at:idx+1 ifAbsent:nil.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   781
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   782
    "Created: / 2.1.1998 / 18:28:01 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   783
    "Modified: / 2.1.1998 / 18:33:06 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   784
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   785
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   786
setOpenFile:aStream at:idx
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   787
    OpenFileTable size < (idx+1) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   788
        OpenFileTable grow:idx+1.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   789
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   790
    OpenFileTable at:idx+1 put:aStream.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   791
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   792
"/    Do not shrink OpenFileTable now, make debugging easier
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   793
"/    aStream isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   794
"/        [ OpenFileTable last isNil ] whileTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   795
"/            OpenFileTable removeLast.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   796
"/        ]
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
    "Modified: / 02-01-1998 / 18:33:21 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   800
    "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
   801
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   802
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   803
validateFile:javaStream
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   804
    |fileNo file|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   805
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   806
    fileNo := self validateFileNo:javaStream.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   807
    file := self getOpenFileAt:fileNo.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   808
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   809
    file isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   810
        JavaVM 
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   811
    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
   812
            bindWith:fileNo).
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   813
        ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   814
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   815
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   816
    ^ file
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   817
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   818
    "Created: / 04-01-1998 / 16:50:38 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   819
    "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
   820
!
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
validateFileDescriptor: jFileDescriptor
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   823
    "Validates given instance of java.io.FileDescriptor.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   824
     If it is valid, return underlying Smalltalk stream,
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   825
     otherwise, throws java.io.IOException"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   826
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   827
    | fileNo stream |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   828
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   829
    fileNo := jFileDescriptor instVarNamed:'fd'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   830
    ((fileNo == -1) and:[OperatingSystem isMSWINDOWSlike]) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   831
        fileNo := jFileDescriptor instVarNamed:'handle'.
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
    fileNo isInteger ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   834
        JavaVM throwIOExceptionWithMessage:'Invalid fd in java.io.FileDescriptor'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   835
        ^ nil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   836
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   837
    fileNo == -1 ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   838
        JavaVM throwIOExceptionWithMessage:'java.io.FileDescriptor not open'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   839
        ^ nil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   840
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   841
    stream := self getOpenFileAt:fileNo.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   842
    stream isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   843
        JavaVM 
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   844
    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
   845
        ^nil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   846
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   847
    ^ stream.
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
    "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
   850
!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   851
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   852
validateFileNo:javaStream
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   853
    |fileNo descriptor|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   854
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   855
    "/ JDK 1.1.3 has fileDescriptor wrapped
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   856
    "/ JDK 1.0 has it directly as integer
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   857
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   858
    fileNo := javaStream instVarNamed:'fd'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   859
    fileNo isInteger ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   860
        descriptor := fileNo.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   861
        descriptor notNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   862
            fileNo := descriptor instVarNamed:'fd'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   863
            ((fileNo == -1) and:[OperatingSystem isMSWINDOWSlike]) ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   864
                fileNo := descriptor instVarNamed:'handle'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   865
            ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   866
            fileNo isInteger ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   867
                JavaVM 
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   868
    throwIOExceptionWithMessage:('invalid fd value in FileDescriptor (%1 [%2])' 
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   869
            bindWith:fileNo
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   870
            with:fileNo class).
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   871
                ^self
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   872
            ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   873
            ^fileNo
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   874
        ]
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
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   877
    fileNo isInteger ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   878
"/        self halt:'invalid fileNo in read'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   879
"/        self internalError:'invalid fileNo in read'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   880
        JavaVM 
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   881
    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
   882
            bindWith:fileNo
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   883
            with:fileNo class).
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   884
        ^ nil
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
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   887
    ^ fileNo.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   888
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   889
    "Created: / 04-01-1998 / 17:49:08 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   890
    "Modified: / 13-01-1998 / 14:07:47 / cg"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   891
    "Modified: / 18-08-2011 / 20:03:37 / jv"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   892
    "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
   893
! !
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   894
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   895
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'helpers - reflection'!
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   896
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   897
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
   898
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   899
    "Common helper for invoking methods and ctors. Performs
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   900
     (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
   901
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   902
    | method parameterTypes bargs bargss retval retcls bi executionEx |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   903
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   904
    method := Reflection methodForJavaConstructorObject: jmethod.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   905
    parameterTypes := jmethod instVarNamed: #parameterTypes.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   906
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   907
    (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
   908
        JavaVM throwNullPointerException.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   909
        ^nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   910
    ].
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   911
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   912
    "Possibly box/unbox arguments"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   913
    args notEmptyOrNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   914
        bargs := Array new: (bargss := method numArgs).
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   915
        bi := 1.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   916
        1 to: args size do:[:i|
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   917
            | cls |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   918
            bi > bargss ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   919
"/                self breakPoint: #jv.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   920
                JavaVM throwIllegalArgumentException: 'passed more arguments than expected'.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   921
            ].
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
            cls := Reflection classForJavaClassObject: (parameterTypes at: i).
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   924
            cls isJavaPrimitiveType ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   925
                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
   926
"/                    self breakPoint: #jv.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   927
                    JavaVM throwIllegalArgumentException:'illegal unbox'. ^nil
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   928
                ]).
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   929
                (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
   930
            ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   931
                ((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
   932
                    self breakPoint: #jv.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   933
                    JavaVM throwIllegalArgumentException:'incomplatible argument types'. ^nil.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   934
                ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   935
                bargs at: bi put: (args at:i).
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   936
            ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   937
            bi := bi + 1.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   938
       ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   939
        bi <= bargss ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   940
"/             self breakPoint: #jv.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   941
             JavaVM throwExceptionClassName: 'java.lang.reflect.InvocationTargetException'
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   942
                              withMessage: 'not enough arguments'
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   943
        ].
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   944
    ] ifFalse:[
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   945
        bargs := #()
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   946
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   947
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   948
    "Check number of arguments"
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   949
    method numArgs ~= bargs size ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   950
        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
   951
        ^nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   952
    ].
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   953
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   954
    "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
   955
    method isStatic ifFalse:[
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   956
        method := JavaLookup instance
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   957
                    lookupMethodForSelector: method selector
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   958
                                 directedTo: obj class
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   959
                                        for: obj
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   960
                              withArguments: bargs
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   961
                                       from: context
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   962
                                        ilc: nil.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   963
        method isNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   964
            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
   965
            ^nil.
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   966
        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   967
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   968
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   969
    "Fire the method"
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   970
    [
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   971
        method isStatic ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   972
            retval := method valueWithReceiver: method javaClass arguments: bargs.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   973
        ] ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   974
            retval := method valueWithReceiver: obj arguments: bargs.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   975
        ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   976
    ] on: (JavaVM classForName:'java.lang.Throwable') do:[:ex |
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   977
        executionEx := ex.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   978
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   979
    executionEx notNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   980
        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
   981
        ^nil.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   982
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   983
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   984
    isConstructor ifFalse:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   985
        retcls := jmethod instVarNamed: #returnType.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   986
        retcls notNil ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   987
            retcls := JavaVM classForJavaClassObject: retcls.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   988
            retcls ~~ UndefinedObject ifTrue:[
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   989
                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
   990
            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   991
        ].
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   992
    ].
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   993
    ^retval.
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   994
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   995
    "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
   996
    "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
   997
! !
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
   998
1991
4969b4562cec Removed OLD natives implementation.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1990
diff changeset
   999
!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
  1000
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1001
_AccessController_beginPrivileged: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1002
    "/ introduced with jdk1.2
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1003
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1004
    "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
  1005
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1006
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1007
_AccessController_endPrivileged: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1008
    "/ introduced with jdk1.2
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1009
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1010
    "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
  1011
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1012
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1013
_AudioDevice_audioClose: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1014
    |device fd stream|
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
    device := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1017
    device notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1018
        fd := device instVarNamed:'dev'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1019
        (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
  1020
            stream := self getOpenFileAt:fd.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1021
            stream notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1022
                stream close.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1023
                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
  1024
            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1025
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1026
    ]
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
    "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
  1029
    "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
  1030
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1031
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1032
_AudioDevice_audioOpen: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1033
    |f stream fileNo|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1034
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1035
    NoAudio ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1036
        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
  1037
        ^ -1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1038
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1039
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1040
    Stream streamErrorSignal handle:[:ex |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1041
        Stream streamErrorSignal handle:[:ex |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1042
            stream := nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1043
            ex return.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1044
        ] do:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1045
            stream := SoundStream writing.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1046
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1047
    ] do:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1048
        stream := SoundStream writing.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1049
        stream notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1050
            stream setSampleRate:8000.
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
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1053
    stream isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1054
"/        ^ -1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1055
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1056
        f := '/dev/audio' asFilename.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1057
        f exists ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1058
            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
  1059
            ^ -1
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
        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
  1062
        stream isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1063
            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
  1064
            ^ -1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1065
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1066
        fileNo := self addOpenFile:stream.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1067
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1068
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1069
    fileNo := self addOpenFile:stream.
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
    FileOpenTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1072
        ('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
  1073
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1074
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1075
    ^ fileNo
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1076
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1077
    "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
  1078
    "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
  1079
    "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
  1080
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1081
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1082
_AudioDevice_audioWrite: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1083
    |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
  1084
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1085
    device := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1086
    device notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1087
        fd := device instVarNamed:'dev'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1088
        (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
  1089
            stream := self getOpenFileAt:fd.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1090
            stream notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1091
                bytes := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1092
                count := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1093
                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
  1094
            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1095
        ]
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1098
    "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
  1099
    "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
  1100
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1101
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1102
_BigInteger_plumbInit: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1103
    JavaVM unimplementedNativeMethodSignal raiseRequest
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1104
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1105
    "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
  1106
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1107
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1108
_ColorModel_deletepData: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1109
    "/ void deletepData ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1110
    JavaVM unimplementedNativeMethodSignal raiseRequest
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1111
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1112
    "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
  1113
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1114
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1115
_ColorModel_initIDs: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1116
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1117
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1118
    "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
  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
_Constructor_getModifiers: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1122
    "/ int getModifiers ()
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 / 02:54:38 / 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
_Constructor_newInstance: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1131
    "/ 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
  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
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1137
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1138
_Field_get: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1139
    "/ 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
  1140
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1141
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1142
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1143
    "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
  1144
    "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
  1145
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1146
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1147
_Field_getBoolean: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1148
    "/ 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
  1149
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1150
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1151
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1152
    "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
  1153
    "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
  1154
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1155
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1156
_Field_getByte: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1157
    "/ 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
  1158
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1159
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1160
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1161
    "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
  1162
    "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
  1163
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1164
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1165
_Field_getChar: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1166
    "/ 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
  1167
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1168
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1169
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1170
    "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
  1171
    "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
  1172
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1173
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1174
_Field_getDouble: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1175
    "/ 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
  1176
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1177
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1178
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1179
    "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
  1180
    "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
  1181
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1182
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1183
_Field_getFloat: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1184
    "/ 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
  1185
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1186
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1187
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1188
    "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
  1189
    "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
  1190
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1191
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1192
_Field_getInt: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1193
    "/ 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
  1194
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1195
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1196
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1197
    "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
  1198
    "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
  1199
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1200
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1201
_Field_getLong: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1202
    "/ 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
  1203
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1204
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1205
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1206
    "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
  1207
    "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
  1208
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1209
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1210
_Field_getModifiers: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1211
    "/ int getModifiers ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1212
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1213
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1214
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1215
    "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
  1216
    "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
  1217
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1218
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1219
_Field_getShort: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1220
    "/ 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
  1221
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1222
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1223
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1224
    "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
  1225
    "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
  1226
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1227
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1228
_Field_set: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1229
    "/ 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
  1230
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1231
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1232
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1233
    "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
  1234
    "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
  1235
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1236
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1237
_Field_setBoolean: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1238
    "/ 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
  1239
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1240
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1241
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1242
    "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
  1243
    "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
  1244
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1245
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1246
_Field_setByte: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1247
    "/ 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
  1248
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1249
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1250
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1251
    "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
  1252
    "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
  1253
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1254
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1255
_Field_setChar: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1256
    "/ 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
  1257
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1258
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1259
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1260
    "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
  1261
    "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
  1262
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1263
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1264
_Field_setDouble: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1265
    "/ 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
  1266
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1267
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1268
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1269
    "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
  1270
    "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
  1271
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1272
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1273
_Field_setFloat: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1274
    "/ 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
  1275
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1276
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1277
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1278
    "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
  1279
    "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
  1280
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1281
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1282
_Field_setInt: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1283
    "/ 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
  1284
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1285
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1286
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1287
    "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
  1288
    "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
  1289
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1290
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1291
_Field_setLong: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1292
    "/ 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
  1293
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1294
JavaVM unimplementedNativeMethodSignal raiseRequest.
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
    "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
  1297
    "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
  1298
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1299
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1300
_Field_setShort: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1301
    "/ 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
  1302
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1303
JavaVM unimplementedNativeMethodSignal raiseRequest.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1304
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1305
    "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
  1306
    "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
  1307
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1308
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1309
_FileDescriptor_initSystemFD: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1310
    |descriptor fileNo myStream|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1311
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1312
    descriptor := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1313
    fileNo := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1314
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1315
    fileNo == 0 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1316
        myStream := Stdin
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1317
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1318
        fileNo == 1 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1319
           myStream := JavaConsoleStream ? Stdout
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1320
        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1321
            fileNo == 2 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1322
                myStream := JavaConsoleStream ? Stderr
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1323
            ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1324
                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
  1325
                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
  1326
            ]
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
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1329
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1330
    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
  1331
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1332
    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
  1333
    ^ descriptor
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
    "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
  1336
    "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
  1337
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1338
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1339
_FileDescriptor_valid: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1340
    "/ boolean valid ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1341
    |descriptor fileNo stream|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1342
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1343
    descriptor := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1344
    fileNo := descriptor instVarNamed:'fd'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1345
    stream := self getOpenFileAt:fileNo.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1346
    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
  1347
    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
  1348
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1349
    ^ 1 "/ TRUE
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
    "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
  1352
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1353
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1354
_FileInputStream_close: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1355
    ^ 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
  1356
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1357
    "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
  1358
    "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
  1359
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1360
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1361
_FileOutputStream_close: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1362
    ^ 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
  1363
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1364
    "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
  1365
    "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
  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
_File_canonPath: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1369
    "/ 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
  1370
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1371
    |jPath path realPath|
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
    jPath := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1374
    jPath isNil ifTrue:[^ jPath].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1375
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1376
    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
  1377
    realPath := path asFilename pathName.
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
    ^ Java as_String:realPath
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1380
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1381
    "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
  1382
    "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
  1383
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1384
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1385
_File_initIDs: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1386
    "/ 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
  1387
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1388
    "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
  1389
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1390
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1391
_File_rmdir0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1392
    "/ boolean rmdir0 ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1393
    JavaVM unimplementedNativeMethodSignal raiseRequest
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1394
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1395
    "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
  1396
    "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
  1397
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1398
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1399
_Float_floatToIntBits: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1400
    |f i|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1401
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1402
    f := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1403
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1404
    UninterpretedBytes isBigEndian ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1405
        i := f basicAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1406
        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
  1407
        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
  1408
        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
  1409
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1410
        i := f basicAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1411
        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
  1412
        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
  1413
        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
  1414
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1415
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1416
    ^ i.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1417
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1418
    "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
  1419
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1420
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1421
_FontDescriptor_initIDs: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1422
    "/ new with jdk1.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
    "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
  1425
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1426
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1427
_Font_initIDs: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1428
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1429
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1430
    "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
  1431
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1432
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1433
_GifImageDecoder_parseImage: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1434
    |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
  1435
     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
  1436
     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
  1437
     countGot countGot2|
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
    decoder := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1440
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1441
    i1 := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1442
    i2 := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1443
    width := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1444
    height := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1445
    bool1 := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1446
    depth := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1447
    subHdrBytes := nativeContext argAt:7.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1448
    dstBytes := nativeContext argAt:8.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1449
    colorModel := nativeContext argAt:9.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1450
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1451
    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
  1452
    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
  1453
    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
  1454
    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
  1455
    flags := subHdrBytes at:9.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1456
    codeLen := subHdrBytes at:10.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1457
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1458
    stream := decoder instVarNamed:'input'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1459
    pixelStore := decoder instVarNamed:'store'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1460
    pixelStore isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1461
        ^ 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1462
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1463
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1464
    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
  1465
    compressedData := ByteArray uninitializedNew:buffSize.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1466
    "get compressed data"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1467
    index := 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1468
    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
  1469
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1470
    [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
  1471
        (index + count) > buffSize ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1472
            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
  1473
            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
  1474
            compressedData := t.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1475
            buffSize := buffSize * 2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1476
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1477
        [count ~~ 0] whileTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1478
            countGot := stream
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1479
                        perform:#'read([BII)I'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1480
                        with:compressedData
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1481
                        with:index-1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1482
                        with:count.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1483
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1484
            countGot > 0 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1485
                count := count - countGot.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1486
                index := index + countGot.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1487
            ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1488
                count := -1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1489
            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1490
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1491
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1492
        count >= 0 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1493
            count := stream perform:#read.
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
    compressedSize := index - 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1497
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1498
    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
  1499
    (data isMemberOf:ByteArray) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1500
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1501
        ^ 0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1502
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1503
"/    'GIFReader: decompressing ...' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1504
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
    GIFReader
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1507
        decompressGIFFrom:compressedData
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1508
        count:compressedSize
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1509
        into:data
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1510
        startingAt:1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1511
        codeLen:(codeLen + 1).
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
    clrModel := pixelStore instVarNamed:'colormodel'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1514
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1515
    pixelStore
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1516
        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
  1517
        withArguments:
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1518
            (Array
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1519
                with:0        "/ x
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1520
                with:0        "/ y
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1521
                with:width    "/ w
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1522
                with:height   "/ h
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1523
                with:data
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1524
                with:0        "/ offs
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1525
                with:width).   "/ scanSize
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1526
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1527
    pixelStore  perform:#'imageComplete()V'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1528
"/        perform:#'imageComplete(I)V'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1529
"/        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
  1530
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1531
"/ self internalError:'breakPoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1532
    ^ 1 "/ true
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
    "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
  1535
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1536
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1537
_ImageRepresentation_disposeImage: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1538
    |imgRep img|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1539
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1540
    imgRep := nativeContext receiver.
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
    img := imgRep instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1543
    (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
  1544
        ImageStretchCache notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1545
            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
  1546
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1547
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1548
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1549
    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
  1550
"/    self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1551
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1552
    "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
  1553
    "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
  1554
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1555
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1556
_ImageRepresentation_finish: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1557
    |imgRep bool|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1558
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1559
    imgRep := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1560
    bool := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1561
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1562
"/    '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
  1563
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1564
    ^ 1 "/ true
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1565
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1566
    "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
  1567
    "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
  1568
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1569
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1570
_ImageRepresentation_imageDraw: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1571
    |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
  1572
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1573
    imgRep := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1574
    img := imgRep instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1575
    (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
  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
    jGraphics := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1580
    gc := jGraphics instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1581
    gc realized ifFalse:[^ self].
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
    x := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1584
    y := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1585
    clr := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1586
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1587
    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
  1588
    deviceImage ~~ img ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1589
        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
  1590
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1591
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1592
    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
  1593
    ^ 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1594
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1595
    "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
  1596
    "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
  1597
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1598
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1599
_ImageRepresentation_imageStretch: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1600
    |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
  1601
     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
  1602
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1603
    imgRep := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1604
    img := imgRep instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1605
    (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
  1606
        "/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1607
        ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1608
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1609
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1610
    jGraphics := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1611
    gc := jGraphics instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1612
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1613
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1614
    x1 := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1615
    y1 := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1616
    x2 := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1617
    y2:= nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1618
    srcX1 := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1619
    srcY1 := nativeContext argAt:7.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1620
    w := nativeContext argAt:8.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1621
    h := nativeContext argAt:9.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1622
    clr := nativeContext argAt:10.
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
    (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
  1625
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1626
        ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1627
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1628
    (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
  1629
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1630
        ^ self
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1631
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1632
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1633
    "/ 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
  1634
    "/ to avoid repeated action ...
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
    stretchWidth := (x2-x1).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1637
    stretchHeight := (y2-y1).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1638
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1639
    (stretchWidth == img width
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1640
    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
  1641
        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
  1642
        deviceImage ~~ img ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1643
            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
  1644
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1645
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1646
        ImageStretchCache notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1647
            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
  1648
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1649
        (deviceImage isNil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1650
        or:[deviceImage width ~~ stretchWidth
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1651
        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
  1652
            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
  1653
            ImageStretchCache isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1654
                ImageStretchCache := WeakIdentityDictionary new.
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
            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
  1657
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1658
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1659
    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
  1660
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1661
    "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
  1662
    "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
  1663
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1664
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1665
_ImageRepresentation_offscreenInit: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1666
    |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
  1667
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1668
    imgRep := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1669
    jclr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1670
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1671
    w := imgRep instVarNamed:'width'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1672
    h := imgRep instVarNamed:'height'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1673
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1674
    screenDevice := Screen current.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1675
    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
  1676
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1677
    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
  1678
    "/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1679
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1680
    "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
  1681
    "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
  1682
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1683
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1684
_ImageRepresentation_setBytePixels: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1685
    |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
  1686
     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
  1687
     scanLineWidth nBytes srcIdx dstIdx|
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
    imgRep := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1690
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1691
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1692
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1693
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1694
    clrModel := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1695
    bytes := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1696
    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
  1697
    scanLineWidth := nativeContext argAt:8.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1698
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1699
    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
  1700
    (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
  1701
        rgbMap := clrModel instVarNamed:'rgb'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1702
        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
  1703
        rgbMap
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1704
            keysAndValuesDo:[:idx :rgb |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1705
                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
  1706
            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1707
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1708
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1709
    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
  1710
    opaque ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1711
        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
  1712
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1713
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1714
    img := imgRep instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1715
    (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
  1716
"/        self halt
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1717
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1718
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1719
    (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
  1720
        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
  1721
        srcIdx := offs+1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1722
        dstIdx := 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1723
        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
  1724
            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
  1725
            srcIdx := srcIdx + scanLineWidth.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1726
            dstIdx := dstIdx + w.
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
        bytes := nBytes.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1729
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1730
    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
  1731
    cmap notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1732
        img colorMap:cmap.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1733
        img photometric:#palette
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1734
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1735
    opaque ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1736
        img mask:(ImageReader
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1737
                    buildMaskFromColor:transparentColorIndex
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1738
                    for:bytes
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1739
                    width:w
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1740
                    height:h)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1741
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1742
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1743
    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
  1744
    ^ 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1745
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1746
    "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
  1747
    "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
  1748
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1749
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1750
_ImageRepresentation_setIntPixels: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1751
    |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
  1752
     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
  1753
     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
  1754
     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
  1755
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1756
    imgRep := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1757
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1758
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1759
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1760
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1761
    clrModel := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1762
    ints := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1763
    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
  1764
    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
  1765
    opaque := false.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1766
offs ~~ 0 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1767
 self halt
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1768
].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1769
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1770
    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
  1771
    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
  1772
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1773
        (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
  1774
            rgbMap := clrModel instVarNamed:'rgb'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1775
            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
  1776
            rgbMap
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1777
                keysAndValuesDo:[:idx :rgb |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1778
                    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
  1779
                ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1780
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1781
        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
  1782
        opaque ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1783
            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
  1784
        ].
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
    img := imgRep instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1788
    (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
  1789
"/        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1790
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1791
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1792
    depth == 32 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1793
        "/ 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
  1794
        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
  1795
        srcIdx := 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1796
        dstIdx := 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1797
        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
  1798
        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
  1799
        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
  1800
        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
  1801
        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
  1802
        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
  1803
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1804
        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
  1805
            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
  1806
                val := ints at:srcIdx.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1807
                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
  1808
                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
  1809
                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
  1810
                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
  1811
                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
  1812
                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
  1813
                dstIdx := dstIdx + 3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1814
                srcIdx := srcIdx + 1.
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
            srcIdx := srcIdx + (scanLineWidth - w).
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
        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
  1819
        img photometric:#rgb.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1820
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1821
        scanLineWidth ~~ w ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1822
            self halt
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
        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
  1825
        cmap notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1826
            img colorMap:cmap.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1827
            img photometric:#palette
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1828
        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1829
            img photometric:#rgb
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1830
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1831
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1832
    opaque ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1833
        img mask:(ImageReader
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1834
                    buildMaskFromColor:transparentColorIndex
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1835
                    for:ints
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1836
                    width:w
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1837
                    height:h)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1838
    ].
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
    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
  1841
    ^ 1.
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
    "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
  1844
    "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
  1845
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1846
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1847
_InetAddressImpl_getHostByAddr: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1848
    "/ 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
  1849
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1850
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1851
    "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
  1852
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1853
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1854
_InetAddressImpl_getInetFamily: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1855
    "/ self unimplementedNativeMethod.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1856
    ^ 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1857
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1858
    "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
  1859
    "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
  1860
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1861
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1862
_InetAddressImpl_getLocalHostName: nativeContext
1970
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1865
    |hostName|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1866
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1867
    hostName := OperatingSystem getHostName.
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
    ^ (Java as_String:hostName).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1870
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1871
    "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
  1872
    "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
  1873
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1874
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1875
_InetAddressImpl_lookupAllHostAddr: nativeContext
1970
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1878
    |jAddrImpl jHostName hostName addrBytes|
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
    jAddrImpl := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1881
    jHostName := nativeContext argAt:1.
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 := 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
  1884
    addrBytes := Socket ipAddressOfHost:hostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1885
    addrBytes isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1886
        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
  1887
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1888
    ^ Array with:addrBytes
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
    "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
  1891
    "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
  1892
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1893
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1894
_InetAddressImpl_makeAnyLocalAddress: nativeContext
1970
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1897
    |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
  1898
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1899
    jAddrImpl := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1900
    jAddr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1901
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1902
    hostName := OperatingSystem getHostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1903
    addrBytes := Socket ipAddressOfHost:hostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1904
    addrBytes isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1905
        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
  1906
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1907
    "/ 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
  1908
    address := (addrBytes at:1).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1909
    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
  1910
    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
  1911
    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
  1912
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1913
    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
  1914
    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
  1915
    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
  1916
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1917
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1918
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1919
    "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
  1920
    "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
  1921
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1922
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1923
_InetAddress_getInetFamily: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1924
    "/ self unimplementedNativeMethod.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1925
    ^ 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1926
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1927
    "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
  1928
    "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
  1929
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1930
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1931
_InetAddress_getLocalHostName: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1932
    ""
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|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1935
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1936
    hostName := OperatingSystem getHostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1937
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1938
    ^ Java as_String:hostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1939
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1940
    "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
  1941
    "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
  1942
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1943
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1944
_InetAddress_lookupAllHostAddr: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1945
    ""
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1946
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1947
    |jAddrImpl jHostName hostName addrBytes|
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
    jAddrImpl := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1950
    jHostName := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1951
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1952
    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
  1953
    addrBytes := Socket ipAddressOfHost:hostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1954
    addrBytes isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1955
        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
  1956
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1957
    ^ Array with:addrBytes
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1958
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1959
    "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
  1960
    "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
  1961
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1962
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1963
_InetAddress_lookupHostByAddr: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1964
    "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
  1965
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1966
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1967
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1968
    "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
  1969
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1970
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1971
_InetAddress_lookupHostByName: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1972
    "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
  1973
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1974
JavaVM unimplementedNativeMethodSignal raise.
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
    "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
  1977
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1978
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  1979
_InetAddress_makeAnyLocalAddress: nativeContext
1970
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1982
    |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
  1983
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1984
    jAddrImpl := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1985
    jAddr := nativeContext argAt:1.
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
    hostName := OperatingSystem getHostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1988
    addrBytes := Socket ipAddressOfHost:hostName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1989
    addrBytes isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1990
        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
  1991
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1992
    "/ 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
  1993
    address := (addrBytes at:1).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1994
    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
  1995
    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
  1996
    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
  1997
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  1998
    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
  1999
    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
  2000
    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
  2001
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2002
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2003
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2004
    "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
  2005
    "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
  2006
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2007
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2008
_Inflater_end0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2009
    "/ void end0 ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2010
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2011
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2012
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2013
    "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
  2014
    "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
  2015
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2016
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2017
_Inflater_getAdler0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2018
    "/ int getAdler0 ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2019
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2020
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2021
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2022
    "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
  2023
    "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
  2024
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2025
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2026
_Inflater_getTotalIn0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2027
    "/ int getTotalIn0 ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2028
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2029
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2030
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2031
    "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
  2032
    "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
  2033
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2034
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2035
_Inflater_getTotalOut0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2036
    "/ int getTotalOut0 ()
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
JavaVM unimplementedNativeMethodSignal raise.
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
    "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
  2041
    "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
  2042
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2043
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2044
_Inflater_inflate0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2045
    "/ 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
  2046
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2047
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2048
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2049
    "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
  2050
    "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
  2051
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2052
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2053
_Inflater_reset0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2054
    "/ void reset0 ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2055
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2056
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2057
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2058
    "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
  2059
    "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
  2060
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2061
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2062
_Inflater_setDictionary0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2063
    "/ 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
  2064
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2065
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2066
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2067
    "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
  2068
    "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
  2069
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2070
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2071
_InputThread_run: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2072
    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
  2073
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2074
    "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
  2075
    "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
  2076
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2077
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2078
_Introspector_getMethodDescriptor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2079
    "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
  2080
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2081
JavaVM unimplementedNativeMethodSignal raise.
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
    "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
  2084
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2085
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2086
_Introspector_getMethodParameterCount: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2087
    "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
  2088
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2089
JavaVM unimplementedNativeMethodSignal raise.
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
    "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
  2092
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2093
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2094
_Introspector_getPublicDeclaredMethods0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2095
    "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
  2096
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2097
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2098
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2099
    "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
  2100
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2101
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2102
_JPEGImageDecoder_readImage: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2103
    JavaVM unimplementedNativeMethodSignal raise
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: / 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
  2106
    "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
  2107
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2108
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2109
_MButtonPeer_create: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2110
    ^ self _WButtonPeer_create: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2111
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2112
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2113
_MCanvasPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2114
    |jCanvasPeer jFrame frame subView|
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
    jCanvasPeer := nativeContext receiver.
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
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2119
    jFrame isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2120
        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
  2121
        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
  2122
        ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2123
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2124
    frame := jFrame instVarNamed:'pData'.
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
    subView := JavaView in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2127
    subView delegate:self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2128
    subView javaPeer:jCanvasPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2129
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2130
    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
  2131
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2132
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2133
        '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
  2134
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2135
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2136
    "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
  2137
    "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
  2138
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2139
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2140
_MComponentPeer_cacheInit: nativeContext
1970
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
    "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
  2143
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2144
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2145
_MComponentPeer_handleEvent: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2146
    ^ 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
  2147
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2148
    "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
  2149
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2150
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2151
_MComponentPeer_nativeHandleEvent: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2152
    ^ self _WComponentPeer_nativeHandleEvent: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2153
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2154
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2155
_MComponentPeer_pHide: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2156
    ^ 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
  2157
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2158
    "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
  2159
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2160
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2161
_MComponentPeer_pInitialize: nativeContext
1970
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
    "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
  2164
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2165
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2166
_MComponentPeer_pReshape: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2167
    self commonReshapeComponent: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2168
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2169
    "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
  2170
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2171
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2172
_MComponentPeer_pSetBackground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2173
    |view jClr rgb clr|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2174
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2175
    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
  2176
    jClr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2177
    rgb := jClr instVarNamed:'value'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2178
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2179
    clr := Color rgbValue:rgb.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2180
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2181
    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
  2182
    (view isKindOf:ScrollableView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2183
        view := view scrolledView
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2184
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2185
    view viewBackground:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2186
    view backgroundPaint:clr.
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
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2189
_MComponentPeer_pSetFont: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2190
    |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
  2191
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2192
    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
  2193
    jFont := nativeContext argAt:1.
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
    stFont := jFont instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2196
    (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
  2197
        name := jFont instVarNamed:'name'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2198
        style := jFont instVarNamed:'style'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2199
        size := jFont instVarNamed:'size'.
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
        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
  2202
        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
  2203
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2204
    view font:stFont.
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
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2207
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2208
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2209
_MComponentPeer_pSetForeground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2210
    |view jClr rgb clr|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2211
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2212
    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
  2213
    jClr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2214
    rgb := jClr instVarNamed:'value'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2215
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2216
    clr := Color rgbValue:rgb.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2217
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2218
    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
  2219
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2220
    (view isKindOf:ScrollableView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2221
        view := view scrolledView
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2222
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2223
    view foregroundColor:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2224
!
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
_MComponentPeer_pShow: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2227
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2228
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2229
    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
  2230
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2231
    "/ 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
  2232
    (view isMemberOf:JavaEmbeddedFrameView) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2233
        view beVisible.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2234
        view realize.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2235
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2236
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2237
"/    view windowGroup notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2238
"/        windowServer addGroup:(view windowGroup)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2239
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2240
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2241
    ^ nil
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
"/ self halt.
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
    "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
  2246
    "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
  2247
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2248
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2249
_MComponentPeer_setBackground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2250
    |jClr rgb clr view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2251
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2252
    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
  2253
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2254
    jClr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2255
    rgb := jClr instVarNamed:'value'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2256
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2257
    clr := Color rgbValue:rgb.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2258
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
    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
  2261
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2262
    (view isKindOf:ScrollableView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2263
        view := view scrolledView
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2264
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2265
    view viewBackground:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2266
    view backgroundPaint:clr.
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
    "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
  2269
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2270
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2271
_MComponentPeer_setCursor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2272
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2273
    "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
  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
_MComponentPeer_setFont: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2277
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2278
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2279
    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
  2280
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2281
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2282
    "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
  2283
    "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
  2284
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2285
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2286
_MComponentPeer_setForeground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2287
    |jClr rgb clr view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2288
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2289
    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
  2290
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2291
    jClr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2292
    rgb := jClr instVarNamed:'value'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2293
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2294
    clr := Color rgbValue:rgb.
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
    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
  2297
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2298
    view paint:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2299
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2300
    "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
  2301
    "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
  2302
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2303
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2304
_MFramePeer_create: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2305
    ^ 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
  2306
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2307
    "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
  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_getWindowBackgroundColor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2311
    ^ View defaultViewBackgroundColor rgbValue.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2312
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2313
    "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
  2314
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2315
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2316
_MFramePeer_pHide: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2317
    ^ 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
  2318
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2319
    "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
  2320
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2321
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2322
_MFramePeer_pReshape: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2323
    self commonReshapeComponent: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2324
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2325
    "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
  2326
    "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
  2327
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2328
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2329
_MFramePeer_pSetTitle: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2330
    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
  2331
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2332
    "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
  2333
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2334
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2335
_MFramePeer_pShow: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2336
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2337
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2338
    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
  2339
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2340
    "/ 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
  2341
    (view isMemberOf:JavaEmbeddedFrameView) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2342
        view beVisible.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2343
        view realize.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2344
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2345
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2346
"/    view windowGroup notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2347
"/        windowServer addGroup:(view windowGroup)
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2350
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2351
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2352
"/ self halt.
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
    "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
  2355
    "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
  2356
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2357
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2358
_MFramePeer_setInsets: nativeContext
1970
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
    "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
  2361
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2362
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2363
_MFramePeer_setResizable: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2364
    |view onOff|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2365
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2366
    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
  2367
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2368
    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
  2369
    view isTopView ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2370
        onOff ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2371
            view minExtent:10@10.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2372
            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
  2373
        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2374
            view minExtent:view extent.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2375
            view maxExtent:view extent.
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
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2378
        (view isMemberOf:JavaEmbeddedFrameView) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2379
            self halt.
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
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2382
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2383
"/ '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
  2384
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2385
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2386
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2387
    "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
  2388
    "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
  2389
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2390
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2391
_MToolkit_callbackLoop: nativeContext
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2392
    | toolKit |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2393
    toolKit := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2394
    ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2395
    self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2396
        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
  2397
    "self wakeup: toolKit."
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2398
    self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2399
    (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
  2400
        '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
  2401
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2402
    JavaEventThread := Processor activeProcess.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2403
    [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2404
        [ true ] whileTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2405
            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
  2406
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2407
    ] valueNowOrOnUnwindDo: [ JavaEventThread := nil. ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2408
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2409
    "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
  2410
    "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
  2411
    "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
  2412
!
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
_MToolkit_eventLoop: nativeContext
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2415
    | toolKit |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2416
    (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
  2417
        '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
  2418
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2419
    toolKit := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2420
    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
  2421
    "self wakeup: toolKit."
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2422
    self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2423
    JavaEventThread := Processor activeProcess.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2424
    [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2425
        [ true ] whileTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2426
            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
  2427
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2428
    ] valueNowOrOnUnwindDo: [ JavaEventThread := nil. ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2429
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2430
    "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
  2431
    "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
  2432
    "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
  2433
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2434
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2435
_MToolkit_init: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2436
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2437
    "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
  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
_MToolkit_loadSystemColors: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2441
    ^ self _WToolkit_loadSystemColors: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2442
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2443
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2444
_MToolkit_run: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2445
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2446
    "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
  2447
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2448
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2449
_Math_IEEEremainder: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2450
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2451
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2452
    "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
  2453
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2454
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2455
_Math_acos: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2456
    "arc cosine"
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
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2459
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2460
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2461
"/    (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
  2462
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2463
"/            '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
  2464
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2465
"/            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
  2466
"/        ]
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 arcCos
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
    "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
  2471
    "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
  2472
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2473
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2474
_Math_asin: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2475
    "arc sine"
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
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2478
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2479
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2480
"/    (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
  2481
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2482
"/            '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
  2483
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2484
"/            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
  2485
"/        ]
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 arcSin
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
    "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
  2490
    "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
  2491
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2492
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2493
_Math_atan2: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2494
    JavaVM unimplementedNativeMethodSignal raise
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
    "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
  2497
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2498
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2499
_Math_atan: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2500
    "arc tangens"
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
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2503
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2504
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2505
"/    (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
  2506
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2507
"/            '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
  2508
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2509
"/            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
  2510
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2511
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2512
    ^ dVal arcTan
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2513
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2514
    "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
  2515
    "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
  2516
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2517
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2518
_Math_ceil: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2519
    "ceiling"
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
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2522
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2523
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2524
"/    (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
  2525
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2526
"/            '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
  2527
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2528
"/            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
  2529
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2530
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2531
    ^ dVal ceilingAsFloat
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2532
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2533
    "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
  2534
    "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
  2535
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2536
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2537
_Math_cos: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2538
    "cosine"
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
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2541
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2542
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2543
"/    (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
  2544
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2545
"/            '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
  2546
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2547
"/            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
  2548
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2549
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2550
    ^ dVal cos
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2551
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2552
    "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
  2553
    "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
  2554
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2555
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2556
_Math_exp: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2557
    "exponential"
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
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2560
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2561
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2562
"/    (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
  2563
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2564
"/            '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
  2565
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2566
"/            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
  2567
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2568
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2569
    ^ dVal exp
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2570
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2571
    "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
  2572
    "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
  2573
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2574
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2575
_Math_floor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2576
    "floor"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2577
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2578
    |dVal|
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
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2581
"/    (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
  2582
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2583
"/            '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
  2584
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2585
"/            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
  2586
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2587
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2588
    ^ dVal floorAsFloat
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
    "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
  2591
    "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
  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_log: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2595
    "natural logarithm"
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>>log' 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 ln
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:42:19 / cg"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2610
    "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
  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_pow: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2614
    "power"
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
    |dVal1 dVal2|
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
    dVal1 := 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
"/        dVal1 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>>pow' 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
    dVal2 := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2627
"/    (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
  2628
"/        dVal2 isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2629
"/            '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
  2630
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2631
"/            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
  2632
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2633
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2634
    ^ dVal1 raisedTo:dVal2
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
    "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
  2637
    "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
  2638
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2639
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2640
_Math_rint: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2641
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2642
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2643
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2644
    ^ dVal rounded asFloat.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2645
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2646
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2647
_Math_sin: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2648
    "sine"
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|
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
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2653
"/    (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
  2654
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2655
"/            '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
  2656
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2657
"/            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
  2658
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2659
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2660
    ^ dVal sin
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2661
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2662
    "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
  2663
    "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
  2664
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2665
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2666
_Math_sqrt: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2667
    "square root"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2668
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2669
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2670
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2671
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2672
"/    (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
  2673
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2674
"/            '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
  2675
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2676
"/            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
  2677
"/        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2678
"/    ].
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
    "/ how about domain errors ?
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2681
    dVal < 0 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2682
        ^ 0.0
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
    ^ dVal sqrt
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2685
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2686
    "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
  2687
    "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
  2688
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2689
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2690
_Math_tan: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2691
    "tangent"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2692
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2693
    |dVal|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2694
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2695
    dVal := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2696
"/    (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
  2697
"/        dVal isReal ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2698
"/            '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
  2699
"/        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2700
"/            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
  2701
"/        ]
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
    ^ dVal tan
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: / 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
  2706
    "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
  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
_MemoryAdvice_register0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2710
    "private native void register0()"
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
    "/ UnimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2713
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2714
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2715
_Method_getModifiers: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2716
    |jMethod mthd retVal|
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
    jMethod := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2719
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2720
    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
  2721
    mthd isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2722
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2723
        ^ 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2724
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2725
    ^ mthd accessFlags
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2726
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2727
    "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
  2728
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2729
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2730
_MozillaAppletContext_pMochaOnLoad: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2731
    |id|
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
    id := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2734
"/ '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
  2735
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2736
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2737
    "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
  2738
    "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
  2739
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2740
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2741
_MozillaAppletContext_pShowDocument: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2742
    |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
  2743
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2744
    jAppletContext := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2745
    js := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2746
    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
  2747
    js := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2748
    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
  2749
    js := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2750
    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
  2751
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2752
    "/ 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
  2753
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
  2754
           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
  2755
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2756
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2757
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2758
    "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
  2759
    "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
  2760
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2761
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2762
_MozillaAppletContext_pShowStatus: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2763
    |s js|
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
    js := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2766
    js isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2767
        s := ''
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2768
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2769
        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
  2770
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2771
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2772
    self activityNotification:s.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2773
"/ Transcript showCR:s.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2774
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2775
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2776
    "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
  2777
    "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
  2778
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2779
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2780
_MozillaAppletContext_setConsoleState0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2781
    "/ void setConsoleState0 (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2782
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2783
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2784
    "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
  2785
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2786
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2787
_ObjectInputStream_allocateNewArray: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2788
    "/ 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
  2789
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2790
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2791
    "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
  2792
    "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
  2793
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2794
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2795
_ObjectInputStream_allocateNewObject: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2796
    "/ 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
  2797
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2798
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2799
    "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
  2800
    "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
  2801
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2802
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2803
_ObjectInputStream_inputClassFields: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2804
    "/ 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
  2805
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2806
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2807
    "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
  2808
    "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
  2809
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2810
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2811
_ObjectInputStream_invokeDefaultReadObject: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2812
    "/ 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
  2813
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2814
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2815
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2816
    "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
  2817
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2818
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2819
_ObjectInputStream_invokeObjectReader: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2820
    "/ 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
  2821
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2822
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2823
    "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
  2824
    "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
  2825
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2826
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2827
_ObjectInputStream_invokeReadObject: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2828
    "/ 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
  2829
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2830
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2831
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2832
    "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
  2833
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2834
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2835
_ObjectInputStream_loadClass0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2836
    "/ 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
  2837
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2838
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2839
    "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
  2840
    "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
  2841
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2842
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2843
_ObjectOutputStream_invokeDefaultWriteObject: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2844
    "/ 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
  2845
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2846
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2847
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2848
    "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
  2849
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2850
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2851
_ObjectOutputStream_invokeObjectWriter: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2852
    "/ 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
  2853
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2854
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2855
    "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
  2856
    "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
  2857
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2858
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2859
_ObjectOutputStream_invokeWriteObject: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2860
    "/ 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
  2861
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2862
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2863
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2864
    "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
  2865
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2866
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2867
_ObjectOutputStream_outputClassFields: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2868
    "/ 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
  2869
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2870
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2871
    "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
  2872
    "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
  2873
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2874
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2875
_ObjectStreamClass_doMismatchedRead: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2876
    "/ 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
  2877
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2878
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2879
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2880
    "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
  2881
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2882
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2883
_ObjectStreamClass_findObjectMethod0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2884
    "/ 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
  2885
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2886
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2887
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2888
    "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
  2889
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2890
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2891
_ObjectStreamClass_getClassAccess: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2892
    "/ 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
  2893
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2894
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2895
    "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
  2896
    "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
  2897
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2898
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2899
_ObjectStreamClass_getClassDefinedUID: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2900
    "/ 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
  2901
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2902
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2903
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2904
    "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
  2905
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2906
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2907
_ObjectStreamClass_getFieldAccess: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2908
    "/ 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
  2909
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2910
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2911
    "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
  2912
    "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
  2913
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2914
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2915
_ObjectStreamClass_getFieldSignatures: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2916
    "/ 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
  2917
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2918
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2919
    "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
  2920
    "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
  2921
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2922
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2923
_ObjectStreamClass_getFields0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2924
    "/ 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
  2925
    JavaVM unimplementedNativeMethodSignal raise
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
    "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
  2928
    "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
  2929
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2930
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2931
_ObjectStreamClass_getMethodAccess: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2932
    "/ 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
  2933
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2934
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2935
    "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
  2936
    "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
  2937
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2938
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2939
_ObjectStreamClass_getMethodSignatures: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2940
    "/ 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
  2941
    JavaVM unimplementedNativeMethodSignal raise
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
    "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
  2944
    "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
  2945
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2946
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2947
_ObjectStreamClass_getSerialVersionUID: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2948
    "/ 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
  2949
    JavaVM unimplementedNativeMethodSignal raise
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
    "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
  2952
    "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
  2953
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2954
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2955
_ObjectStreamClass_hasWriteObject: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2956
    "/ 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
  2957
    JavaVM unimplementedNativeMethodSignal raise
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
    "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
  2960
    "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
  2961
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2962
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2963
_OffScreenImageSource_sendPixels: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2964
    "/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2965
    "/ UnimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2966
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2967
    "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
  2968
    "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
  2969
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2970
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2971
_PackedColorModel_initIDs: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2972
    "/ new with jdk1.2 ...
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: / 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
  2975
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2976
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  2977
_PlainDatagramSocketImpl_bind: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2978
    |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
  2979
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2980
    jsock := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2981
    port := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2982
    jaddr := nativeContext argAt:2.
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
    hostName := jaddr instVarNamed:'hostName'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2985
    hostName isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2986
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2987
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2988
        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
  2989
    ].
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
    sock := self validateFile:jsock.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2992
    sock notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2993
        FileIOTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2994
            ('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
  2995
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2996
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2997
        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
  2998
        ok ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  2999
            err := OperatingSystem lastErrorString.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3000
            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
  3001
            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
  3002
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3003
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3004
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3005
    "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
  3006
    "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
  3007
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3008
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3009
_PlainDatagramSocketImpl_join: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3010
    "/ 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
  3011
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3012
    |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
  3013
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3014
    jsock := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3015
    addr := nativeContext argAt:1.
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
    sock := self validateFile:jsock.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3018
    sock notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3019
        FileIOTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3020
            ('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
  3021
        ].
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3022
        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
  3023
self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3024
        ^ nil.  "/ void
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3025
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3026
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3027
    "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
  3028
    "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
  3029
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3030
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3031
_PlainDatagramSocketImpl_receive: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3032
    |jsock jdatagramPacket sock ok|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3033
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3034
    jsock := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3035
    jdatagramPacket := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3036
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3037
    sock := self validateFile:jsock.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3038
    sock notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3039
        FileIOTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3040
            ('JAVA: socket receive') infoPrintCR
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3041
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3042
        ^ -1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3043
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3044
    ^ -1
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
    "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
  3047
    "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
  3048
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3049
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3050
_PlainDatagramSocketImpl_socketGetOption: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3051
    |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
  3052
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3053
    jsock := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3054
    opt := nativeContext argAt:1.
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
    sock := self validateFile:jsock.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3057
    sock notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3058
        FileIOTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3059
            ('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
  3060
        ].
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3061
        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
  3062
self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3063
        ^ -1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3064
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3065
    ^ -1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3066
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3067
    "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
  3068
    "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
  3069
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3070
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3071
_PlainSocketImpl_socketAvailable: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3072
    |jSock sock n|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3073
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3074
    jSock := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3075
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3076
    sock := self validateFile:jSock.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3077
    sock isNil ifTrue:[
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3078
        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
  3079
        ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3080
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3081
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3082
    n := sock numAvailable.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3083
    ^ n
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3084
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3085
    "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
  3086
    "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
  3087
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3088
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3089
_PlainSocketImpl_socketClose: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3090
    |jsock sock|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3091
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3092
    jsock := nativeContext receiver.
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
    sock := self validateFile:jsock.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3095
    sock notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3096
        FileIOTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3097
            'JAVA: close socket' infoPrintCR
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
        sock close.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3100
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3101
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3102
    "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
  3103
    "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
  3104
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3105
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3106
_PlatformFont_initIDs: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3107
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3108
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3109
    "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
  3110
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3111
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3112
_PrintStream_isOutputStreamLocalised: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3113
    "/ 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
  3114
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3115
    JavaVM unimplementedNativeMethodSignal raise
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
    "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
  3118
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3119
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3120
_RandomAccessFile_close: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3121
    ^ 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
  3122
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3123
    "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
  3124
    "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
  3125
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3126
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3127
_Runtime_buildLibName: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3128
    |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
  3129
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3130
    jPath := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3131
    jFileName := nativeContext argAt:2.
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 := 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
  3134
    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
  3135
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3136
    path = '__builtIn__' ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3137
        libName := path , '/' , fileName
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3138
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3139
        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
  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:libName.
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: / 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
  3144
    "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
  3145
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3146
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3147
_Runtime_execInternal: nativeContext
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3148
    "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
  3149
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3150
    | 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
  3151
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3152
    cmdAndArgArray := nativeContext argAt: 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3153
    envArray := nativeContext argAt: 2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3154
    cmd := cmdAndArgArray at: 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3155
    OperatingSystem isUNIXlike ifTrue: [
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3156
        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
  3157
    ] 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
  3158
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3161
    jProcessClass notNil ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3162
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3163
        jProcess := jProcessClass newCleared.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3164
        jProcess
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3165
            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
  3166
            with: cmdAndArgArray
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3167
            with: envArray.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3168
        ^ jProcess
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3169
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3170
    self halt.
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3171
    JavaVM 
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3172
    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
  3173
    ^ nil
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
    "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
  3176
    "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
  3177
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3178
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3179
_Runtime_initializeLinkerInternal: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3180
    "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
  3181
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3182
    |path|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3183
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3184
    "/ 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
  3185
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3186
    path := ''.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3187
    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
  3188
                            path := path , comp
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3189
                        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3190
                            path := path , ':' , comp
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
               ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3193
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3194
    ^ Java as_String:path
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
    "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
  3197
    "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
  3198
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3199
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3200
_Runtime_isInputStreamLocalised: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3201
    "/ 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
  3202
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3203
JavaVM unimplementedNativeMethodSignal raise.
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
    "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
  3206
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3207
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3208
_Runtime_isOutputStreamLocalised: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3209
    "/ 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
  3210
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3211
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3212
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3213
    "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
  3214
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3215
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3216
_Runtime_loadFileInternal: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3217
    "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
  3218
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3219
    |ret|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3220
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3221
    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
  3222
    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
  3223
    ^ ret
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3224
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3225
    "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
  3226
    "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
  3227
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3228
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3229
_Runtime_loadFileInternalI: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3230
    "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
  3231
     but return integer:
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3232
        -1   outOfMemory error
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3233
        0    failed to load
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3234
        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
  3235
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3236
    |jLibName libName libHandle|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3237
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3238
    jLibName := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3239
    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
  3240
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3241
    (SimulatedLibs includes:libName) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3242
"/        ('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
  3243
        ^ 1
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
    (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
  3246
"/        ('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
  3247
        ^ 1
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3250
    libName asFilename exists ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3251
        ('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
  3252
        ^ 0
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3255
    (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
  3256
        ^ 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3257
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3258
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3259
    libHandle := ObjectFileLoader loadLibrary:libName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3260
    libHandle isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3261
        ('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
  3262
        ^ 0
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3265
    LoadedLibs isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3266
        LoadedLibs := Dictionary new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3267
    ].
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
    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
  3270
    ^ 1
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
    "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
  3273
    "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
  3274
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3275
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3276
_Runtime_runFinalization: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3277
    "/ void runFinalization ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3278
"/    UnimplementedNativeMethodSignal raise
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
    "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
  3281
    "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
  3282
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3283
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3284
_Runtime_runFinalizersOnExit0: nativeContext
1970
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3287
    |onOff|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3288
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3289
    onOff := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3290
    ^ 1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3291
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3292
    "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
  3293
    "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
  3294
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3295
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3296
_Runtime_setInputStreamLocalised: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3297
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3298
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3299
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3300
    "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
  3301
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3302
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3303
_Runtime_setOutputStreamLocalised: nativeContext
1970
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
JavaVM unimplementedNativeMethodSignal raise.
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
    "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
  3308
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3309
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3310
_Runtime_totalMemory: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3311
    "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
  3312
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3313
    ^ ObjectMemory oldSpaceSize + ObjectMemory newSpaceSize
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3314
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3315
    "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
  3316
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3317
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3318
_Runtime_traceInstructions: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3319
    "/ void traceInstructions (boolean)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3320
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3321
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3322
    "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
  3323
    "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
  3324
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3325
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3326
_Runtime_traceMethodCalls: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3327
    "/ void traceMethodCalls (boolean)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3328
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3329
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3330
    "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
  3331
    "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
  3332
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3333
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3334
_ScrollPane_initIDs: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3335
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3336
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3337
    "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
  3338
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3339
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3340
_SecurityManager_classDepth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3341
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3342
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3343
    "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
  3344
    "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
  3345
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3346
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3347
_SecurityManager_classLoaderDepth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3348
    |con depth|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3349
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3350
    con := thisContext sender.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3351
    depth := 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3352
    [con notNil] whileTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3353
        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
  3354
            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
  3355
                depth := depth + 1
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
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3358
        con := con sender.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3359
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3360
'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
  3361
    ^ depth.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3362
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3363
    "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
  3364
    "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
  3365
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3366
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3367
_SecurityManager_currentClassLoader: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3368
    |loader|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3369
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3370
    loader := JavaClassReader classLoaderQuerySignal query.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3371
"/ '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
  3372
    ^ loader.
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
    "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
  3375
    "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
  3376
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3377
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3378
_SecurityManager_currentLoadedClass0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3379
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3380
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3381
    "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
  3382
    "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
  3383
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3384
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3385
_SocketInputStream_socketRead: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3386
    ^ 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
  3387
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3388
    "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
  3389
    "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
  3390
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3391
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3392
_SocketOutputStream_socketWrite: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3393
    ^ 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
  3394
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3395
    "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
  3396
    "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
  3397
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3398
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3399
_String_compareTo: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3400
    "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
  3401
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3402
    |jString1 jString2|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3403
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3404
    jString1 := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3405
    jString2 := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3406
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3407
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3408
    "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
  3409
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3410
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3411
_String_equals: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3412
    |jString1 jString2|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3413
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3414
    jString1 := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3415
    jString2 := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3416
    ^ (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
  3417
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3418
    "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
  3419
    "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
  3420
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3421
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3422
_String_equalsIgnoreCase: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3423
    "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
  3424
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3425
    |jString1 jString2|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3426
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3427
self halt:'untested'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3428
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3429
    jString1 := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3430
    jString2 := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3431
    ^ (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
  3432
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3433
    "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
  3434
    "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
  3435
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3436
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3437
_String_indexOf: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3438
    "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
  3439
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3440
    |jString1 jString2 idx|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3441
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3442
    jString1 := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3443
    jString2 := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3444
    idx := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3445
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3446
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3447
    "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
  3448
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3449
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3450
_String_lastIndexOf: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3451
    "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
  3452
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3453
    |jString1 jString2 idx|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3454
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3455
    jString1 := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3456
    jString2 := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3457
    idx := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3458
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3459
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3460
    "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
  3461
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3462
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3463
_String_length: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3464
    |jString|
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
    jString := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3467
    ^ (jString instVarAt:3)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3468
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3469
    "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
  3470
    "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
  3471
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3472
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3473
_String_regionMatches2: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3474
    "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
  3475
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3476
    |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
  3477
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3478
    jString1 := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3479
    bool := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3480
    jString2 := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3481
    idx1 := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3482
    idx2 := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3483
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3484
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3485
    "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
  3486
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3487
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3488
_String_regionMatches: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3489
    "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
  3490
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3491
    |jString1 jString2 idx1 idx2|
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
    jString1 := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3494
    jString2 := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3495
    idx1 := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3496
    idx2 := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3497
JavaVM unimplementedNativeMethodSignal raise.
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
    "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
  3500
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3501
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3502
_String_startsWith: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3503
    "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
  3504
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3505
    |jString1 jString2 idx|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3506
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3507
    jString1 := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3508
    jString2 := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3509
    idx := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3510
JavaVM unimplementedNativeMethodSignal raise.
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
    "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
  3513
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3514
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3515
_SystemColor_GetSysColor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3516
    "/ int GetSysColor (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3517
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3518
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3519
    "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
  3520
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3521
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3522
_SystemResourceManager_getEntryFromKey: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3523
    "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
  3524
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3525
    |key s|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3526
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3527
    key := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3528
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3529
    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
  3530
    s isNil ifTrue:[^ nil].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3531
    ^ Java as_String:s
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3532
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3533
    "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
  3534
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3535
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3536
_SystemResourceManager_validateSystemResource: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3537
    "check a resource"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3538
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3539
    |bool str1 str2|
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
    bool := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3542
    str1 := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3543
    str2 := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3544
    ^ 1 "/ true
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3545
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3546
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3547
_System_getCallerClass: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3548
    "/ introduced with jdk1.2
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3549
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3550
    |senderContext cls|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3551
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3552
    senderContext := nativeContext sender.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3553
    [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
  3554
        senderContext := senderContext sender.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3555
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3556
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3557
    senderContext method isStatic ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3558
        cls := senderContext receiver
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3559
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3560
        cls := senderContext receiver class
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3561
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3562
    cls isJavaClass ifTrue:[
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3563
        ^ Reflection javaClassObjectForClass:cls
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3564
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3565
    (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
  3566
        ^ 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
  3567
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3568
    self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3569
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3570
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3571
    "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
  3572
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3573
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3574
_System_validateSecurityManager: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3575
    "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
  3576
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3577
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3578
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3579
    "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
  3580
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3581
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3582
_ThreadGroup_initMainThreadGroup0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3583
    "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
  3584
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3585
JavaVM unimplementedNativeMethodSignal raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3586
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3587
    "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
  3588
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3589
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3590
_Thread_countStackFrames: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3591
    "/ int countStackFrames ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3592
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3593
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3594
    "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
  3595
!
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
_Thread_start: nativeContext
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3598
    "start the thread"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3599
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3600
    | jThread  jName  name  stProcess |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3601
    jThread := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3602
    (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
  3603
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3604
        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
  3605
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3606
    stProcess := JavaProcess
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3607
                for: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3608
                    | procName |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3609
                    Object abortSignal
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3610
                        handle: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3611
                            :ex |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3612
                            procName := stProcess name.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3613
                            (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
  3614
                                ('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
  3615
                                    infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3616
                                ex restart.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3617
                            ] ifFalse: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3618
                                (stProcess == JavaScreenUpdaterThread
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3619
                                    or: [ stProcess == JavaEventQueueThread ])
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3620
                                        ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3621
                                            ('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
  3622
                                                infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3623
                                            ex restart
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3624
                                        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3625
                                        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
  3626
                            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3627
                        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3628
                        do: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3629
                            [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3630
                                JavaVM javaExceptionSignal
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3631
                                    handle: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3632
                                        :ex |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3633
                                        | exClass |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3634
                                        procName := stProcess name.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3635
                                        exClass := ex parameter class.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3636
                                        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
  3637
                                            ('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
  3638
                                        ] ifFalse: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3639
                                            Transcript
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3640
                                                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
  3641
                                                        , exClass name).
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
                                        ex return.
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
                                    do: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3646
                                        Object messageNotUnderstoodSignal
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3647
                                            handle: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3648
                                                :ex |
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
                                                "/ 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
  3651
                                                "/ a nullPointerException ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3652
                                                 con  m |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3653
                                                con := ex suspendedContext.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3654
                                                con receiver isNil ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3655
                                                    ((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
  3656
                                                        JavaVM throwNullPointerException.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3657
                                                        AbortSignal raise.
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
                                                        "/ ex proceed.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3660
                                                    ]
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
                                                ex reject.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3663
                                            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3664
                                            do: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3665
                                                "/ 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
  3666
                                                jThread perform: #'run()V'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3667
                                                ThreadTrace == true ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3668
                                                    ('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
  3669
                                                ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3670
                                                jThread perform: #'exit()V'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3671
                                                ThreadTrace == true ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3672
                                                    ('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
  3673
                                                ]
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
                                    ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3676
                            ] ensure: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3677
                                | monitors |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3678
                                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
  3679
                                monitors notNil ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3680
                                    monitors do: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3681
                                        :obj |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3682
                                        | mon |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3683
                                        mon := obj getJavaMonitorFor.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3684
                                        mon notNil ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3685
                                            mon owningProcess == stProcess ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3686
                                                ('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
  3687
                                                    infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3688
                                                mon exit
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3689
                                            ].
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
                                    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3692
                                    EnteredMonitorsPerProcess removeKey: stProcess.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3693
                                    stProcess == JavaScreenUpdaterThread ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3694
                                        JavaScreenUpdaterThread := nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3695
                                    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3696
                                    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
  3697
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3698
"/                                    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
  3699
"/                                    screenUpdaterClass notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3700
"/                                        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
  3701
"/                                    ].
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
                                Java removeThread: jThread ifAbsent: [].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3704
                            ]
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
                ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3707
                priority: (Processor activePriority).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3708
    jName := jThread instVarNamed: 'name'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3709
    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
  3710
        name := jName
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3711
    ].
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
    "/ kludge - remember the ScreenUpdater ...
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
    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
  3716
        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
  3717
            (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
  3718
                JavaEventQueueThread := stProcess.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3719
            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3720
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3721
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3722
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3723
"/name = 'UserDialogShowThread' ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3724
"/self halt
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3725
"/].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3726
    "/ 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
  3727
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3728
    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
  3729
    stProcess name: 'JAVA-' , name.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3730
    stProcess restartable: true.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3731
    stProcess resume.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3732
    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
  3733
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3734
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3735
    "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
  3736
    "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
  3737
    "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
  3738
    "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
  3739
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3740
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3741
_Thread_suspend0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3742
    "yield"
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
    |jThread stProcess|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3745
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3746
    jThread := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3747
    stProcess := JavaVM stProcessForJavaThread:jThread.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3748
    stProcess isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3749
        ThreadTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3750
            ('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
  3751
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3752
        ^ nil "void"
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3753
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3754
    stProcess suspend
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: / 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
  3757
    "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
  3758
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3759
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3760
_Throwable_printStackTrace0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3761
    |out outStream exceptionObject contextList|
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
    outStream := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3764
    exceptionObject := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3765
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3766
    contextList := exceptionObject instVarNamed:'backtrace'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3767
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3768
    out := self javaConsoleStream.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3769
    out cr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3770
    out nextPutLine:'JAVA: stackTrace:'.
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
    contextList do:[:con |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3773
        out
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3774
            nextPutAll:'  ';
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3775
            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
  3776
            nextPutAll:'.';
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3777
            nextPutAll:(con method selector);
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3778
            nextPutAll:' [';
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3779
            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
  3780
            nextPutAll:' ';
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3781
            nextPutAll:(con quickLineNumber displayString);
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3782
            nextPutAll:']'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3783
        out cr
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3784
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3785
    out nextPutLine:'----------------------------------------------------'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3786
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3787
    "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
  3788
    "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
  3789
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3790
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3791
_URLConnection_close: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3792
    "/ void close ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3793
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3794
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3795
    "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
  3796
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3797
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3798
_URLConnection_finalize: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3799
    "/ void finalize ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3800
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3801
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3802
    "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
  3803
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3804
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3805
_URLConnection_getContentLength0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3806
    "/ int getContentLength0 ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3807
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3808
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3809
    "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
  3810
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3811
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3812
_URLConnection_getContentType0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3813
    "/ java.lang.String getContentType0 ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3814
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3815
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3816
    "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
  3817
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3818
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3819
_URLConnection_getHeaderField0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3820
    "/ 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
  3821
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3822
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3823
    "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
  3824
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3825
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3826
_URLConnection_pCreate: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3827
    "/ 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
  3828
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3829
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3830
    "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
  3831
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3832
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3833
_URLInputStream_available: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3834
    "/ int available ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3835
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3836
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3837
    "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
  3838
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3839
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3840
_URLInputStream_open: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3841
    "/ void open ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3842
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3843
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3844
    "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
  3845
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3846
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3847
_URLInputStream_read: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3848
    "/ 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
  3849
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3850
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3851
    "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
  3852
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3853
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3854
_URLOutputStream_open: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3855
    "/ void open ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3856
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3857
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3858
    "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
  3859
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3860
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3861
_URLOutputStream_pClose: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3862
    "/ void pClose ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3863
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3864
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3865
    "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
  3866
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3867
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3868
_URLOutputStream_write: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3869
    "/ void write (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3870
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3871
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3872
    "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
  3873
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3874
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3875
_URLOutputStream_writeBytes: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3876
    "/ 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
  3877
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3878
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3879
    "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
  3880
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3881
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3882
_URLStreamHandlerFactory_pInit: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3883
    "/ self unimplementedNativeMethod.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3884
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3885
    "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
  3886
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3887
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3888
_URLStreamHandlerFactory_pSupportsProtocol: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3889
    "/ 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
  3890
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3891
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3892
    "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
  3893
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3894
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3895
_VM_getState: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3896
    "/ int getState ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3897
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3898
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3899
    "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
  3900
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3901
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3902
_VM_resetJavaMonitor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3903
    "/ void resetJavaMonitor ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3904
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3905
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3906
    "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
  3907
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3908
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3909
_VM_resumeJavaMonitor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3910
    "/ void resumeJavaMonitor ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3911
    JavaVM unimplementedNativeMethodSignal raise
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
    "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
  3914
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3915
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3916
_VM_suspendJavaMonitor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3917
    "/ void suspendJavaMonitor ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3918
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3919
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3920
    "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
  3921
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3922
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3923
_VM_threadsSuspended: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3924
    "/ boolean threadsSuspended ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3925
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3926
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3927
    "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
  3928
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3929
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3930
_VM_unsuspendSomeThreads: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3931
    "/ void unsuspendSomeThreads ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3932
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3933
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3934
    "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
  3935
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3936
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3937
_VM_unsuspendThreads: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3938
    "/ void unsuspendThreads ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3939
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3940
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3941
    "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
  3942
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3943
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3944
_VM_writeJavaMonitorReport: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3945
    "/ void writeJavaMonitorReport ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3946
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3947
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3948
    "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
  3949
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3950
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3951
_WButtonPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3952
    |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
  3953
     lbl|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3954
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3955
    jButtonPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3956
    jButton := jButtonPeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3957
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3958
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3959
    frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3960
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3961
    button := Button in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3962
    button sizeFixed:true.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3963
    button action:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3964
                        jButtonPeer perform:#'handleAction()V'.
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3967
    lbl := jButton instVarNamed:'label'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3968
    lbl notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3969
        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
  3970
        button label:lbl
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3971
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3972
    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
  3973
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3974
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3975
        '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
  3976
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3977
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3978
    "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
  3979
    "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
  3980
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3981
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3982
_WButtonPeer_setLabel: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3983
    |label jString|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3984
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3985
    jString := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3986
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3987
    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
  3988
    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
  3989
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3990
    "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
  3991
    "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
  3992
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3993
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  3994
_WCanvasPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3995
    |jCanvasPeer jFrame frame subView|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3996
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  3997
    jCanvasPeer := nativeContext receiver.
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
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4000
    jFrame isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4001
        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
  4002
        subView := JavaView new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4003
"/        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
  4004
"/        ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4005
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4006
        frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4007
        subView := JavaView in:frame.
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4010
    subView delegate:self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4011
    subView javaPeer:jCanvasPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4012
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4013
    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
  4014
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4015
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4016
        '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
  4017
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4018
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4019
    "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
  4020
    "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
  4021
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4022
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4023
_WCheckboxMenuItemPeer_setState: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4024
    "/ void setState (boolean)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4025
"/    UnimplementedNativeMethodSignal raise
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
    "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
  4028
    "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
  4029
!
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
_WCheckboxPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4032
    |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
  4033
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4034
    jCheckboxPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4035
    jCheckbox := jCheckboxPeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4036
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4037
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4038
    frame := jFrame instVarNamed:'pData'.
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
    checkBox := CheckBox in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4041
    checkBox action:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4042
                        jCheckboxPeer
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4043
                            perform:#'handleAction(Z)V'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4044
                            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
  4045
                    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4046
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4047
    lbl := jCheckbox instVarNamed:'label'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4048
    lbl notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4049
        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
  4050
        checkBox label:lbl
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4053
    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
  4054
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4055
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4056
        '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
  4057
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4058
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4059
    "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
  4060
    "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
  4061
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4062
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4063
_WCheckboxPeer_setCheckboxGroup: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4064
    |checkBox jGroup|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4065
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4066
    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
  4067
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4068
    jGroup := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4069
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4070
    "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
  4071
    "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
  4072
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4073
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4074
_WCheckboxPeer_setLabel: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4075
    "/ 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
  4076
    JavaVM unimplementedNativeMethodSignal raise
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
    "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
  4079
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4080
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4081
_WCheckboxPeer_setState: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4082
    |checkBox state|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4083
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4084
    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
  4085
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4086
    state := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4087
    state ~~ 0 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4088
        checkBox turnOn
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4089
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4090
        checkBox turnOff
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4093
    "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
  4094
    "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
  4095
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4096
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4097
_WChoicePeer_addItem: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4098
    |jString index comboBox|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4099
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4100
    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
  4101
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4102
    jString := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4103
    index := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4104
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4105
    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
  4106
    comboBox model changed:#list.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4107
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4108
    "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
  4109
    "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
  4110
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4111
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4112
_WChoicePeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4113
    |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
  4114
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4115
    jChoicePeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4116
    jChoice := jChoicePeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4117
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4118
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4119
    frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4120
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4121
    comboBox := ComboListView in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4122
    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
  4123
    comboBox action:[:index |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4124
                        jChoicePeer
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4125
                            perform:#'handleAction(I)V'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4126
                            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
  4127
                    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4128
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4129
    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
  4130
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4131
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4132
        '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
  4133
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4134
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4135
    "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
  4136
    "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
  4137
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4138
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4139
_WChoicePeer_remove: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4140
    "/ void remove (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4141
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4142
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4143
    "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
  4144
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4145
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4146
_WChoicePeer_reshape: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4147
    self commonReshapeComponent: nativeContext.
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4148
"/    self pReshape: nativeContext.
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4149
    ^ self.
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
    "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
  4152
    "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
  4153
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4154
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4155
_WChoicePeer_select: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4156
    |comboBox index|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4157
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4158
    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
  4159
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4160
    index := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4161
    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
  4162
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4163
    "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
  4164
    "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
  4165
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4166
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4167
_WClipboard_getClipboardText: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4168
    "/ java.lang.String getClipboardText ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4169
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4170
    |str|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4171
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4172
    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
  4173
    str isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4174
        str := ''.
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
    ^ Java as_String:''.
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
    "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
  4179
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4180
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4181
_WClipboard_init: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4182
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4183
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4184
    "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
  4185
    "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
  4186
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4187
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4188
_WClipboard_setClipboardText: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4189
    "/ 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
  4190
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4191
    |strSel data|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4192
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4193
    strSel := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4194
    data := strSel instVarNamed:'data'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4195
    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
  4196
        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
  4197
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4198
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4199
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4200
    "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
  4201
    "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
  4202
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4203
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4204
_WColor_getDefaultColor: nativeContext
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4205
    | clrIndex  jClr  clr |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4206
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4207
    clrIndex := nativeContext argAt: 1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4208
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4209
    "/ windows defaults:
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4210
    "/  1: view background
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
    clrIndex == 1 ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4213
        clr := View defaultViewBackgroundColor.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4214
        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
  4215
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4216
    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
  4217
    clr isNil ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4218
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4219
        self internalError: 'breakpoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4220
        ^ nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4221
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4222
    clr := clr on: (Screen current).
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4223
    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
  4224
    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
  4225
    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
  4226
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4227
"/ self halt.
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
    ^ jClr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4230
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4231
    "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
  4232
    "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
  4233
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4234
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4235
_WComponentPeer__beginValidate: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4236
    "/ void _beginValidate ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4237
    JavaVM unimplementedNativeMethodSignal raise
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
    "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
  4240
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4241
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4242
_WComponentPeer__dispose: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4243
    |view jPeer|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4244
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4245
    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
  4246
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4247
    Object errorSignal catch:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4248
        view destroy.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4249
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4250
    JavaWindowGroup removeView:view.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4251
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4252
    jPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4253
    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
  4254
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4255
    "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
  4256
    "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
  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__setBackground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4260
    |rgb clr 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
    view isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4264
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4265
    rgb := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4266
    clr := Color rgbValue:rgb.
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
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4269
"/ self internalError:'breakPoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4270
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4271
    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
  4272
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4273
"/    (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
  4274
"/        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
  4275
"/        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
  4276
"/    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4277
"/        (view isMemberOf:JavaView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4278
"/            view viewBackground:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4279
"/            view backgroundPaint:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4280
"/        ]
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
    (view isKindOf:ScrollableView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4284
        view := view scrolledView
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
    view viewBackground:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4287
    view backgroundPaint:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4288
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4289
    "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
  4290
    "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
  4291
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4292
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4293
_WComponentPeer__setForeground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4294
    |rgb clr view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4295
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4296
    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
  4297
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4298
    rgb := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4299
    clr := Color rgbValue:rgb.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4300
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4301
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4302
"/ self internalError:'breakPoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4303
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4304
    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
  4305
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4306
    view paint:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4307
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4308
    "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
  4309
    "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
  4310
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4311
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4312
_WComponentPeer_disable: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4313
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4314
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4315
    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
  4316
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4317
    Object errorSignal handle:[:ex |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4318
    ] do:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4319
        view disable
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4320
    ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4321
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4322
    "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
  4323
    "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
  4324
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4325
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4326
_WComponentPeer_enable: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4327
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4328
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4329
    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
  4330
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4331
    Object errorSignal handle:[:ex |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4332
    ] do:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4333
        view enable
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4334
    ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4335
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4336
    "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
  4337
    "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
  4338
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4339
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4340
_WComponentPeer_endValidate: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4341
    "/ void endValidate ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4342
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4343
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4344
    "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
  4345
!
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
_WComponentPeer_getLocationOnScreen: nativeContext
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4348
    "/ java.awt.Point getLocationOnScreen ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4349
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4350
    | view  p  jP |
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
    view := self viewForWPeer: nativeContext.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4353
    view isNil ifTrue: [ ^ nil ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4354
    p := view originRelativeTo: nil.
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4355
    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
  4356
    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
  4357
    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
  4358
    ^ jP
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4359
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4360
    "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
  4361
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4362
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4363
_WComponentPeer_handleEvent: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4364
    "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
  4365
     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
  4366
     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
  4367
     Ignore for JavaViews."
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4368
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4369
    |view jEv stEv ignore|
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
    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
  4372
    view notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4373
        jEv := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4374
        stEv := jEv instVarNamed:'data'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4375
        (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
  4376
            ignore := true.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4377
            view isJavaView ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4378
                ignore := false
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4379
            ] ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4380
                view isTopView ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4381
                    stEv type == #terminate ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4382
                        ignore := false
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4383
                    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4384
                ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4385
            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4386
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4387
            ignore ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4388
                EventTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4389
                    ('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
  4390
                ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4391
                view dispatchEvent:stEv.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4392
                ^ self.
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4395
            EventTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4396
                ('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
  4397
            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4398
            ^ self
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4399
        ]
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
    EventTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4402
        ('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
  4403
    ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4404
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4405
    "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
  4406
    "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
  4407
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4408
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4409
_WComponentPeer_hide: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4410
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4411
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4412
    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
  4413
"/ 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
  4414
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4415
    Object errorSignal handle:[:ex |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4416
    ] do:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4417
        view beInvisible
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4418
    ]
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
    "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
  4421
    "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
  4422
!
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
_WComponentPeer_nativeHandleEvent: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4425
    "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
  4426
     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
  4427
     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
  4428
     Ignore for JavaViews."
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4429
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4430
    |view jEv stEv|
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
^self.
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4433
    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
  4434
    view notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4435
        (view isKindOf:JavaView) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4436
            jEv := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4437
            stEv := jEv instVarNamed:'data'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4438
            (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
  4439
                EventTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4440
                    ('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
  4441
                ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4442
                stEv sendEventWithFocusOn:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4443
                ^ self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4444
            ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4445
        ]
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
    EventTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4448
        ('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
  4449
    ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4450
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4451
    "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
  4452
    "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
  4453
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4454
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4455
_WComponentPeer_requestFocus: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4456
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4457
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4458
    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
  4459
"/ '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
  4460
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4461
"/    view getKeyboardFocus
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
    "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
  4464
    "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
  4465
!
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
_WComponentPeer_reshape: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4468
    self commonReshapeComponent: nativeContext
1970
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
    "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
  4471
    "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
  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_setBackground: 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 superView isMemberOf:JavaEmbeddedFrameView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4488
"/        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
  4489
"/        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
  4490
"/    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4491
"/        (view isMemberOf:JavaView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4492
"/            view viewBackground:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4493
"/            view backgroundPaint:clr.
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
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4496
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4497
    (view isKindOf:ScrollableView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4498
        view := view scrolledView
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4499
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4500
    view viewBackground:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4501
    view backgroundPaint:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4502
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4503
    "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
  4504
    "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
  4505
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4506
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4507
_WComponentPeer_setCursor: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4508
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4509
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4510
    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
  4511
"/ self halt.
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
    "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
  4514
    "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
  4515
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4516
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4517
_WComponentPeer_setFont: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4518
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4519
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4520
    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
  4521
"/ self halt.
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
    "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
  4524
    "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
  4525
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4526
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4527
_WComponentPeer_setForeground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4528
    |jClr rgb clr view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4529
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4530
    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
  4531
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4532
    jClr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4533
    rgb := jClr instVarNamed:'value'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4534
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4535
    clr := Color rgbValue:rgb.
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4538
    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
  4539
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4540
    (view isKindOf:ScrollableView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4541
        view := view scrolledView
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
    view paint:clr.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4544
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4545
    "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
  4546
    "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
  4547
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4548
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4549
_WComponentPeer_setZOrderPosition: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4550
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4551
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4552
    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
  4553
"/    self unimplementedNativeMethod.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4554
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4555
"/ self internalError:'breakPoint'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4556
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4557
    "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
  4558
    "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
  4559
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4560
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4561
_WComponentPeer_show: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4562
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4563
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4564
    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
  4565
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4566
    "/ 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
  4567
    (view isMemberOf:JavaEmbeddedFrameView) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4568
        view beVisible.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4569
        view 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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4572
"/    view windowGroup notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4573
"/        windowServer addGroup:(view windowGroup)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4574
"/    ].
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
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4577
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4578
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4579
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4580
    "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
  4581
    "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
  4582
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4583
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4584
_WComponentPeer_start: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4585
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4586
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4587
    "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
  4588
    "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
  4589
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4590
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4591
_WContainerPeer_calculateInsets: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4592
    "/ new with ns4.0 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4593
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4594
    "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
  4595
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4596
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4597
_WDefaultFontCharset_canConvert: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4598
    ^ 1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4599
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4600
    "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
  4601
    "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
  4602
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4603
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4604
_WDialogPeer__hide: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4605
    |dialog|
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
    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
  4608
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4609
    dialog hide.
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: / 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
  4612
    "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
  4613
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4614
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4615
_WDialogPeer__show: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4616
    |dialog|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4617
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4618
    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
  4619
"/
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4620
"/ 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
  4621
"/ 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
  4622
"/    dialog realize.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4623
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4624
dialog show.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4625
"/dialog fixSize.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4626
"/dialog makeFullyVisible.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4627
"/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
  4628
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4629
    "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
  4630
    "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
  4631
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4632
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4633
_WDialogPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4634
    |jDialogPeer dialog|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4635
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4636
    jDialogPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4637
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4638
    dialog := ModalBox new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4639
    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
  4640
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4641
    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
  4642
    dialog windowGroup:JavaWindowGroup.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4643
    JavaWindowGroup addTopView:dialog.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4644
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4645
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4646
        '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
  4647
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4648
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4649
    "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
  4650
    "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
  4651
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4652
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4653
_WDrawingSurfaceInfo_getDepth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4654
    "/ int getDepth ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4655
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4656
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4657
    "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
  4658
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4659
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4660
_WDrawingSurfaceInfo_getHBitmap: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4661
    "/ int getHBitmap ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4662
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4663
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4664
    "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
  4665
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4666
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4667
_WDrawingSurfaceInfo_getHDC: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4668
    "/ int getHDC ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4669
    JavaVM unimplementedNativeMethodSignal raise
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
    "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
  4672
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4673
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4674
_WDrawingSurfaceInfo_getHPalette: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4675
    "/ int getHPalette ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4676
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4677
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4678
    "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
  4679
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4680
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4681
_WDrawingSurfaceInfo_getHWnd: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4682
    "/ int getHWnd ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4683
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4684
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4685
    "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
  4686
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4687
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4688
_WDrawingSurfaceInfo_getPBits: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4689
    "/ int getPBits ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4690
    JavaVM unimplementedNativeMethodSignal raise
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
    "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
  4693
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4694
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4695
_WDrawingSurfaceInfo_lock: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4696
    "/ int lock ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4697
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4698
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4699
    "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
  4700
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4701
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4702
_WDrawingSurfaceInfo_unlock: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4703
    "/ void unlock ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4704
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4705
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4706
    "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
  4707
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4708
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4709
_WEmbeddedFramePeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4710
    "/ 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
  4711
    JavaVM unimplementedNativeMethodSignal raise
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
    "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
  4714
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4715
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4716
_WFileDialogPeer_show: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4717
    |jDialogPeer jDialog dialogView stDialog
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4718
     title dir pattern f|
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
    jDialogPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4721
    jDialog := jDialogPeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4722
    dialogView := jDialogPeer instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4723
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4724
    stDialog := FileSelectionBox new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4725
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4726
    dir := jDialog instVarNamed:'dir'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4727
    dir notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4728
        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
  4729
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4730
    pattern := jDialog instVarNamed:'file'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4731
    pattern notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4732
        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
  4733
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4734
    title := jDialog instVarNamed:'title'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4735
    title notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4736
        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
  4737
        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
  4738
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4739
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4740
    stDialog show.
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
    stDialog accepted ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4743
        f := stDialog pathName.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4744
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4745
        "/ 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
  4746
        "/ 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
  4747
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4748
        jDialog
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4749
            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
  4750
            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
  4751
        jDialog
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4752
            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
  4753
            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
  4754
        jDialog
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4755
            perform:#'setVisible(Z)V'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4756
            with:0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4757
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4758
        jDialogPeer
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4759
            perform:#'handleCancel()V'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4760
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4761
"/ self halt.
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
    "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
  4764
    "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
  4765
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4766
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4767
_WFontMetrics_bytesWidth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4768
    "/ 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
  4769
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4770
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4771
    "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
  4772
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4773
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4774
_WFontMetrics_getMFCharSegmentWidth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4775
    "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
  4776
     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
  4777
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4778
    |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
  4779
     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
  4780
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4781
    jMetrics := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4782
    jFont := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4783
    jFontDescr := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4784
    bool1 := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4785
    cp := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4786
    offs := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4787
    lenght := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4788
    bp := nativeContext argAt:7.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4789
    int1 := nativeContext argAt:8.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4790
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4791
    stFont := jFont instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4792
    (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
  4793
        self halt
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4794
    ].
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
    stFont device isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4797
        stFont := stFont on:Display.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4798
        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
  4799
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4800
    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
  4801
    ^ w.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4802
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4803
    "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
  4804
    "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
  4805
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4806
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4807
_WFontMetrics_init: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4808
    |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
  4809
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4810
    jMetrics := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4811
    jFont := jMetrics instVarNamed:'font'.
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
    family := jFont instVarNamed:'family'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4814
    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
  4815
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4816
    name := jFont instVarNamed:'name'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4817
    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
  4818
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4819
    style := jFont instVarNamed:'style'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4820
    size := jFont instVarNamed:'size'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4821
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4822
    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
  4823
    stFont isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4824
        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
  4825
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4826
    stFont := stFont on:Display.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4827
self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4828
"/    stFont := jFont instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4829
"/    stFont isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4830
"/        self halt
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4831
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4832
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4833
    stFont := stFont on:Display.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4834
    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
  4835
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4836
    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
  4837
    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
  4838
    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
  4839
    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
  4840
    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
  4841
    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
  4842
    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
  4843
    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
  4844
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4845
    widths := Array new:256.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4846
    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
  4847
        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
  4848
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4849
    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
  4850
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4851
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4852
    "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
  4853
    "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
  4854
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4855
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4856
_WFontMetrics_needsConversion: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4857
    |jFont jFontDescr stFont|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4858
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4859
    jFont := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4860
    jFontDescr := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4861
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4862
    stFont := jFont instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4863
"/    stFont isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4864
"/        self halt
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
"/    stFont device isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4867
"/        stFont := stFont on:Display.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4868
"/        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
  4869
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4870
"/
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4871
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4872
    ^ 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4873
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4874
    "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
  4875
    "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
  4876
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4877
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4878
_WFramePeer__setIconImage: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4879
    |frame imgRep image|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4880
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4881
    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
  4882
    imgRep := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4883
    imgRep notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4884
        image := imgRep instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4885
        (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
  4886
            frame icon:image.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4887
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4888
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4889
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4890
    "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
  4891
    "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
  4892
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4893
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4894
_WFramePeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4895
    |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
  4896
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4897
    jFramePeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4898
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4899
    "/ 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
  4900
    "/ mozillaFrames
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4901
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4902
    jFrame := jFramePeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4903
    (jFrame notNil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4904
    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
  4905
    ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4906
        ((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
  4907
        and:[frame ~~ 0]) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4908
            WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4909
                '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
  4910
            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4911
            "/ 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
  4912
            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
  4913
            pDataIdx isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4914
                "/ 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
  4915
                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
  4916
            ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4917
            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
  4918
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4919
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4920
        frame := jFramePeer instVarNamed:'pData'
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4921
    ].
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
    (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
  4924
        WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4925
            '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
  4926
            jFramePeer class name infoPrintCR.
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
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4929
"/ OLD
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4930
"/        frame := StandardSystemView new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4931
"/        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
  4932
"/        JavaWindowGroup addTopView:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4933
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4934
        frame := JavaTopView new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4935
        frame delegate:self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4936
        frame javaPeer:jFramePeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4937
        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
  4938
        JavaWindowGroup addTopView:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4939
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4940
"/        top := StandardSystemView new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4941
"/        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
  4942
"/        frame delegate:self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4943
"/        frame javaPeer:jFramePeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4944
"/        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
  4945
"/        JavaWindowGroup addTopView:top.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4946
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4947
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4948
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4949
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4950
        '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
  4951
        ' frame: ' print. frame printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4952
    ].
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
    "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
  4955
    "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
  4956
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4957
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4958
_WFramePeer_setMenuBar0: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4959
    |frame jMenuBarPeer menuPanel|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4960
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4961
    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
  4962
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4963
    jMenuBarPeer := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4964
    jMenuBarPeer isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4965
        "/ 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
  4966
        "/ 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
  4967
        "/ 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
  4968
        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
  4969
            (v isKindOf:MenuPanel) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4970
                v destroy
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4971
            ]
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
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4974
        menuPanel := jMenuBarPeer instVarNamed:'pData'.
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
        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
  4977
        frame addSubView:menuPanel.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4978
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4979
    ^ nil
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: / 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
  4982
    "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
  4983
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4984
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4985
_WFramePeer_setResizable: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4986
    |view onOff|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4987
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  4988
    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
  4989
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4990
    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
  4991
    view isTopView ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4992
        onOff ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4993
            view minExtent:10@10.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4994
            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
  4995
        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4996
            view minExtent:view extent.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  4997
            view maxExtent:view extent.
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
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5000
        (view isMemberOf:JavaEmbeddedFrameView) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5001
            self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5002
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5003
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5004
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5005
"/ '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
  5006
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5007
    ^ nil
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
    "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
  5010
    "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
  5011
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5012
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5013
_WFramePeer_setTitle: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5014
    |view jString string|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5015
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5016
    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
  5017
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5018
    jString := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5019
    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
  5020
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5021
"/ '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
  5022
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5023
    view label:string.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5024
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5025
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5026
    "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
  5027
    "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
  5028
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5029
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5030
_WGraphics__dispose: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5031
    "/ void _dispose()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5032
    JavaVM unimplementedNativeMethodSignal raise
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
    "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
  5035
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5036
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5037
_WGraphics_changeClip: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5038
    |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
  5039
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5040
    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
  5041
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5042
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5043
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5044
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5045
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5046
    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
  5047
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5048
    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
  5049
"/ '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
  5050
    gc clippingRectangle:r.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5051
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5052
    "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
  5053
    "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
  5054
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5055
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5056
_WGraphics_clearRect: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5057
    |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
  5058
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5059
    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
  5060
"/    gc isNil ifTrue:[^ self].
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
    gc realized ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5063
        '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
  5064
        ^ self
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5067
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5068
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5069
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5070
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5071
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5072
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5073
"/ self internalError:'breakPoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5074
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5075
    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
  5076
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5077
    "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
  5078
    "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
  5079
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5080
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5081
_WGraphics_close: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5082
    "/ 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
  5083
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5084
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5085
    "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
  5086
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5087
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5088
_WGraphics_copyArea: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5089
    |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
  5090
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5091
    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
  5092
"/    gc isNil ifTrue:[^ self].
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
    gc realized ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5095
        '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
  5096
        ^ self
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5097
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5098
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5099
    srcX := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5100
    srcY := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5101
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5102
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5103
    deltaX := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5104
    deltaY := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5105
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5106
    gc
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5107
        copyFrom:gc
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5108
        x:srcX y:srcY
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5109
        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
  5110
        width:w height:h
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: / 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
  5113
    "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
  5114
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5115
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5116
_WGraphics_createFromComponent: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5117
    |jGraphics jWin view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5118
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5119
    jGraphics := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5120
    jWin := nativeContext argAt:1.
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
    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
  5123
    view isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5124
        self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5125
        ^ self
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5126
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5127
    view clippingRectangle:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5128
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5129
"/    "/ just a consistency check ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5130
"/    (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
  5131
"/        self halt:'consistency check'
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5134
    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
  5135
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5136
    "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
  5137
    "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
  5138
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5139
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5140
_WGraphics_createFromGraphics: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5141
    |jGraphics graphics gc|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5142
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5143
    jGraphics := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5144
    graphics := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5145
    gc := graphics instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5146
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5147
    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
  5148
    gc clippingRectangle:nil.
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: / 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
  5151
    "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
  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_createFromHDC: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5155
    "/ void createFromHDC (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:17:32 / 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_createFromPrintJob: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5162
    "/ 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
  5163
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5164
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5165
    "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
  5166
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5167
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5168
_WGraphics_dispose: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5169
    |gc|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5170
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5171
    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
  5172
    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5173
    gc clippingRectangle:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5174
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5175
    "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
  5176
    "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
  5177
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5178
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5179
_WGraphics_drawArc: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5180
    |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
  5181
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5182
    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
  5183
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5184
    gc realized ifFalse:[^ self].
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
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5187
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5188
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5189
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5190
    startAngle := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5191
    endAngle := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5192
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5193
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5194
        '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
  5195
               ' 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
  5196
               ' 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
  5197
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5198
    gc
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5199
        displayArcX:x y:y
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5200
        width:w height:h
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5201
        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
  5202
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5203
    "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
  5204
    "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
  5205
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5206
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5207
_WGraphics_drawBytes: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5208
    "/ 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
  5209
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5210
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5211
    "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
  5212
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5213
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5214
_WGraphics_drawLine: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5215
    |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
  5216
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5217
    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
  5218
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5219
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5220
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5221
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5222
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5223
    x2 := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5224
    y2 := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5225
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5226
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5227
        '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
  5228
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5229
    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
  5230
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5231
    "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
  5232
    "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
  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_drawMFCharsConvertedSegment: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5236
    "/ 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
  5237
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5238
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5239
    "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
  5240
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5241
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5242
_WGraphics_drawMFCharsSegment: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5243
    |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
  5244
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5245
    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
  5246
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5247
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5248
    jFont := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5249
    jFontDescr := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5250
    s := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5251
    offs := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5252
    len := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5253
    x := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5254
    y := nativeContext argAt:7.
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
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5257
        '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
  5258
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5259
    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
  5260
    ^ (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
  5261
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5262
    "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
  5263
    "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
  5264
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5265
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5266
_WGraphics_drawOval: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5267
    |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
  5268
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5269
    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
  5270
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5271
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5272
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5273
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5274
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5275
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5276
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5277
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5278
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5279
        '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
  5280
                ' 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
  5281
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5282
    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
  5283
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5284
    "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
  5285
    "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
  5286
!
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
_WGraphics_drawPolygon: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5289
    |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
  5290
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5291
    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
  5292
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5293
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5294
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5295
    xVector := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5296
    yVector := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5297
    count := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5298
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5299
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5300
        'drawPolgon' printCR.
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5303
    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
  5304
    gc displayPolygon:points
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5305
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5306
    "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
  5307
    "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
  5308
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5309
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5310
_WGraphics_drawPolyline: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5311
    "/ 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
  5312
    JavaVM unimplementedNativeMethodSignal raise
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
    "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
  5315
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5316
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5317
_WGraphics_drawRect: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5318
    |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
  5319
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5320
    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
  5321
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5322
    gc realized ifFalse:[^ self].
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
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5325
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5326
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5327
    h := nativeContext argAt:4.
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
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5330
"/ self internalError:'breakPoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5331
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5332
    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
  5333
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5334
    "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
  5335
    "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
  5336
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5337
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5338
_WGraphics_drawRoundRect: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5339
    |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
  5340
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5341
    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
  5342
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5343
    gc realized ifFalse:[^ self].
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
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5346
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5347
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5348
    h := nativeContext argAt:4.
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
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5351
"/ self internalError:'breakPoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5352
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5353
    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
  5354
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5355
    "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
  5356
    "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
  5357
!
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
_WGraphics_drawSFChars: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5360
    "/ 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
  5361
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5362
    |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
  5363
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5364
    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
  5365
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5366
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5367
    str := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5368
    idx1 := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5369
    nChars := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5370
    x := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5371
    y := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5372
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5373
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5374
        '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
  5375
               ' s= ' print. str printCR.
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
    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
  5378
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5379
    "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
  5380
    "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
  5381
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5382
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5383
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5384
_WGraphics_fillArc: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5385
    |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
  5386
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5387
    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
  5388
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5389
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5390
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5391
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5392
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5393
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5394
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5395
    startAngle := nativeContext argAt:5.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5396
    endAngle := nativeContext argAt:6.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5397
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5398
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5399
        '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
  5400
               ' 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
  5401
               ' 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
  5402
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5403
    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
  5404
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5405
    "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
  5406
    "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
  5407
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5408
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5409
_WGraphics_fillOval: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5410
    |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
  5411
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5412
    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
  5413
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5414
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5415
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5416
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5417
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5418
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5419
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5420
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5421
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5422
        '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
  5423
                ' 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
  5424
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5425
    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
  5426
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5427
    "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
  5428
    "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
  5429
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5430
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5431
_WGraphics_fillPolygon: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5432
    |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
  5433
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5434
    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
  5435
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5436
    gc realized ifFalse:[^ self].
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
    xVector := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5439
    yVector := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5440
    count := nativeContext argAt:3.
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
    DrawOPTrace ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5443
        'fillPolgon' printCR.
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5446
    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
  5447
    gc fillPolygon:points
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5448
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5449
    "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
  5450
    "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
  5451
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5452
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5453
_WGraphics_fillRect: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5454
    |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
  5455
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5456
    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
  5457
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5458
    gc realized ifFalse:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5459
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5460
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5461
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5462
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5463
    h := nativeContext argAt:4.
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
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5466
"/ self internalError:'breakPoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5467
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5468
    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
  5469
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5470
    "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
  5471
    "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
  5472
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5473
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5474
_WGraphics_fillRoundRect: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5475
    |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
  5476
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5477
    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
  5478
"/    gc isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5479
    gc realized ifFalse:[^ self].
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
    x := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5482
    y := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5483
    w := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5484
    h := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5485
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5486
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5487
"/ self internalError:'breakPoint'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5488
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5489
    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
  5490
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5491
    "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
  5492
    "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
  5493
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5494
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5495
_WGraphics_getClipBounds: nativeContext
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5496
    | 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
  5497
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5498
    gc := self gcForWGraphics: nativeContext.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5499
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5500
"/    gc isNil ifTrue:[^ nil].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5501
1971
e75c1790521c Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5502
    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
  5503
    (gc isMemberOf: JavaView) ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5504
        "/ r := gc clippingRectangleOrNil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5505
        r := gc getNextUpdateRectangle.
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
    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
  5508
    r isNil ifTrue: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5509
        x := y := 0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5510
        w := (gc width).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5511
        h := (gc height).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5512
    ] ifFalse: [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5513
        x := (r left).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5514
        y := (r top).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5515
        w := (r width).
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5516
        h := (r height).
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
    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
  5519
    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
  5520
    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
  5521
    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
  5522
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5523
"/ '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
  5524
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5525
    ^ rect
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
    "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
  5528
    "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
  5529
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5530
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5531
_WGraphics_imageCreate: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5532
    |jGraphics imgRep|
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
    jGraphics := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5535
    imgRep := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5536
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5537
    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
  5538
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5539
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5540
    "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
  5541
    "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
  5542
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5543
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5544
_WGraphics_pSetFont: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5545
    |gc jFont stFont|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5546
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5547
    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
  5548
    jFont := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5549
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5550
    stFont := jFont instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5551
    (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
  5552
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5553
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5554
        gc font:stFont
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5555
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5556
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5557
    "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
  5558
    "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
  5559
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5560
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5561
_WGraphics_pSetForeground: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5562
    |gc rgb clr|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5563
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5564
    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
  5565
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5566
    rgb := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5567
    rgb isInteger ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5568
        "/ 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
  5569
        rgb := rgb instVarNamed:'value'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5570
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5571
    clr := Color rgbValue:rgb.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5572
    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
  5573
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5574
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5575
"/ self internalError:'breakPoint'.
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
    "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
  5578
    "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
  5579
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5580
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5581
_WGraphics_print: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5582
    "/ 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
  5583
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5584
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5585
    "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
  5586
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5587
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5588
_WGraphics_removeClip: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5589
    "/ void removeClip ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5590
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5591
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5592
    "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
  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
_WGraphics_setPaintMode: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5596
    |gc|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5597
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5598
    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
  5599
    gc function:#copy.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5600
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5601
    true "DrawOPTrace" ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5602
        'copyMode' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5603
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5604
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5605
    "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
  5606
    "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
  5607
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5608
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5609
_WGraphics_setXORMode: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5610
    |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
  5611
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5612
    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
  5613
    jColor := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5614
    device := gc graphicsDevice.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5615
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5616
"/    "/ 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
  5617
"/    "/ rgb value for inverting.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5618
"/    "/ 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
  5619
"/
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5620
"/    device visualType == #TrueColor ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5621
"/        rgb := jColor instVarNamed:'value'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5622
"/        rgb := rgb bitAnd:16rFFFFFF.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5623
"/        rgb == 0 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5624
"/            rgb := 16rFFFFFF.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5625
"/        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5626
"/        invColor := rgb
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5627
"/    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5628
"/        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
  5629
"/    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5630
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5631
    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
  5632
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5633
"/    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
  5634
"/       background:device blackColor.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5635
    device
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5636
        setForeground:invColor background:0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5637
        in:gc gcId.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5638
    gc function:#xor.
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
    true "DrawOPTrace" ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5641
        'xorMode' infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5642
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5643
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5644
    "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
  5645
    "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
  5646
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5647
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5648
_WLabelPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5649
    |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
  5650
     lbl|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5651
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5652
    jLabelPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5653
    jLabel := jLabelPeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5654
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5655
    lbl := jLabel instVarNamed:'text'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5656
    lbl notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5657
        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
  5658
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5659
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5660
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5661
    frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5662
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5663
    label := Label in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5664
    label sizeFixed:true.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5665
    lbl notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5666
        label label:lbl
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5667
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5668
    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
  5669
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5670
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5671
        '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
  5672
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5673
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5674
    "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
  5675
    "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
  5676
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5677
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5678
_WLabelPeer_setAlignment: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5679
    |label alignNr|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5680
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5681
    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
  5682
    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
  5683
    label notNil ifTrue:[
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: / 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
  5687
    "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
  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
_WLabelPeer_setText: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5691
    |label jString str|
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
    jString := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5694
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5695
    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
  5696
    jString notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5697
        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
  5698
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5699
    label label:str
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5700
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5701
    "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
  5702
    "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
  5703
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5704
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5705
_WListPeer__addItem: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5706
    |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
  5707
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5708
    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
  5709
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5710
    jString := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5711
    index1 := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5712
    length := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5713
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5714
    (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
  5715
        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
  5716
        m changed:#list.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5717
    ].
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
    "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
  5720
    "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
  5721
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5722
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5723
_WListPeer_addItem: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5724
    |jString index selListView m|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5725
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5726
    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
  5727
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5728
    jString := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5729
    index := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5730
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5731
    m := selListView model.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5732
    m isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5733
        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
  5734
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5735
        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
  5736
        m changed:#list.
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5739
    "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
  5740
    "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
  5741
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5742
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5743
_WListPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5744
    |jListPeer jFrame frame selectionInListView|
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
    jListPeer := nativeContext receiver.
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
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5749
    frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5750
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5751
    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
  5752
    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
  5753
    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
  5754
    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
  5755
    selectionInListView useIndex:true.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5756
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5757
    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
  5758
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5759
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5760
        '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
  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
    "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
  5764
    "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
  5765
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5766
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5767
_WListPeer_delItems: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5768
    |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
  5769
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5770
    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
  5771
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5772
    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
  5773
    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
  5774
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5775
    model := selListView model.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5776
    model isNil ifTrue:[^ self].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5777
    list := model list.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5778
    list size >= index1 ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5779
        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
  5780
        model changed:#list.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5781
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5782
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5783
    "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
  5784
    "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
  5785
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5786
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5787
_WListPeer_deselect: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5788
    "/ void deselect (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5789
    JavaVM unimplementedNativeMethodSignal raise
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
    "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
  5792
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5793
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5794
_WListPeer_getMaxWidth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5795
    "/ int getMaxWidth ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5796
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5797
    ^ 1000 "/ a dummy value
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5798
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5799
"/    UnimplementedNativeMethodSignal raise
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
    "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
  5802
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5803
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5804
_WListPeer_isSelected: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5805
    |selectionInListView index model|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5806
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5807
    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
  5808
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5809
    index := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5810
    (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
  5811
        (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
  5812
        ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5813
            ^ 1
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
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5816
    ^ 0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5817
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5818
    "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
  5819
    "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
  5820
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5821
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5822
_WListPeer_makeVisible: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5823
    |selectionInListView lineNr|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5824
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5825
    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
  5826
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5827
    lineNr := nativeContext argAt:1.
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
    selectionInListView makeLineVisible:(lineNr + 1)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5830
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5831
    "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
  5832
    "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
  5833
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5834
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5835
_WListPeer_select: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5836
    |selectionInListView index model|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5837
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5838
    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
  5839
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5840
    index := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5841
    (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
  5842
        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
  5843
    ]
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
    "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
  5846
    "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
  5847
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5848
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5849
_WListPeer_setMultipleSelections: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5850
    |selectionInListView onOff|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5851
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5852
    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
  5853
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5854
    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
  5855
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5856
    selectionInListView multipleSelectOk:onOff.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5857
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5858
    "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
  5859
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5860
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5861
_WListPeer_updateMaxItemWidth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5862
    |selectionInListView lineNr|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5863
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5864
    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
  5865
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5866
    "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
  5867
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5868
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5869
_WMenuBarPeer_addMenu: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5870
    "/ 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
  5871
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5872
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5873
    "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
  5874
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5875
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5876
_WMenuBarPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5877
    |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
  5878
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5879
    jMenuBarPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5880
    jMenuBar := jMenuBarPeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5881
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5882
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5883
    frame := jFrame instVarNamed:'pData'.
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
    menuBar := MenuPanel in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5886
    menuBar verticalLayout:false.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5887
    menuBar realize.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5888
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5889
    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
  5890
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5891
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5892
        '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
  5893
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5894
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5895
    "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
  5896
    "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
  5897
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5898
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5899
_WMenuBarPeer_delMenu: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5900
    "/ void delMenu (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5901
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5902
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5903
    "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
  5904
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5905
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5906
_WMenuItemPeer__dispose: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5907
    |jMenuItemPeer item|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5908
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5909
    jMenuItemPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5910
    item := jMenuItemPeer instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5911
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5912
"/ 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
  5913
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5914
    "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
  5915
    "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
  5916
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5917
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5918
_WMenuItemPeer__setLabel: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5919
    "/ 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
  5920
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5921
    |jMenuItemPeer item label|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5922
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5923
    jMenuItemPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5924
    item := jMenuItemPeer instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5925
    (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
  5926
        '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
  5927
        ^ self
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5928
    ].
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
    label := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5931
    label isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5932
        label := ''
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5933
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5934
        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
  5935
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5936
    item label:label.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5937
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5938
    "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
  5939
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5940
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5941
_WMenuItemPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5942
    |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
  5943
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5944
    jMenuItemPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5945
    jMenuItem := jMenuItemPeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5946
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5947
    jMenuPeer := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5948
    menu := jMenuPeer instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5949
    (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
  5950
        '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
  5951
        ^ self
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5952
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5953
    item := menu createAtIndex:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5954
    item value:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5955
                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
  5956
               ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5957
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5958
    lbl := jMenuItem instVarNamed:'label'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5959
    lbl notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5960
        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
  5961
        item label:lbl
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5962
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5963
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5964
    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
  5965
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5966
    WindowOPTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5967
        '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
  5968
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5969
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5970
    "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
  5971
    "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
  5972
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5973
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5974
_WMenuItemPeer_enable: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5975
    |jMenuItemPeer item state|
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
    jMenuItemPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5978
    item := jMenuItemPeer instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5979
    (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
  5980
        '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
  5981
        ^ self
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5982
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5983
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5984
    state := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5985
    item enabled:(state ~~ 0)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5986
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5987
    "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
  5988
    "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
  5989
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5990
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5991
_WMenuPeer_addSeparator: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5992
    "/ void addSeparator ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5993
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5994
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5995
    "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
  5996
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5997
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  5998
_WMenuPeer_createMenu: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  5999
    |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
  6000
     lbl item|
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
    jMenuPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6003
    jMenu := jMenuPeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6004
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6005
    jMenuBarPeer := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6006
    menuPanel := jMenuBarPeer instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6007
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6008
    item := menuPanel createAtIndex:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6009
    lbl := jMenu instVarNamed:'label'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6010
    lbl notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6011
        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
  6012
        item label:lbl
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
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6015
    menu := MenuPanel new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6016
    item submenu:menu.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6017
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6018
    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
  6019
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6020
'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
  6021
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6022
    "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
  6023
    "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
  6024
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6025
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6026
_WMenuPeer_createSubMenu: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6027
    "/ 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
  6028
"/    UnimplementedNativeMethodSignal raise
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: / 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
  6031
    "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
  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
_WMenuPeer_delItem: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6035
    "/ void delItem (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6036
    |jMenuPeer jMenu menuPanel itemIndex|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6037
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6038
    jMenuPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6039
    menuPanel := jMenuPeer instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6040
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6041
    itemIndex := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6042
    menuPanel remove:itemIndex.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6043
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6044
"/    UnimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6045
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6046
    "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
  6047
    "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
  6048
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6049
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6050
_WPanelPeer_calculateInsets: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6051
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6052
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6053
    "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
  6054
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6055
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6056
_WPopupMenuPeer__show: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6057
    "/ 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
  6058
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6059
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6060
    "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
  6061
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6062
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6063
_WPopupMenuPeer_createMenu: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6064
    "/ 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
  6065
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6066
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6067
    "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
  6068
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6069
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6070
_WPrintJob_end: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6071
    "/ void end ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6072
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6073
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6074
    "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
  6075
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6076
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6077
_WScrollPanePeer__getHScrollbarHeight: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6078
    |scrollPane|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6079
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6080
    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
  6081
    ^ HorizontalScrollBar new preferredExtent y.
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
    "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
  6084
    "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
  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__getVScrollbarWidth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6088
    |scrollPane|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6089
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6090
    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
  6091
    ^ ScrollBar new preferredExtent x.
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
    "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
  6094
    "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
  6095
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6096
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6097
_WScrollPanePeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6098
    |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
  6099
     lbl|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6100
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6101
    jScrollPanePeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6102
    jScrollPane := jScrollPanePeer instVarNamed:'target'.
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
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6105
    frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6106
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6107
    "/ 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
  6108
    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
  6109
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6110
    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
  6111
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6112
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6113
        '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
  6114
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6115
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6116
    "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
  6117
    "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
  6118
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6119
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6120
_WScrollPanePeer_getOffset: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6121
    "/ int getOffset (int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6122
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6123
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6124
    "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
  6125
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6126
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6127
_WScrollPanePeer_getScrollChild: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6128
    "/ java.awt.Component getScrollChild ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6129
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6130
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6131
    "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
  6132
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6133
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6134
_WScrollPanePeer_setInsets: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6135
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6136
    "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
  6137
    "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
  6138
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6139
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6140
_WScrollPanePeer_setScrollPosition: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6141
    "/ void setScrollPosition (int int)
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6142
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6143
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6144
    "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
  6145
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6146
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6147
_WScrollPanePeer_setSpans: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6148
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6149
    "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
  6150
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6151
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6152
_WScrollbarPeer__setValues: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6153
    |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
  6154
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6155
    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
  6156
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6157
    value := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6158
    visibleAmount := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6159
    min := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6160
    max := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6161
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6162
    (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
  6163
        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
  6164
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6165
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6166
    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
  6167
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6168
    "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
  6169
    "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
  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_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6173
    |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
  6174
     min max|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6175
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6176
    jScrollbarPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6177
    jScrollbar := jScrollbarPeer instVarNamed:'target'.
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
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6180
    frame := jFrame instVarNamed:'pData'.
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
    (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
  6183
        scrollBar := HorizontalScrollBar in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6184
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6185
        scrollBar := ScrollBar in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6186
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6187
    min := jScrollbar instVarNamed:'minimum'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6188
    max := jScrollbar instVarNamed:'maximum'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6189
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6190
    scrollBar scrollDownAction:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6191
                        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
  6192
                        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
  6193
                     ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6194
    scrollBar scrollUpAction:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6195
                        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
  6196
                        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
  6197
                     ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6198
    scrollBar scrollAction:[:org |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6199
                        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
  6200
                     ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6201
    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
  6202
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6203
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6204
        '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
  6205
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6206
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6207
    "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
  6208
    "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
  6209
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6210
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6211
_WScrollbarPeer_setLineIncrement: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6212
    |scrollBar inc|
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
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
  6215
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6216
    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
  6217
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6218
    inc := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6219
"/    scrollBar thumb lineIncrement:inc.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6220
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6221
    "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
  6222
    "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
  6223
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6224
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6225
_WScrollbarPeer_setPageIncrement: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6226
    |scrollBar inc|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6227
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6228
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
  6229
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6230
    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
  6231
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6232
    inc := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6233
"/    scrollBar thumb pageIncrement:inc.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6234
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6235
    "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
  6236
    "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
  6237
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6238
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6239
_WTextAreaPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6240
    |jTextAreaPeer jFrame frame editTextView|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6241
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6242
    jTextAreaPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6243
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6244
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6245
    frame := jFrame instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6246
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6247
    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
  6248
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6249
    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
  6250
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6251
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6252
        '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
  6253
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6254
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6255
    "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
  6256
    "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
  6257
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6258
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6259
_WTextAreaPeer_insertText: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6260
    |textView pos string jstring|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6261
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6262
    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
  6263
    (textView isKindOf:ScrollableView) ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6264
        textView := textView scrolledView
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6265
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6266
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6267
    jstring := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6268
    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
  6269
    pos := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6270
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6271
    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
  6272
    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
  6273
    textView makeCursorVisible.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6274
"/ textView invalidateRepairNow:true.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6275
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6276
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6277
    "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
  6278
    "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
  6279
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6280
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6281
_WTextAreaPeer_replaceText: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6282
    "/ 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
  6283
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6284
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6285
    "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
  6286
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6287
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6288
_WTextComponentPeer_enableEditing: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6289
    |textView enabled|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6290
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6291
    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
  6292
    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
  6293
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6294
    ^ textView readOnly:enabled not
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6295
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6296
    "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
  6297
    "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
  6298
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6299
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6300
_WTextComponentPeer_getSelectionEnd: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6301
    |textView|
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
    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
  6304
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6305
    ^ textView characterPositionOfSelectionEnd
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6306
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6307
    "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
  6308
    "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
  6309
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6310
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6311
_WTextComponentPeer_getSelectionStart: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6312
    |textView|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6313
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6314
    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
  6315
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6316
    ^ textView characterPositionOfSelection - 1
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
    "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
  6319
    "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
  6320
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6321
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6322
_WTextComponentPeer_getText: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6323
    |textView string jString|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6324
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6325
    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
  6326
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6327
    string := textView contents asString.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6328
    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
  6329
    ^ jString
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
    "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
  6332
    "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
  6333
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6334
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6335
_WTextComponentPeer_select: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6336
    |textView selStart selEnd|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6337
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6338
    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
  6339
    selStart := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6340
    selEnd := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6341
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6342
    selStart == selEnd ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6343
        "/ clear selection
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6344
        textView unselect.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6345
        "/ and set caret
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6346
        textView cursorToCharacterPosition:selStart + 1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6347
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6348
        "/ change selection
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6349
        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
  6350
    ].
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
    "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
  6353
    "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
  6354
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6355
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6356
_WTextComponentPeer_setText: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6357
    |textView string jstring|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6358
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6359
    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
  6360
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6361
    jstring := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6362
    jstring notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6363
        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
  6364
    ].
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
    textView contents:string.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6367
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6368
    "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
  6369
    "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
  6370
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6371
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6372
_WTextFieldPeer_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6373
    |jTextFieldPeer jFrame frame editField|
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
    jTextFieldPeer := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6376
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6377
    jFrame := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6378
    frame := jFrame instVarNamed:'pData'.
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
    editField := EditField in:frame.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6381
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6382
    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
  6383
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6384
    editField crAction:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6385
                        jTextFieldPeer perform:#handleAction.
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
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6388
        '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
  6389
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6390
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6391
    "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
  6392
    "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
  6393
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6394
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6395
_WTextFieldPeer_setEchoCharacter: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6396
    |editField char|
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
    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
  6399
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6400
    char := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6401
    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
  6402
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6403
    "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
  6404
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6405
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6406
_WToolkit_beep: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6407
    "/ void beep ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6408
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6409
    Screen current beep
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
    "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
  6412
    "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
  6413
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6414
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6415
_WToolkit_eventLoop: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6416
    (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
  6417
        '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
  6418
    ].
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
    JavaEventThread := Processor activeProcess.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6421
    [
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6422
        [true] whileTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6423
            AbortSignal handle:[:ex |
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6424
                ex return
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6425
            ] do:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6426
                self doWindowsEventThread.
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
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6429
    ] valueNowOrOnUnwindDo:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6430
        JavaEventThread := nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6431
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6432
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6433
    "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
  6434
    "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
  6435
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6436
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6437
_WToolkit_getComboHeightOffset: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6438
    ^ 0
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6439
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6440
    "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
  6441
    "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
  6442
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6443
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6444
_WToolkit_getScreenHeight: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6445
    ^ Screen current height
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6446
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6447
    "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
  6448
    "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
  6449
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6450
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6451
_WToolkit_getScreenResolution: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6452
    ^ 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
  6453
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6454
    "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
  6455
    "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
  6456
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6457
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6458
_WToolkit_getScreenWidth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6459
    ^ Screen current width
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6460
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6461
    "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
  6462
    "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
  6463
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6464
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6465
_WToolkit_init: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6466
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6467
    "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
  6468
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6469
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6470
_WToolkit_loadSystemColors: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6471
"/ self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6472
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6473
    "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
  6474
    "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
  6475
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6476
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6477
_WToolkit_makeColorModel: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6478
    "/ 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
  6479
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6480
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6481
    "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
  6482
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6483
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6484
_WToolkit_sync: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6485
    "/ void sync ()
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6486
    JavaVM unimplementedNativeMethodSignal raise
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6487
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6488
    "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
  6489
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6490
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6491
_WWindowPeer__setResizable: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6492
    |view onOff|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6493
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6494
    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
  6495
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6496
    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
  6497
    view isTopView ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6498
        onOff ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6499
            view minExtent:10@10.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6500
            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
  6501
        ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6502
            view minExtent:view extent.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6503
            view maxExtent:view extent.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6504
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6505
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6506
        (view isMemberOf:JavaEmbeddedFrameView) ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6507
            self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6508
        ]
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6509
    ].
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
"/ '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
  6512
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6513
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6514
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6515
    "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
  6516
    "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
  6517
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6518
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6519
_WWindowPeer__setTitle: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6520
    |view jString string|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6521
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6522
    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
  6523
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6524
    jString := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6525
    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
  6526
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6527
"/ '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
  6528
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6529
    view label:string.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6530
    ^ nil
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6531
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6532
    "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
  6533
    "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
  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_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6537
    "/ 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
  6538
    |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
  6539
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6540
    jWindowPeer := nativeContext receiver.
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
    jWindow := jWindowPeer instVarNamed:'target'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6543
    window := jWindowPeer instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6544
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6545
    (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
  6546
        WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6547
            '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
  6548
            jWindowPeer class name infoPrintCR.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6549
        ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6550
    ] ifFalse:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6551
"/ OLD
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6552
"/        window := StandardSystemView new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6553
"/        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
  6554
"/        JavaWindowGroup addTopView:window.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6555
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6556
        window := JavaPopUpView new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6557
        window borderWidth:0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6558
        window level:0.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6559
        window delegate:self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6560
        window javaPeer:jWindowPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6561
        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
  6562
        JavaWindowGroup addTopView:window.
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
"/        top := StandardSystemView new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6565
"/        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
  6566
"/        window delegate:self.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6567
"/        window javaPeer:jWindowPeer.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6568
"/        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
  6569
"/        JavaWindowGroup addTopView:top.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6570
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6571
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6572
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6573
    WindowCreationTrace == true ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6574
        '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
  6575
        ' window: ' print. window printNL.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6576
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6577
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6578
    "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
  6579
    "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
  6580
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6581
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6582
_WWindowPeer_getContainerElement: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6583
    "/ 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
  6584
    JavaVM unimplementedNativeMethodSignal raise
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
    "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
  6587
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6588
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6589
_WWindowPeer_toBack: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6590
    |view|
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
    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
  6593
    view lower.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6594
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6595
    "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
  6596
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6597
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6598
_WWindowPeer_toFront: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6599
    |view|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6600
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6601
    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
  6602
    view raise.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6603
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6604
    "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
  6605
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6606
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6607
_WWindowPeer_updateInsets: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6608
"/ self halt.
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
    "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
  6611
    "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
  6612
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6613
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6614
_Win32Process_create: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6615
    "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
  6616
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6617
    |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
  6618
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6619
    jProcess := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6620
    cmd := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6621
    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
  6622
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6623
    env := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6624
    env notNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6625
        self halt
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
self halt.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6628
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6629
    p := Win32Process new.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6630
    p command:cmd.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6631
    p environment:env.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6632
    p inStream:inPipe.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6633
    p outStream:outPipe.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6634
    p errorStream:errorPipe.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6635
    p directory:nil.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6636
    p startProcess.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6637
self halt.
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
    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
  6640
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6641
    "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
  6642
    "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
  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
_X11FontMetrics_getMFCharSegmentWidth: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6646
    "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
  6647
     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
  6648
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6649
    |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
  6650
     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
  6651
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6652
    jMetrics := nativeContext receiver.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6653
    jFont := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6654
    jFontDescr := nativeContext argAt:2.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6655
    cp := nativeContext argAt:3.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6656
    lenght := nativeContext argAt:4.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6657
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6658
    stFont := jFont instVarNamed:'pData'.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6659
    (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
  6660
        self halt
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6661
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6662
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6663
    stFont device isNil ifTrue:[
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6664
        stFont := stFont on:Display.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6665
        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
  6666
    ].
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6667
    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
  6668
    ^ w.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6669
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6670
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6671
_X11FontMetrics_init: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6672
    ^ self _WFontMetrics_init: nativeContext
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
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6675
_X11GraphicsDevice_getConfigType: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6676
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6677
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6678
    |configNr cls|
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6679
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6680
    "/ 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
  6681
    configNr := nativeContext argAt:1.
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6682
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6683
    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
  6684
    ^ 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
  6685
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6686
    "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
  6687
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6688
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6689
_X11GraphicsDevice_getNumConfigs: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6690
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6691
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6692
    ^ 1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6693
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6694
    "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
  6695
    "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
  6696
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6697
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6698
_X11GraphicsEnvironment_getNumScreens: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6699
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6700
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6701
    "/ 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
  6702
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6703
    ^ 1
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6704
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6705
    "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
  6706
    "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
  6707
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6708
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6709
_X11GraphicsEnvironment_initDisplay: nativeContext
1970
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6710
    "/ new with jdk1.2 ...
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6711
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6712
    "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
  6713
!
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6714
1983
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6715
_X11Graphics_changeClip: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6716
    ^ self _WGraphics_changeClip: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6717
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6718
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6719
_X11Graphics_createFromComponent: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6720
    ^ self _WGraphics_createFromComponent: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6721
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6722
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6723
_X11Graphics_disposeImpl: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6724
    ^ self _WGraphics_dispose: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6725
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6726
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6727
_X11Graphics_drawMFCharsSegment: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6728
    ^ self _WGraphics_drawMFCharsSegment: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6729
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6730
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6731
_X11Graphics_drawRect: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6732
    ^ self _WGraphics_drawRect: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6733
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6734
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6735
_X11Graphics_fillOval: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6736
    ^ self _WGraphics_fillOval: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6737
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6738
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6739
_X11Graphics_fillRect: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6740
    ^ self _WGraphics_fillRect: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6741
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6742
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6743
_X11Graphics_pSetFont: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6744
    ^ self _WGraphics_pSetFont: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6745
!
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6746
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6747
_X11Graphics_pSetForeground: nativeContext
03dcc3899eea Make all native methods source ending with ': nativeContext'.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1982
diff changeset
  6748
    ^ 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
  6749
! !
a78cd5a84c77 Native methods moved from JavaVM to JavaNativeMethodImpl_OpenJDK6
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1969
diff changeset
  6750
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6751
!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
  6752
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6753
_com_sun_management_UnixOperatingSystem_initialize: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6754
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6755
    <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
  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
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
  6758
^self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6759
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6760
    "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
  6761
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6762
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6763
!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
  6764
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6765
_java_awt_AWTEvent_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6766
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6767
    <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
  6768
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6769
    "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
  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
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6774
_java_awt_Button_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6775
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6776
    <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
  6777
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6778
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6781
_java_awt_Color_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6782
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6783
    <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
  6784
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6785
        "/ 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
  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
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6790
_java_awt_Component_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6791
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6792
    <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
  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
        "/ 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
  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
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6799
_java_awt_Container_initIDs: this _context: nativeContext
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/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
  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
    "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
  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
    "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
  6806
!
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
_java_awt_Cursor_initIDs: this _context: nativeContext
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
    <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
  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
    "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
  6813
!
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
_java_awt_Dialog_initIDs: this _context: nativeContext
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
    <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
  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
    "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
  6820
!
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
_java_awt_Dimension_initIDs: this _context: nativeContext
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
    <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
  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
    "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
  6827
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6828
    "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
  6829
!
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
_java_awt_Event_initIDs: this _context: nativeContext
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
    <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
  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
    "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
  6836
!
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
_java_awt_FontMetrics_initIDs: this _context: nativeContext
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
    <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
  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
    ^ 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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6845
_java_awt_Frame_initIDs: this _context: nativeContext
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/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
  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: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
  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
_java_awt_Insets_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6853
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6854
    <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
  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
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6859
_java_awt_KeyboardFocusManager_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6860
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6861
    <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
  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
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6866
_java_awt_MenuComponent_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6867
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6868
    <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
  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
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6873
_java_awt_MenuItem_initIDs: this _context: nativeContext
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
    <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
  6876
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6877
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6880
_java_awt_Rectangle_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6881
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6882
    <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
  6883
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6884
    "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
  6885
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6886
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6889
_java_awt_Toolkit_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6890
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6891
    <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
  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
        "/ 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
  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
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6898
_java_awt_Window_initIDs: this _context: nativeContext
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/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
  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
    "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
  6903
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6904
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6905
!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
  6906
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6907
_java_awt_event_InputEvent_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6908
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6909
    <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
  6910
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6911
    "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
  6912
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6913
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6914
_java_awt_event_KeyEvent_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6915
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6916
    <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
  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
    "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
  6919
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6920
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6921
_java_awt_event_MouseEvent_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6922
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6923
    <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
  6924
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6925
    "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
  6926
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6927
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6928
!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
  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
_java_io_FileDescriptor_initIDs: this _context: nativeContext
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
    <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
  6933
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6934
        "/ 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
  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
    "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
  6937
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6938
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6939
_java_io_FileDescriptor_set: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6940
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6941
    <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
  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
    "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
  6944
     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
  6945
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6946
    ^a1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6947
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6948
    "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
  6949
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6950
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6951
_java_io_FileDescriptor_sync: this _context: nativeContext
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
    <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
  6954
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6955
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6956
    * 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
  6957
    * 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
  6958
    * 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
  6959
    * 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
  6960
    * 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
  6961
    * 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
  6962
    * 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
  6963
    * 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
  6964
    *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6965
    * 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
  6966
    * 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
  6967
    * 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
  6968
    * 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
  6969
    * 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
  6970
    *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6971
    * 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
  6972
    * 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
  6973
    * 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
  6974
    * 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
  6975
    * 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
  6976
    *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6977
    * @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
  6978
    *        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
  6979
    *        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
  6980
    *        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
  6981
    * @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
  6982
    */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6983
    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
  6984
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6985
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6986
    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
  6987
        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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6990
    "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
  6991
    "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
  6992
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6994
_java_io_FileInputStream_available: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6995
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6996
    <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
  6997
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  6998
        |file|
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
    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
  7001
    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
  7002
        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
  7003
        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
  7004
            ^ 1
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
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7007
    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
  7008
        ^ 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
  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
    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
  7011
        ^ 0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7012
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7013
    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
  7014
    ^ 1
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
    "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
  7017
    "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
  7018
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7019
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7020
_java_io_FileInputStream_close0: this _context: nativeContext
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
    <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
  7023
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7024
    ^self commonClose: self nativeContext
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7025
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7026
    "Modified: / 30-01-2013 / 14:13:31 / 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
  7027
!
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
_java_io_FileInputStream_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7030
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7031
    <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
  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
        "/ 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
  7034
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7035
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7038
_java_io_FileInputStream_open: this _:a1 _context: nativeContext
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: '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
  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
    |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
  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
    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
  7045
    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
  7046
    (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
  7047
        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
  7048
            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
  7049
            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
  7050
            ^ self.
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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7054
    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
  7055
    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
  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
    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
  7058
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7059
    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
  7060
        ('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
  7061
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7062
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7063
    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
  7064
    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
  7065
        ^ self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7066
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7067
    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
  7068
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7069
"/    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
  7070
"/        (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
  7071
"/        ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7072
"/            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
  7073
"/            ^ self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7074
"/        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7075
"/    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7076
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7077
    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
  7078
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7079
    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
  7080
        ('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
  7081
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7082
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7083
    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
  7084
    "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
  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
    "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
  7087
    "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
  7088
    "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
  7089
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7090
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7091
_java_io_FileInputStream_read: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7092
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7093
    <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
  7094
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7095
        |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
  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
    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
  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
    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
  7100
        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
  7101
        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
  7102
            ^ -1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7103
        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7104
    ].
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
    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
  7107
        ('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
  7108
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7109
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7110
    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
  7111
    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
  7112
        ^ -1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7113
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7114
    "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
  7115
    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
  7116
        byte := 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7117
            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
  7118
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7119
    ^ byte
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7120
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7121
    "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
  7122
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7125
_java_io_FileInputStream_readBytes: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7126
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7127
    <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
  7128
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7129
    ^ self anyStream_readBytes: 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
  7130
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7131
    "Modified: / 04-02-1998 / 15:23:08 / cg"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7132
    "Modified: / 30-01-2013 / 14:13: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
  7133
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7134
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7135
_java_io_FileInputStream_skip: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7136
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7137
    <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
  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
        "/ 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
  7140
    |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
  7141
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7142
    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
  7143
    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
  7144
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7145
    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
  7146
        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
  7147
        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
  7148
            ^ -1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7149
        ]
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
    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
  7153
        (('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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7156
    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
  7157
    ^ nSkip
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7158
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7159
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7162
_java_io_FileOutputStream_close0: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7163
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7164
    <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
  7165
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7166
    ^self commonClose: self nativeContext
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7167
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7168
    "Modified: / 30-01-2013 / 14:13:38 / 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
  7169
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7170
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7171
_java_io_FileOutputStream_initIDs: this _context: nativeContext
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
    <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
  7174
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7175
        "/ 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
  7176
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7177
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7180
_java_io_FileOutputStream_open: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7181
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7182
    <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
  7183
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7184
    ^ self commonOpen: self nativeContext 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
  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
    "Modified: / 07-04-1998 / 19:14:31 / cg"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7187
    "Modified: / 30-01-2013 / 14:13: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
  7188
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7189
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7190
_java_io_FileOutputStream_openAppend: this _:a1 _context: nativeContext
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
    <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
  7193
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7194
    ^ self commonOpen: self nativeContext 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
  7195
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7196
    "Modified: / 07-04-1998 / 19:13:42 / cg"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7197
    "Modified: / 30-01-2013 / 14:13: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
  7198
!
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
_java_io_FileOutputStream_write: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7201
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7202
    <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
  7203
    "
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
     * 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
  7206
     * 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
  7207
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7208
     * @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
  7209
     * @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
  7210
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7211
     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
  7212
    "
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
    | 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
  7215
    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
  7216
    "/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
  7217
    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
  7218
    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
  7219
    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
  7220
    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
  7221
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7222
        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
  7223
    ] 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
  7224
        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
  7225
    ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7226
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7227
    "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
  7228
!
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
_java_io_FileOutputStream_writeBytes: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7231
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7232
    <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
  7233
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7234
        ^ self anyStream_writeBytes: self nativeContext
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7235
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7236
    "Modified: / 04-02-1998 / 15:24:20 / cg"
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7237
    "Modified: / 30-01-2013 / 14:13:51 / 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
  7238
!
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
_java_io_FileSystem_getFileSystem: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7241
    <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
  7242
    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
  7243
        ^ (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
  7244
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7245
    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
  7246
        ^ (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
  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
    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
  7249
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7250
    "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
  7251
    "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
  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
_java_io_ObjectInputStream_latestUserDefinedLoader: this _context: nativeContext
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
    <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
  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
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7260
    * 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
  7261
    * 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
  7262
    * 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
  7263
    * 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
  7264
    *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7265
    *     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
  7266
    *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7267
    * 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
  7268
    * 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
  7269
    */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7270
    // 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
  7271
    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
  7272
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7273
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7274
    | ctx cl |
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7275
    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
  7276
    [ 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
  7277
        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
  7278
            (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
  7279
                "/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
  7280
                "/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
  7281
                ^cl.
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
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7284
        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
  7285
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7286
    ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7287
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7288
    "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
  7289
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7290
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7291
_java_io_ObjectStreamClass_hasStaticInitializer: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7292
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7293
    <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
  7294
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7295
    | cls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7296
    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
  7297
    ^(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
  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
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7302
_java_io_ObjectStreamClass_initNative: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7303
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7304
    <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
  7305
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7306
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
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7309
     * 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
  7310
     */
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
    "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
  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
    "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
  7315
!
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
_java_io_RandomAccessFile_close0: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7318
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7319
    <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
  7320
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7321
    ^ self commonClose: self nativeContext
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7322
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7323
    "Modified: / 30-01-2013 / 14:17:00 / 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
  7324
!
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
_java_io_RandomAccessFile_getFilePointer: this _context: nativeContext
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
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7329
     * 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
  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
     * @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
  7332
     *             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
  7333
     * @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
  7334
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7335
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7336
    <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
  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
    | file |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7339
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7340
    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
  7341
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7342
    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
  7343
        ('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
  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
    ^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
  7346
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7347
    "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
  7348
!
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
_java_io_RandomAccessFile_initIDs: this _context: nativeContext
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
    <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
  7353
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7354
    "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
  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
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7359
_java_io_RandomAccessFile_length: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7360
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7361
    <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
  7362
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7363
        |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
  7364
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7365
    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
  7366
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7367
    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
  7368
        ('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
  7369
    ].
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
    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
  7372
    ^ sz.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7373
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7374
    "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
  7375
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7376
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7377
_java_io_RandomAccessFile_open: this _:a1 _: a2 _context: nativeContext
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
    <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
  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
    |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
  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
    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
  7385
    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
  7386
    (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
  7387
        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
  7388
        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
  7389
        ^ self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7390
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7391
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7392
    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
  7393
    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
  7394
    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
  7395
    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
  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
    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
  7399
    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
  7400
    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
  7401
    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
  7402
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7403
    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
  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
    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
  7406
        ('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
  7407
    ].
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
    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
  7410
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7411
    (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
  7412
    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
  7413
        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
  7414
            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
  7415
                    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
  7416
                               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
  7417
                               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
  7418
                              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
  7419
            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
  7420
                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
  7421
            , ' 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
  7422
                ^ self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7423
            ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7424
            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
  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
            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
  7427
                (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
  7428
                ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7429
                    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
  7430
                        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
  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
                    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
  7433
                ]
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
        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7436
    ].
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
    (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
  7439
        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
  7440
    ].
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
    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
  7443
        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
  7444
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7445
        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
  7446
        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
  7447
            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
  7448
        ].
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
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
    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
  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
    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
  7455
        ('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
  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
    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
  7459
    "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
  7460
    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
  7461
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7462
    "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
  7463
    "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
  7464
    "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
  7465
!
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
_java_io_RandomAccessFile_read: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7468
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7469
    <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
  7470
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7471
        |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
  7472
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7473
    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
  7474
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7475
    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
  7476
        ('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
  7477
    ].
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
    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
  7480
    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
  7481
        ^ -1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7482
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7483
    ^ byte
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7484
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7485
    "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
  7486
    "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
  7487
!
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
_java_io_RandomAccessFile_readBytes: this _:a1 _: a2 _: a3 _context: nativeContext
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
    <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
  7492
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7493
    ^ self anyStream_readBytes: 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
  7494
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7495
    "Modified: / 04-02-1998 / 15:23:27 / cg"
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7496
    "Modified: / 30-01-2013 / 14:14:06 / 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
  7497
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7498
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7499
_java_io_RandomAccessFile_seek: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7500
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7501
    <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
  7502
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7503
        |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
  7504
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7505
    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
  7506
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7507
    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
  7508
        ('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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7511
    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
  7512
    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
  7513
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7514
    "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
  7515
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7518
_java_io_RandomAccessFile_writeBytes: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7519
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7520
    <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
  7521
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7522
        ^ self anyStream_writeBytes: self nativeContext
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7523
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7524
    "Created: / 04-02-1998 / 15:24:35 / cg"
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7525
    "Modified: / 30-01-2013 / 14:14:10 / 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
  7526
!
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
_java_io_UnixFileSystem_canonicalize0: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7529
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7530
    <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
  7531
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7532
    |  path |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7533
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7534
    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
  7535
    ^(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
  7536
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7537
    "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
  7538
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7539
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7540
_java_io_UnixFileSystem_checkAccess: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7541
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7542
    <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
  7543
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7544
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7545
     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
  7546
     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
  7547
     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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7550
    | 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
  7551
    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
  7552
    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
  7553
    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
  7554
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7555
        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
  7556
        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
  7557
        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
  7558
    ] 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
  7559
        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
  7560
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7561
    ^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
  7562
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7563
    "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
  7564
!
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
_java_io_UnixFileSystem_createDirectory: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7567
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7568
    <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
  7569
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7570
    | 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
  7571
    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
  7572
    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
  7573
    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
  7574
    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
  7575
        [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7576
            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
  7577
            ^1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7578
        ] 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
  7579
            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
  7580
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7581
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7582
    ^0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7583
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7584
    "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
  7585
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7586
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7587
_java_io_UnixFileSystem_createFileExclusively: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7588
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7589
    <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
  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
    | file |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7592
    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
  7593
    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
  7594
    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
  7595
        [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7596
            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
  7597
        ] 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
  7598
            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
  7599
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7600
        ^1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7601
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7602
    ^0
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
    "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
  7605
!
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
_java_io_UnixFileSystem_delete0: this _:a1 _context: nativeContext
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
    <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
  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
      /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7612
      * 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
  7613
      * 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
  7614
      */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7615
      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
  7616
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7617
    | file |
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
    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
  7620
    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
  7621
    ^[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7622
        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
  7623
        true
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7624
    ] 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
  7625
        false
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7626
    ]
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
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7631
_java_io_UnixFileSystem_getBooleanAttributes0: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7632
    <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
  7633
    | 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
  7634
    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
  7635
    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
  7636
    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
  7637
    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
  7638
    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
  7639
        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
  7640
    ] 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
  7641
    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
  7642
        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
  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
    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
  7645
        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
  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
    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
  7648
        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
  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
    ^ retval
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
    "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
  7653
    "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
  7654
    "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
  7655
    "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
  7656
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7657
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7658
_java_io_UnixFileSystem_getLastModifiedTime: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7659
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7660
    <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
  7661
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7662
    | 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
  7663
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7664
    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
  7665
    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
  7666
    ^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
  7667
        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
  7668
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7669
        0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7670
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7671
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7672
    "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
  7673
    "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
  7674
    "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
  7675
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7676
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7677
_java_io_UnixFileSystem_getLength: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7678
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7679
    <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
  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
    | file |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7682
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7683
    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
  7684
    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
  7685
    ^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
  7686
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7687
    "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
  7688
!
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
_java_io_UnixFileSystem_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7691
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7692
    <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
  7693
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
    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
  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
    "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
  7698
    "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
  7699
!
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
_java_io_UnixFileSystem_list: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7702
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7703
    <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
  7704
    "
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
    * 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
  7707
    * 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
  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
    * <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
  7710
    * 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
  7711
    * 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
  7712
    * 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
  7713
    * 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
  7714
    * 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
  7715
    *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7716
    * <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
  7717
    * 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
  7718
    * 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
  7719
    *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7720
    * @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
  7721
    *          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
  7722
    *          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
  7723
    *          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
  7724
    *          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
  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
   "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7727
    | 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
  7728
    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
  7729
    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
  7730
    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
  7731
    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
  7732
    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
  7733
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7734
    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
  7735
    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
  7736
    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
  7737
        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
  7738
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7739
    ^jnames
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7740
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7741
    "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
  7742
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7743
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7744
_java_io_UnixFileSystem_rename0: this _:a1 _: a2 _context: nativeContext
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
    <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
  7747
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7748
    | 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
  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
    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
  7751
    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
  7752
    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
  7753
    ^[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7754
        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
  7755
        true
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7756
    ] 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
  7757
        false
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7758
    ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7759
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7760
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7763
_java_io_UnixFileSystem_setLastModifiedTime: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7764
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7765
    <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
  7766
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7767
    | 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
  7768
    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
  7769
    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
  7770
    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
  7771
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7772
    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
  7773
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7774
    "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
  7775
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7776
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7777
_java_io_UnixFileSystem_setPermission: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7778
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7779
    <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
  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
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7782
     * 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
  7783
     * 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
  7784
     * 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
  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
    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
  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
    | 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
  7789
    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
  7790
    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
  7791
    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
  7792
    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
  7793
    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
  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
    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
  7796
    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
  7797
    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
  7798
    "
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
    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
  7801
        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
  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
    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
  7804
        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
  7805
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7806
    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
  7807
        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
  7808
    ].
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
        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
  7811
            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
  7812
        ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7813
            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
  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
        ^ 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7816
    ] 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
  7817
        ^ 0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7818
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7819
    ^0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7820
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7821
    "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
  7822
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7823
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7824
_java_io_UnixFileSystem_setReadOnly: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7825
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7826
    <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
  7827
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7828
    | 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
  7829
    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
  7830
    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
  7831
    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
  7832
    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
  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
        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
  7835
        ^1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7836
    ] 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
  7837
        ^0
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
    ^0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7840
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7841
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7844
_java_io_Win32FileSystem_initIDs: this _context: nativeContext
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
    <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
  7847
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7848
    "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
  7849
!
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
_java_io_WinNTFileSystem_canonicalize0: this _:a1 _context: nativeContext
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
    <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
  7854
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
    |  path |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7857
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7858
    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
  7859
    ^(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
  7860
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7861
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7864
_java_io_WinNTFileSystem_canonicalizeWithPrefix0: this _:a1 _: a2 _context: nativeContext
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: '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
  7867
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7868
    |  path |
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
    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
  7871
    ^(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
  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
    "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
  7874
!
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
_java_io_WinNTFileSystem_checkAccess: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7877
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7878
    <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
  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
    ^ 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
  7881
!
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
_java_io_WinNTFileSystem_createDirectory: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7884
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7885
    <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
  7886
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7887
    ^ 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
  7888
!
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
_java_io_WinNTFileSystem_createFileExclusively: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7891
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7892
    <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
  7893
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7894
    ^ self _java_io_UnixFileSystem_createFileExclusively: this _:a1 _context: nil
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7895
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7896
    "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
  7897
    "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
  7898
!
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
_java_io_WinNTFileSystem_delete0: this _:a1 _context: nativeContext
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
    <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
  7903
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7904
    ^ 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
  7905
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7906
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7907
_java_io_WinNTFileSystem_getBooleanAttributes: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7908
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7909
    <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
  7910
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7911
    ^ self _java_io_UnixFileSystem_getBooleanAttributes0: this _:a1 _context: nil
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7912
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7913
    "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
  7914
    "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
  7915
!
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
_java_io_WinNTFileSystem_getLastModifiedTime: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7918
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7919
    <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
  7920
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7921
    ^ self _java_io_UnixFileSystem_getLastModifiedTime: this _:a1 _context: nil
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7922
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7923
    "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
  7924
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7927
_java_io_WinNTFileSystem_getLength: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7928
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7929
    <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
  7930
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7931
    ^ self _java_io_UnixFileSystem_getLength: this _:a1 _context: nil
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7932
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7933
    "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
  7934
    "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
  7935
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7936
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7937
_java_io_WinNTFileSystem_list: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7938
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7939
    <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
  7940
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  7941
    ^ self _java_io_UnixFileSystem_list: this _:a1 _context: nil
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7942
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7943
    "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
  7944
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7947
!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
  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
_java_lang_ClassLoader_NativeLibrary_load: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7950
    <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
  7951
    "/ 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
  7952
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7953
    | 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
  7954
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7955
    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
  7956
    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
  7957
    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
  7958
    (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
  7959
        "/        ('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
  7960
        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
  7961
        ^ self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7962
        "/ void
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7963
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7964
    (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
  7965
        "/        ('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
  7966
        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
  7967
        ^ self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7968
        "/ void
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7969
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7970
    (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
  7971
        ^ self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7972
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7973
    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
  7974
    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
  7975
        ('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
  7976
        ^ self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7977
        "/ void
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7978
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7979
    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
  7980
    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
  7981
        ('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
  7982
        ^ self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7983
        "/ void
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7984
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7985
    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
  7986
    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
  7987
    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
  7988
    ^ self
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7989
    "/ void
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7990
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7991
    "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
  7992
    "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
  7993
    "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
  7994
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7995
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7996
_java_lang_ClassLoader_defineClass1: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7997
    <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
  7998
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  7999
     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
  8000
                                      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
  8001
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8002
    | 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
  8003
    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
  8004
    "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
  8005
    "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
  8006
    "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
  8007
    (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
  8008
        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
  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
    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
  8011
    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
  8012
    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
  8013
    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
  8014
    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
  8015
    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
  8016
    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
  8017
    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
  8018
        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
  8019
        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
  8020
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8021
        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
  8022
            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
  8023
    ] 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
  8024
            do: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8025
        :ex |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8026
        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
  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
    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
  8030
     "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
  8031
    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
  8032
    "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
  8033
        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
  8034
    ^ 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
  8035
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8036
    "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
  8037
    "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
  8038
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8041
_java_lang_ClassLoader_findBootstrapClass: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8042
    <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
  8043
    "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
  8044
     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
  8045
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8046
    | 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
  8047
    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
  8048
    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
  8049
                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
  8050
                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
  8051
                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
  8052
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8053
    ^ 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
  8054
        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
  8055
        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
  8056
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8057
    "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
  8058
    "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
  8059
!
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
_java_lang_ClassLoader_findLoadedClass0: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8062
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8063
    <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
  8064
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8065
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8066
    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
  8067
    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
  8068
    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
  8069
        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
  8070
        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
  8071
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
    | 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
  8074
    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
  8075
    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
  8076
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8077
    ^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
  8078
        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
  8079
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8080
        nil
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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8083
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8086
_java_lang_ClassLoader_registerNatives: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8087
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8088
    <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
  8089
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8090
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8091
    "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
  8092
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8093
    "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
  8094
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8095
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8096
_java_lang_ClassLoader_resolveClass0: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8097
    <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
  8098
    "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
  8099
    "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
  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
    | 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
  8102
    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
  8103
    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
  8104
    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
  8105
        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
  8106
        ^ nil
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
    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
  8109
    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
  8110
    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
  8111
     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
  8112
    ^ cls.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8113
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8114
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8115
        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
  8116
        * 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
  8117
        * 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
  8118
        * 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
  8119
        * 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
  8120
        * 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
  8121
        * </p>
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
        * @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
  8124
        *         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
  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
        * @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
  8127
         *          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
  8128
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8129
    "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
  8130
    "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
  8131
    "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
  8132
    "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
  8133
    "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
  8134
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8135
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8136
_java_lang_ClassLoader_retrieveDirectives: this _context: nativeContext
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
    <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
  8139
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8140
    | directives |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8141
    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
  8142
    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
  8143
        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
  8144
    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
  8145
        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
  8146
    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
  8147
        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
  8148
    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
  8149
        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
  8150
    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
  8151
        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
  8152
    ^directives
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8153
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: / 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
  8155
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8156
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8157
_java_lang_Class_desiredAssertionStatus0: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8158
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8159
    <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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8162
    ^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
  8163
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8164
    "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
  8165
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8166
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8167
_java_lang_Class_forName0: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8168
    <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
  8169
    |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
  8170
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8171
    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
  8172
     "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
  8173
    (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
  8174
        ^ 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
  8175
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8176
    (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
  8177
        ^ 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
  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
    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
  8180
    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
  8181
    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
  8182
        (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
  8183
            |nms|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8184
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8185
            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
  8186
            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
  8187
                        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
  8188
            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
  8189
                ^ 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
  8190
            ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8191
            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
  8192
        ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8193
            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
  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
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8196
    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
  8197
        ^ 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
  8198
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8199
    ((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
  8200
        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
  8201
            ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8202
                [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
  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
    ^ 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
  8205
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8206
    "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
  8207
    "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
  8208
    "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
  8209
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8212
_java_lang_Class_getClassLoader0: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8213
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8214
    <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
  8215
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8216
    "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
  8217
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8218
    |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
  8219
    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
  8220
    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
  8221
    ^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
  8222
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8223
    "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
  8224
!
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
_java_lang_Class_getComponentType: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8227
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: '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
  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
        |cls|
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
    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
  8233
    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
  8234
        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
  8235
        ^ nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8236
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8237
    ^ 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
  8238
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8239
    "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
  8240
    "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
  8241
    "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
  8242
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8243
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8244
_java_lang_Class_getConstantPool: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8245
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8246
    <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
  8247
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8248
        | class |
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
    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
  8251
    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
  8252
        ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8253
    ].
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
    ^ 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
  8256
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8257
    "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
  8258
    "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
  8259
    "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
  8260
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8261
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8262
_java_lang_Class_getDeclaredClasses0: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8263
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8264
    <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
  8265
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8266
    | 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
  8267
    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
  8268
    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
  8269
    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
  8270
    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
  8271
        ((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
  8272
            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
  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
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8275
    ^(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
  8276
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8277
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8280
_java_lang_Class_getDeclaredConstructors0: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8281
    <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
  8282
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8283
    | 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
  8284
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8285
    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
  8286
    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
  8287
    ^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
  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
    "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
  8290
    "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
  8291
    "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
  8292
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8293
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8294
_java_lang_Class_getDeclaredFields0: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8295
    <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
  8296
    |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
  8297
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8298
    class := Reflection
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  8299
                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
  8300
    (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
  8301
        ^(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
  8302
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8303
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8304
    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
  8305
    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
  8306
    ^fields
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8307
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8308
    "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
  8309
    "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
  8310
    "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
  8311
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8312
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8313
_java_lang_Class_getDeclaredMethods0: this _:a1 _context: nativeContext
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: '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
  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
    | 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
  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
    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
  8319
    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
  8320
    ^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
  8321
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8322
    "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
  8323
    "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
  8324
    "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
  8325
    "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
  8326
!
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
_java_lang_Class_getDeclaringClass: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8329
    <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
  8330
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8331
     /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8332
     * 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
  8333
     * 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
  8334
     * 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
  8335
     * 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
  8336
     * 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
  8337
     * 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
  8338
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8339
     * @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
  8340
     * @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
  8341
     */"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8342
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8343
    | 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
  8344
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8345
    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
  8346
    (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
  8347
    (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
  8348
    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
  8349
    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
  8350
    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
  8351
    ^ 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
  8352
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: / 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
  8354
!
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
_java_lang_Class_getEnclosingMethod0: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8357
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8358
    <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
  8359
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8360
    ^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
  8361
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8362
    "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
  8363
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8364
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8365
_java_lang_Class_getGenericSignature: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8366
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8367
    <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
  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
    |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
  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
    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
  8372
    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
  8373
    ^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
  8374
        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
  8375
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8376
        nil
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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8379
    "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
  8380
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8381
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8382
_java_lang_Class_getInterfaces: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8383
    <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
  8384
    |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
  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
    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
  8387
    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
  8388
    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
  8389
    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
  8390
    interfaces
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8391
        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
  8392
    ^ jInterfaces
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8393
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8394
    "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
  8395
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8398
_java_lang_Class_getModifiers: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8399
    <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
  8400
    | cls |
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
    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
  8403
    ^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
  8404
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8405
    "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
  8406
    "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
  8407
    "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
  8408
!
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
_java_lang_Class_getName0: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8411
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8412
    <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
  8413
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8414
    |class|
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 := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8417
    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
  8418
    ^ Reflection
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8419
        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
  8420
        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
  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
    "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
  8423
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8424
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8425
_java_lang_Class_getPrimitiveClass: this _:a1 _context: nativeContext
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
    <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
  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
        "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
  8430
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8431
    |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
  8432
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8433
    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
  8434
    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
  8435
    (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
  8436
        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
  8437
    ^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
  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
    "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
  8440
    "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
  8441
    "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
  8442
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8443
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8444
_java_lang_Class_getProtectionDomain0: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8445
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8446
    <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
  8447
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8448
    ^(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
  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
    "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
  8451
!
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
_java_lang_Class_getRawAnnotations: this _context: nativeContext
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
    <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
  8456
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8457
    |class |
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
    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
  8460
    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
  8461
        ^nil
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
    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
  8464
        ^nil
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
    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
  8467
        ^nil.
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
    ^ 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
  8470
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8471
    "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
  8472
    "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
  8473
    "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
  8474
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8475
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8476
_java_lang_Class_getSuperclass: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8477
    <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
  8478
    "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
  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
    | 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
  8481
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8482
    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
  8483
    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
  8484
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8485
    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
  8486
    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
  8487
        ^ 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
  8488
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8489
    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
  8490
        ^ 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
  8491
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8492
    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
  8493
    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
  8494
    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
  8495
    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
  8496
    ^ 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
  8497
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8498
    "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
  8499
    "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
  8500
    "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
  8501
    "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
  8502
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8503
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8504
_java_lang_Class_isArray: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8505
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8506
    <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
  8507
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8508
        ^ (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
  8509
        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
  8510
        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
  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
    "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
  8513
    "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
  8514
    "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
  8515
!
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
_java_lang_Class_isAssignableFrom: this _:a1 _context: nativeContext
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
    <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
  8520
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8521
        "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8522
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8523
     * 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
  8524
     * {@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
  8525
     * 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
  8526
     * {@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
  8527
     * 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
  8528
     * 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
  8529
     * {@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
  8530
     * 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
  8531
     * {@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
  8532
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8533
     * <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
  8534
     * 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
  8535
     * 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
  8536
     * 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
  8537
     * 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
  8538
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8539
     * @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
  8540
     * @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
  8541
     * 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
  8542
     * @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
  8543
     *            null.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8544
     * @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
  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
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8547
    | 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
  8548
    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
  8549
    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
  8550
    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
  8551
    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
  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
    "/    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
  8554
    "/    @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
  8555
    "/    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
  8556
    "/    {@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
  8557
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8558
    ^(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
  8559
        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
  8560
        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
  8561
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8562
    "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
  8563
    "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
  8564
!
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
_java_lang_Class_isInstance: this _:a1 _context: nativeContext
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
    <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
  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
        "
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
     * 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
  8573
     * 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
  8574
     * 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
  8575
     * 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
  8576
     * {@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
  8577
     * 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
  8578
     * 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
  8579
     * otherwise.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8580
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8581
     * <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
  8582
     * 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
  8583
     * {@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
  8584
     * 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
  8585
     * 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
  8586
     * 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
  8587
     * 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
  8588
     * 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
  8589
     * {@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
  8590
     * 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
  8591
     * 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
  8592
     * 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
  8593
     * 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
  8594
     * 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
  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
     * @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
  8597
     * @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
  8598
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8599
     * @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
  8600
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8601
    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
  8602
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8603
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8604
    |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
  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
    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
  8607
    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
  8608
    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
  8609
    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
  8610
    ^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
  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
    "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
  8613
    "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
  8614
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8617
_java_lang_Class_isInterface: this _context: nativeContext
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: '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
  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
        "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
  8622
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8623
    |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
  8624
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8625
    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
  8626
    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
  8627
    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
  8628
        ^ 0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8629
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8630
    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
  8631
        ^ 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
  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
    ^ 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
  8634
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8635
    "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
  8636
    "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
  8637
    "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
  8638
!
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
_java_lang_Class_isPrimitive: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8641
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8642
    <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
  8643
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8644
        "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
  8645
     (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
  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
    |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
  8648
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8649
    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
  8650
    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
  8651
    ^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
  8652
        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
  8653
        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
  8654
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8655
    "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
  8656
    "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
  8657
    "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
  8658
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8659
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8660
_java_lang_Class_registerNatives: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8661
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8662
    <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
  8663
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8664
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8665
     "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
  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
    "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
  8668
!
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
_java_lang_Class_setProtectionDomain0: this _: a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8671
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8672
    <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
  8673
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8674
    (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
  8675
    ^a1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8676
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8677
    "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
  8678
!
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
_java_lang_Compiler_disable: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8681
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8682
    <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
  8683
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8684
    "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
  8685
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8686
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8687
_java_lang_Compiler_enable: this _context: nativeContext
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
    <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
  8690
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8691
    "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
  8692
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8693
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8694
_java_lang_Compiler_registerNatives: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8695
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8696
    <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
  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
    "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
  8699
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8700
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8701
_java_lang_Double_doubleToRawLongBits: this _:a1 _: a2 _context: nativeContext
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
    <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
  8704
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
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8707
     * 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
  8708
     * 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
  8709
     * 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
  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
     * <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
  8712
     * {@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
  8713
     * 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
  8714
     * 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
  8715
     * {@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
  8716
     * (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
  8717
     * {@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
  8718
     * (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
  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
     * <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
  8721
     * {@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
  8722
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8723
     * <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
  8724
     * {@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
  8725
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8726
     * <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
  8727
     * 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
  8728
     * {@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
  8729
     * {@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
  8730
     * 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
  8731
     * value.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8732
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8733
     * <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
  8734
     * 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
  8735
     * 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
  8736
     * {@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
  8737
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8738
     * @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
  8739
     * @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
  8740
     * @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
  8741
     */
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
      | 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
  8744
    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
  8745
    (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
  8746
    (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
  8747
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8748
    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
  8749
    ^ 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
  8750
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8751
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8752
"/    | f |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8753
"/    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
  8754
"/    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
  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
"/    __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
  8757
"/    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
  8758
"/%}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8759
"/    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
  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
    "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
  8762
    "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
  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
_java_lang_Double_longBitsToDouble: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8766
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8767
    <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
  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
    |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
  8770
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8771
    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
  8772
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8773
    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
  8774
    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
  8775
        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
  8776
        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
  8777
        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
  8778
        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
  8779
        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
  8780
        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
  8781
        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
  8782
        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
  8783
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8784
        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
  8785
        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
  8786
        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
  8787
        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
  8788
        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
  8789
        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
  8790
        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
  8791
        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
  8792
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8793
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8794
    ^ aFloat.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8795
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8796
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8797
"/    | 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
  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
"/    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
  8800
"/    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
  8801
"/%{
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8802
"/    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
  8803
"/    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
  8804
"/    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
  8805
"/    __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
  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
"/    ^f
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
    "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
  8810
!
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
_java_lang_Float_floatToRawIntBits: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8813
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8814
    <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
  8815
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
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8818
     * 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
  8819
     * 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
  8820
     * 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
  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
     * <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
  8823
     * {@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
  8824
     * number.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8825
     * 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
  8826
     * {@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
  8827
     * 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
  8828
     * {@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
  8829
     * 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
  8830
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8831
     * <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
  8832
     * {@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
  8833
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8834
     * <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
  8835
     * {@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
  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
     * <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
  8838
     * 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
  8839
     * 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
  8840
     * 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
  8841
     * 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
  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
     * <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
  8844
     * {@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
  8845
     * 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
  8846
     * {@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
  8847
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8848
     * @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
  8849
     * @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
  8850
     * @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
  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
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8853
    | 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
  8854
    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
  8855
    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
  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
        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
  8858
        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
  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
    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
  8861
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8862
    "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
  8863
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8866
_java_lang_Float_intBitsToFloat: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8867
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8868
    <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
  8869
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8870
    | 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
  8871
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8872
    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
  8873
    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
  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
    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
  8876
    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
  8877
    __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
  8878
%}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8879
    ^f
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8880
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8881
    "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
  8882
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8883
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8884
_java_lang_Object_clone: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8885
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8886
    <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
  8887
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8888
        "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
  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
    |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
  8891
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8892
    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
  8893
    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
  8894
    ^ rslt
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8895
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8896
    "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
  8897
!
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
_java_lang_Object_getClass: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8900
    <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
  8901
    "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
  8902
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8903
    | 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
  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
    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
  8906
    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
  8907
    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
  8908
    ^ jClass
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8909
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8910
    "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
  8911
    "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
  8912
!
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
_java_lang_Object_hashCode: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8915
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8916
    <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
  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
        "identityHash"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8919
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8920
    |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
  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
    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
  8923
    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
  8924
    ^ rslt
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8925
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8926
    "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
  8927
!
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
_java_lang_Object_notify: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8930
    <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
  8931
    "wakeup"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8932
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8933
    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
  8934
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8935
    "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
  8936
    "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
  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
_java_lang_Object_notifyAll: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8940
    <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
  8941
    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
  8942
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8943
    "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
  8944
    "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
  8945
    "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
  8946
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8947
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8948
_java_lang_Object_registerNatives: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8949
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8950
    <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
  8951
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8952
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8953
    "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
  8954
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8955
    "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
  8956
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8959
_java_lang_Object_wait: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8960
    <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
  8961
    | 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
  8962
    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
  8963
    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
  8964
    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
  8965
        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
  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
    JavaVM
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8968
        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
  8969
        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
  8970
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8971
    "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
  8972
    "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
  8973
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8976
_java_lang_Package_getSystemPackage0: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8977
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8978
    <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
  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
    "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
  8981
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8982
    | 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
  8983
    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
  8984
    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
  8985
    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
  8986
    ^(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
  8987
        syspkg
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8988
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8989
        nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8990
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8991
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  8992
    "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
  8993
!
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
_java_lang_ProcessEnvironment_environ: this _context: nativeContext
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
    <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
  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
    | 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
  9000
    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
  9001
    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
  9002
    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
  9003
    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
  9004
        [: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
  9005
        jenv
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9006
            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
  9007
            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
  9008
        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
  9009
    ^jenv
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: / 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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9014
_java_lang_ProcessEnvironment_environmentBlock: this _context: nativeContext
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/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
  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
    ^ 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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9021
_java_lang_Runtime_availableProcessors: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9022
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9023
    <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
  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
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9026
     * 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
  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
     * <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
  9029
     * 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
  9030
     * 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
  9031
     * 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
  9032
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9033
     * @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
  9034
     *          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
  9035
     * @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
  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
    ^ 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
  9040
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9041
    "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
  9042
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9043
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9044
_java_lang_Runtime_freeMemory: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9045
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9046
    <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
  9047
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9048
        "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
  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
    ^ 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
  9051
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9052
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9055
_java_lang_Runtime_gc: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9056
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9057
    <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
  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
        "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
  9060
     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
  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
    ^ self
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
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9067
_java_lang_Runtime_runFinalization0: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9068
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9069
    <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
  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
    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
  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
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9076
_java_lang_SecurityManager_getClassContext: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9077
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9078
    <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
  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
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9081
     * 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
  9082
     * <p>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9083
     * 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
  9084
     * 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
  9085
     * 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
  9086
     * 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
  9087
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9088
     * @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
  9089
     */
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
    "
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
    | 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
  9094
    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
  9095
    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
  9096
    [ 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
  9097
        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
  9098
            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
  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
        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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9103
    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
  9104
    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
  9105
        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
  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
    ^jclasses
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9108
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9109
    "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
  9110
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9113
_java_lang_Shutdown_halt0: this _:a1 _context: nativeContext
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
    <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
  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
    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
  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
    "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
  9120
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9121
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9122
_java_lang_StrictMath_cbrt: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9123
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9124
    <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
  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 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
  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: / 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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9131
_java_lang_StrictMath_ceil: this _:a1 _: a2 _context: nativeContext
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: '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
  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
    ^ 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
  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: / 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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9140
_java_lang_StrictMath_cos: this _:a1 _: a2 _context: nativeContext
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: '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
  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 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
  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: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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9149
_java_lang_StrictMath_cosh: this _:a1 _: a2 _context: nativeContext
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: '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
  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
    "
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
     * 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
  9156
     * 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
  9157
     * (<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
  9158
     * 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
  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
     * <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
  9161
     * <ul>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9162
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9163
     * <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
  9164
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9165
     * <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
  9166
     * infinity.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9167
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9168
     * <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
  9169
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9170
     * </ul>
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
     * @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
  9173
     * @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
  9174
     * @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
  9175
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9176
    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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9179
    ^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
  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
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9184
_java_lang_StrictMath_expm1: this _:a1 _: a2 _context: nativeContext
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
    <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
  9187
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9188
    ^ 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
  9189
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9190
    "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
  9191
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9192
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9193
_java_lang_StrictMath_floor: this _:a1 _: a2 _context: nativeContext
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
    <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
  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
   ^ 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
  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
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9202
_java_lang_StrictMath_pow: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
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
    <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
  9205
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9206
    ^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
  9207
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9208
    "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
  9209
!
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
_java_lang_StrictMath_sin: this _:a1 _: a2 _context: nativeContext
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
    <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
  9214
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9215
    ^ 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
  9216
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9217
    "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
  9218
!
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
_java_lang_StrictMath_sinh: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9221
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9222
    <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
  9223
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 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
  9227
     * 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
  9228
     * (<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
  9229
     * 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
  9230
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9231
     * <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
  9232
     * <ul>
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
     * <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
  9235
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9236
     * <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
  9237
     * 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
  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
     * </ul>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9243
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9244
     * @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
  9245
     * @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
  9246
     * @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
  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
    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
  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
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9251
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9252
    ^ 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
  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
    "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
  9255
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9258
_java_lang_StrictMath_sqrt: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9259
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9260
    <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
  9261
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9262
    ^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
  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
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9267
_java_lang_StrictMath_tan: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9268
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9269
    <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
  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
    ^ 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
  9272
!
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
_java_lang_StrictMath_tanh: this _:a1 _: a2 _context: nativeContext
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
    <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
  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
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9279
     * 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
  9280
     * 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
  9281
     * (<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
  9282
     * 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
  9283
     * 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
  9284
     * 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
  9285
     * 1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9286
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9287
     * <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
  9288
     * <ul>
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
     * <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
  9291
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9292
     * <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
  9293
     * 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
  9294
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9295
     * <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
  9296
     * {@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
  9297
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9298
     * <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
  9299
     * {@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
  9300
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9301
     * </ul>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9302
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9303
     * @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
  9304
     * @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
  9305
     * @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
  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
    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
  9308
    "
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
    ^ 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
  9311
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9312
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9315
_java_lang_String_intern: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9316
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9317
    <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
  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
        |jString|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9320
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9321
    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
  9322
    ^ 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
  9323
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9324
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9325
_java_lang_System_arraycopy: this _:a1 _: a2 _: a3 _: a4 _: a5 _context: nativeContext
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
    <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
  9328
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9329
    |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
  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
    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
  9332
    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
  9333
        ^ 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
  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
    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
  9336
        ^ 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
  9337
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9338
    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
  9339
    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
  9340
    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
  9341
        ^ 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
  9342
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9343
    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
  9344
        ^ 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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9347
    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
  9348
    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
  9349
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9350
    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
  9351
        ifTrue:
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9352
            [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
  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
                    [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
  9355
                        [^ 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
  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
        ifFalse:
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9358
            [^ 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
  9359
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9360
    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
  9361
    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
  9362
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9363
    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
  9364
        ^ 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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9367
    ((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
  9368
        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
  9369
            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
  9370
                ^ 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
  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
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9373
        ^ 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
  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
    ((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
  9376
        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
  9377
            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
  9378
                ^ 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
  9379
            ]
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
        ^ 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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9384
    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
  9385
    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
  9386
    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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9389
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9390
    (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
  9391
        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
  9392
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9393
        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
  9394
            "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
  9395
            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
  9396
            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
  9397
                | obj |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9398
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9399
                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
  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
                (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
  9402
                    ^ 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
  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
                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
  9405
            ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9406
        ] ifTrue:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9407
            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
  9408
        ]
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
    ^ nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9411
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9412
    "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
  9413
!
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
_java_lang_System_currentTimeMillis: this _context: nativeContext
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
    <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
  9418
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9419
    "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
  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
    "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
  9422
    ^ 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
  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
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9425
     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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9428
    "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
  9429
    "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
  9430
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9431
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9432
_java_lang_System_identityHashCode: this _:a1 _context: nativeContext
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
    <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
  9435
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9436
        |obj|
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
    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
  9439
    ^ 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
  9440
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: / 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
  9442
    "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
  9443
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9444
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9445
_java_lang_System_initProperties: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9446
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9447
    <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
  9448
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9449
        |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
  9450
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9451
    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
  9452
    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
  9453
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9454
    "/ 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
  9455
    "/ 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
  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
    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
  9458
        |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
  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
        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
  9461
        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
  9462
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9463
        props
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9464
            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
  9465
            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
  9466
            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
  9467
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9468
    ^ props
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9469
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9470
    "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
  9471
    "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
  9472
    "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
  9473
!
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
_java_lang_System_mapLibraryName: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9476
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9477
    <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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9480
    | name |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9481
    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
  9482
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9483
    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
  9484
        ^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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9487
    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
  9488
        ^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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9491
    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
  9492
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9493
    "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
  9494
    "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
  9495
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9496
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9497
_java_lang_System_nanoTime: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9498
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9499
    <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
  9500
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9501
    ^ 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
  9502
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9503
    "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
  9504
!
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
_java_lang_System_registerNatives: this _context: nativeContext
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
    <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
  9509
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
    "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
  9512
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9513
    "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
  9514
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9515
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9516
_java_lang_System_setErr0: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9517
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9518
    <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
  9519
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9520
        |stream|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9521
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9522
    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
  9523
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9524
    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
  9525
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9526
    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
  9527
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9528
    "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
  9529
    "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
  9530
    "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
  9531
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9532
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9533
_java_lang_System_setIn0: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9534
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9535
    <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
  9536
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9537
        |stream|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9538
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9539
    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
  9540
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9541
    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
  9542
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9543
    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
  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: / 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
  9546
    "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
  9547
!
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
_java_lang_System_setOut0: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9550
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/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
  9552
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9553
        |stream|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9554
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9555
    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
  9556
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9557
    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
  9558
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9559
    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
  9560
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9561
    "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
  9562
    "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
  9563
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9564
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9565
_java_lang_Thread_currentThread: this _context: nativeContext
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: '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
  9567
    | 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
  9568
    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
  9569
    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
  9570
    (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
  9571
        = '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
  9572
            ifTrue: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9573
                | owner |
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  9574
                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
  9575
                            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
  9576
                (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
  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
    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
  9579
    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
  9580
    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
  9581
    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
  9582
    ^ t
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9583
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: / 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
  9585
    "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
  9586
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9587
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9588
_java_lang_Thread_holdsLock: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9589
    <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
  9590
    | 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
  9591
    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
  9592
    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
  9593
    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
  9594
    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
  9595
    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
  9596
    (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
  9597
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9598
    "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
  9599
    "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
  9600
    "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
  9601
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9602
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9603
_java_lang_Thread_interrupt0: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9604
    <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
  9605
    | 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
  9606
    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
  9607
    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
  9608
    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
  9609
    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
  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
    "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
  9612
    "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
  9613
    "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
  9614
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9617
_java_lang_Thread_isAlive: this _context: nativeContext
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: '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
  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
        "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
  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
        ^ 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
  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 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
  9634
    ^ 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
  9635
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9636
    "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
  9637
    "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
  9638
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9639
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9640
_java_lang_Thread_isInterrupted: this _:a1 _context: nativeContext
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: '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
  9642
    "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
  9643
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9644
    | 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
  9645
    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
  9646
    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
  9647
    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
  9648
    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
  9649
    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
  9650
    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
  9651
    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
  9652
    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
  9653
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9654
    "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
  9655
    "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
  9656
    "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
  9657
    "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
  9658
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9659
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9660
_java_lang_Thread_registerNatives: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9661
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9662
    <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
  9663
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9664
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9665
    "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
  9666
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9667
    "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
  9668
!
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
_java_lang_Thread_resume0: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9671
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9672
    <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
  9673
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9674
        "yield"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9675
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9676
    |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
  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
    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
  9679
    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
  9680
    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
  9681
        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
  9682
            ('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
  9683
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9684
        ^ 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
  9685
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9686
    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
  9687
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9688
    "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
  9689
    "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
  9690
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9691
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9692
_java_lang_Thread_setPriority0: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9693
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9694
    <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
  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
   |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
  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
    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
  9699
    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
  9700
    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
  9701
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9702
    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
  9703
        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
  9704
            '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
  9705
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9706
        ^ nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9707
    ].
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
    "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
  9710
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9711
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9712
_java_lang_Thread_sleep: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9713
    <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
  9714
    "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
  9715
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9716
    | millis |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9717
    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
  9718
    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
  9719
        Reflection 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9720
    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
  9721
            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
  9722
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9723
    Logger
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9724
        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
  9725
                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
  9726
                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
  9727
        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
  9728
        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
  9729
    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
  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
    "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
  9732
    "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
  9733
    "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
  9734
!
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
_java_lang_Thread_start0: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9737
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9738
    <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
  9739
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9740
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
  9741
    ^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
  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
    "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
  9744
    "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
  9745
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9746
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9747
_java_lang_Thread_stop0: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9748
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9749
    <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
  9750
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9751
        "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
  9752
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9753
    | 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
  9754
    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
  9755
    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
  9756
    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
  9757
        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
  9758
            ('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
  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
        ^ 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
  9761
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9762
    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
  9763
    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
  9764
    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
  9765
    stProcess
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9766
        interruptWith: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9767
            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
  9768
                handle: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9769
                    :ex |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9770
                    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
  9771
                    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
  9772
                    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
  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
                do: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9775
                    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
  9776
                        ('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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9779
                    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
  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
                    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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9785
    "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
  9786
    "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
  9787
    "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
  9788
!
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
_java_lang_Thread_yield: this _context: nativeContext
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
    <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
  9793
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9794
        "yield"
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9795
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9796
    |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
  9797
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9798
    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
  9799
"/    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
  9800
"/    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
  9801
"/    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
  9802
"/        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
  9803
"/            ('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
  9804
"/        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9805
"/        ^ 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
  9806
"/    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9807
"/    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
  9808
"/        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
  9809
"/    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9810
"/        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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9813
    "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
  9814
    "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
  9815
!
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
_java_lang_Throwable_fillInStackTrace: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9818
    <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
  9819
    | 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
  9820
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9821
    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
  9822
    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
  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
    "/
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9825
    "/ 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
  9826
    "/
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9827
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9828
    (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
  9829
        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
  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
    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
  9832
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9833
    "/
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9834
    "/ 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
  9835
    "/
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9836
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9837
    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
  9838
        "/ 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
  9839
        [ 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
  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
        "/ 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
  9842
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9843
        [ 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
  9844
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9845
    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
  9846
    [ 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
  9847
        (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
  9848
            "/ 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
  9849
            "/ cleanup ...
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9850
            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
  9851
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9852
        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
  9853
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9854
    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
  9855
    ^ nil.
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
    "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
  9858
    "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
  9859
    "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
  9860
    "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
  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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9863
_java_lang_Throwable_getStackTraceDepth: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9864
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9865
    <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
  9866
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9867
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9868
    ^(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
  9869
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9870
    "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
  9871
!
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
_java_lang_Throwable_getStackTraceElement: this _:a1 _context: nativeContext
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
    <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
  9876
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9877
    | 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
  9878
    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
  9879
    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
  9880
    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
  9881
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9882
    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
  9883
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9884
    stackTraceElement
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9885
        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
  9886
        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
  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
        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
  9889
        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
  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
        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
  9892
        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
  9893
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9894
    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
  9895
        stackTraceElement
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9896
            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
  9897
            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
  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
    ^ stackTraceElement
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
    "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
  9902
!
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
_java_lang_UNIXProcess_forkAndExec: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _: a8 _: a9 _: a10 _context: nativeContext
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
    <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
  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
    "^ 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
  9909
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9910
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9911
_java_lang_UNIXProcess_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9912
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9913
    <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
  9914
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9915
    "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
  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
    "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
  9918
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9919
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9920
_java_lang_UNIXProcess_waitForProcessExit: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9921
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9922
    <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
  9923
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9924
    "^ 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
  9925
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9926
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9927
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9928
!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
  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
_java_lang_ref_Finalizer_invokeFinalizeMethod: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9931
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9932
    <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
  9933
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9934
    | o |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9935
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9936
    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
  9937
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9938
    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
  9939
    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
  9940
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9941
    "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
  9942
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9943
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9944
!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
  9945
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9946
_java_lang_reflect_Array_getLength: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9947
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9948
    <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
  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
    ^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
  9951
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9952
    "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
  9953
!
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
_java_lang_reflect_Array_multiNewArray: this _:a1 _: a2 _context: nativeContext
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
    <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
  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
    |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
  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
    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
  9962
        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
  9963
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9964
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9965
    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
  9966
        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
  9967
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9968
    ].
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
    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
  9977
    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
  9978
        Reflection 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9979
    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
  9980
            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
  9981
        ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9982
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9983
    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
  9984
        Reflection 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9985
    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
  9986
        ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9987
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9988
    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
  9989
    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
  9990
    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
  9991
        | newArray |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
  9992
        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
  9993
            "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
  9994
            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
  9995
    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
  9996
            ^nil.
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
        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
  9999
            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
 10000
    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
 10001
            ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10002
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10003
        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
 10004
        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
 10005
        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
 10006
            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
 10007
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10008
        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
 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
    ^array.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10011
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10012
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10015
_java_lang_reflect_Array_newArray: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10016
    <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
 10017
    |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
 10018
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10019
    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
 10020
        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
 10021
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10022
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10023
    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
 10024
                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
 10025
    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
 10026
        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
 10027
        ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10028
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10029
    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
 10030
    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
 10031
        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
 10032
    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
 10033
        ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10034
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10035
    ^ 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
 10036
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10037
    "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
 10038
    "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
 10039
    "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
 10040
    "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
 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
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 10043
_java_lang_reflect_Array_set: this _: array _: index0 _: value _context: 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
 10044
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10045
    <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
 10046
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 10047
    | index  |
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 10048
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 10049
    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
 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
    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
 10052
        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
 10053
        ^nil.
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
    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
 10056
        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
 10057
        ^nil.
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
    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
 10060
        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
 10061
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10062
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10063
    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
 10064
        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
 10065
        ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10066
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10067
    (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
 10068
        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
 10069
        ^nil.
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
    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
 10072
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 10073
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10076
_java_lang_reflect_Proxy_defineClass0: this _:a1 _: a2 _: a3 _: a4 _: a5 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10077
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10078
    <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
 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
        "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10081
    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
 10082
                                             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
 10083
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10084
    | 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
 10085
    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
 10086
    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
 10087
    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
 10088
    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
 10089
    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
 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
    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
 10092
            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
 10093
            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
 10094
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10095
    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
 10096
    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
 10097
    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
 10098
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10099
    ^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
 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
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10104
!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
 10105
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10106
_java_net_DatagramPacket_init: this _context: nativeContext
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/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
 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: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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10115
_java_net_Inet4AddressImpl_getHostByAddr: this _:a1 _context: nativeContext
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/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
 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
    ^ 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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10122
_java_net_Inet4AddressImpl_getLocalHostName: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10123
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10124
    <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
 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
    ^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
 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
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10131
_java_net_Inet4AddressImpl_lookupAllHostAddr: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10132
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10133
    <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
 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
    | 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
 10136
    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
 10137
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10138
        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
 10139
    ] 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
 10140
        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
 10141
    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
 10142
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10143
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10144
    "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
 10145
     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
 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
    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
 10148
    inet4Address
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10149
        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
 10150
        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
 10151
        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
 10152
        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
 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 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
 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
    "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
 10157
!
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
_java_net_Inet4Address_init: this _context: nativeContext
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
    <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
 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
    "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
 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
    "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
 10166
!
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
_java_net_Inet6Address_init: this _context: nativeContext
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
    <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
 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
    "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
 10173
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10174
    "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
 10175
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10176
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10177
_java_net_InetAddressImplFactory_isIPv6Supported: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10178
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10179
    <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
 10180
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10181
    ^ 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
 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
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10186
_java_net_InetAddress_init: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10187
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10188
    <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
 10189
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10190
    "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
 10191
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10192
    "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
 10193
    "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
 10194
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10195
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10196
_java_net_NetworkInterface_getAll: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10197
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10198
    <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
 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
    ^ 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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10203
_java_net_NetworkInterface_getByName0: this _:a1 _context: nativeContext
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/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
 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
    ^ 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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10210
_java_net_NetworkInterface_init: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10211
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10212
    <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
 10213
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10214
    "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
 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
    "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
 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
_java_net_PlainDatagramSocketImpl_bind0: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10220
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10221
    <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
 10222
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10223
    | 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
 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
    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
 10226
    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
 10227
    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
 10228
        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
 10229
        ^nil.
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 := 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
 10232
    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
 10233
        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
 10234
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10235
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10236
    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
 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
    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
 10239
    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
 10240
        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
 10241
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10242
        JavaVM 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10243
    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
 10244
        ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10245
    ].
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
        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
 10248
        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
 10249
    ] 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
 10250
        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
 10251
    ]
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
    "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
 10254
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10255
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10256
_java_net_PlainDatagramSocketImpl_datagramSocketClose: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10257
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10258
    <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
 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
        |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
 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
    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
 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
    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
 10265
    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
 10266
        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
 10267
            '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
 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
        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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10272
    "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
 10273
    "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
 10274
!
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
_java_net_PlainDatagramSocketImpl_datagramSocketCreate: this _context: nativeContext
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
    <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
 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 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
 10281
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10282
    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
 10283
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10284
    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
 10285
    (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
 10286
        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
 10287
        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
 10288
        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
 10289
        ^ self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10290
    ].
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
    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
 10293
        ('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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10296
    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
 10297
    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
 10298
        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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10301
    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
 10302
    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
 10303
    "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
 10304
    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
 10305
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10306
    "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
 10307
    "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
 10308
    "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
 10309
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10310
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_net_PlainDatagramSocketImpl_init: this _context: nativeContext
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
    <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
 10314
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10315
    "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
 10316
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10317
    "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
 10318
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10319
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10320
_java_net_PlainDatagramSocketImpl_receive0: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10321
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10322
    <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
 10323
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10324
    ^ 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
 10325
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10326
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10327
_java_net_PlainDatagramSocketImpl_send: this _:a1 _context: nativeContext
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
    <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
 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
        |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
 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
    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
 10334
    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
 10335
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10336
    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
 10337
    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
 10338
        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
 10339
            ('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
 10340
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10341
        ^ -1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10342
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10343
    ^ -1
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
    "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
 10346
    "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
 10347
!
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
_java_net_PlainDatagramSocketImpl_socketSetOption: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10350
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10351
    <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
 10352
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10353
        "/ 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
 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
    |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
 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 := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10358
    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
 10359
    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
 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 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
 10363
        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
 10364
            ('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
 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
        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
 10368
        (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
 10369
        ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10370
            (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
 10371
            ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10372
                (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
 10373
                ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10374
                    (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
 10375
                    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10376
                        (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
 10377
                        ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10378
                            (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
 10379
                            ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10380
                                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
 10381
                            ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10382
                        ]
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
                ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10385
            ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10386
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10387
        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
 10388
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
 10389
        ^ 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
 10390
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10391
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10392
    "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
 10393
    "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
 10394
!
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
_java_net_PlainSocketImpl_initProto: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10397
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10398
    <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
 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
    "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
 10401
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10402
    "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
 10403
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10406
_java_net_PlainSocketImpl_socketAccept: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10407
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10408
    <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
 10409
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10410
    |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
 10411
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10412
    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
 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
    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
 10415
    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
 10416
        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
 10417
        ^ self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10418
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10419
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10420
    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
 10421
    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
 10422
    (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
 10423
        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
 10424
        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
 10425
        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
 10426
        ^ self.
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
    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
 10429
        '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
 10430
    ].
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
        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
 10433
    ] 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
 10434
        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
 10435
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10436
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10437
    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
 10438
        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
 10439
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10440
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10441
    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
 10442
    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
 10443
    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
 10444
    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
 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
    "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
 10447
    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
 10448
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10449
    "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
 10450
    "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
 10451
    "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
 10452
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10453
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10454
_java_net_PlainSocketImpl_socketAvailable: this _context: nativeContext
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
    <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
 10457
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10458
        |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
 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
    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
 10461
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10462
    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
 10463
    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
 10464
        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
 10465
        ^ self.
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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10468
    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
 10469
    ^ n
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10470
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10471
    "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
 10472
    "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
 10473
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10474
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10475
_java_net_PlainSocketImpl_socketBind: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10476
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10477
    <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
 10478
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10479
    |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
 10480
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10481
    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
 10482
    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
 10483
    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
 10484
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 := 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
 10486
    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
 10487
        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
 10488
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10489
        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
 10490
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10491
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10492
    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
 10493
    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
 10494
        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
 10495
            ('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
 10496
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10497
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
            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
 10500
        ] 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
 10501
            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
 10502
    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
 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
        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
 10505
            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
 10506
            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
 10507
    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
 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
       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
 10510
       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
 10511
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10512
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10513
    "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
 10514
    "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
 10515
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10518
_java_net_PlainSocketImpl_socketClose0: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10519
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10520
    <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
 10521
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 10522
    ^self commonClose: self nativeContext
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 10523
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 10524
    "Modified: / 30-01-2013 / 14:16:08 / 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
 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
_java_net_PlainSocketImpl_socketConnect: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10528
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10529
    <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
 10530
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10531
    |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
 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 := this.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10534
    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
 10535
    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
 10536
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10537
    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
 10538
    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
 10539
        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
 10540
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10541
        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
 10542
        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
 10543
            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
 10544
            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
 10545
            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
 10546
            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
 10547
            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
 10548
            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
 10549
            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
 10550
            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
 10551
        ].
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
    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
 10554
        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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10557
    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
 10558
    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
 10559
        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
 10560
            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
 10561
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10562
        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
 10563
            (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
 10564
            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
 10565
                (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
 10566
                ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10567
                    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
 10568
                ].
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
                (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
 10571
                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
                    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
 10573
                        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
 10574
                    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10575
                    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
 10576
                ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10577
            ]
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
        [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10581
            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
 10582
            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
 10583
                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
 10584
    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
 10585
            ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10586
            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
 10587
            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
 10588
        ] 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
 10589
            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
 10590
    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
 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
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10594
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10595
    "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
 10596
    "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
 10597
    "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
 10598
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10599
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10600
_java_net_PlainSocketImpl_socketCreate: this _:a1 _context: nativeContext
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
    <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
 10603
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10604
    |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
 10605
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10606
    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
 10607
    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
 10608
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10609
    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
 10610
    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
 10611
        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
 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
    (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
 10614
        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
 10615
        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
 10616
        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
 10617
        ^ self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10618
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10619
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10620
    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
 10621
        ('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
 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
    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
 10625
        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
 10626
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10627
        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
 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
    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
 10630
        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
 10631
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10632
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10633
    (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
 10634
        "/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
 10635
        [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10636
            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
 10637
        ] 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
 10638
            JavaVM 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10639
    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
 10640
            ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10641
        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10642
    ].
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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10645
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10646
    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
 10647
    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
 10648
    "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
 10649
    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
 10650
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10651
    "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
 10652
    "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
 10653
    "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
 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
_java_net_PlainSocketImpl_socketGetOption: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10657
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10658
    <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
 10659
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10660
    | 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
 10661
    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
 10662
    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
 10663
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10664
    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
 10665
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10666
"/  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
 10667
    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
 10668
        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
 10669
        ^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
 10670
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10671
"/  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
 10672
    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
 10673
        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
 10674
        ^-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
 10675
    ].
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
"/  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
 10678
    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
 10679
        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
 10680
        ^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
 10681
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10682
"/  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
 10683
    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
 10684
        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
 10685
        ^-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
 10686
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10687
"/  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
 10688
    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
 10689
        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
 10690
        ^ret
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10691
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10692
"/  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
 10693
    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
 10694
        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
 10695
        ^-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
 10696
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10697
"/  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
 10698
    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
 10699
        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
 10700
        ^ret
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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10703
"/  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
 10704
    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
 10705
        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
 10706
        ^ret
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10707
    ].
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
"/  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
 10710
    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
 10711
        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
 10712
        ^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
 10713
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10714
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10715
"/  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
 10716
    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
 10717
        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
 10718
        ^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
 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
    "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
 10722
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10723
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10724
_java_net_PlainSocketImpl_socketListen: this _:a1 _context: nativeContext
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
    <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
 10727
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10728
        |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
 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
    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
 10731
    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
 10732
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10733
    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
 10734
    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
 10735
        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
 10736
            ('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
 10737
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10738
        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
 10739
        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
 10740
            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
 10741
            ^ self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10742
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10743
        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
 10744
            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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10748
    "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
 10749
    "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
 10750
    "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
 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
_java_net_PlainSocketImpl_socketSetOption: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10754
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10755
    <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
 10756
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10757
    | 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
 10758
    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
 10759
    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
 10760
    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
 10761
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10762
    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
 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
"/  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
 10765
    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
 10766
        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
 10767
        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
 10768
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10769
"/  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
 10770
    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
 10771
        ^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
 10772
    ].
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
"/  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
 10775
    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
 10776
        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
 10777
        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
 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
"/  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
 10780
    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
 10781
        ^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
 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
"/  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
 10784
    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
 10785
        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
 10786
        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
 10787
        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
 10788
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10789
"/  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
 10790
    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
 10791
        ^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
 10792
                   .
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10793
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10794
"/  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
 10795
    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
 10796
        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
 10797
        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
 10798
    ].
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
"/  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
 10801
    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
 10802
        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
 10803
        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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10806
"/  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
 10807
    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
 10808
        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
 10809
        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
 10810
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10811
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10812
"/  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
 10813
    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
 10814
        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
 10815
        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
 10816
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10817
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10818
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10819
        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
 10820
    ] 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
 10821
        JavaVM 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10822
    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
 10823
    ].
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
    "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
 10826
!
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
_java_net_SocketInputStream_init: this _context: nativeContext
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
    <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
 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
    "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
 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
    "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
 10835
!
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
_java_net_SocketInputStream_socketRead0: this _:a1 _: a2 _: a3 _: a4 _: a5 _context: nativeContext
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
    <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
 10840
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10841
    | 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
 10842
    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
 10843
    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
 10844
    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
 10845
    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
 10846
    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
 10847
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10848
    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
 10849
        JavaVM 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10850
    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
 10851
        ^ -1.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10852
    ].
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
    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
 10855
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10856
    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
 10857
        [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10858
            (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
 10859
                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
 10860
    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
 10861
                ^ -1.
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
        ] 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
 10864
            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
 10865
        ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10866
    ].
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
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10869
        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
 10870
    ] 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
 10871
        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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10874
    ^nread
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10875
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10876
    "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
 10877
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10878
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10879
_java_net_SocketOutputStream_init: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10880
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10881
    <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
 10882
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10883
    "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
 10884
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10885
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10888
_java_net_SocketOutputStream_socketWrite0: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
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
    <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
 10891
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10892
    | 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
 10893
    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
 10894
    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
 10895
    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
 10896
    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
 10897
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10898
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10899
    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
 10900
        JavaVM 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10901
    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
 10902
        ^ -1.
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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10905
    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
 10906
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10907
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10908
        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
 10909
    ] 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
 10910
        JavaVM 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10911
    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
 10912
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10913
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10914
    "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
 10915
! !
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
!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
 10918
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10919
_java_nio_Bits_copyFromByteArray: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10920
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10921
    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
 10922
                                         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
 10923
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10924
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10925
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10926
    <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
 10927
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10928
    | 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
 10929
    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
 10930
    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
 10931
    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
 10932
    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
 10933
    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
 10934
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10935
    "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
 10936
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10937
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10938
_java_nio_Bits_copyToByteArray: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10939
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10940
    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
 10941
                                       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
 10942
    "
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
    <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
 10945
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10946
    | 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
 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
    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
 10949
    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
 10950
    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
 10951
    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
 10952
    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
 10953
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10954
    "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
 10955
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10956
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10957
!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
 10958
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10959
_java_security_AccessController_doPrivileged: this _: a1 _: a2 _context: nativeContext
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
    <javanative: 'java/security/AccessController' name: ''>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10962
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10963
    | retval |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10964
    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
 10965
        do: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10966
            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
 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
    ^ retval
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
    "Modified: / 20-01-2013 / 20:57: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
 10971
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10972
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10973
_java_security_AccessController_doPrivileged: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10974
    <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
 10975
    "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
 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
    | retval |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10978
    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
 10979
        do: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10980
            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
 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
    ^ retval
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10983
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10984
    "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
 10985
    "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
 10986
    "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
 10987
    "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
 10988
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10989
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10990
_java_security_AccessController_getStackAccessControlContext: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10991
    <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
 10992
    "/ 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
 10993
    "/ 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
 10994
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10995
    ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10996
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 10997
    "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
 10998
    "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
 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
!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
 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
_java_sql_DriverManager_getCallerClassLoader: this _context: nativeContext
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
    <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
 11006
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11007
    ^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
 11008
        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
 11009
        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
 11010
        classLoader
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11011
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11012
    "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
 11013
! !
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
!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
 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
_java_text_Bidi_nativeBidiChars: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _context: nativeContext
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
    <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
 11020
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11021
    ^ 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
 11022
! !
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
!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
 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
_java_util_ResourceBundle_getClassContext: this _context: nativeContext
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
    <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
 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
    "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
 11031
     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
 11032
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11033
    |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
 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
    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
 11036
    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
 11037
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11038
        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
 11039
            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
 11040
    ] 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
 11041
    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
 11042
    [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
 11043
        (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
 11044
            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
 11045
            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
 11046
                "/ 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
 11047
                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
 11048
            ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11049
            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
 11050
                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
 11051
                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
 11052
            ]
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
        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
 11055
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11056
    ^(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
 11057
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11058
    "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
 11059
    "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
 11060
    "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
 11061
    "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
 11062
!
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
_java_util_TimeZone_getSystemGMTOffsetID: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11065
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11066
    <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
 11067
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11068
    ^ 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
 11069
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11070
    "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
 11071
!
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
_java_util_TimeZone_getSystemTimeZoneID: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11074
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11075
    <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
 11076
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11077
    "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
 11078
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11079
    ^ nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11080
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11081
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11084
!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
 11085
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11086
_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11087
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11088
    <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
 11089
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11090
    "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
 11091
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11092
    ^ 0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11093
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11094
    "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
 11095
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11096
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11097
!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
 11098
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11099
_java_util_jar_JarFile_getMetaInfEntryNames: this _context: nativeContext
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
    <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
 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
    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
 11104
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11105
    | 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
 11106
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11107
    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
 11108
    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
 11109
    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
 11110
    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
 11111
        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
 11112
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11113
    ^jentries
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11114
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11115
    "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
 11116
! !
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
!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
 11119
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11120
_java_util_zip_Adler32_updateBytes: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11121
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11122
    <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
 11123
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11124
    ^ 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
 11125
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11126
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11127
_java_util_zip_CRC32_update: this _:a1 _: a2 _context: nativeContext
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
    <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
 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
    ^ 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
 11132
!
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
_java_util_zip_CRC32_updateBytes: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
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
    <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
 11137
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11138
    | 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
 11139
    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
 11140
    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
 11141
    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
 11142
    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
 11143
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11144
    ^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
 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
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11149
_java_util_zip_Deflater_deflateBytes: this _:a1 _: a2 _: a3 _: a4 _: a5 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11150
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11151
    <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
 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
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11154
    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
 11155
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11156
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11157
    | 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
 11158
    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
 11159
    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
 11160
    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
 11161
    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
 11162
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11163
    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
 11164
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11165
    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
 11166
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11167
    ^ret.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11168
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11169
    "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
 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
_java_util_zip_Deflater_end: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11173
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11174
    <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
 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
    | 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
 11177
    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
 11178
    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
 11179
    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
 11180
    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
 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
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11185
_java_util_zip_Deflater_getBytesRead: this _:a1 _: a2 _context: nativeContext
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
    <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
 11188
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11189
    | 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
 11190
    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
 11191
    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
 11192
    ^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
 11193
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11194
    "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
 11195
!
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
_java_util_zip_Deflater_getBytesWritten: this _:a1 _: a2 _context: nativeContext
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
    <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
 11200
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11201
    | 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
 11202
    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
 11203
    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
 11204
    ^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
 11205
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11206
    "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
 11207
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11208
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11209
_java_util_zip_Deflater_init: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11210
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11211
    <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
 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
    | 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
 11214
    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
 11215
    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
 11216
    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
 11217
    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
 11218
    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
 11219
    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
 11220
        (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
 11221
            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
 11222
            ^i
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11223
        ].
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
    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
 11226
    ^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
 11227
    "/^deflater
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11228
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11229
    "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
 11230
!
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
_java_util_zip_Deflater_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11233
    <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
 11234
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11235
    "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
 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: / 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
 11238
    "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
 11239
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11240
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11241
_java_util_zip_Deflater_reset: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11242
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11243
    <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
 11244
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11245
    | 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
 11246
    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
 11247
    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
 11248
    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
 11249
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11250
    "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
 11251
!
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
_java_util_zip_Inflater_end: this _:a1 _: a2 _context: nativeContext
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
    <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
 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
     "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11258
    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
 11259
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11260
    | 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
 11261
    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
 11262
    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
 11263
    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
 11264
    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
 11265
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11266
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11269
_java_util_zip_Inflater_getBytesRead: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11270
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11271
    <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
 11272
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11273
    | 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
 11274
    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
 11275
    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
 11276
    ^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
 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
    "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
 11279
!
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
_java_util_zip_Inflater_getBytesWritten: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11282
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11283
    <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
 11284
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11285
    | 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
 11286
    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
 11287
    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
 11288
    ^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
 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
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11293
_java_util_zip_Inflater_inflateBytes: this _:a1 _: a2 _: a3 _: a4 _: a5 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11294
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11295
    <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
 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
    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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11300
    | 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
 11301
    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
 11302
    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
 11303
    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
 11304
    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
 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
    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
 11307
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11308
    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
 11309
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11310
    ^ret.
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
    "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
 11313
    "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
 11314
!
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
_java_util_zip_Inflater_init: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11317
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11318
    <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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11321
    | 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
 11322
    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
 11323
    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
 11324
    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
 11325
    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
 11326
        (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
 11327
            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
 11328
            ^i
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
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11331
    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
 11332
    ^ 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
 11333
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11334
    "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
 11335
    "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
 11336
!
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
_java_util_zip_Inflater_initIDs: this _context: nativeContext
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
    <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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11343
    "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
 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
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11348
_java_util_zip_Inflater_reset: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11349
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11350
    <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
 11351
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11352
    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
 11353
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11354
    | 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
 11355
    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
 11356
    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
 11357
    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
 11358
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11359
    "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
 11360
    "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
 11361
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11362
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11363
_java_util_zip_ZipEntry_initFields: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11364
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11365
    <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
 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
        | 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
 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
    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
 11370
    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
 11371
    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
 11372
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11373
    entry
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11374
        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
 11375
        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
 11376
        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
 11377
        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
 11378
        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
 11379
        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
 11380
        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
 11381
        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
 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
    "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
 11384
    "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
 11385
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11386
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11387
_java_util_zip_ZipEntry_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11388
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11389
    <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
 11390
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11391
        "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
 11392
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11393
    "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
 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
_java_util_zip_ZipFile_close: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11397
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11398
    <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
 11399
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11400
    | 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
 11401
    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
 11402
    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
 11403
    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
 11404
    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
 11405
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11406
    "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
 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
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11409
_java_util_zip_ZipFile_freeEntry: this _: jzfile _: dummy1 _: jzentry _: dummy2 _context: 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
 11410
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11411
    <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
 11412
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11413
    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
 11414
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11415
    "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
 11416
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11417
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11418
_java_util_zip_ZipFile_getCSize: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11419
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11420
    <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
 11421
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11422
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11423
    | 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
 11424
    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
 11425
    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
 11426
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11427
    ^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
 11428
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11429
    "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
 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
_java_util_zip_ZipFile_getEntry: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
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
    <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
 11435
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11436
    | 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
 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
    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
 11439
    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
 11440
    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
 11441
    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
 11442
        ^ 0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11443
    ] ifFalse: [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11444
        ^ 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
 11445
            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
 11446
            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
 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
    ]
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: / 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
 11451
    "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
 11452
    "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
 11453
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11456
_java_util_zip_ZipFile_getMethod: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11457
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11458
    <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
 11459
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
    | 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
 11462
    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
 11463
    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
 11464
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11465
    ^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
 11466
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11467
    "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
 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
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11470
_java_util_zip_ZipFile_getNextEntry: this _:jzfile _: dummy1 _: index _context: 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
 11471
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11472
    <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
 11473
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11474
    | zipArchive i |
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11475
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11476
    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
 11477
    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
 11478
    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
 11479
        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
 11480
            ^ 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
 11481
                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
 11482
                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
 11483
            ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11484
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11485
        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
 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
    ^0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11488
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11489
    "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
 11490
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11491
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11492
_java_util_zip_ZipFile_getSize: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11493
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11494
    <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
 11495
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
    | 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
 11498
    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
 11499
    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
 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
    ^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
 11502
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11503
    "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
 11504
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11505
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11506
_java_util_zip_ZipFile_getTotal: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11507
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11508
    <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
 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
    | zar|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11511
    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
 11512
    ^ 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
 11513
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11514
    "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
 11515
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11516
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11517
_java_util_zip_ZipFile_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11518
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11519
    <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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11522
    "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
 11523
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11524
    "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
 11525
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11526
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11527
_java_util_zip_ZipFile_open: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
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
    <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
 11530
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11531
    | 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
 11532
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11533
    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
 11534
    "/(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
 11535
    mode := a2.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 11536
    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
 11537
    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
 11538
    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
 11539
    ^[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11540
        | 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
 11541
        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
 11542
        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
 11543
        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
 11544
            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
 11545
            i
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11546
        ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11547
            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
 11548
            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
 11549
        ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11550
    ] 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
 11551
        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
 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
    "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
 11555
    "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
 11556
!
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
_java_util_zip_ZipFile_read: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _: a8 _: a9 _context: nativeContext
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
    <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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11563
    | 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
 11564
    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
 11565
    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
 11566
    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
 11567
    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
 11568
    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
 11569
    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
 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
    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
 11572
    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
 11573
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11574
    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
 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
    ^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
 11577
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11578
    "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
 11579
    "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
 11580
! !
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
!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
 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
_stx_libjava_ClassLoader_findClassS: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11585
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11586
    <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
 11587
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11588
    | 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
 11589
    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
 11590
    (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
 11591
        JavaVM 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11592
    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
 11593
        ^self
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
    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
 11596
    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
 11597
    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
 11598
        JavaVM 
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11599
    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
 11600
        ^self
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
    ^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
 11603
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11604
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11607
!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
 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
_stx_libjava_groovy_GroovyClassLoader_SystemClassCollector_getDefiningClassLoader: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11610
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11611
    <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
 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
    ^ SystemClassLoader
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: / 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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11618
!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
 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
_stx_libjava_tests_MonitorTests_abort: this _context: nativeContext
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
    <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
 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
    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
 11625
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11626
    "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
 11627
! !
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
!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
 11630
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11631
_stx_libjava_tests_lang_MonitorTests_abort: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11632
    <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
 11633
        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
 11634
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11635
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11638
!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
 11639
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11640
_stx_libjava_tests_vm_XLOAD_forcePatchupAndUnfix: this _context: nativeContext
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
    <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
 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
    | ctx |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11645
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11646
    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
 11647
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11648
    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
 11649
    [ 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
 11650
        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
 11651
                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
 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
        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
 11654
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11655
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11656
    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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11659
    "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
 11660
! !
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
!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
 11663
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11664
_sun_font_FontManager_initIDs: this _context: nativeContext
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
    <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
 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
    "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
 11669
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11670
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11671
_sun_font_FreetypeFontScaler_initIDs: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11672
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11673
    <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
 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
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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11678
_sun_font_StrikeCache_getGlyphCacheDescription: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11679
    <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
 11680
    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
 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
    "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
 11683
    "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
 11684
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11685
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11686
!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
 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
_sun_io_Win32ErrorMode_setErrorMode: this _:a1 _: a2 _context: nativeContext
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
    <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
 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
    "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
 11693
    ^0
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
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11698
!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
 11699
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11700
_sun_java2d_Disposer_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11701
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11702
    <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
 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
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11707
!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
 11708
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11709
_sun_java2d_cmm_lcms_LCMS_getTagData: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11710
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11711
    <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
 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
    | 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
 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
    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
 11716
    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
 11717
    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
 11718
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11719
    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
 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
    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
 11722
        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
 11723
                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
 11724
                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
 11725
        ^self.
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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11728
    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
 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
    "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
 11731
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11732
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11733
_sun_java2d_cmm_lcms_LCMS_getTagSize: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11734
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11735
    <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
 11736
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11737
    | 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
 11738
    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
 11739
    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
 11740
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11741
    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
 11742
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11743
    "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
 11744
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11745
    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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11748
    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
 11749
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11750
    ^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
 11751
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11752
    "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
 11753
!
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
_sun_java2d_cmm_lcms_LCMS_initLCMS: this _:a1 _: a2 _: a3 _context: nativeContext
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
    <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
 11758
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11759
    "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
 11760
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11761
    "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
 11762
!
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
_sun_java2d_cmm_lcms_LCMS_loadProfile: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11765
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/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
 11767
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11768
    "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
 11769
    ^12344321
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
    "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
 11772
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11773
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11774
!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
 11775
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11776
_sun_java2d_pipe_Region_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11777
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11778
    <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
 11779
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11780
    "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
 11781
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11782
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11783
!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
 11784
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11785
_sun_management_MemoryImpl_getMemoryManagers0: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11786
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11787
    <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
 11788
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11789
    "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
 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
    | beanCls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11792
    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
 11793
    ^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
 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: / 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
 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
_sun_management_MemoryImpl_getMemoryPools0: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11799
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11800
    <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
 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
    "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
 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
    | beanCls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11805
    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
 11806
    ^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
 11807
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11808
    "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
 11809
!
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
_sun_management_VMManagementImpl_getStartupTime: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11812
    <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
 11813
    ^ StartupTime.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11814
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11815
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11818
_sun_management_VMManagementImpl_getVersion0: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11819
    <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
 11820
    ^ 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
 11821
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11822
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11825
_sun_management_VMManagementImpl_initOptionalSupportFields: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11826
    <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
 11827
    | cls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11828
    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
 11829
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11830
    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
 11831
    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
 11832
    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
 11833
    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
 11834
    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
 11835
    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
 11836
    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
 11837
    ^ self.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11838
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11839
    "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
 11840
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11841
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11842
_sun_management_VMManagementImpl_isThreadCpuTimeEnabled: this _context: nativeContext
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
    <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
 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
    ^ 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
 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
    "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
 11849
! !
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
!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
 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
_sun_misc_GC_maxObjectInspectionAge: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11854
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11855
    <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
 11856
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
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11859
     * 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
 11860
     * 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
 11861
     * 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
 11862
     * collector.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11863
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11864
     * <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
 11865
     * 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
 11866
     * 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
 11867
     * 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
 11868
     * 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
 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
     * <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
 11871
     * 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
 11872
     * 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
 11873
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11874
    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
 11875
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11876
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11877
    ^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
 11878
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11879
    "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
 11880
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11881
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11882
_sun_misc_Signal_findSignal: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11883
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11884
    <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
 11885
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11886
        | 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
 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
    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
 11889
    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
 11890
        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
 11891
        ^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
 11892
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11893
    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
 11894
        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
 11895
        ^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
 11896
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11897
    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
 11898
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11899
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11902
_sun_misc_Signal_handle0: this _:a1 _: a2 _: a3 _context: nativeContext
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
    <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
 11905
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11906
        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
 11907
    ^ 0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11908
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11909
    "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
 11910
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11911
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11912
_sun_misc_Unsafe_addressSize: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11913
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11914
    <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
 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
    ^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
 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: / 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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11921
_sun_misc_Unsafe_allocateInstance: this _:a1 _context: nativeContext
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: '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
 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
    /** 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
 11927
        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
 11928
    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
 11929
        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
 11930
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11931
    | cls |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11932
    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
 11933
    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
 11934
    ^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
 11935
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11936
    "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
 11937
!
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
_sun_misc_Unsafe_allocateMemory: this _:a1 _: a2 _context: nativeContext
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
    <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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11944
    | size |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11945
    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
 11946
    ^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
 11947
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11948
    "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
 11949
    "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
 11950
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11951
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11952
_sun_misc_Unsafe_arrayBaseOffset: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11953
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11954
    <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
 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
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11957
    * 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
 11958
    * 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
 11959
    * 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
 11960
    * 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
 11961
    * 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
 11962
    *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11963
    * @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
 11964
    * @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
 11965
    */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11966
    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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11969
    ^ 1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11970
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11971
    "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
 11972
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11973
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11974
_sun_misc_Unsafe_arrayIndexScale: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11975
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11976
    <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
 11977
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11978
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11979
      /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11980
      * 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
 11981
      * 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
 11982
      * 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
 11983
      * #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
 11984
      * 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
 11985
      *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11986
      * @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
 11987
      * @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
 11988
      * @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
 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
    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
 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
    ^ 1
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11994
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11997
_sun_misc_Unsafe_compareAndSwapInt: this _:a1 _: a2 _: a3 _: a4 _: a5 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11998
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 11999
    <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
 12000
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12001
    ^self _sun_misc_Unsafe_compareAndSwapObject: this _:a1 _: a2 _: a3 _: a4 _: a5 _context: nil
1993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12002
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12003
    "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
 12004
    "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
 12005
!
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
_sun_misc_Unsafe_compareAndSwapLong: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12008
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12009
    <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
 12010
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12011
        "
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
     * 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
 12014
     * 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
 12015
     * @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
 12016
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12017
    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
 12018
                                                  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
 12019
                                                  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
 12020
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12021
    | 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
 12022
    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
 12023
    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
 12024
    "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
 12025
    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
 12026
    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
 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
    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
 12029
    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
 12030
    (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
 12031
            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
 12032
            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
 12033
    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
 12034
    ^ok
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12035
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12036
    "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
 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
_sun_misc_Unsafe_compareAndSwapObject: this _:a1 _: a2 _: a3 _: a4 _: a5 _context: nativeContext
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
    <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
 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
        "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12044
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12045
     * 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
 12046
     * 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
 12047
     * @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
 12048
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12049
    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
 12050
                                                  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
 12051
                                                  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
 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
    | 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
 12054
    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
 12055
    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
 12056
    "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
 12057
    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
 12058
    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
 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
    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
 12061
    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
 12062
        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
 12063
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12064
        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
 12065
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12066
    (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
 12067
        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
 12068
            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
 12069
        ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12070
            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
 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
        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
 12073
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12074
        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
 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
    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
 12077
    ^ok
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
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12082
_sun_misc_Unsafe_copyMemory: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12083
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12084
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12085
     * 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
 12086
     * block.
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
    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
 12089
                                  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
 12090
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12091
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12092
    <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
 12093
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12094
    | 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
 12095
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12096
    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
 12097
    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
 12098
    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
 12099
    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
 12100
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12101
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12104
_sun_misc_Unsafe_defineClass: this _:a1 _: a2 _: a3 _: a4 _: a5 _: a6 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12105
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12106
    <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
 12107
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
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12110
     * 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
 12111
     * 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
 12112
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12113
    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
 12114
                                    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
 12115
                                    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
 12116
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12117
    | 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
 12118
    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
 12119
    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
 12120
    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
 12121
    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
 12122
    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
 12123
    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
 12124
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12125
    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
 12126
            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
 12127
            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
 12128
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12129
    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
 12130
    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
 12131
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12132
    ^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
 12133
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12134
    "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
 12135
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12136
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12137
_sun_misc_Unsafe_ensureClassInitialized: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12138
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: '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
 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
        |class|
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
    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
 12144
     "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
 12145
    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
 12146
    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
 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: / 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
 12149
    "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
 12150
    "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
 12151
    "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
 12152
!
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
_sun_misc_Unsafe_freeMemory: this _:a1 _: a2 _context: nativeContext
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
    <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
 12157
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12158
    | address  |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12159
    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
 12160
    ^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
 12161
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12162
    "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
 12163
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12164
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12165
_sun_misc_Unsafe_getBoolean: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12166
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12167
    <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
 12168
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 offset |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12170
    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
 12171
    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
 12172
    ^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
 12173
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12174
    "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
 12175
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12176
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12177
_sun_misc_Unsafe_getByte: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12178
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12179
    <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
 12180
    <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
 12181
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12182
    | 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
 12183
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12184
    "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
 12185
    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
 12186
    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
 12187
    ^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
 12188
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12189
    "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
 12190
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12193
_sun_misc_Unsafe_getByte: this _: a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12194
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12195
    <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
 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
    | address |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12198
    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
 12199
    ^SimulatedNativeMemory byteAt: address
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12200
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12201
    "Modified: / 20-01-2013 / 20:54: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
 12202
    "Modified (format): / 21-01-2013 / 17: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
 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
_sun_misc_Unsafe_getChar: this _:a1 _: a2 _: a3 _context: nativeContext
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
    <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
 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: / 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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12217
_sun_misc_Unsafe_getDouble: this _:a1 _: a2 _: a3 _context: nativeContext
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: '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
 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: / 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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12229
_sun_misc_Unsafe_getFloat: this _:a1 _: a2 _: a3 _context: nativeContext
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: '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
 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: / 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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12241
_sun_misc_Unsafe_getFloatVolatile: this _:a1 _: a2 _: a3 _context: nativeContext
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: '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
 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: / 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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12253
_sun_misc_Unsafe_getInt: this _:a1 _: a2 _: a3 _context: nativeContext
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: '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
 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 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
 12259
    */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12260
    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
 12261
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12262
    | 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
 12263
    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
 12264
    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
 12265
    ^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
 12266
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12267
    "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
 12268
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12269
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12270
_sun_misc_Unsafe_getIntVolatile: this _:a1 _: a2 _: a3 _context: nativeContext
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
    <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
 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
    | 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
 12275
    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
 12276
    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
 12277
    ^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
 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
    "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
 12280
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12281
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12282
_sun_misc_Unsafe_getLong: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12283
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12284
    <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
 12285
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12286
    | 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
 12287
    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
 12288
    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
 12289
    ^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
 12290
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12291
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12294
_sun_misc_Unsafe_getLongVolatile: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12295
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12296
    <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
 12297
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 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
    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
 12300
    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
 12301
    ^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
 12302
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12303
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12306
_sun_misc_Unsafe_getObject: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12307
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12308
    <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
 12309
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12310
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12311
    * 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
 12312
    * @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
 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
    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
 12315
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12316
    | 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
 12317
    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
 12318
    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
 12319
    ^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
 12320
        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
 12321
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12322
        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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12325
    "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
 12326
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12327
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12328
_sun_misc_Unsafe_getObjectVolatile: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12329
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12330
    <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
 12331
    "
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
    * 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
 12334
    * 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
 12335
    */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12336
    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
 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
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12339
    ^self _sun_misc_Unsafe_getObject: this _:a1 _: a2 _: a3 _context: nil
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12340
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12341
    "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
 12342
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12343
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12344
_sun_misc_Unsafe_getShort: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12345
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12346
    <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
 12347
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12348
    | 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
 12349
    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
 12350
    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
 12351
    ^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
 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
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12356
_sun_misc_Unsafe_getShortVolatile: this _:a1 _: a2 _: a3 _context: nativeContext
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
    <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
 12359
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12360
    | 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
 12361
    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
 12362
    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
 12363
    ^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
 12364
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12365
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12368
_sun_misc_Unsafe_objectFieldOffset: this _:a1 _context: nativeContext
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
    <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
 12371
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12372
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12373
    | javaFieldObject |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12374
    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
 12375
    ^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
 12376
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12377
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12380
_sun_misc_Unsafe_pageSize: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12381
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12382
    <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
 12383
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12384
    ^ 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
 12385
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12386
    "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
 12387
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12388
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12389
_sun_misc_Unsafe_park: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12390
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12391
    <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
 12392
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12393
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12394
     * 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
 12395
     * <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
 12396
     * 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
 12397
     * 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
 12398
     * 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
 12399
     * 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
 12400
     * '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
 12401
     * 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
 12402
     * elsewhere.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12403
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12404
    "
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
    | 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
 12407
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12408
    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
 12409
    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
 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
    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
 12412
        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
 12413
            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
 12414
            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
 12415
                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
 12416
            ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12417
        ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12418
            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
 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
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12421
        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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12424
    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
 12425
    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
 12426
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12427
    "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
 12428
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12429
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12430
_sun_misc_Unsafe_putBoolean: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12431
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12432
    <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
 12433
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12434
    "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
 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
    | 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
 12437
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12438
    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
 12439
    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
 12440
    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
 12441
    ^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
 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
    "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
 12444
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12445
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12446
_sun_misc_Unsafe_putByte: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
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
    <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
 12449
    <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
 12450
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12451
    | o offset x |
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12452
    o := a1.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12453
    offset := a2.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12454
    x := a4.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12455
    ^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
 12456
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12457
    "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
 12458
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12459
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12460
_sun_misc_Unsafe_putChar: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12461
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12462
    <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
 12463
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12464
    | 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
 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
    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
 12467
    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
 12468
    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
 12469
    ^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
 12470
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12471
    "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
 12472
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12473
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12474
_sun_misc_Unsafe_putDouble: this _:a1 _: a2 _: a3 _: a4 _: a5 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12475
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12476
    <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
 12477
    <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
 12478
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12479
    | 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
 12480
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12481
    o := a1.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12482
    offset := a2.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12483
    x := a4.
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12484
    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
 12485
    ^nil
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12486
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12487
    "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
 12488
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12489
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12490
_sun_misc_Unsafe_putFloat: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12491
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12492
    <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
 12493
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12494
    | 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
 12495
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12496
    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
 12497
    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
 12498
    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
 12499
    ^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
 12500
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12501
    "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
 12502
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12503
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12504
_sun_misc_Unsafe_putInt: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12505
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12506
    <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
 12507
    "
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
     * 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
 12510
     * <p>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12511
     * 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
 12512
     * {@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
 12513
     * 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
 12514
     * 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
 12515
     * <p>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12516
     * 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
 12517
     * 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
 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
     * @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
 12520
     *        null
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12521
     * @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
 12522
     *        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
 12523
     *        statically
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12524
     * @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
 12525
     * @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
 12526
     *         {@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
 12527
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12528
    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
 12529
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12530
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12531
    | 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
 12532
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12533
    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
 12534
    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
 12535
    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
 12536
    ^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
 12537
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12538
    "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
 12539
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12540
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12541
_sun_misc_Unsafe_putLong: this _:a1 _: a2 _: a3 _: a4 _: a5 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12542
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12543
    <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
 12544
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 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
 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
    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
 12549
    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
 12550
    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
 12551
    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
 12552
    ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12553
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12554
    "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
 12555
    "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
 12556
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12557
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12558
_sun_misc_Unsafe_putLong: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12559
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12560
    <javanative: 'sun/misc/Unsafe' name: 'putLong(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
 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
    | o x |
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
    "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
 12565
    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
 12566
    x := a3.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12567
    SimulatedNativeMemory sint64At: o 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
 12568
    ^nil
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12569
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12570
    "Modified: / 20-01-2013 / 20:53: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
 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
_sun_misc_Unsafe_putObject: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12574
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12575
    <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
 12576
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
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12579
     * 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
 12580
     * <p>
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12581
     * 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
 12582
     * 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
 12583
     * 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
 12584
     * 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
 12585
     * 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
 12586
     * @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
 12587
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12588
     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
 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
    | 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
 12591
    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
 12592
    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
 12593
    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
 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
    ^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
 12596
        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
 12597
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12598
        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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12601
    "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
 12602
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12603
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12604
_sun_misc_Unsafe_putObjectVolatile: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12605
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12606
    <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
 12607
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12608
    ^self _sun_misc_Unsafe_putObject: this _:a1 _: a2 _: a3 _: a4 _context: nil
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12609
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12610
    "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
 12611
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12612
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12613
_sun_misc_Unsafe_putOrderedObject: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12614
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12615
    <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
 12616
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12617
    "
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
     * 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
 12620
     * 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
 12621
     * 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
 12622
     * 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
 12623
     * 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
 12624
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12625
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12626
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12627
    ^ self _sun_misc_Unsafe_putObject: this _:a1 _: a2 _: a3 _: a4 _context: nil
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12628
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 12629
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12632
_sun_misc_Unsafe_putShort: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12633
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12634
    <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
 12635
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12636
    | 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
 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
    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
 12639
    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
 12640
    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
 12641
    ^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
 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
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12646
_sun_misc_Unsafe_registerNatives: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12647
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12648
    <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
 12649
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
     "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
 12652
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12653
    "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
 12654
!
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
_sun_misc_Unsafe_setMemory: this _:a1 _: a2 _: a3 _: a4 _: a5 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12657
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12658
    <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
 12659
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12660
    | 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
 12661
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12662
    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
 12663
    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
 12664
    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
 12665
    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
 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
    "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
 12668
!
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
_sun_misc_Unsafe_staticFieldBase: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12671
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12672
    <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
 12673
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12674
      /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12675
      * 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
 12676
      * #staticFieldOffset}.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12677
      * <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
 12678
      * 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
 12679
      * 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
 12680
      * 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
 12681
      * 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
 12682
      * 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
 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
      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
 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
     | 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
 12687
     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
 12688
     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
 12689
     ^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
 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
    "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
 12692
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12693
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12694
_sun_misc_Unsafe_staticFieldOffset: this _:a1 _context: nativeContext
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/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
 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
    | javaFieldObject |
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12699
    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
 12700
    ^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
 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
    "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
 12703
!
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
_sun_misc_Unsafe_unpark: this _:a1 _context: nativeContext
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
    <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
 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
    /**
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12710
     * 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
 12711
     * 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
 12712
     * 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
 12713
     * 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
 12714
     * 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
 12715
     * 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
 12716
     * 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
 12717
     * 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
 12718
     * @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
 12719
     *
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12720
     */
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12721
    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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12724
    | 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
 12725
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12726
    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
 12727
    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
 12728
        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
 12729
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12730
    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
 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
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12735
_sun_misc_VM_initialize: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12736
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12737
    <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
 12738
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12739
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12740
    "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
 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
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12745
!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
 12746
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12747
_sun_nio_ch_FileChannelImpl_initIDs: this _context: nativeContext
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: '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
 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
    ^ 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
 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
    "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
 12754
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12755
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12756
_sun_nio_ch_FileChannelImpl_map0: this _:a1 _: a2 _: a3 _: a4 _: a5 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12757
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12758
    <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
 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
    ^ 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
 12761
!
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
_sun_nio_ch_FileChannelImpl_position0: this _:a1 _: a2 _: a3 _context: nativeContext
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
    <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
 12766
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12767
    | 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
 12768
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12769
    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
 12770
    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
 12771
    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
 12772
    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
 12773
        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
 12774
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12775
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12776
    ^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
 12777
        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
 12778
        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
 12779
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12780
    "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
 12781
!
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
_sun_nio_ch_FileChannelImpl_size0: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12784
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12785
    <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
 12786
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12787
    | 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
 12788
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12789
    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
 12790
    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
 12791
    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
 12792
        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
 12793
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12794
    ].
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 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
 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
    "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
 12798
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12799
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12800
_sun_nio_ch_FileChannelImpl_truncate0: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12801
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12802
    <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
 12803
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12804
    | 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
 12805
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12806
    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
 12807
    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
 12808
    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
 12809
    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
 12810
        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
 12811
        ^nil.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12812
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12813
    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
 12814
    ^0.
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12815
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12816
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12819
_sun_nio_ch_FileDispatcher_init: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12820
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12821
    <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
 12822
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12823
    ^ 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
 12824
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12825
    "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
 12826
!
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
_sun_nio_ch_FileDispatcher_preClose0: this _:a1 _context: nativeContext
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
    <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
 12831
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12832
    "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
 12833
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12834
    "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
 12835
!
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
_sun_nio_ch_FileDispatcher_read0: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
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
    <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
 12840
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12841
    | 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
 12842
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12843
    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
 12844
    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
 12845
    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
 12846
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12847
    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
 12848
    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
 12849
    [
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12850
        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
 12851
        "/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
 12852
    ] 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
 12853
        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
 12854
        ^0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12855
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12856
    ^read
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
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12861
_sun_nio_ch_FileDispatcher_write0: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12862
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12863
    <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
 12864
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12865
    | 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
 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
    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
 12868
    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
 12869
    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
 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
    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
 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
        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
 12874
        "/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
 12875
    ] 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
 12876
        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
 12877
        ^0
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12878
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12879
    ^writtem
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12880
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12881
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12884
_sun_nio_ch_IOUtil_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12885
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12886
    <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
 12887
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12888
    "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
 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
    "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
 12891
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12892
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12893
_sun_nio_ch_IOUtil_initPipe: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12894
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12895
    <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
 12896
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12897
    ^ 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
 12898
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12899
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12900
_sun_nio_ch_NativeThread_current: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12901
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12902
    <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
 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
    ^ 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
 12905
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12906
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12909
_sun_nio_ch_NativeThread_init: this _context: nativeContext
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/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
 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
    ^ 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
 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
    "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
 12916
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12917
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12918
_sun_nio_ch_Net_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12919
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12920
    <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
 12921
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12922
    "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
 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
    "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
 12925
!
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
_sun_nio_ch_Net_socket0: this _:a1 _: a2 _context: nativeContext
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
    <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
 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
    ^ 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
 12932
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12933
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12934
_sun_nio_ch_ServerSocketChannelImpl_initIDs: this _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12935
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12936
    <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
 12937
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12938
    "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
 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
    "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
 12941
! !
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
!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
 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
_sun_reflect_ConstantPool_getDoubleAt0: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12946
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12947
    <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
 12948
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12949
        | 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
 12950
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12951
    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
 12952
    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
 12953
    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
 12954
    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
 12955
    ^ double
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
    "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
 12958
    "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
 12959
    "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
 12960
!
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
_sun_reflect_ConstantPool_getIntAt0: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12963
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12964
    <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
 12965
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12966
        | 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
 12967
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12968
    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
 12969
    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
 12970
    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
 12971
    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
 12972
    ^ int
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12973
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12974
    "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
 12975
    "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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12978
_sun_reflect_ConstantPool_getLongAt0: this _:a1 _: a2 _context: nativeContext
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/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
 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
        | 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
 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
    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
 12985
    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
 12986
    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
 12987
    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
 12988
    ^ long
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12989
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12990
    "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
 12991
    "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
 12992
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12993
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12994
_sun_reflect_ConstantPool_getUTF8At0: this _:a1 _: a2 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12995
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12996
    <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
 12997
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12998
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 12999
    | 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
 13000
    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
 13001
    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
 13002
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13003
    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
 13004
    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
 13005
    ^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
 13006
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13007
    "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
 13008
    "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
 13009
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13010
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13011
_sun_reflect_NativeConstructorAccessorImpl_newInstance0: this _:a1 _: a2 _context: nativeContext
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
    <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
 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
    | 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
 13017
    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
 13018
    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
 13019
    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
 13020
    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
 13021
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13022
    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
 13023
    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
 13024
    ^instance
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13025
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13026
    "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
 13027
    "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
 13028
    "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
 13029
!
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
_sun_reflect_NativeMethodAccessorImpl_invoke0: this _:a1 _: a2 _: a3 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13032
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13033
    <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
 13034
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13035
    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
 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
    | 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
 13038
    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
 13039
    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
 13040
    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
 13041
    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
 13042
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 13043
    ^ 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
 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
    "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
 13046
    "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
 13047
    "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
 13048
    "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
 13049
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13050
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13051
_sun_reflect_Reflection_getCallerClass: this _:a1 _context: nativeContext
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
    <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
 13054
    "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13055
    /** 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
 13056
        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
 13057
        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
 13058
        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
 13059
        <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
 13060
        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
 13061
        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
 13062
        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
 13063
        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
 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
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13066
    | 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
 13067
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13068
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13069
    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
 13070
    framesSkipped := 0.
2009
d904ed10c6b7 Make rest of native methods not using nativeContext parameter.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1994
diff changeset
 13071
    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
 13072
    [ 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
 13073
        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
 13074
        "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
 13075
         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
 13076
        (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
 13077
            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
 13078
                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
 13079
            ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13080
    ].
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13081
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13082
    "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
 13083
    "                  |                                                            "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13084
    "                  V                                                            "
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13085
    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
 13086
    ^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
 13087
        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
 13088
        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
 13089
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13090
    "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
 13091
    "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
 13092
!
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13093
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13094
_sun_reflect_Reflection_getClassAccessFlags: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13095
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13096
    <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
 13097
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13098
        |class|
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13099
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13100
    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
 13101
    ^(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
 13102
        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
 13103
    ] ifFalse:[
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13104
        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
 13105
    ]
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13106
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13107
    "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
 13108
    "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
 13109
    "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
 13110
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13111
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13112
!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
 13113
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13114
_sun_security_provider_NativeSeedGenerator_nativeGenerateSeed: this _:a1 _context: nativeContext
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13115
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13116
    <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
 13117
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13118
    ^ 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
 13119
! !
6cb676a913a8 Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1992
diff changeset
 13120
1969
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
 13121
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'documentation'!
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
 13122
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
 13123
version_HG
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
 13124
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
 13125
    ^ '$Changeset: <not expanded> $'
beb598c730b2 Added JavaNativeMethodImpl_OpenJDK6.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
 13126
! !
1982
8138440bc4ab Ensure that all native methods are properly annotated.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1981
diff changeset
 13127