gtk_menu_popup

From: Date: Tue, 01 Jan 2002 19:59:15 +0000
Subject: gtk_menu_popup
Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-308@lists.php.net to get a copy of this message
I've just spent about a week trying to make sense of this. Andrei already did something to it so it will only accept 5 parameters (user_data doesn't seem to get accepted unless I'm doing some bad thing to it). The first two parameters should always be null for a popup menu. They are there because they are used internally to associate a popup with a menubar or optionmenu (because there is NO SUCH THING AS A DROPDOWN GTKMENU). The third parameter refers to another callback function which needs to return an array of co-ordinates (x, y). It can be null, and if so there is a default in place for it (the menu pops up at the pointer position). The fourth parameter does nothing, even in the depths of GTK code, and really shouldn't be there at all as it refers to mouse-button options in a callback which could equally well be triggered by a key-press-event or enter-notify-event signal. Havoc informs me that it refers to the button-release-event button, but I'm still struggling to see its purpose. The fifth parameter could permanently be $event->time(); as far as I can see .... menu->popup(); would be a lot more straightforward to use if we could lose the first 2 parameters, set the callback position array to be automatically generated somehow from any input other than 'null', lose parameter 4, and maybe (I dunno) lose parameter 5 as well ... Comments, anyone? Patches?

« previous php.gtk.dev (#308) next »