GTK+ callbacks must have C linkage (patch 1157384)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -96,12 +96,14 @@ struct _GtkPixmapMenuItemClass
|
||||
guint have_pixmap_count;
|
||||
};
|
||||
|
||||
|
||||
extern "C" {
|
||||
GtkType gtk_pixmap_menu_item_get_type (void);
|
||||
GtkWidget* gtk_pixmap_menu_item_new (void);
|
||||
void gtk_pixmap_menu_item_set_pixmap (GtkPixmapMenuItem *menu_item,
|
||||
GtkWidget *pixmap);
|
||||
#endif // GTK 2.0
|
||||
GtkWidget *pixmap);
|
||||
}
|
||||
|
||||
#endif // !__WXGTK20__
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// idle system
|
||||
@@ -149,6 +151,7 @@ static wxString wxReplaceUnderscore( const wxString& title )
|
||||
// activate message from GTK
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern "C" {
|
||||
static void gtk_menu_open_callback( GtkWidget *widget, wxMenu *menu )
|
||||
{
|
||||
if (g_isIdle) wxapp_install_idle_handler();
|
||||
@@ -163,6 +166,7 @@ static void gtk_menu_open_callback( GtkWidget *widget, wxMenu *menu )
|
||||
wxWindow *win = menu->GetInvokingWindow();
|
||||
if (win) win->GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMenuBar
|
||||
@@ -581,6 +585,7 @@ void wxMenuBar::SetLabelTop( size_t pos, const wxString& label )
|
||||
// "activate"
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern "C" {
|
||||
static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
|
||||
{
|
||||
if (g_isIdle)
|
||||
@@ -651,11 +656,13 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
|
||||
menu->SendEvent(id, item->IsCheckable() ? item->IsChecked() : -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "select"
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern "C" {
|
||||
static void gtk_menu_hilight_callback( GtkWidget *widget, wxMenu *menu )
|
||||
{
|
||||
if (g_isIdle) wxapp_install_idle_handler();
|
||||
@@ -677,11 +684,13 @@ static void gtk_menu_hilight_callback( GtkWidget *widget, wxMenu *menu )
|
||||
wxWindow *win = menu->GetInvokingWindow();
|
||||
if (win) win->GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "deselect"
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern "C" {
|
||||
static void gtk_menu_nolight_callback( GtkWidget *widget, wxMenu *menu )
|
||||
{
|
||||
if (g_isIdle) wxapp_install_idle_handler();
|
||||
@@ -704,6 +713,7 @@ static void gtk_menu_nolight_callback( GtkWidget *widget, wxMenu *menu )
|
||||
if (win)
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMenuItem
|
||||
@@ -1525,7 +1535,7 @@ static void changed_have_pixmap_status (GtkPixmapMenuItem *menu_item);
|
||||
|
||||
static GtkMenuItemClass *parent_class = NULL;
|
||||
|
||||
}
|
||||
} // extern "C"
|
||||
|
||||
#define BORDER_SPACING 3
|
||||
#define PMAP_WIDTH 20
|
||||
@@ -1556,6 +1566,8 @@ gtk_pixmap_menu_item_get_type (void)
|
||||
return pixmap_menu_item_type;
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
||||
/**
|
||||
* gtk_pixmap_menu_item_new
|
||||
*
|
||||
@@ -1834,5 +1846,7 @@ changed_have_pixmap_status (GtkPixmapMenuItem *menu_item)
|
||||
gtk_widget_queue_resize(GTK_WIDGET(menu_item));
|
||||
}
|
||||
|
||||
#endif
|
||||
} // extern "C"
|
||||
|
||||
#endif // !__WXGTK20__
|
||||
|
||||
|
Reference in New Issue
Block a user