Re: [Pharo-project] Fwd: How can the main window title in Squeak and Pharo be set?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] Fwd: How can the main window title in Squeak and Pharo be set?

Eliot Miranda-2
 



On Fri, Jan 11, 2013 at 5:34 AM, Torsten Bergmann <[hidden email]> 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
     http://squeakvm.org/win32/settings.html

     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:

       http://wiki.squeak.org/squeak/3862

     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:

     http://lists.squeakfoundation.org/pipermail/squeak-dev/2013-January/167766.html

     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!)
     write:

       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

+1.
--
best,
Eliot
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] Fwd: How can the main window title in Squeak and Pharo be set?

David T. Lewis
 
On Fri, Jan 11, 2013 at 10:48:55AM -0800, Eliot Miranda wrote:

>
> 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.
>

I suspect this is not the first time Eliot has mentioned this, nor the
first time I've forgotten about it, so now it is on Mantis at

  http://bugs.squeak.org/view.php?id=7716

Dave

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] Fwd: How can the main window title in Squeak and Pharo be set?

stephane ducasse-2
In reply to this post by Eliot Miranda-2

>
>
> 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.

Eliot
I thought that the code from teleplace was under GPL.
The code for Cog made by teleplace is under another license (MIT)?

Stef
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] Fwd: How can the main window title in Squeak and Pharo be set?

Eliot Miranda-2
 



On Sat, Jan 12, 2013 at 12:39 AM, stephane ducasse <[hidden email]> wrote:

>
>
> 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.

Eliot
I thought that the code from teleplace was under GPL.

All the image code from Teleplace is GPL.  I'm hoping that specific code such as Andreas' improved profiler will be released under the MIT license.  Fingers crossed :)
 
The code for Cog made by teleplace is under another license (MIT)?

The VM is of course MIT otherwise the community wouldn't be using it :)

Stef
--
best,
Eliot