DeviceHandle.st
author Claus Gittinger <cg@exept.de>
Thu, 20 Mar 1997 16:34:27 +0100
changeset 1471 ba228f3678d9
parent 611 e0442439a3c6
child 1518 aa610d7fd205
permissions -rw-r--r--
checkin from browser
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
164
claus
parents: 151
diff changeset
     1
"
claus
parents: 151
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
175
claus
parents: 164
diff changeset
     3
	      All Rights Reserved
164
claus
parents: 151
diff changeset
     4
claus
parents: 151
diff changeset
     5
 This software is furnished under a license and may be used
claus
parents: 151
diff changeset
     6
 only in accordance with the terms of that license and with the
claus
parents: 151
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
claus
parents: 151
diff changeset
     8
 be provided or otherwise made available to, or used by, any
claus
parents: 151
diff changeset
     9
 other person.  No title to or ownership of the software is
claus
parents: 151
diff changeset
    10
 hereby transferred.
claus
parents: 151
diff changeset
    11
"
claus
parents: 151
diff changeset
    12
151
claus
parents:
diff changeset
    13
Object subclass:#DeviceHandle
601
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    14
	instanceVariableNames:'device drawableId gcId'
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    15
	classVariableNames:''
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    16
	poolDictionaries:''
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    17
	category:'Graphics-Support'
151
claus
parents:
diff changeset
    18
!
claus
parents:
diff changeset
    19
164
claus
parents: 151
diff changeset
    20
!DeviceHandle class methodsFor:'documentation'!
claus
parents: 151
diff changeset
    21
claus
parents: 151
diff changeset
    22
copyright
claus
parents: 151
diff changeset
    23
"
claus
parents: 151
diff changeset
    24
 COPYRIGHT (c) 1995 by Claus Gittinger
175
claus
parents: 164
diff changeset
    25
	      All Rights Reserved
164
claus
parents: 151
diff changeset
    26
claus
parents: 151
diff changeset
    27
 This software is furnished under a license and may be used
claus
parents: 151
diff changeset
    28
 only in accordance with the terms of that license and with the
claus
parents: 151
diff changeset
    29
 inclusion of the above copyright notice.   This software may not
claus
parents: 151
diff changeset
    30
 be provided or otherwise made available to, or used by, any
claus
parents: 151
diff changeset
    31
 other person.  No title to or ownership of the software is
claus
parents: 151
diff changeset
    32
 hereby transferred.
claus
parents: 151
diff changeset
    33
"
claus
parents: 151
diff changeset
    34
!
claus
parents: 151
diff changeset
    35
175
claus
parents: 164
diff changeset
    36
documentation
claus
parents: 164
diff changeset
    37
"
claus
parents: 164
diff changeset
    38
    This is an abstract class for device handles which are responsible
claus
parents: 164
diff changeset
    39
    for finalization i.e. to destroy underlying system resources, when the GC
claus
parents: 164
diff changeset
    40
    frees an object which has created some system object.
claus
parents: 164
diff changeset
    41
    Currently, these are forms and views (streams, cursors, colors and
claus
parents: 164
diff changeset
    42
    fonts could also make use of this class - however, for historical reasons,
claus
parents: 164
diff changeset
    43
    they continue to use their own private finalization machanisms. This may
claus
parents: 164
diff changeset
    44
    change in future versions).
601
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    45
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    46
    [see also:]
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    47
        DeviceDrawable
611
e0442439a3c6 documentation
Claus Gittinger <cg@exept.de>
parents: 601
diff changeset
    48
e0442439a3c6 documentation
Claus Gittinger <cg@exept.de>
parents: 601
diff changeset
    49
    [author:]
e0442439a3c6 documentation
Claus Gittinger <cg@exept.de>
parents: 601
diff changeset
    50
        Claus Gittinger
e0442439a3c6 documentation
Claus Gittinger <cg@exept.de>
parents: 601
diff changeset
    51
175
claus
parents: 164
diff changeset
    52
"
164
claus
parents: 151
diff changeset
    53
! !
claus
parents: 151
diff changeset
    54
151
claus
parents:
diff changeset
    55
!DeviceHandle methodsFor:'accessing'!
claus
parents:
diff changeset
    56
1471
ba228f3678d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 611
diff changeset
    57
id
ba228f3678d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 611
diff changeset
    58
    "return the id of the dravable"
ba228f3678d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 611
diff changeset
    59
ba228f3678d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 611
diff changeset
    60
    ^ drawableId
ba228f3678d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 611
diff changeset
    61
ba228f3678d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 611
diff changeset
    62
    "Modified: 20.3.1997 / 16:34:00 / cg"
ba228f3678d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 611
diff changeset
    63
! !
ba228f3678d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 611
diff changeset
    64
ba228f3678d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 611
diff changeset
    65
!DeviceHandle methodsFor:'private accessing'!
ba228f3678d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 611
diff changeset
    66
151
claus
parents:
diff changeset
    67
setDevice:aDevice id:aDrawableId gcId:aGCId
601
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    68
    "set the handles contents"
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    69
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    70
    device := aDevice.
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    71
    drawableId := aDrawableId.
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    72
    gcId := aGCId
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    73
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    74
    "Modified: 23.4.1996 / 22:10:26 / cg"
151
claus
parents:
diff changeset
    75
! !
601
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    76
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    77
!DeviceHandle class methodsFor:'documentation'!
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    78
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    79
version
1471
ba228f3678d9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 611
diff changeset
    80
    ^ '$Header: /cvs/stx/stx/libview/DeviceHandle.st,v 1.7 1997-03-20 15:34:27 cg Exp $'
601
2c4c1e797909 commentary
Claus Gittinger <cg@exept.de>
parents: 219
diff changeset
    81
! !