diff --git a/include/wx/gtk/window.h b/include/wx/gtk/window.h index f3639f2c8c..fb342e9a0b 100644 --- a/include/wx/gtk/window.h +++ b/include/wx/gtk/window.h @@ -363,6 +363,12 @@ protected: // should be called from OnInternalIdle() if it's overridden void GTKUpdateCursor(); + // Connect the given function to the specified signal on m_widget. + // + // This is just a wrapper for g_signal_connect() and returns the handler id + // just as it does. + gulong GTKConnectWidget(const char *signal, void (*callback)()); + // Return true from here if PostCreation() should connect to size_request // signal: this is done by default but doesn't work for some native // controls which override this function to return false diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index e73b3ebb82..3a4ec1ae2a 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -2382,6 +2382,11 @@ void wxWindowGTK::PostCreation() gtk_widget_show( m_widget ); } +gulong wxWindowGTK::GTKConnectWidget(const char *signal, void (*callback)()) +{ + return g_signal_connect(m_widget, signal, callback, this); +} + void wxWindowGTK::ConnectWidget( GtkWidget *widget ) { g_signal_connect (widget, "key_press_event",