From 3ed2e7ce8217e90bd9c074fea75c43d5629ce5bb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 15 Dec 1999 17:14:58 +0000 Subject: [PATCH] more WXUNUSED() here and there git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/framecmn.cpp | 4 ++-- src/gtk/window.cpp | 16 +++++++++++++--- src/gtk1/window.cpp | 16 +++++++++++++--- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index 39055b4afb..4432c7e0cb 100644 --- a/src/common/framecmn.cpp +++ b/src/common/framecmn.cpp @@ -215,7 +215,7 @@ bool wxFrameBase::ProcessCommand(int id) // default resizing behaviour - if only ONE subwindow, resize to fill the // whole client area -void wxFrameBase::OnSize(wxSizeEvent& event) +void wxFrameBase::OnSize(wxSizeEvent& WXUNUSED(event)) { // if we're using constraints - do use them #if wxUSE_CONSTRAINTS @@ -276,7 +276,7 @@ void wxFrameBase::OnSize(wxSizeEvent& event) } // The default implementation for the close window event. -void wxFrameBase::OnCloseWindow(wxCloseEvent& event) +void wxFrameBase::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) { Destroy(); } diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 3f6f633c0e..25f072ef1d 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -1654,9 +1654,18 @@ gtk_window_realized_callback( GtkWidget *WXUNUSED(m_widget), wxWindow *win ) // "size_allocate" //----------------------------------------------------------------------------- +#ifdef HAVE_XIM + #define WXUNUSED_UNLESS_XIM(param) param +#else + #define WXUNUSED_UNLESS_XIM(param) WXUNUSED(param) +#endif + /* Resize XIM window */ -static void gtk_wxwindow_size_callback( GtkWidget *widget, GtkAllocation* alloc, wxFrame *win ) +static +void gtk_wxwindow_size_callback( GtkWidget * WXUNUSED_UNLESS_XIM(widget), + GtkAllocation * WXUNUSED_UNLESS_XIM(alloc), + wxFrame * WXUNUSED_UNLESS_XIM(win) ) { if (g_isIdle) wxapp_install_idle_handler(); @@ -1669,7 +1678,7 @@ static void gtk_wxwindow_size_callback( GtkWidget *widget, GtkAllocation* alloc, { gint width, height; - gdk_window_get_size (widget->window, &width, &height); + gdk_window_get_size (widget->window, &width, &height); win->m_icattr->preedit_area.width = width; win->m_icattr->preedit_area.height = height; gdk_ic_set_attr (win->m_ic, win->m_icattr, GDK_IC_PREEDIT_AREA); @@ -1684,7 +1693,8 @@ static void gtk_wxwindow_size_callback( GtkWidget *widget, GtkAllocation* alloc, /* Initialize XIM support */ static gint -gtk_wxwindow_realized_callback( GtkWidget *widget, wxWindow *win ) +gtk_wxwindow_realized_callback( GtkWidget * WXUNUSED_UNLESS_XIM(widget), + wxWindow * WXUNUSED_UNLESS_XIM(win) ) { if (g_isIdle) wxapp_install_idle_handler(); diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 3f6f633c0e..25f072ef1d 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -1654,9 +1654,18 @@ gtk_window_realized_callback( GtkWidget *WXUNUSED(m_widget), wxWindow *win ) // "size_allocate" //----------------------------------------------------------------------------- +#ifdef HAVE_XIM + #define WXUNUSED_UNLESS_XIM(param) param +#else + #define WXUNUSED_UNLESS_XIM(param) WXUNUSED(param) +#endif + /* Resize XIM window */ -static void gtk_wxwindow_size_callback( GtkWidget *widget, GtkAllocation* alloc, wxFrame *win ) +static +void gtk_wxwindow_size_callback( GtkWidget * WXUNUSED_UNLESS_XIM(widget), + GtkAllocation * WXUNUSED_UNLESS_XIM(alloc), + wxFrame * WXUNUSED_UNLESS_XIM(win) ) { if (g_isIdle) wxapp_install_idle_handler(); @@ -1669,7 +1678,7 @@ static void gtk_wxwindow_size_callback( GtkWidget *widget, GtkAllocation* alloc, { gint width, height; - gdk_window_get_size (widget->window, &width, &height); + gdk_window_get_size (widget->window, &width, &height); win->m_icattr->preedit_area.width = width; win->m_icattr->preedit_area.height = height; gdk_ic_set_attr (win->m_ic, win->m_icattr, GDK_IC_PREEDIT_AREA); @@ -1684,7 +1693,8 @@ static void gtk_wxwindow_size_callback( GtkWidget *widget, GtkAllocation* alloc, /* Initialize XIM support */ static gint -gtk_wxwindow_realized_callback( GtkWidget *widget, wxWindow *win ) +gtk_wxwindow_realized_callback( GtkWidget * WXUNUSED_UNLESS_XIM(widget), + wxWindow * WXUNUSED_UNLESS_XIM(win) ) { if (g_isIdle) wxapp_install_idle_handler();