<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Tom, Hi Tim, Hi Ron,<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 22, 2019 at 10:34 PM Tom Beckmann <<a href="mailto:tomjonabc@gmail.com">tomjonabc@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"> <div dir="ltr">Hey everyone,<br><br>I was looking for a way to set the OS cursor position from Squeak and found primitive 91 (see screenshots), which used to do exactly that (also according to the blue book). Now it instead returns whether a pixel depth is supported by the display.<br></div></blockquote><div><br></div><div>As Tim says we must remove, or at least reimplement primCursorLockPut: to say it is moo longer implemented ASAP.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Has an alternative for setting the cursor position been implemented? If not, what would be the correct way of re-adding that functionality? Taking over another primitive number? I read that some people resorted to using custom FFI, but I feel like it could be worth the effort to properly reintegrate the functionality.<br></div></blockquote><div><br></div><div>Indeed, but not in the default VM. Qwaq/Teleplace/3D ICC extended the HostWindowPlugin:</div><div><br></div><div><div>primitiveSetCursorPositionX:Y:</div><div>#if TerfVM</div><div>EXPORT(sqInt)</div><div>primitiveSetCursorPosition(void)</div><div>{</div><div>   ...</div><div>    result = ioSetCursorPositionXY(x, y);</div></div><div><br></div><div>and implementationsfor ioSetCursorPositionXY exist in the Term VM source for some platforms.</div><div><br></div><div>iOS :-( platforms//iOS/plugins/HostWindowPlugin/sqMacHostWindow.m</div><div><br></div><div><div>sqInt ioSetCursorPositionXY(long x, long y) {   return -1; }</div></div><div><br></div><div>Unix :-) platforms//unix/vm-display-X11/sqUnixX11.c</div><div><br></div><div><div>static long</div><div>display_ioSetCursorPositionXY(long x, long y)</div><div>{</div><div>        if (!XWarpPointer(stDisplay, None, DefaultRootWindow(stDisplay),</div><div>                                          0, 0, 0, 0, x, y))</div><div>                return -1;</div><div>        XFlush(stDisplay);</div><div>        return 0;</div><div>}</div></div><div><br></div><div>Windows :-) (but only in the Term VM sources in platforms/win32/plugins/HostWindowPlugin/sqWin32HostWindowPlugin.c).  This needs to be ported).</div><div><br></div><div><div>#if TerfVM</div><div>sqInt ioSetCursorPositionXY(sqInt x, sqInt y) { return SetCursorPos(x,y) ? 0  : -1; }</div><div><br></div><div><br></div><div>I'm pretty sure Ron has no issues with the Perf VM code getting integrated.  And I think all those #if TermVM qualifiers can (and should) be discarded.</div><div><br></div><div>So what we really need are</div><div><br></div><div>a) an implementation for iOS Cocoa, and</div><div>b) someone to put the energy into integrating the code, given that Vincent Blondeau extended HostWin dowPlugin with support for setting the window icon.  SO the Term and opensmalltalk code has diverged a little.</div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br>Usecases: for example in Photoshop you often have number inputs on the far right side of your monitor. These support clicking and dragging for changing the value. However, the cursor will almost immediately hit the right edge of the screen. To prevent this, the cursor position will keep being reset to the center of the slider element while the user is dragging.<br>Further, games often use mouse input as a relative number, rather than absolute, by forcing the cursor to the center of screen after each frame and only taking the movement between each frame. This is most commonly seen in games with first person perspective.<br></div></blockquote><div><br></div><div>You don't have to justify.  primCursorLocPut: is essential GUi functionality.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br>Thank you for any pointers!<br><br>Best,<br>Tom<br></div>
</blockquote></div><div><br></div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div></div></div></div></div></div></div></div></div>