[10382] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Help: Registering C++ Callback

daemon@ATHENA.MIT.EDU (Jay J. Williams)
Tue Nov 24 11:16:05 1998

Date: Tue, 24 Nov 1998 10:14:18 -0600 (CST)
From: "Jay J. Williams" <jjw@ece.nwu.edu>
To: gtk-list@redhat.com
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

Hi,

I'm having some problems using gtk+1.0.5 with g++.  I'm trying to register 
C++ callback functions within my code.  When I compile the program I get
the following warning for all the callbacks I register with 
gtk_signal_connect:

	warning: converting from `int (KevVideo::*)(_GtkWidget *,
		_GdkEvent *,void *)' to `void(*)()'

All of the c++ callbacks have the following prototype,

gint KevVideo::CB_widgetName(GtkWidget *widget,GdkEvent *event,
	gpointer data);

My program seems to run; the callbacks routines are called.  However, the
callback functions produce incorrect results when they accessing the
class's data members:( Does this appear to be an error on my part or is
there something special I should be doing in order to use C++ callbacks
with gtk+?


Cheers,
Jay



                                              )|(
                                             (o o)
------------------------------------------ooO-(_)-Ooo-------------------------
Jay J. Williams                       '||'                          \\|//
E-Mail: jjw@nwu.edu                    ||   ....   .... ...          - -
Northwestern University                ||  '' .||   '|.  |          (o o)
ECE Department                         ||  .|' ||    '|.|             J
2145 Sheridan Road                 || .|'  '|..'|'    '|              -
Evanston, IL 60208-3118             '''            .. |              \_/
Voice: (847) 491-3039                               ''         
FAX:   (847) 491-4455 URL ->  http://www.ece.nwu.edu/~jjw
            ** This Message Was Printed On 100% Recycled Electronics **  
============ooO=(-)=Ooo==================ooO=======Ooo========================
               (o o)
                )|(

-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post