Help: Registering C++ Callback



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)
                )|(



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