Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setButton(Php::Parameters ¶ms) {
- // Php::Value callback = params[0];
- _button = gtk_button_new_with_label(_buttonTitle);
- gtk_container_add(GTK_CONTAINER(_window), _button);
- g_signal_connect(G_OBJECT(_button), "clicked", G_CALLBACK(callback), NULL);
- }
- void callback(GtkButton *button, gpointer data) {
- g_print("testing");
- }
- In file included from /usr/include/glib-2.0/gobject/gobject.h:28:0,
- from /usr/include/glib-2.0/gobject/gbinding.h:29,
- from /usr/include/glib-2.0/glib-object.h:23,
- from /usr/include/glib-2.0/gio/gioenums.h:28,
- from /usr/include/glib-2.0/gio/giotypes.h:28,
- from /usr/include/glib-2.0/gio/gio.h:26,
- from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
- from /usr/include/gtk-2.0/gdk/gdk.h:32,
- from /usr/include/gtk-2.0/gtk/gtk.h:32,
- from main.cpp:3:
- main.cpp: In member function ‘void Gtk::setButton(Php::Parameters&)’:
- /usr/include/glib-2.0/gobject/gclosure.h:70:41: error: invalid use of member function (did you forget the ‘()’ ?)
- #define G_CALLBACK(f) ((GCallback) (f))
- ^
- /usr/include/glib-2.0/gobject/gsignal.h:475:60: note: in definition of macro ‘g_signal_connect’
- g_signal_connect_data ((instance), (detailed_signal), (c_handler), (data), NULL, (GConnectFlags) 0)
- ^
- main.cpp:46:49: note: in expansion of macro ‘G_CALLBACK’
- g_signal_connect(G_OBJECT(_button), "clicked", G_CALLBACK(callback), NULL);
- ^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement