author | Claus Gittinger <cg@exept.de> |
Mon, 12 Jul 2004 16:05:14 +0200 | |
changeset 4200 | ef9f995f1d20 |
parent 3878 | 28052cae1ad3 |
child 4434 | cbbb56b8d851 |
permissions | -rw-r--r-- |
164 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
175 | 3 |
All Rights Reserved |
164 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
3611
8b4384c9e660
Use #finalize instead of #disposed
Stefan Vogel <sv@exept.de>
parents:
2913
diff
changeset
|
13 |
"{ Package: 'stx:libview' }" |
8b4384c9e660
Use #finalize instead of #disposed
Stefan Vogel <sv@exept.de>
parents:
2913
diff
changeset
|
14 |
|
151 | 15 |
Object subclass:#DeviceHandle |
4200
ef9f995f1d20
slot to remember parentHandle
Claus Gittinger <cg@exept.de>
parents:
3878
diff
changeset
|
16 |
instanceVariableNames:'device parentId drawableId gcId' |
601 | 17 |
classVariableNames:'' |
18 |
poolDictionaries:'' |
|
19 |
category:'Graphics-Support' |
|
151 | 20 |
! |
21 |
||
164 | 22 |
!DeviceHandle class methodsFor:'documentation'! |
23 |
||
24 |
copyright |
|
25 |
" |
|
26 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
175 | 27 |
All Rights Reserved |
164 | 28 |
|
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
! |
|
37 |
||
175 | 38 |
documentation |
39 |
" |
|
40 |
This is an abstract class for device handles which are responsible |
|
41 |
for finalization i.e. to destroy underlying system resources, when the GC |
|
42 |
frees an object which has created some system object. |
|
43 |
Currently, these are forms and views (streams, cursors, colors and |
|
44 |
fonts could also make use of this class - however, for historical reasons, |
|
45 |
they continue to use their own private finalization machanisms. This may |
|
46 |
change in future versions). |
|
601 | 47 |
|
48 |
[see also:] |
|
49 |
DeviceDrawable |
|
611 | 50 |
|
51 |
[author:] |
|
52 |
Claus Gittinger |
|
53 |
||
175 | 54 |
" |
164 | 55 |
! ! |
56 |
||
151 | 57 |
!DeviceHandle methodsFor:'accessing'! |
58 |
||
1471 | 59 |
id |
60 |
"return the id of the dravable" |
|
61 |
||
62 |
^ drawableId |
|
63 |
||
64 |
"Modified: 20.3.1997 / 16:34:00 / cg" |
|
65 |
! ! |
|
66 |
||
1518 | 67 |
!DeviceHandle methodsFor:'finalization'! |
68 |
||
3611
8b4384c9e660
Use #finalize instead of #disposed
Stefan Vogel <sv@exept.de>
parents:
2913
diff
changeset
|
69 |
finalize |
1518 | 70 |
"I am abstract" |
71 |
||
2913 | 72 |
self subclassResponsibility |
1518 | 73 |
|
74 |
"Created: 2.4.1997 / 19:23:14 / cg" |
|
75 |
! ! |
|
76 |
||
3878 | 77 |
!DeviceHandle methodsFor:'private-accessing'! |
1471 | 78 |
|
151 | 79 |
setDevice:aDevice id:aDrawableId gcId:aGCId |
601 | 80 |
"set the handles contents" |
81 |
||
82 |
device := aDevice. |
|
83 |
drawableId := aDrawableId. |
|
84 |
gcId := aGCId |
|
85 |
||
86 |
"Modified: 23.4.1996 / 22:10:26 / cg" |
|
4200
ef9f995f1d20
slot to remember parentHandle
Claus Gittinger <cg@exept.de>
parents:
3878
diff
changeset
|
87 |
! |
ef9f995f1d20
slot to remember parentHandle
Claus Gittinger <cg@exept.de>
parents:
3878
diff
changeset
|
88 |
|
ef9f995f1d20
slot to remember parentHandle
Claus Gittinger <cg@exept.de>
parents:
3878
diff
changeset
|
89 |
setDevice:aDevice id:aDrawableId gcId:aGCId parentId:parentsDrawableId |
ef9f995f1d20
slot to remember parentHandle
Claus Gittinger <cg@exept.de>
parents:
3878
diff
changeset
|
90 |
"set the handles contents" |
ef9f995f1d20
slot to remember parentHandle
Claus Gittinger <cg@exept.de>
parents:
3878
diff
changeset
|
91 |
|
ef9f995f1d20
slot to remember parentHandle
Claus Gittinger <cg@exept.de>
parents:
3878
diff
changeset
|
92 |
device := aDevice. |
ef9f995f1d20
slot to remember parentHandle
Claus Gittinger <cg@exept.de>
parents:
3878
diff
changeset
|
93 |
drawableId := aDrawableId. |
ef9f995f1d20
slot to remember parentHandle
Claus Gittinger <cg@exept.de>
parents:
3878
diff
changeset
|
94 |
parentId := parentsDrawableId. |
ef9f995f1d20
slot to remember parentHandle
Claus Gittinger <cg@exept.de>
parents:
3878
diff
changeset
|
95 |
gcId := aGCId |
151 | 96 |
! ! |
601 | 97 |
|
98 |
!DeviceHandle class methodsFor:'documentation'! |
|
99 |
||
100 |
version |
|
4200
ef9f995f1d20
slot to remember parentHandle
Claus Gittinger <cg@exept.de>
parents:
3878
diff
changeset
|
101 |
^ '$Header: /cvs/stx/stx/libview/DeviceHandle.st,v 1.12 2004-07-12 14:05:14 cg Exp $' |
601 | 102 |
! ! |