|
Re: Getting currently-selected Gtk::Notebook page: msg#00081gnome.gtk+.perl
On Thu, 2003-10-09 at 04:25, Ken Restivo wrote: > "switch-page" > void user_function (GtkNotebook *notebook, > GtkNotebookPage *page, > gint page_num, > gpointer user_data); > > I tested this in C, and the page_num variable does in fact deliver the > correct number. > > But in Perl all I can shift out of there is the notebook widget itself. Well, it seems to work for me: $notebook -> signal_connect(switch_page => sub { warn join(", ", @_); }); gives someting like: Gtk2::Notebook=HASH(0x865340c), 142057896, 2 at ... which is what the prototype suggests. Of course, the GtkNotebookPage parameter is not correct. It's a struct and supposedly gets cast to an integer. We'd need custom marshalling for this to work correctly, but as far as I can tell that struct is supposed to be private anyway. HTH, -Torsten |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: last call: 00081, A. Pagaltzis |
|---|---|
| Next by Date: | key bindings: 00081, Jaap Karssenberg |
| Previous by Thread: | Getting currently-selected Gtk::Notebook pagei: 00081, Ken Restivo |
| Next by Thread: | last call: 00081, muppet |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |