g_signal_connect problem
- From: Grzesiek <gszewc elka pw edu pl>
- To: "gtk-forum" <gtk-app-devel-list gnome org>
- Subject: g_signal_connect problem
- Date: Mon, 27 Oct 2003 20:29:53 +0100
Hi.
How to connect class member function as callback function in GTK2.x
I use GTKmm to create GUI.
I've got class window1 and member function:
void handle_signal_selection_stopped (GtkDatabox * box,
GtkDataboxCoord * marked,
GtkDataboxCoord * select);
I try to connect this function like this:
g_signal_connect (G_OBJECT (drawbox2), "gtk_databox_selection_stopped",
G_CALLBACK (handle_signal_selection_stopped), NULL);
but I've got an error:
"no matches converting function `handle_signal_selection_stopped` to type
void (*)();
candidates are:void window1::handle_signal_selection_stopped(....""
I've allso tried :
g_signal_connect (G_OBJECT (drawbox2), "gtk_databox_selection_stopped",
G_CALLBACK (&window1::handle_signal_selection_stopped), NULL);
but it gives error:"converting from void (window1::*)(GtkDatabox* ....) to
void(*)();"
When I declare function handle_signal_selection_stopped as global function
it's compile and work correctly.
How to solve this problem ??
I need class member function to use member values etc...
--
Gregory
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]