--- Emmanuele Bassi <[EMAIL PROTECTED]> wrote:

> On Wed, 2006-09-06 at 06:54 -0700, Sergei Steshenko wrote:
> > 
> > --- Emmanuele Bassi <[EMAIL PROTECTED]> wrote:
> > 
> > > On Wed, 2006-09-06 at 14:54 +0200, Ratcliffe, Jeffrey (Peters) wrote:
> > > > How do I check whether a window has been maximized or not?
> > > 
> > > Connect a callback to the 'window-state-event' event, and check the
> > > passed Gtk2::Gdk::Event::WindowState when the event is fired; the
> > > changed_mask member of the event should contain the 'maximized' flag.
> > > 
> > >   $window->signal_connect(window_state_event => sub {
> > >       my ($w, $event) = @_;
> > >   
> > >       if ($event->changed_mask & [ 'maximized', ]) {
> 
> By the way, I should test what I write instead of skimming through the
> documentation, as this works.
> 
> 
> > Isn't "&" in
> > 
> > $event->changed_mask & [ 'maximized', ]
> > 
> > bitwise AND ?
> 
> Yep.
> 
> > And doesn't "[ 'maximized', ]" return array reference ?
> > 
> > If the answer to both questions is YES, how will it work ?
> 
> It was the case of magic (via operator overloading), not my memory; now
> I can relax about the state of my memory, and once again thank muppet
> and Torsten for the incredible effort of keeping the Glib/GTK perl API
> incredibly sane and C-like. :-)
> 
> Ciao,
>  Emmanuele.
> 
> -- 
> Emmanuele Bassi,  E: [EMAIL PROTECTED]
> W: http://www.emmanuelebassi.net
> B: http://log.emmanuelebassi.net
> 
> 

Well, there is useful info on all this in the output of

perldoc Glib
.

Thanks,
  Sergei.



Applications From Scratch: http://appsfromscratch.berlios.de/

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
gtk-perl-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-perl-list

Reply via email to