[squeak-dev] Re: [Pharo-project] change pharo image title

Eliot Miranda eliot.miranda at gmail.com
Fri Feb 24 21:31:21 UTC 2012


On Cog:

primitiveHostWindowTitle: windowIndex string: titleString
<primitive: 'primitiveHostWindowTitle' module: 'HostWindowPlugin'>
self primitiveFailed

squeakWindowHandle
"Answer the native Squeak window handle, presumably a pointer, as an
unsigned integer.
 This value should be usable in native calls to the window manager as well
as
 the argument to primitiveNativeWindowPosition:"
<primitive: 'primitiveSqueakWindowHandle' module: 'HostWindowPlugin'>
self primitiveFailed

squeakWinIndex

"What winIndex refers to Squeak's main window?"
^ Smalltalk platformName caseOf: {
['Win32'] -> [ (self squeakWindowHandle) ]. "Window Index is just the
handle here."
['unix'] -> [ self squeakWindowHandle ]. "Window Index is just the handle
here."
['Mac OS'] -> [ 1 ] "The Host Window plugin shares the window-ref lookup
table."
} otherwise: [ -1 ].

self primitiveHostWindowTitle: self squeakWinIndex string: 'Yowza!'

You can find the full set of primitives in a class called HostWindows in
OpenQwaq.  You can find the plugin in Cog's HostWindowPlugin

On Fri, Feb 24, 2012 at 12:19 PM, Gary Chambers
<gazzaguru2 at btinternet.com>wrote:

> **
> For Windows only...
>
> (HostWindowProxy new instVarNamed: #windowHandle put: Win32Window
> getFocus; yourself)
>   windowTitle: aString
>
>
> Would be nice if the HostWindow stuff had some develpment time...
>
> Regards, Gary
>
> ----- Original Message -----
> *From:* Usman Bhatti <usman.bhatti at gmail.com>
> *To:* Pharo Development <pharo-project at lists.gforge.inria.fr>
> *Sent:* Friday, February 24, 2012 7:56 PM
> *Subject:* [Pharo-project] change pharo image title
>
> Is there a way to programmatically set the title of a pharo image on
> startup? I grabbed the first level pasteup morph and tried to play with it
> but I didn't find the intended method.
>
> thanx
>
> usman
>
>


-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20120224/10346319/attachment.htm


More information about the Squeak-dev mailing list