13 HostGraphicsDevice subclass:#DeviceWorkstation |
13 HostGraphicsDevice subclass:#DeviceWorkstation |
14 instanceVariableNames:'visualType monitorType depth ncells bitsPerRGB bitsRed bitsGreen |
14 instanceVariableNames:'visualType monitorType depth ncells bitsPerRGB bitsRed bitsGreen |
15 bitsBlue redMask greenMask blueMask redShift greenShift blueShift |
15 bitsBlue redMask greenMask blueMask redShift greenShift blueShift |
16 hasColors hasGreyscales width height widthMM heightMM |
16 hasColors hasGreyscales width height widthMM heightMM |
17 resolutionHor resolutionVer idToTableIndexMapping knownViews |
17 resolutionHor resolutionVer idToTableIndexMapping knownViews |
18 knownIds knownBitmaps knownBitmapIds dispatching dispatchProcess |
18 knownIds knownBitmaps knownBitmapIds dispatching dispatchProcess exitOnLastClose |
19 ctrlDown shiftDown metaDown altDown motionEventCompression lastId |
19 ctrlDown shiftDown metaDown altDown motionEventCompression lastId |
20 lastView keyboardMap rootView isSlow activeKeyboardGrab |
20 lastView keyboardMap rootView isSlow activeKeyboardGrab |
21 activePointerGrab buttonTranslation multiClickTimeDelta |
21 activePointerGrab buttonTranslation multiClickTimeDelta |
22 altModifiers metaModifiers ctrlModifiers shiftModifiers |
22 altModifiers metaModifiers ctrlModifiers shiftModifiers |
23 supportsDeepIcons preferredIconSize ditherColors fixColors |
23 supportsDeepIcons preferredIconSize ditherColors fixColors |
24 numFixRed numFixGreen numFixBlue fixGrayColors copyBuffer |
24 numFixRed numFixGreen numFixBlue fixGrayColors copyBuffer |
25 lastCopyBuffer blackColor whiteColor focusMode activeView |
25 lastCopyBuffer blackColor whiteColor focusMode activeView |
26 clipBoardEncoding focusView' |
26 clipBoardEncoding focusView' |
27 classVariableNames:'ButtonTranslation MultiClickTimeDelta DeviceErrorSignal |
27 classVariableNames:'ButtonTranslation MultiClickTimeDelta DeviceErrorSignal |
28 DeviceIOErrorSignal DeviceIOTimeoutErrorSignal ErrorPrinting |
28 DeviceIOErrorSignal DeviceIOTimeoutErrorSignal ErrorPrinting |
29 DefaultScreen AllScreens ExitOnLastClose CurrentScreenQuerySignal |
29 DefaultScreen AllScreens CurrentScreenQuerySignal |
30 LastActiveScreen LastActiveProcess NoBeep |
30 LastActiveScreen LastActiveProcess NoBeep |
31 WindowsRightButtonBehavior' |
31 WindowsRightButtonBehavior ExitOnLastClose' |
32 poolDictionaries:'' |
32 poolDictionaries:'' |
33 category:'Interface-Graphics' |
33 category:'Interface-Graphics' |
34 ! |
34 ! |
35 |
35 |
36 !DeviceWorkstation class methodsFor:'documentation'! |
36 !DeviceWorkstation class methodsFor:'documentation'! |
94 knownIds <Collection> corresponding device-view ids |
94 knownIds <Collection> corresponding device-view ids |
95 knownBitmaps <Collection> all known device bitmaps |
95 knownBitmaps <Collection> all known device bitmaps |
96 knownBitmapIds <Collection> corresponding device-bitmap ids |
96 knownBitmapIds <Collection> corresponding device-bitmap ids |
97 |
97 |
98 dispatching <Boolean> true, if currently in dispatch loop |
98 dispatching <Boolean> true, if currently in dispatch loop |
|
99 exitDispatchOnLastWindowClose |
|
100 <Boolean> if true, dispatch is finished when the last |
|
101 window closes (default:true). |
99 |
102 |
100 ctrlDown <Boolean> true, if control key currently pressed |
103 ctrlDown <Boolean> true, if control key currently pressed |
101 shiftDown <Boolean> true, if shift key currently pressed |
104 shiftDown <Boolean> true, if shift key currently pressed |
102 metaDown <Boolean> true, if meta key (cmd-key) is currently pressed |
105 metaDown <Boolean> true, if meta key (cmd-key) is currently pressed |
103 altDown <Boolean> true, if alt key is currently pressed |
106 altDown <Boolean> true, if alt key is currently pressed |
133 it as a multi-click. |
136 it as a multi-click. |
134 |
137 |
135 ErrorPrinting controls low-level (X-) error message printing |
138 ErrorPrinting controls low-level (X-) error message printing |
136 |
139 |
137 AllScreens a collectin of known screens |
140 AllScreens a collectin of known screens |
138 |
|
139 ExitOnLastClose if true, the dispatch process terminates when the |
|
140 last view is closed. (for stand alone apps) |
|
141 Should be set to false, if a standAlone app |
|
142 closes all views and still needs an event dispatcher |
|
143 later (i.e. is temporary view-less) |
|
144 |
141 |
145 [see also:] |
142 [see also:] |
146 GraphicsContext DeviceDrawable |
143 GraphicsContext DeviceDrawable |
147 WindowSensor WindowGroup WindowEvent |
144 WindowSensor WindowGroup WindowEvent |
148 ProcessorScheduler |
145 ProcessorScheduler |
346 CurrentScreenQuerySignal := QuerySignal new. |
343 CurrentScreenQuerySignal := QuerySignal new. |
347 CurrentScreenQuerySignal nameClass:self message:#currentScreenQuerySignal. |
344 CurrentScreenQuerySignal nameClass:self message:#currentScreenQuerySignal. |
348 CurrentScreenQuerySignal notifierString:'asking for current screen'. |
345 CurrentScreenQuerySignal notifierString:'asking for current screen'. |
349 ]. |
346 ]. |
350 ErrorPrinting := true. |
347 ErrorPrinting := true. |
351 ExitOnLastClose := false. |
|
352 |
348 |
353 self initializeConstants. |
349 self initializeConstants. |
354 |
350 |
355 "Modified: 3.8.1997 / 18:14:58 / cg" |
351 "Modified: 3.8.1997 / 18:14:58 / cg" |
356 ! |
352 ! |
751 |
747 |
752 !DeviceWorkstation class methodsFor:'standalone setup'! |
748 !DeviceWorkstation class methodsFor:'standalone setup'! |
753 |
749 |
754 exitOnLastClose:aBoolean |
750 exitOnLastClose:aBoolean |
755 "set/clear the flag which controls if the |
751 "set/clear the flag which controls if the |
756 event dispatching should stop when the last view is closed. |
752 event dispatching should stop when the last view is closed |
|
753 on the (main) Display connection. |
757 (standAlone applications will set it)" |
754 (standAlone applications will set it)" |
758 |
755 |
|
756 "/ here, a separate class variable is used, since this may have |
|
757 "/ to be set at init-time, when no display instance exists yet. |
|
758 "/ For all other (non-main-Display) connections, an instVar is used. |
759 ExitOnLastClose := aBoolean |
759 ExitOnLastClose := aBoolean |
760 |
760 |
761 "Modified: 23.4.1996 / 22:01:28 / cg" |
761 "Modified: 23.4.1996 / 22:01:28 / cg" |
762 ! ! |
762 ! ! |
763 |
763 |
3592 dispatching ifFalse:[^ self]. |
3592 dispatching ifFalse:[^ self]. |
3593 |
3593 |
3594 self == Display ifTrue:[ |
3594 self == Display ifTrue:[ |
3595 ExitOnLastClose ifFalse:[^ self]. |
3595 ExitOnLastClose ifFalse:[^ self]. |
3596 ]. |
3596 ]. |
|
3597 exitOnLastClose ifFalse:[^ self]. |
3597 |
3598 |
3598 knownViews notNil ifTrue:[ |
3599 knownViews notNil ifTrue:[ |
3599 (knownViews findFirst:[:slot | |
3600 (knownViews findFirst:[:slot | |
3600 slot notNil |
3601 slot notNil |
3601 and:[slot ~~ 0 |
3602 and:[slot ~~ 0 |
4536 "close down connection to Display - usually never done" |
4537 "close down connection to Display - usually never done" |
4537 |
4538 |
4538 ^ self subclassResponsibility |
4539 ^ self subclassResponsibility |
4539 |
4540 |
4540 "Created: 13.1.1997 / 22:10:07 / cg" |
4541 "Created: 13.1.1997 / 22:10:07 / cg" |
|
4542 ! |
|
4543 |
|
4544 exitOnLastClose:aBoolean |
|
4545 "set/clear the flag which controls if the |
|
4546 event dispatching should stop when the last view is closed." |
|
4547 |
|
4548 self == Display ifTrue:[ |
|
4549 ExitOnLastClose := aBoolean |
|
4550 ]. |
|
4551 exitOnLastClose := aBoolean |
|
4552 |
|
4553 "Modified: 23.4.1996 / 22:01:28 / cg" |
4541 ! |
4554 ! |
4542 |
4555 |
4543 initialize |
4556 initialize |
4544 "initialize the receiver for a connection to the default display" |
4557 "initialize the receiver for a connection to the default display" |
4545 |
4558 |