Re: Wrapping gtkimageview

On Tue, 2008-03-04 at 23:28 +0100, Andreas Volz wrote:
> But I've some problems to connect the signals. See my code from the .hg
> file:
> _WRAP_SIGNAL(void on_mouse_wheel_scroll(), "mouse-wheel-scroll")
> If I compile this I get:
> In member function 
> 'virtual void Gtk::ImageView::on_on_mouse_wheel_scroll()':
> error: too few arguments to function
> See the prototype of the C signal:
> void user_function (GtkImageView *view, GdkScrollDirection direction,
>                     gpointer user_data)

This signal seems to send a GtkScrollDirection direction parameter, but
you don't mention that in your _WRAP_SIGNAL().

> And the generated def file for the signals:
> (define-signal mouse-wheel-scroll
>   (of-object "GtkImageView")
>   (return-type "void")
>   (when "last")
>   (parameters
>     '("GdkScrollDirection" "p0")
>   )
> )
> The question is why the gpointer parameter isn't generated automatic.

The gpointer user_data parameter is a generic thing that all GObject
signals have so that C applications can maintain state. You don't need
it and gmmproc doesn't expose it.

Murray Cumming
murrayc murrayc com

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