Re: The Trunk: Graphics-eem.557.mcz
Christoph Thiede via Squeak-dev <[email protected]> Fri, 12 Jun 2026 19:49:10 +0200
| Newsgroups | gmane.comp.lang.smalltalk.squeak.general |
|---|---|
| Message-ID | <1b2811ef-394f-4f3f-8775-5cae0f84b4eb@MX2025-DAG1.hpi.uni-potsdam.de> |
Hi Eliot, all, DisplayScreen class>>#displayScreenRectangle does not work because it depends on #hostOSWindowPosition/hostOSWindowExtent which are only implemented in Cuis. Should we copy over these methods from our own accessors on HostWindowProxy or deduplicate them in some way? Best, Christoph -- Sent from Squeak Inbox Talk On 2025-09-30T16:33:02+00:00, [email protected] wrote: > Eliot Miranda uploaded a new version of Graphics to project The Trunk: > http://source.squeak.org/trunk/Graphics-eem.557.mcz > > ==================== Summary ==================== > > Name: Graphics-eem.557 > Author: eem > Time: 30 September 2025, 9:32:46.865896 am > UUID: bff9c0b3-6b1b-4bbc-acb5-1c310adffbaa > Ancestors: Graphics-ct.556 > > Add methods to access the screen rectangles of multiple monitors. > > =============== Diff against Graphics-ct.556 =============== > > Item was added: > + ----- Method: DisplayScreen class>>displayScreenRectangle (in category 'host OS window') ----- > + displayScreenRectangle > + "Answer the rectangle occupied by the Display in the host gui's logical display coordinate system. > + This rectangle describes the Display, not the screen it is displayed on." > + ^self hostOSWindowPosition extent: self hostOSWindowExtent > + > + "self displayScreenRectangle" > + > + "self screenWorkArea containsRect: self displayScreenRectangle"! > > Item was added: > + ----- Method: DisplayScreen class>>largestScreenWorkArea (in category 'host OS window') ----- > + largestScreenWorkArea > + "Answer the largest available working area of a host display screen." > + "Copyright (c) 2005-2021, 3D Immersive Collaboration Consulting, LLC., All Rights Reserved" > + | screenWorkAreas | > + ^(screenWorkAreas := self screenWorkAreas) inject: screenWorkAreas first into: > + [:best :next| > + best area >= next area > + ifTrue: [best] > + ifFalse: [next]] > + > + "self largestScreenWorkArea"! > > Item was added: > + ----- Method: DisplayScreen class>>primitiveHostWindowScreenWorkAreaPositionFor: (in category 'primitives') ----- > + primitiveHostWindowScreenWorkAreaPositionFor: windex > + "Answer the origin of host-defined screen work area for the screen holding the given window. > + Fail if the windowHandle is invalid." > + <primitive: 'primitiveHostWindowScreenWorkAreaPosition' module: 'HostWindowPlugin'> > + self primitiveFailed! > > Item was added: > + ----- Method: DisplayScreen class>>primitiveHostWindowScreenWorkAreaSizeFor: (in category 'primitives') ----- > + primitiveHostWindowScreenWorkAreaSizeFor: windex > + "Answer the origin of host-defined screen work area for the screen holding the given window. > + Fail if the windowHandle is invalid." > + <primitive: 'primitiveHostWindowScreenWorkAreaSize' module: 'HostWindowPlugin'> > + self primitiveFailed! > > Item was added: > + ----- Method: DisplayScreen class>>primitiveScreenRectangles (in category 'primitives') ----- > + primitiveScreenRectangles > + > + <primitive: #primitiveScreenRectangles module: 'HostWindowPlugin'> > + "Answer nil if HostWindowPlugin is not supported." > + ^nil > + > + "DisplayScreen primitiveScreenRectangles"! > > Item was added: > + ----- Method: DisplayScreen class>>screenWorkArea (in category 'host OS window') ----- > + screenWorkArea > + "The available working area of the screen occupied by the main window." > + "Copyright (c) 2005-2024, 3D Immersive Collaboration Consulting, LLC., All Rights Reserved" > + ^(self primitiveHostWindowScreenWorkAreaPositionFor: 1) > + extent: (self primitiveHostWindowScreenWorkAreaSizeFor: 1) > + > + "self screenWorkArea" > + > + "self screenWorkAreas includes: self screenWorkArea" > + > + "self screenWorkArea containsRect: (DisplayScreen hostOSWindowPosition extent: DisplayScreen hostOSWindowExtent)"! > > Item was added: > + ----- Method: DisplayScreen class>>screenWorkAreas (in category 'host OS window') ----- > + screenWorkAreas > + "Answer the rectangles of host OS displays in the host gui's logical display coordinate system." > + "Copyright (c) 2005-2021, 3D Immersive Collaboration Consulting, LLC., All Rights Reserved" > + | points | > + points := self primitiveScreenRectangles collect: > + [:packedPoint| | x y | > + x := packedPoint bitShift: -16. > + (y := packedPoint bitAnd: 16rFFFF) > 32767 ifTrue: > + [y := y - 65536]. > + x(a)y]. > + ^(1 to: points size by: 2) collect: > + [:i| (points at: i) extent: (points at: i + 1)] > + > + "self screenWorkAreas" > + "self screenWorkAreas collect: #origin" > + "self screenWorkAreas collect: #center" > + "self screenWorkAreas collect: #extent"! Squeak-dev mailing list -- [email protected] To unsubscribe send an email to [email protected]