author | Claus Gittinger <cg@exept.de> |
Thu, 14 Jun 2018 10:32:44 +0200 | |
changeset 8384 | c473ce4aa06a |
parent 7857 | 4afb1a6d3f40 |
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 |
" |
|
3611
8b4384c9e660
Use #finalize instead of #disposed
Stefan Vogel <sv@exept.de>
parents:
2913
diff
changeset
|
12 |
"{ Package: 'stx:libview' }" |
8b4384c9e660
Use #finalize instead of #disposed
Stefan Vogel <sv@exept.de>
parents:
2913
diff
changeset
|
13 |
|
7857 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
151 | 16 |
Object subclass:#DeviceHandle |
7416
bd3b9e9edd9e
Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents:
6347
diff
changeset
|
17 |
instanceVariableNames:'device drawableId gcId' |
601 | 18 |
classVariableNames:'' |
19 |
poolDictionaries:'' |
|
20 |
category:'Graphics-Support' |
|
151 | 21 |
! |
22 |
||
164 | 23 |
!DeviceHandle class methodsFor:'documentation'! |
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
175 | 28 |
All Rights Reserved |
164 | 29 |
|
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
175 | 39 |
documentation |
40 |
" |
|
41 |
This is an abstract class for device handles which are responsible |
|
42 |
for finalization i.e. to destroy underlying system resources, when the GC |
|
43 |
frees an object which has created some system object. |
|
44 |
Currently, these are forms and views (streams, cursors, colors and |
|
45 |
fonts could also make use of this class - however, for historical reasons, |
|
46 |
they continue to use their own private finalization machanisms. This may |
|
47 |
change in future versions). |
|
601 | 48 |
|
49 |
[see also:] |
|
50 |
DeviceDrawable |
|
611 | 51 |
|
52 |
[author:] |
|
53 |
Claus Gittinger |
|
54 |
||
175 | 55 |
" |
164 | 56 |
! ! |
57 |
||
7857 | 58 |
!DeviceHandle class methodsFor:'queries'! |
59 |
||
60 |
isAbstract |
|
61 |
"Return if this class is an abstract class. |
|
62 |
True is returned here for myself only; false for subclasses. |
|
63 |
Abstract subclasses must redefine this again." |
|
64 |
||
65 |
^ self == DeviceHandle. |
|
66 |
! ! |
|
67 |
||
151 | 68 |
!DeviceHandle methodsFor:'accessing'! |
69 |
||
4436
05eadeb4b603
In #cleanUpLobbyForChildrenOfView...
Stefan Vogel <sv@exept.de>
parents:
4434
diff
changeset
|
70 |
device |
05eadeb4b603
In #cleanUpLobbyForChildrenOfView...
Stefan Vogel <sv@exept.de>
parents:
4434
diff
changeset
|
71 |
^ device |
05eadeb4b603
In #cleanUpLobbyForChildrenOfView...
Stefan Vogel <sv@exept.de>
parents:
4434
diff
changeset
|
72 |
! |
05eadeb4b603
In #cleanUpLobbyForChildrenOfView...
Stefan Vogel <sv@exept.de>
parents:
4434
diff
changeset
|
73 |
|
1471 | 74 |
id |
75 |
"return the id of the dravable" |
|
76 |
||
77 |
^ drawableId |
|
78 |
||
79 |
"Modified: 20.3.1997 / 16:34:00 / cg" |
|
80 |
! ! |
|
81 |
||
1518 | 82 |
!DeviceHandle methodsFor:'finalization'! |
83 |
||
3611
8b4384c9e660
Use #finalize instead of #disposed
Stefan Vogel <sv@exept.de>
parents:
2913
diff
changeset
|
84 |
finalize |
1518 | 85 |
"I am abstract" |
86 |
||
2913 | 87 |
self subclassResponsibility |
1518 | 88 |
|
89 |
"Created: 2.4.1997 / 19:23:14 / cg" |
|
90 |
! ! |
|
91 |
||
3878 | 92 |
!DeviceHandle methodsFor:'private-accessing'! |
1471 | 93 |
|
151 | 94 |
setDevice:aDevice id:aDrawableId gcId:aGCId |
601 | 95 |
"set the handles contents" |
96 |
||
97 |
device := aDevice. |
|
98 |
drawableId := aDrawableId. |
|
99 |
gcId := aGCId |
|
100 |
||
101 |
"Modified: 23.4.1996 / 22:10:26 / cg" |
|
151 | 102 |
! ! |
601 | 103 |
|
104 |
!DeviceHandle class methodsFor:'documentation'! |
|
105 |
||
106 |
version |
|
7416
bd3b9e9edd9e
Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents:
6347
diff
changeset
|
107 |
^ '$Header$' |
601 | 108 |
! ! |
7416
bd3b9e9edd9e
Delegate GraphicsContext objects
Stefan Vogel <sv@exept.de>
parents:
6347
diff
changeset
|
109 |