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). Hope this helps a little bit Bye T. |
On Fri, Jan 11, 2013 at 5:34 AM, Torsten Bergmann <[hidden email]> wrote: -- From the history of Squeak and Pharo you can: 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.
+1. best, Eliot
|
In reply to this post by Torsten Bergmann
On 11 January 2013 13:34, 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). > > Hope this helps a little bit > > Bye > T. > I downloaded the NBCog.exe and was able to execute the 'NBWin32Window getFocus setWindowText: 'Hello using Native Boost' example you showed above. It looks me to like they are direct calls to the Windows API which don't require any external DLLs other the built in Windows ones.. However on Linux would that mean it may be necessary to use different code for Gnome or KDE/Qt for instance, or use some other native or crossplatform widgetset like Wx? -- Frank Church ======================= http://devblog.brahmancreations.com |
On Fri, Jan 11, 2013 at 10:57 AM, Frank Church <[hidden email]> wrote: --
IIRC no. This is at the XLib level. See XStoreName/XSetTextProperty. best, Eliot
|
In reply to this post by Eliot Miranda-2
On Sat, Jan 12, 2013 at 12:39 AM, stephane ducasse <[hidden email]> wrote: --
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
|
Free forum by Nabble | Edit this page |