Re: Gtk2::Notebook and switch-page signal

Anyway the original question is: could somebody explain what
gpointer mean in "switch-page(Gtk2::Notebook, gpointer, Glib::UInt)"? :-)

For this signal, in git master, the gpointer argument is now a proper
GTK_TYPE_WIDGET representing the new selected child, suggesting someone
attempted to fix this.

You may be able to get a usable thing by doing

    $child = Glib::Object->new_from_pointer ($the_gpointer_value);

if you really want to try using it.  However, if it breaks, you get the keep the pieces.

Eeerr.... I'm confused a bit. As far as I can see documentation
mixes two different meaning of the word "pointer".
1. a variable holding a memory address
2. a small arrow (or other shape) moved by mouse (or other pointing device) writes:

scalar = Glib::Object->new_from_pointer ($pointer, $noinc=FALSE)
        $pointer (unsigned) a C pointer value as an integer.


gpointer = $object->get_pointer
        Complement of new_from_pointer.

Unfortunately Gtk2::Widget class overrides method get_pointer so
$notebook->get_pointer() returns two small integers,
the actual coordinates of the small arrow within the window.

What is $object in the former doc snippet?
How to get a valid gpointer value?

One problem with the signal documentation is that we get the signal
signatures by asking the library at runtime for the types of the parameters.
This information doesn't include parameter names, and doesn't explain which
signals are private and which are public.  Many of the very old things in
gtk+ have signals when they actually just wanted virtual functions, so
they're not always intended for application usage.

Any idea how could I force signal handler to be executed without
actual page switch? :-)
Now I have to do some workarounds. The program works but it is not "clean".

No smoke, no drugs, no vindoze.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]