RE: function type




> >Hi, i'm writing a class in C++ which has a member-function to add a
> >button into the widget. It's declared like this:
> >
> >gboolean AddButton(gint* id, gchar* label, function_type callback,
> >gpointer data);
> >
> >Which type should I use for the callback? Something like GtkSignalFunc??
>
> can't be answered without knowing which signal you plan on connecting to.
> clicked ? button_press ? button_release ? enter_notify? etc.

It's a button_press signal

>
> why aren't you using Gtk-- ?
>
> --p

That's a good question. Well, I began writting this application using GTK+
and  plain C.
Then they ask me to write some classes using C++. I said: "There's a C++
wrapper called Gtk--" But they were already working with GTK+ and didn't
want to know nothing about Gtk--.
So, in short... I just obey orders :)))

Thanks again,
    Ignacio Nodal





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