Aah, thanks! Here's the full suite of commands:
pyglet/window/win32/__init__.py:
def restore(self):
_user32.ShowWindow(self._hwnd, SW_RESTORE)
pyglet/window/xlib/__init__.py:
def restore(self):
xlib.XMapWindow(self._x_display, self._window)
See:
http://www.avsnonline.net/library/ebooks/en/computer/lupg/xlib-programming/xlib-programming-2.html
pyglet/window/carbon/__init__.py:
def restore(self):
carbon.CollapseWindow(self._window, False)
See:
http://developer.apple.com/DOCUMENTATION/Carbon/Reference/Window_Manager/Reference/reference.html#//apple_ref/c/func/CollapseWindow
(Note: I'm not sure if this alone is sufficient in the Carbon case --
there maybe needs to be some stuff regarding setting custom cursors,
as the Carbon minimize() code seems to handle some cursor things.)
So, Alex -- any chance of getting these in pyglet?
In any case, hopefully this'll be useful to others!
Zach
On Mar 6, 4:57 pm, tazg <[email protected]> wrote:
> in /pyglet/window/win32/__init__.py there is:
>
> def minimize(self):
> _user32.ShowWindow(self._hwnd, SW_MINIMIZE)
>
> def maximize(self):
> _user32.ShowWindow(self._hwnd, SW_MAXIMIZE)
>
> so you should be able to just add:
>
> def restore(self):
> _user32.ShowWindow(self._hwnd, SW_RESTORE)
>
> Here's the
> reference:http://msdn.microsoft.com/en-us/library/ms633548(VS.85).aspx
>
> Of course you will have to look up how to do it in carbon (os x) too
> and make the same change carbon/__init__.py
>
> On Mar 6, 2:52 pm, Zachrahan <[email protected]> wrote:
>
>
>
> > Hi all,
>
> > I'm curious if there's a way in pyglet to programmatically reverse the
> > action of "window.minimize()", which collapses a window to the taskbar
> > (Windows) or dock (OS X).
>
> > Naïvely, one might think "window.maximize()" would do the trick, but
> > that actually is equivalent to clicking on the "maximize" widget in
> > the window's title bar, zooming the window to take up as much space as
> > possible. This has the side-effect of un-minimizing the window, but it
> > also alters its size.
>
> > Any thoughts?
>
> > Zach
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---