[Vm-dev] Re: [Pharo-project] Fwd: How can the main window title in
Squeak and Pharo be set?
eliot.miranda at gmail.com
Fri Jan 11 18:48:55 UTC 2013
On Fri, Jan 11, 2013 at 5:34 AM, Torsten Bergmann <astares at gmx.de> wrote:
> From the history of Squeak and Pharo you can:
> 1. Squeak.exe (VM for Windows) was always able to set this using
> the Setting "WindowTitle" in Pharo.ini - see
> This was implemented by Andreas Raab (maintainer of SqueakVM)
> 2. Later there was the idea in Squeak for a project
> called "Areithfa Ffenestri" that should add more
> support code to Squeak to allow access to the
> native window or open new ones:
> This is a VM plugin that is not in all VM's and even after
> years AFAIK not fully implemented on all platforms.
> If it is available then you can do what Bert Freudenberg
> suggested here:
> Dont know if the Pharo VM maintainers added this plugin
> too. You have to ask Igor or Esteban.
> 3. While Squeak tries to stay platform independent and
> encapsulate platform dependent logic mostly into VM plugins
> to unify the access there is some other idea in Pharo now:
> With the growing need to easily access platform logic
> of the underlying OS or access external libraries written in
> other languages there is a new FFI plugin which is
> (since Pharo 2.0) will be included in the standard distribution.
> This new Foreign Function Interface (FFI) is called
> NativeBoost and will move more logic into Smalltalk
> itself. So you dont have to write/compile a plugin.
> You just need a VM with NativeBoost support (NBCog.exe on Windows)
> Using native Boost (when in Pharo 2.0) you can (already!)
> NBWin32Window getFocus setWindowText: 'Hello using Native Boost'
> to change the window title. Internally I just call the
> Windows Win32-API function "SetWindowTextA" using the
> window handle.
> If someone from other platforms implements an NBUnixWindow,
> NBMacWindow, NBRiscOSWindow, ... we can also implement a
> common interface class (NBPharoWindow for example).
and an additional piece of history is that a number of plugins, including
the HostWindowPlugin, were enhanced at Qwaq/Teleplace (now 3d ICC), in a
cross-platform manner since we supported Mac and Windows initially and
later had a linux prototype. The code for some of these enhanced plugins,
including the HostWindowPlugin, was released along with Cog, which has an
MIT license. So if you mine the COg branch you'll find code that can be
folded back into trunk you'll get the enhanced functionality. For the
Qwaq/Teleplace HostWindowPlugin that included setting the window title,
repositioning and resizing the main window, querying its size, etc.
> Hope this helps a little bit
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev