+extern "C" {
+static void gtk_button_clicked_callback( GtkWidget *WXUNUSED(widget), wxButton *button )
+{
+ if (!button->m_hasVMT) return;
+ if (g_blockEventsOnDrag) return;
+
+ wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId());
+ event.SetEventObject(button);
+ button->HandleWindowEvent(event);
+}
+}
+
+//-----------------------------------------------------------------------------
+// "style_set" from m_widget
+//-----------------------------------------------------------------------------
+
+extern "C" {
+static void
+gtk_button_style_set_callback(GtkWidget* widget, GtkStyle*, wxButton* win)
+{
+ /* the default button has a border around it */
+ wxWindow* parent = win->GetParent();
+ if (parent && parent->m_wxwindow && GTK_WIDGET_CAN_DEFAULT(widget))
+ {
+ GtkBorder* border = NULL;
+ gtk_widget_style_get(widget, "default_border", &border, NULL);
+ if (border)
+ {
+ win->MoveWindow(
+ win->m_x - border->left,
+ win->m_y - border->top,
+ win->m_width + border->left + border->right,
+ win->m_height + border->top + border->bottom);
+ gtk_border_free(border);
+ }
+ }
+}
+}