Re: Wrapping gtkimageview
- From: Murray Cumming <murrayc murrayc com>
- To: Andreas Volz <lists brachttal net>
- Cc: gtkmm-list gnome org
- Subject: Re: Wrapping gtkimageview
- Date: Wed, 05 Mar 2008 00:39:49 +0100
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:
>
> imageview.cc: In member function
> 'virtual void Gtk::ImageView::on_on_mouse_wheel_scroll()':
> imageview.cc:339: 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
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]