Merge pull request #2151 from MaartenBent/clang-warnings

Fix clang warnings and replace tabs.
This commit is contained in:
Dimitri Schoolwerth
2020-12-24 10:19:37 +01:00
committed by GitHub
66 changed files with 288 additions and 230 deletions

View File

@@ -40,4 +40,8 @@ ELSE(WEBKIT2_FOUND)
SET( WEBKIT2_LIBRARIES ) SET( WEBKIT2_LIBRARIES )
ENDIF(WEBKIT2_FOUND) ENDIF(WEBKIT2_FOUND)
MARK_AS_ADVANCED(WEBKIT2_LIBRARY WEBKIT2_LIBRARIES WEBKIT2_INCLUDE_DIR) MARK_AS_ADVANCED(WEBKIT2_LIBRARY
WEBKIT2_LIBRARIES
WEBKIT2_INCLUDE_DIR
WEBKIT2_JS_LIBRARY
)

View File

@@ -56,7 +56,7 @@
#endif #endif
#ifndef TMT_FONT #ifndef TMT_FONT
#define TMT_FONT 210 #define TMT_FONT 210
#endif #endif
#ifndef HAVE_VSSYM32 #ifndef HAVE_VSSYM32

View File

@@ -25,7 +25,7 @@ BEGIN
MENUITEM "&Cascade", 4002 MENUITEM "&Cascade", 4002
MENUITEM "Tile &Horizontally", 4001 MENUITEM "Tile &Horizontally", 4001
MENUITEM "Tile &Vertically", 4005 MENUITEM "Tile &Vertically", 4005
MENUITEM "", -1 MENUITEM "", -1
MENUITEM "&Arrange Icons", 4003 MENUITEM "&Arrange Icons", 4003
MENUITEM "&Next", 4004 MENUITEM "&Next", 4004
END END

View File

@@ -26,12 +26,12 @@ typedef struct {
GR_FONT_ID fid; GR_FONT_ID fid;
} XFontStruct; } XFontStruct;
typedef struct { typedef struct {
short lbearing; /* origin to left edge of raster */ short lbearing; /* origin to left edge of raster */
short rbearing; /* origin to right edge of raster */ short rbearing; /* origin to right edge of raster */
short width; /* advance to next char's origin */ short width; /* advance to next char's origin */
short ascent; /* baseline to top edge of raster */ short ascent; /* baseline to top edge of raster */
short descent; /* baseline to bottom edge of raster */ short descent; /* baseline to bottom edge of raster */
unsigned short attributes; /* per char flags (not predefined) */ unsigned short attributes; /* per char flags (not predefined) */
} XCharStruct; } XCharStruct;
/* Configure window value mask bits */ /* Configure window value mask bits */
@@ -133,8 +133,8 @@ typedef struct {
#define XSetSubwindowMode(d, gc, mode) wxNoop() #define XSetSubwindowMode(d, gc, mode) wxNoop()
#define XFreeColormap(d, cmap) wxNoop() #define XFreeColormap(d, cmap) wxNoop()
#define XSetTransientForHint(d, w, p) wxNoop() #define XSetTransientForHint(d, w, p) wxNoop()
#define XUnionRegion(sr1,sr2,r) GrUnionRegion(r,sr1,sr2) #define XUnionRegion(sr1,sr2,r) GrUnionRegion(r,sr1,sr2)
#define XIntersectRegion(sr1,sr2,r) GrIntersectRegion(r,sr1,sr2) #define XIntersectRegion(sr1,sr2,r) GrIntersectRegion(r,sr1,sr2)
#define XEqualRegion(r1, r2) GrEqualRegion(r1, r2) #define XEqualRegion(r1, r2) GrEqualRegion(r1, r2)
#define XEmptyRegion(r) GrEmptyRegion(r) #define XEmptyRegion(r) GrEmptyRegion(r)
#define XOffsetRegion(r, x, y) GrOffsetRegion(r, x, y) #define XOffsetRegion(r, x, y) GrOffsetRegion(r, x, y)
@@ -144,7 +144,7 @@ typedef struct {
/* TODO: Cannot find equivalent for this. */ /* TODO: Cannot find equivalent for this. */
#define XIconifyWindow(d, w, s) 0 #define XIconifyWindow(d, w, s) 0
#define XCreateWindowWithColor(d,p,x,y,w,h,bw,depth,cl,vis,backColor,foreColor) \ #define XCreateWindowWithColor(d,p,x,y,w,h,bw,depth,cl,vis,backColor,foreColor) \
GrNewWindow(p,x,y,w,h,bw,backColor,foreColor) GrNewWindow(p,x,y,w,h,bw,backColor,foreColor)
#define XLookupString(event, buf, len, sym, status) (*sym = (event)->scancode) #define XLookupString(event, buf, len, sym, status) (*sym = (event)->scancode)
#define XBell(a, b) GrBell() #define XBell(a, b) GrBell()
#define DisplayWidthMM(d, s) 100 #define DisplayWidthMM(d, s) 100
@@ -163,45 +163,45 @@ typedef struct {
* Data structure used by color operations * Data structure used by color operations
*/ */
typedef struct { typedef struct {
unsigned long pixel; unsigned long pixel;
unsigned short red, green, blue; unsigned short red, green, blue;
char flags; /* do_red, do_green, do_blue */ char flags; /* do_red, do_green, do_blue */
char pad; char pad;
} XColor; } XColor;
typedef struct { typedef struct {
int type; int type;
Display *display; /* Display the event was read from */ Display *display; /* Display the event was read from */
XID resourceid; /* resource id */ XID resourceid; /* resource id */
unsigned long serial; /* serial number of failed request */ unsigned long serial; /* serial number of failed request */
unsigned char error_code; /* error code of failed request */ unsigned char error_code; /* error code of failed request */
unsigned char request_code; /* Major op-code of failed request */ unsigned char request_code; /* Major op-code of failed request */
unsigned char minor_code; /* Minor op-code of failed request */ unsigned char minor_code; /* Minor op-code of failed request */
} XErrorEvent; } XErrorEvent;
/* /*
* Visual structure; contains information about colormapping possible. * Visual structure; contains information about colormapping possible.
*/ */
typedef struct { typedef struct {
void *ext_data; /* hook for extension to hang data */ void *ext_data; /* hook for extension to hang data */
VisualID visualid; /* visual id of this visual */ VisualID visualid; /* visual id of this visual */
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)
int c_class; /* C++ class of screen (monochrome, etc.) */ int c_class; /* C++ class of screen (monochrome, etc.) */
#else #else
int class; /* class of screen (monochrome, etc.) */ int class; /* class of screen (monochrome, etc.) */
#endif #endif
unsigned long red_mask, green_mask, blue_mask; /* mask values */ unsigned long red_mask, green_mask, blue_mask; /* mask values */
int bits_per_rgb; /* log base 2 of distinct color values */ int bits_per_rgb; /* log base 2 of distinct color values */
int map_entries; /* color map entries */ int map_entries; /* color map entries */
} Visual; } Visual;
/* /*
* Depth structure; contains information for each possible depth. * Depth structure; contains information for each possible depth.
*/ */
typedef struct { typedef struct {
int depth; /* this depth (Z) of the depth */ int depth; /* this depth (Z) of the depth */
int nvisuals; /* number of Visual types at this depth */ int nvisuals; /* number of Visual types at this depth */
Visual *visuals; /* list of visuals possible at this depth */ Visual *visuals; /* list of visuals possible at this depth */
} Depth; } Depth;
/* /*
@@ -210,56 +210,56 @@ typedef struct {
* by application code. * by application code.
*/ */
struct _XDisplay; /* Forward declare before use for C++ */ struct _XDisplay; /* Forward declare before use for C++ */
typedef struct { typedef struct {
void *ext_data; /* hook for extension to hang data */ void *ext_data; /* hook for extension to hang data */
struct _XDisplay *display;/* back pointer to display structure */ struct _XDisplay *display; /* back pointer to display structure */
Window root; /* Root window id. */ Window root; /* Root window id. */
int width, height; /* width and height of screen */ int width, height; /* width and height of screen */
int mwidth, mheight; /* width and height of in millimeters */ int mwidth, mheight; /* width and height of in millimeters */
int ndepths; /* number of depths possible */ int ndepths; /* number of depths possible */
Depth *depths; /* list of allowable depths on the screen */ Depth *depths; /* list of allowable depths on the screen */
int root_depth; /* bits per pixel */ int root_depth; /* bits per pixel */
Visual *root_visual; /* root visual */ Visual *root_visual; /* root visual */
GC default_gc; /* GC for the root root visual */ GC default_gc; /* GC for the root root visual */
Colormap cmap; /* default color map */ Colormap cmap; /* default color map */
unsigned long white_pixel; unsigned long white_pixel;
unsigned long black_pixel; /* White and Black pixel values */ unsigned long black_pixel; /* White and Black pixel values */
int max_maps, min_maps; /* max and min color maps */ int max_maps, min_maps; /* max and min color maps */
int backing_store; /* Never, WhenMapped, Always */ int backing_store; /* Never, WhenMapped, Always */
Bool save_unders; Bool save_unders;
long root_input_mask; /* initial root input mask */ long root_input_mask; /* initial root input mask */
} Screen; } Screen;
typedef struct { typedef struct {
int x, y; /* location of window */ int x, y; /* location of window */
int width, height; /* width and height of window */ int width, height; /* width and height of window */
int border_width; /* border width of window */ int border_width; /* border width of window */
int depth; /* depth of window */ int depth; /* depth of window */
Visual *visual; /* the associated visual structure */ Visual *visual; /* the associated visual structure */
Window root; /* root of screen containing window */ Window root; /* root of screen containing window */
int _class; /* InputOutput, InputOnly*/ int _class; /* InputOutput, InputOnly*/
int bit_gravity; /* one of the bit gravity values */ int bit_gravity; /* one of the bit gravity values */
int win_gravity; /* one of the window gravity values */ int win_gravity; /* one of the window gravity values */
int backing_store; /* NotUseful, WhenMapped, Always */ int backing_store; /* NotUseful, WhenMapped, Always */
unsigned long backing_planes;/* planes to be preserved if possible */ unsigned long backing_planes;/* planes to be preserved if possible */
unsigned long backing_pixel;/* value to be used when restoring planes */ unsigned long backing_pixel;/* value to be used when restoring planes */
Bool save_under; /* boolean, should bits under be saved? */ Bool save_under; /* boolean, should bits under be saved? */
Colormap colormap; /* color map to be associated with window */ Colormap colormap; /* color map to be associated with window */
Bool map_installed; /* boolean, is color map currently installed*/ Bool map_installed; /* boolean, is color map currently installed*/
int map_state; /* IsUnmapped, IsUnviewable, IsViewable */ int map_state; /* IsUnmapped, IsUnviewable, IsViewable */
long all_event_masks; /* set of events all people have interest in*/ long all_event_masks; /* set of events all people have interest in*/
long your_event_mask; /* my event mask */ long your_event_mask; /* my event mask */
long do_not_propagate_mask;/* set of events that should not propagate */ long do_not_propagate_mask;/* set of events that should not propagate */
Bool override_redirect; /* boolean value for override-redirect */ Bool override_redirect; /* boolean value for override-redirect */
Screen *screen; /* back pointer to correct screen */ Screen *screen; /* back pointer to correct screen */
} XWindowAttributes; } XWindowAttributes;
typedef int (*XErrorHandler) ( /* WARNING, this type not in Xlib spec */ typedef int (*XErrorHandler) (/* WARNING, this type not in Xlib spec */
Display* /* display */, Display* /* display */,
XErrorEvent* /* error_event */ XErrorEvent* /* error_event */
); );
/* events*/ /* events*/

View File

@@ -1281,7 +1281,7 @@ void MyFrame::OnDropPossible( wxDataViewEvent &event )
if (event.GetDataFormat() != wxDF_UNICODETEXT) if (event.GetDataFormat() != wxDF_UNICODETEXT)
event.Veto(); event.Veto();
else else
event.SetDropEffect(wxDragMove); // check 'move' drop effect event.SetDropEffect(wxDragMove); // check 'move' drop effect
} }
void MyFrame::OnDrop( wxDataViewEvent &event ) void MyFrame::OnDrop( wxDataViewEvent &event )

View File

@@ -1,9 +1,9 @@
#include "../sample.rc" #include "../sample.rc"
app_icon ICON "registry.ico" app_icon ICON "registry.ico"
icon_key1 ICON "key1.ico" icon_key1 ICON "key1.ico"
icon_key2 ICON "key2.ico" icon_key2 ICON "key2.ico"
icon_key3 ICON "key3.ico" icon_key3 ICON "key3.ico"
icon_value1 ICON "value1.ico" icon_value1 ICON "value1.ico"
icon_value2 ICON "value2.ico" icon_value2 ICON "value2.ico"

View File

@@ -1,3 +1,3 @@
FromResource WAVE "cuckoo.wav" FromResource WAVE "cuckoo.wav"
#include "../sample.rc" #include "../sample.rc"

View File

@@ -52,8 +52,8 @@ const int ANNOTATION_STYLE = wxSTC_STYLE_LASTPREDEFINED + 1;
// A small image of a hashtag symbol used in the autocompletion window. // A small image of a hashtag symbol used in the autocompletion window.
const char* hashtag_xpm[] = { const char* hashtag_xpm[] = {
"10 10 2 1", "10 10 2 1",
" c None", " c None",
". c #BD08F9", ". c #BD08F9",
" .. .. ", " .. .. ",
" .. .. ", " .. .. ",
"..........", "..........",

View File

@@ -218,7 +218,7 @@ void wxAuiGtkTabArt::DrawTab(wxDC& dc, wxWindow* wnd, const wxAuiNotebookPage& p
if (!page.active) if (!page.active)
tab_rect.y += 2 * GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder; tab_rect.y += 2 * GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder;
gap_rect_y = tab_rect.y + tab_rect.height - GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder / 2; gap_rect_y = tab_rect.y + tab_rect.height - GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder / 2;
// fall through wxFALLTHROUGH;
case wxAUI_NB_BOTTOM: case wxAUI_NB_BOTTOM:
gap_start = tab_rect.x - GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_vborder / 2; gap_start = tab_rect.x - GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_vborder / 2;
gap_width = tab_rect.width; gap_width = tab_rect.width;

View File

@@ -1799,7 +1799,6 @@ wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat))
format.Replace("%y","%Y"); format.Replace("%y","%Y");
return format; return format;
} }
break;
default: default:
wxFAIL_MSG( "Unknown locale info" ); wxFAIL_MSG( "Unknown locale info" );

View File

@@ -148,8 +148,8 @@ wxChar wxTextInputStream::GetChar()
// remember the second one for the next call, as there is no // remember the second one for the next call, as there is no
// way to fit both of them into a single wxChar in this case. // way to fit both of them into a single wxChar in this case.
m_lastWChar = wbuf[1]; m_lastWChar = wbuf[1];
#endif // SIZEOF_WCHAR_T == 2
wxFALLTHROUGH; wxFALLTHROUGH;
#endif // SIZEOF_WCHAR_T == 2
case 1: case 1:
m_validBegin = inlen + 1; m_validBegin = inlen + 1;

View File

@@ -716,7 +716,7 @@ size_t wxStrlen(const wxChar16 *s )
{ {
if (!s) return 0; if (!s) return 0;
size_t i=0; size_t i=0;
while (*s!=0) { ++i; ++s; }; while (*s!=0) { ++i; ++s; }
return i; return i;
} }

View File

@@ -288,7 +288,7 @@ private:
case wxTE_HT_BELOW: case wxTE_HT_BELOW:
// This shouldn't happen for single line control. // This shouldn't happen for single line control.
wxFAIL_MSG( "Unreachable" ); wxFAIL_MSG( "Unreachable" );
// fall through wxFALLTHROUGH;
case wxTE_HT_BEYOND: case wxTE_HT_BEYOND:
// Select the last field. // Select the last field.

View File

@@ -393,7 +393,7 @@ void wxAnyButton::DoSetBitmapPosition(wxDirection dir)
{ {
default: default:
wxFAIL_MSG( "invalid position" ); wxFAIL_MSG( "invalid position" );
// fall through wxFALLTHROUGH;
case wxLEFT: case wxLEFT:
gtkpos = GTK_POS_LEFT; gtkpos = GTK_POS_LEFT;

View File

@@ -301,7 +301,7 @@ static void wxgtk_main_do_event(GdkEvent* event, void* data)
// examine the event itself to distinguish between the two cases but // examine the event itself to distinguish between the two cases but
// this would be unnecessarily complicated). // this would be unnecessarily complicated).
cat2 = wxEVT_CATEGORY_CLIPBOARD; cat2 = wxEVT_CATEGORY_CLIPBOARD;
// Fall through. wxFALLTHROUGH;
case GDK_PROXIMITY_IN: case GDK_PROXIMITY_IN:
case GDK_PROXIMITY_OUT: case GDK_PROXIMITY_OUT:

View File

@@ -901,7 +901,7 @@ void wxMenu::GtkAppend(wxMenuItem* mitem, int pos)
break; break;
default: default:
wxFAIL_MSG("unexpected menu item kind"); wxFAIL_MSG("unexpected menu item kind");
// fall through wxFALLTHROUGH;
case wxITEM_NORMAL: case wxITEM_NORMAL:
#ifdef __WXGTK4__ #ifdef __WXGTK4__
//TODO GtkImageMenuItem is gone, have to implement it ourselves with //TODO GtkImageMenuItem is gone, have to implement it ourselves with

View File

@@ -279,7 +279,7 @@ int wxMessageDialog::ShowModal()
{ {
default: default:
wxFAIL_MSG(wxT("unexpected GtkMessageDialog return code")); wxFAIL_MSG(wxT("unexpected GtkMessageDialog return code"));
// fall through wxFALLTHROUGH;
case GTK_RESPONSE_CANCEL: case GTK_RESPONSE_CANCEL:
case GTK_RESPONSE_DELETE_EVENT: case GTK_RESPONSE_DELETE_EVENT:

View File

@@ -189,7 +189,7 @@ GtkPolicyType GtkPolicyFromWX(wxScrollbarVisibility visibility)
default: default:
wxFAIL_MSG( wxS("unknown scrollbar visibility") ); wxFAIL_MSG( wxS("unknown scrollbar visibility") );
// fall through wxFALLTHROUGH;
case wxSHOW_SB_ALWAYS: case wxSHOW_SB_ALWAYS:
policy = GTK_POLICY_ALWAYS; policy = GTK_POLICY_ALWAYS;

View File

@@ -404,7 +404,7 @@ void wxGtkStyleContext::Bg(wxColour& color, int state) const
const int i = stride * (cairo_image_surface_get_height(surf) / 2); const int i = stride * (cairo_image_surface_get_height(surf) / 2);
const unsigned* p = reinterpret_cast<const unsigned*>(data + i); const unsigned* p = reinterpret_cast<const unsigned*>(data + i);
const unsigned pixel = *p; const unsigned pixel = *p;
guchar r, g, b, a = 0xff; guchar r = 0, g = 0, b = 0, a = 0xff;
switch (cairo_image_surface_get_format(surf)) switch (cairo_image_surface_get_format(surf))
{ {
case CAIRO_FORMAT_ARGB32: case CAIRO_FORMAT_ARGB32:

View File

@@ -572,7 +572,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
break; break;
default: default:
wxFAIL_MSG("unknown toolbar child type"); wxFAIL_MSG("unknown toolbar child type");
// fall through wxFALLTHROUGH;
case wxITEM_DROPDOWN: case wxITEM_DROPDOWN:
case wxITEM_NORMAL: case wxITEM_NORMAL:
tool->m_item = gtk_tool_button_new(NULL, ""); tool->m_item = gtk_tool_button_new(NULL, "");

View File

@@ -136,6 +136,7 @@ void wx_tree_entry_set_destroy_func(wxTreeEntry* entry,
/* private */ /* private */
static void wx_tree_entry_class_init(void* g_class, void* class_data) static void wx_tree_entry_class_init(void* g_class, void* class_data)
{ {
(void)class_data;
GObjectClass* gobject_class = G_OBJECT_CLASS(g_class); GObjectClass* gobject_class = G_OBJECT_CLASS(g_class);
gobject_class->dispose = wx_tree_entry_dispose; gobject_class->dispose = wx_tree_entry_dispose;
parent_class = G_OBJECT_CLASS(g_type_class_peek_parent(g_class)); parent_class = G_OBJECT_CLASS(g_type_class_peek_parent(g_class));

View File

@@ -5181,7 +5181,7 @@ void wxWindowGTK::GTKSendPaintEvents(const GdkRegion* region)
break; break;
} }
} }
// fall through wxFALLTHROUGH;
case wxBG_STYLE_SYSTEM: case wxBG_STYLE_SYSTEM:
if ( GetThemeEnabled() ) if ( GetThemeEnabled() )

View File

@@ -222,16 +222,16 @@ bool wxMask::Create( const wxBitmap& bitmap )
wxBitmap wxMask::GetBitmap() const wxBitmap wxMask::GetBitmap() const
{ {
wxBitmap bitmap; wxBitmap bitmap;
if (m_bitmap) if (m_bitmap)
{ {
bitmap.SetBitmap( m_bitmap ); bitmap.SetBitmap( m_bitmap );
bitmap.SetWidth( m_width ); bitmap.SetWidth( m_width );
bitmap.SetHeight( m_height ); bitmap.SetHeight( m_height );
} }
return bitmap; return bitmap;
} }

View File

@@ -464,14 +464,14 @@ bool wxChmInputStream::Eof() const
return (m_content==NULL || return (m_content==NULL ||
m_contentStream==NULL || m_contentStream==NULL ||
m_contentStream->Eof() || m_contentStream->Eof() ||
m_pos>m_size); (size_t)m_pos>m_size);
} }
size_t wxChmInputStream::OnSysRead(void *buffer, size_t bufsize) size_t wxChmInputStream::OnSysRead(void *buffer, size_t bufsize)
{ {
if ( m_pos >= m_size ) if ( (size_t)m_pos >= m_size )
{ {
m_lasterror = wxSTREAM_EOF; m_lasterror = wxSTREAM_EOF;
return 0; return 0;
@@ -854,7 +854,7 @@ wxFSFile* wxChmFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs),
/** /**
* Doku see wxFileSystemHandler * Doku see wxFileSystemHandler
*/ */
wxString wxChmFSHandler::FindFirst(const wxString& spec, int flags) wxString wxChmFSHandler::FindFirst(const wxString& spec, int WXUNUSED(flags))
{ {
wxString right = GetRightLocation(spec); wxString right = GetRightLocation(spec);
wxString left = GetLeftLocation(spec); wxString left = GetLeftLocation(spec);

View File

@@ -34,11 +34,11 @@
bool wxUxThemeIsActive() bool wxUxThemeIsActive()
{ {
return ::IsAppThemed() && ::IsThemeActive(); return ::IsAppThemed() && ::IsThemeActive();
} }
#else #else
bool wxUxThemeIsActive() bool wxUxThemeIsActive()
{ {
return false; return false;
} }
#endif // wxUSE_UXTHEME #endif // wxUSE_UXTHEME

View File

@@ -138,7 +138,7 @@ int wxColourDialog::ShowModal()
[theColorPanel setDelegate:theCPDelegate]; [theColorPanel setDelegate:theCPDelegate];
// //
// Start the color panel modal loop // Start the color panel modal loop
// //
OSXBeginModalDialog(); OSXBeginModalDialog();
NSModalSession session = [NSApp beginModalSessionForWindow:theColorPanel]; NSModalSession session = [NSApp beginModalSessionForWindow:theColorPanel];

View File

@@ -472,6 +472,7 @@ wxFont::wxFont(wxOSXSystemFont font)
break; break;
case wxOSX_SYSTEM_FONT_FIXED: case wxOSX_SYSTEM_FONT_FIXED:
uifont = kCTFontUIFontUserFixedPitch; uifont = kCTFontUIFontUserFixedPitch;
break;
default: default:
break; break;
} }

View File

@@ -197,7 +197,7 @@ WXImage wxOSXGetSystemImage(const wxString& name)
return nsimage; return nsimage;
} }
wxBitmap wxOSXCreateSystemBitmap(const wxString& name, const wxString &client, const wxSize& sizeHint) wxBitmap wxOSXCreateSystemBitmap(const wxString& name, const wxString &WXUNUSED(client), const wxSize& WXUNUSED(sizeHint))
{ {
NSImage* nsimage = wxOSXGetSystemImage(name); NSImage* nsimage = wxOSXGetSystemImage(name);
if ( nsimage ) if ( nsimage )

View File

@@ -116,16 +116,16 @@ public:
} }
size_t GetNumberOfItems() const wxOVERRIDE size_t GetNumberOfItems() const wxOVERRIDE
{ {
return m_popUpMenu->GetMenuItemCount(); return m_popUpMenu->GetMenuItemCount();
} }
void RemoveItem( size_t pos ) wxOVERRIDE void RemoveItem( size_t pos ) wxOVERRIDE
{ {
m_popUpMenu->Delete( m_popUpMenu->FindItemByPosition( pos ) ); m_popUpMenu->Delete( m_popUpMenu->FindItemByPosition( pos ) );
} }
void SetItem(int pos, const wxString& s) wxOVERRIDE void SetItem(int pos, const wxString& s) wxOVERRIDE
{ {
m_popUpMenu->FindItemByPosition( pos )->SetItemLabel( s ) ; m_popUpMenu->FindItemByPosition( pos )->SetItemLabel( s ) ;
} }
@@ -137,7 +137,7 @@ private:
wxWidgetImplType* wxWidgetImpl::CreateChoice( wxWindowMac* wxpeer, wxWidgetImplType* wxWidgetImpl::CreateChoice( wxWindowMac* wxpeer,
wxWindowMac* WXUNUSED(parent), wxWindowMac* WXUNUSED(parent),
wxWindowID WXUNUSED(id), wxWindowID WXUNUSED(id),
wxMenu* menu, wxMenu* WXUNUSED(menu),
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
long WXUNUSED(style), long WXUNUSED(style),

View File

@@ -1929,6 +1929,8 @@ outlineView:(NSOutlineView*)outlineView
-(BOOL) textShouldBeginEditing:(NSText*)textEditor -(BOOL) textShouldBeginEditing:(NSText*)textEditor
{ {
wxUnusedVar(textEditor);
currentlyEditedColumn = [self editedColumn]; currentlyEditedColumn = [self editedColumn];
currentlyEditedRow = [self editedRow]; currentlyEditedRow = [self editedRow];
@@ -2743,7 +2745,6 @@ wxDataObjectComposite* wxCocoaDataViewControl::GetDnDDataObjects(NSData* dataObj
return NULL; return NULL;
} }
} }
break;
default: default:
return NULL; return NULL;
} }
@@ -3426,7 +3427,7 @@ wxIMPLEMENT_CLASS(wxDataViewCheckIconText, wxDataViewIconText);
wxDataViewCheckIconTextRenderer::wxDataViewCheckIconTextRenderer wxDataViewCheckIconTextRenderer::wxDataViewCheckIconTextRenderer
( (
wxDataViewCellMode mode, wxDataViewCellMode mode,
int align int WXUNUSED(align)
) )
: wxDataViewRenderer(GetDefaultType(), mode,mode) : wxDataViewRenderer(GetDefaultType(), mode,mode)
{ {

View File

@@ -164,7 +164,7 @@ wxDateTimeWidgetImpl::CreateDateTimePicker(wxDateTimePickerCtrl* wxpeer,
const wxDateTime& dt, const wxDateTime& dt,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
long style, long WXUNUSED(style),
wxDateTimeWidgetKind kind) wxDateTimeWidgetKind kind)
{ {
NSRect r = wxOSXGetFrameForControl(wxpeer, pos, size); NSRect r = wxOSXGetFrameForControl(wxpeer, pos, size);

View File

@@ -89,7 +89,7 @@ public:
[m_item setData:(NSData*) data forType:(NSString*) format]; [m_item setData:(NSData*) data forType:(NSString*) format];
} }
NSPasteboardItem* GetNative() { return m_item; }; NSPasteboardItem* GetNative() { return m_item; }
private: private:
NSPasteboardItem* m_item; NSPasteboardItem* m_item;
}; };
@@ -157,7 +157,7 @@ public:
return (CFDataRef) [m_item dataForType:(NSString*) type]; return (CFDataRef) [m_item dataForType:(NSString*) type];
} }
NSPasteboardItem* GetNative() { return m_item; }; NSPasteboardItem* GetNative() { return m_item; }
private: private:
NSPasteboardItem* m_item; NSPasteboardItem* m_item;
NSPasteboard* m_pasteboard; NSPasteboard* m_pasteboard;
@@ -318,6 +318,9 @@ wxDragResult NSDragOperationToWxDragResult(NSDragOperation code)
- (NSDragOperation)draggingSession:(nonnull NSDraggingSession *)session sourceOperationMaskForDraggingContext:(NSDraggingContext)context - (NSDragOperation)draggingSession:(nonnull NSDraggingSession *)session sourceOperationMaskForDraggingContext:(NSDraggingContext)context
{ {
wxUnusedVar(session);
wxUnusedVar(context);
NSDragOperation allowedDragOperations = NSDragOperationEvery; NSDragOperation allowedDragOperations = NSDragOperationEvery;
// NSDragOperationGeneric also makes a drag to the trash possible // NSDragOperationGeneric also makes a drag to the trash possible
@@ -471,6 +474,7 @@ typedef NSString* NSPasteboardType;
- (nonnull NSArray<NSPasteboardType> *)writableTypesForPasteboard:(nonnull NSPasteboard *)pasteboard - (nonnull NSArray<NSPasteboardType> *)writableTypesForPasteboard:(nonnull NSPasteboard *)pasteboard
{ {
wxUnusedVar(pasteboard);
wxCFMutableArrayRef<CFStringRef> typesarray; wxCFMutableArrayRef<CFStringRef> typesarray;
if ( m_data ) if ( m_data )
m_data->AddSupportedTypes(typesarray, wxDataObjectBase::Direction::Get); m_data->AddSupportedTypes(typesarray, wxDataObjectBase::Direction::Get);

View File

@@ -69,7 +69,7 @@ static NSUInteger CalculateNSEventMaskFromEventCategory(wxEventCategory cat)
if ( cat | wxEVT_CATEGORY_USER_INPUT ) if ( cat | wxEVT_CATEGORY_USER_INPUT )
{ {
mask |= mask |=
NSLeftMouseDownMask | NSLeftMouseDownMask |
NSLeftMouseUpMask | NSLeftMouseUpMask |
NSRightMouseDownMask | NSRightMouseDownMask |
NSRightMouseUpMask | NSRightMouseUpMask |

View File

@@ -419,7 +419,7 @@ int wxFileDialog::ShowModal()
m_firstFileTypeFilter = -1; m_firstFileTypeFilter = -1;
if ( m_useFileTypeFilter if ( m_useFileTypeFilter
&& m_filterIndex >= 0 && m_filterIndex < m_filterExtensions.GetCount() ) && m_filterIndex >= 0 && (size_t)m_filterIndex < m_filterExtensions.GetCount() )
{ {
m_firstFileTypeFilter = m_filterIndex; m_firstFileTypeFilter = m_filterIndex;
} }

View File

@@ -87,7 +87,7 @@ WXGLPixelFormat WXGLChoosePixelFormat(const int *GLAttrs,
if ( GLAttrs && n1 > 1 ) if ( GLAttrs && n1 > 1 )
{ {
n1--; // skip the ending '0' n1--; // skip the ending '0'
while ( p < n1 ) while ( p < (unsigned)n1 )
{ {
data[p] = (NSOpenGLPixelFormatAttribute) GLAttrs[p]; data[p] = (NSOpenGLPixelFormatAttribute) GLAttrs[p];
p++; p++;
@@ -98,7 +98,7 @@ WXGLPixelFormat WXGLChoosePixelFormat(const int *GLAttrs,
{ {
n2--; // skip the ending '0' n2--; // skip the ending '0'
unsigned p2 = 0; unsigned p2 = 0;
while ( p2 < n2 ) while ( p2 < (unsigned)n2 )
data[p++] = (NSOpenGLPixelFormatAttribute) ctxAttrs[p2++]; data[p++] = (NSOpenGLPixelFormatAttribute) ctxAttrs[p2++];
} }

View File

@@ -209,6 +209,7 @@ private:
- (void)playerItemDidReachEnd:(NSNotification *)notification - (void)playerItemDidReachEnd:(NSNotification *)notification
{ {
wxUnusedVar(notification);
if ( m_backend ) if ( m_backend )
{ {
if ( m_backend->SendStopEvent() ) if ( m_backend->SendStopEvent() )
@@ -538,7 +539,7 @@ wxSize wxAVMediaBackend::GetVideoSize() const
return m_bestSize; return m_bestSize;
} }
void wxAVMediaBackend::Move(int x, int y, int w, int h) void wxAVMediaBackend::Move(int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(w), int WXUNUSED(h))
{ {
// as we have a native player, no need to move the video area // as we have a native player, no need to move the video area
} }

View File

@@ -316,7 +316,7 @@ void* wxMessageDialog::ConstructNSAlert()
m_buttonId[ m_buttonCount++ ] = wxID_HELP; m_buttonId[ m_buttonCount++ ] = wxID_HELP;
} }
wxASSERT_MSG( m_buttonCount <= WXSIZEOF(m_buttonId), "Too many buttons" ); wxASSERT_MSG( m_buttonCount <= (int)WXSIZEOF(m_buttonId), "Too many buttons" );
return alert; return alert;
} }

View File

@@ -663,6 +663,9 @@ extern int wxOSXGetIdFromSelector(SEL action );
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{ {
wxUnusedVar(keyPath);
wxUnusedVar(change);
if (context == EffectiveAppearanceContext) if (context == EffectiveAppearanceContext)
{ {
wxNonOwnedWindowCocoaImpl* windowimpl = [(NSWindow*)object WX_implementation]; wxNonOwnedWindowCocoaImpl* windowimpl = [(NSWindow*)object WX_implementation];
@@ -719,7 +722,7 @@ void wxNonOwnedWindowCocoaImpl::WillBeDestroyed()
} }
} }
void wxNonOwnedWindowCocoaImpl::Create( wxWindow* parent, const wxPoint& pos, const wxSize& size, void wxNonOwnedWindowCocoaImpl::Create( wxWindow* WXUNUSED(parent), const wxPoint& pos, const wxSize& size,
long style, long extraStyle, const wxString& WXUNUSED(name) ) long style, long extraStyle, const wxString& WXUNUSED(name) )
{ {
static wxNonOwnedWindowController* controller = NULL; static wxNonOwnedWindowController* controller = NULL;

View File

@@ -219,6 +219,7 @@ int wxUserNotificationMsgImpl::ms_notifIdBase = 1000;
- (void)userNotificationCenter:(NSUserNotificationCenter *)center didActivateNotification:(NSUserNotification *)notification - (void)userNotificationCenter:(NSUserNotificationCenter *)center didActivateNotification:(NSUserNotification *)notification
{ {
wxUnusedVar(center);
NSString* notifId = [notification.userInfo objectForKey:@"wxId"]; NSString* notifId = [notification.userInfo objectForKey:@"wxId"];
if (notifId) if (notifId)
wxUserNotificationMsgImpl::NotificationActivated(wxCFStringRef::AsString(notifId), notification.activationType); wxUserNotificationMsgImpl::NotificationActivated(wxCFStringRef::AsString(notifId), notification.activationType);

View File

@@ -81,6 +81,7 @@
- (void)drawRect:(NSRect)dirtyRect - (void)drawRect:(NSRect)dirtyRect
{ {
wxUnusedVar(dirtyRect);
[self.bitmapImageRep drawInRect:[self bounds]]; [self.bitmapImageRep drawInRect:[self bounds]];
} }

View File

@@ -236,7 +236,7 @@ private:
OnSelectPageForTool(tool); OnSelectPageForTool(tool);
} }
void OnClose(wxCloseEvent& e) void OnClose(wxCloseEvent& WXUNUSED(e))
{ {
// Instead of destroying the window, just hide it, it could be // Instead of destroying the window, just hide it, it could be
// reused again by another invocation of the editor. // reused again by another invocation of the editor.

View File

@@ -206,16 +206,14 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
case wxSYS_DEFAULT_GUI_FONT : case wxSYS_DEFAULT_GUI_FONT :
{ {
return wxFont(wxOSX_SYSTEM_FONT_SMALL) ; return wxFont(wxOSX_SYSTEM_FONT_SMALL) ;
} ; }
break ;
case wxSYS_OEM_FIXED_FONT : case wxSYS_OEM_FIXED_FONT :
case wxSYS_ANSI_FIXED_FONT : case wxSYS_ANSI_FIXED_FONT :
case wxSYS_SYSTEM_FIXED_FONT : case wxSYS_SYSTEM_FIXED_FONT :
default : default :
{ {
return wxFont(wxOSX_SYSTEM_FONT_FIXED) ; return wxFont(wxOSX_SYSTEM_FONT_FIXED) ;
} ; }
break ;
} }
return *wxNORMAL_FONT; return *wxNORMAL_FONT;

View File

@@ -71,6 +71,10 @@
- (NSArray *)control:(NSControl *)control textView:(NSTextView *)textView completions:(NSArray *)words - (NSArray *)control:(NSControl *)control textView:(NSTextView *)textView completions:(NSArray *)words
forPartialWordRange:(NSRange)charRange indexOfSelectedItem:(int*)index forPartialWordRange:(NSRange)charRange indexOfSelectedItem:(int*)index
{ {
wxUnusedVar(control);
wxUnusedVar(words);
wxUnusedVar(index);
NSMutableArray* matches = NULL; NSMutableArray* matches = NULL;
NSString* partialString; NSString* partialString;

View File

@@ -65,7 +65,7 @@ public :
{ {
} }
void SetLabel( const wxString& title, wxFontEncoding encoding ) wxOVERRIDE void SetLabel( const wxString& WXUNUSED(title), wxFontEncoding WXUNUSED(encoding) ) wxOVERRIDE
{ {
// although NSControl has this method, NSImageView throws an exception if it is called // although NSControl has this method, NSImageView throws an exception if it is called
} }
@@ -106,7 +106,7 @@ void wxStaticBitmap::SetScaleMode(ScaleMode scaleMode)
wxWidgetImplType* wxWidgetImpl::CreateStaticBitmap( wxWindowMac* wxpeer, wxWidgetImplType* wxWidgetImpl::CreateStaticBitmap( wxWindowMac* wxpeer,
wxWindowMac* WXUNUSED(parent), wxWindowMac* WXUNUSED(parent),
wxWindowID WXUNUSED(id), wxWindowID WXUNUSED(id),
const wxBitmap& bitmap, const wxBitmap& WXUNUSED(bitmap),
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
long WXUNUSED(style), long WXUNUSED(style),

View File

@@ -153,6 +153,7 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
- (BOOL)getObjectValue:(id *)obj forString:(NSString *)string errorDescription:(NSString **)error - (BOOL)getObjectValue:(id *)obj forString:(NSString *)string errorDescription:(NSString **)error
{ {
wxUnusedVar(error);
*obj = [NSString stringWithString:string]; *obj = [NSString stringWithString:string];
return YES; return YES;
} }
@@ -160,9 +161,14 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
- (BOOL)isPartialStringValid:(NSString **)partialStringPtr proposedSelectedRange:(NSRangePointer)proposedSelRangePtr - (BOOL)isPartialStringValid:(NSString **)partialStringPtr proposedSelectedRange:(NSRangePointer)proposedSelRangePtr
originalString:(NSString *)origString originalSelectedRange:(NSRange)origSelRange errorDescription:(NSString **)error originalString:(NSString *)origString originalSelectedRange:(NSRange)origSelRange errorDescription:(NSString **)error
{ {
wxUnusedVar(proposedSelRangePtr);
wxUnusedVar(origString);
wxUnusedVar(origSelRange);
wxUnusedVar(error);
if ( maxLength > 0 ) if ( maxLength > 0 )
{ {
if ( [*partialStringPtr length] > maxLength ) if ( [*partialStringPtr length] > (unsigned)maxLength )
{ {
field->SendMaxLenEvent(); field->SendMaxLenEvent();
return NO; return NO;
@@ -431,6 +437,7 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
- (void)changeColor:(id)sender - (void)changeColor:(id)sender
{ {
wxUnusedVar(sender);
// Define this just to block the color change messages - these are sent from // Define this just to block the color change messages - these are sent from
// the shared color/font panel resulting in unwanted changes of color when // the shared color/font panel resulting in unwanted changes of color when
// shared color panel is used (as when using wxColourPickerCtrl for example). // shared color panel is used (as when using wxColourPickerCtrl for example).
@@ -475,6 +482,7 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
-(BOOL)textView:(NSTextView *)aTextView clickedOnLink:(id)link atIndex:(NSUInteger)charIndex -(BOOL)textView:(NSTextView *)aTextView clickedOnLink:(id)link atIndex:(NSUInteger)charIndex
{ {
wxUnusedVar(link);
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( aTextView ); wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( aTextView );
if ( impl ) if ( impl )
{ {
@@ -592,6 +600,10 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil;
- (NSArray *)control:(NSControl *)control textView:(NSTextView *)textView completions:(NSArray *)words - (NSArray *)control:(NSControl *)control textView:(NSTextView *)textView completions:(NSArray *)words
forPartialWordRange:(NSRange)charRange indexOfSelectedItem:(NSInteger*)index forPartialWordRange:(NSRange)charRange indexOfSelectedItem:(NSInteger*)index
{ {
wxUnusedVar(control);
wxUnusedVar(words);
wxUnusedVar(index);
NSMutableArray* matches = [NSMutableArray array]; NSMutableArray* matches = [NSMutableArray array];
wxTextWidgetImpl* impl = (wxNSTextFieldControl * ) wxWidgetImpl::FindFromWXWidget( self ); wxTextWidgetImpl* impl = (wxNSTextFieldControl * ) wxWidgetImpl::FindFromWXWidget( self );
@@ -897,7 +909,7 @@ bool wxNSTextViewControl::PositionToXY(long pos, long *x, long *y) const
wxCHECK_MSG( pos >= 0, false, wxS("Invalid character position") ); wxCHECK_MSG( pos >= 0, false, wxS("Invalid character position") );
NSString* txt = [m_textView string]; NSString* txt = [m_textView string];
if ( pos > [txt length] ) if ( (unsigned)pos > [txt length] )
return false; return false;
// Last valid position is past the last character // Last valid position is past the last character
@@ -975,7 +987,7 @@ long wxNSTextViewControl::XYToPosition(long x, long y) const
// Return error if given x position // Return error if given x position
// is past the line. // is past the line.
if ( x >= lineRng.length ) if ( (unsigned)x >= lineRng.length )
return -1; return -1;
return lineRng.location + x; return lineRng.location + x;
@@ -1440,7 +1452,7 @@ bool wxNSTextFieldControl::PositionToXY(long pos, long *x, long *y) const
{ {
wxCHECK_MSG( pos >= 0, false, wxS("Invalid character position") ); wxCHECK_MSG( pos >= 0, false, wxS("Invalid character position") );
if ( pos > [[m_textField stringValue] length] ) if ( (unsigned)pos > [[m_textField stringValue] length] )
return false; return false;
if ( y ) if ( y )
@@ -1457,7 +1469,7 @@ long wxNSTextFieldControl::XYToPosition(long x, long y) const
wxCHECK_MSG( x >= 0 && y >= 0, -1, wxS("Invalid line/column number") ); wxCHECK_MSG( x >= 0 && y >= 0, -1, wxS("Invalid line/column number") );
// Last valid position is after the last character. // Last valid position is after the last character.
if ( y != 0 || x > [[m_textField stringValue] length] ) if ( y != 0 || (unsigned)x > [[m_textField stringValue] length] )
return -1; return -1;
return x; return x;

View File

@@ -416,6 +416,7 @@ private:
- (void)setSelectable:(bool) value - (void)setSelectable:(bool) value
{ {
wxUnusedVar(value);
m_isSelectable = true; m_isSelectable = true;
} }

View File

@@ -69,6 +69,7 @@ void wxBell()
- (void)applicationDidFinishLaunching:(NSNotification *)notification - (void)applicationDidFinishLaunching:(NSNotification *)notification
{ {
wxUnusedVar(notification);
[NSApp stop:nil]; [NSApp stop:nil];
wxTheApp->OSXOnDidFinishLaunching(); wxTheApp->OSXOnDidFinishLaunching();
} }
@@ -93,6 +94,9 @@ void wxBell()
- (NSApplicationPrintReply)application:(NSApplication *)sender printFiles:(NSArray *)fileNames withSettings:(NSDictionary *)printSettings showPrintPanels:(BOOL)showPrintPanels - (NSApplicationPrintReply)application:(NSApplication *)sender printFiles:(NSArray *)fileNames withSettings:(NSDictionary *)printSettings showPrintPanels:(BOOL)showPrintPanels
{ {
wxUnusedVar(sender); wxUnusedVar(sender);
wxUnusedVar(printSettings);
wxUnusedVar(showPrintPanels);
wxArrayString fileList; wxArrayString fileList;
size_t i; size_t i;
const size_t count = [fileNames count]; const size_t count = [fileNames count];
@@ -141,6 +145,8 @@ void wxBell()
- (void)handleQuitAppEvent:(NSAppleEventDescriptor *)event - (void)handleQuitAppEvent:(NSAppleEventDescriptor *)event
withReplyEvent:(NSAppleEventDescriptor *)replyEvent withReplyEvent:(NSAppleEventDescriptor *)replyEvent
{ {
wxUnusedVar(event);
wxUnusedVar(replyEvent);
if ( wxTheApp->OSXOnShouldTerminate() ) if ( wxTheApp->OSXOnShouldTerminate() )
{ {
wxTheApp->OSXOnWillTerminate(); wxTheApp->OSXOnWillTerminate();
@@ -151,6 +157,7 @@ void wxBell()
- (void)handleOpenAppEvent:(NSAppleEventDescriptor *)event - (void)handleOpenAppEvent:(NSAppleEventDescriptor *)event
withReplyEvent:(NSAppleEventDescriptor *)replyEvent withReplyEvent:(NSAppleEventDescriptor *)replyEvent
{ {
wxUnusedVar(event);
wxUnusedVar(replyEvent); wxUnusedVar(replyEvent);
} }
@@ -357,7 +364,7 @@ void wxBell()
/* This is needed because otherwise we don't receive any key-up events for command-key /* This is needed because otherwise we don't receive any key-up events for command-key
combinations (an AppKit bug, apparently) */ combinations (an AppKit bug, apparently) */
- (void)sendEvent:(NSEvent *)anEvent - (void)sendEvent:(NSEvent *)anEvent
{ {
if ([anEvent type] == NSKeyUp && ([anEvent modifierFlags] & NSCommandKeyMask)) if ([anEvent type] == NSKeyUp && ([anEvent modifierFlags] & NSCommandKeyMask))

View File

@@ -939,7 +939,7 @@ static void SetDrawingEnabledIfFrozenRecursive(wxWidgetCocoaImpl *impl, bool ena
return NO; return NO;
} }
- (NSView *)hitTest:(NSPoint)aPoint; - (NSView *)hitTest:(NSPoint)aPoint
{ {
wxWidgetCocoaImpl* viewimpl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); wxWidgetCocoaImpl* viewimpl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
if ( viewimpl && viewimpl->GetWXPeer() && !viewimpl->GetWXPeer()->IsEnabled() ) if ( viewimpl && viewimpl->GetWXPeer() && !viewimpl->GetWXPeer()->IsEnabled() )
@@ -980,6 +980,7 @@ void wxOSX_insertText(NSView* self, SEL _cmd, NSString* text);
- (void)insertText:(id)aString replacementRange:(NSRange)replacementRange - (void)insertText:(id)aString replacementRange:(NSRange)replacementRange
{ {
wxUnusedVar(replacementRange);
wxOSX_insertText(self, @selector(insertText:), aString); wxOSX_insertText(self, @selector(insertText:), aString);
} }
@@ -992,6 +993,9 @@ void wxOSX_insertText(NSView* self, SEL _cmd, NSString* text);
- (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange - (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange
{ {
wxUnusedVar(aString);
wxUnusedVar(selectedRange);
wxUnusedVar(replacementRange);
} }
- (void)unmarkText - (void)unmarkText
@@ -1015,6 +1019,8 @@ void wxOSX_insertText(NSView* self, SEL _cmd, NSString* text);
- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange - (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
{ {
wxUnusedVar(aRange);
wxUnusedVar(actualRange);
return nil; return nil;
} }
@@ -1025,10 +1031,13 @@ void wxOSX_insertText(NSView* self, SEL _cmd, NSString* text);
- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange - (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
{ {
wxUnusedVar(aRange);
wxUnusedVar(actualRange);
return NSMakeRect(0, 0, 0, 0); return NSMakeRect(0, 0, 0, 0);
} }
- (NSUInteger)characterIndexForPoint:(NSPoint)aPoint - (NSUInteger)characterIndexForPoint:(NSPoint)aPoint
{ {
wxUnusedVar(aPoint);
return NSNotFound; return NSNotFound;
} }
@@ -1128,7 +1137,7 @@ void wxOSX_insertText(NSView* self, SEL _cmd, NSString* text)
impl->insertText(text, self, _cmd); impl->insertText(text, self, _cmd);
} }
void wxOSX_panGestureEvent(NSView* self, SEL _cmd, NSPanGestureRecognizer* panGestureRecognizer) void wxOSX_panGestureEvent(NSView* self, SEL WXUNUSED(_cmd), NSPanGestureRecognizer* panGestureRecognizer)
{ {
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
if ( impl == NULL ) if ( impl == NULL )
@@ -1137,7 +1146,7 @@ void wxOSX_panGestureEvent(NSView* self, SEL _cmd, NSPanGestureRecognizer* panGe
impl->PanGestureEvent(panGestureRecognizer); impl->PanGestureEvent(panGestureRecognizer);
} }
void wxOSX_zoomGestureEvent(NSView* self, SEL _cmd, NSMagnificationGestureRecognizer* magnificationGestureRecognizer) void wxOSX_zoomGestureEvent(NSView* self, SEL WXUNUSED(_cmd), NSMagnificationGestureRecognizer* magnificationGestureRecognizer)
{ {
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
if ( impl == NULL ) if ( impl == NULL )
@@ -1146,7 +1155,7 @@ void wxOSX_zoomGestureEvent(NSView* self, SEL _cmd, NSMagnificationGestureRecogn
impl->ZoomGestureEvent(magnificationGestureRecognizer); impl->ZoomGestureEvent(magnificationGestureRecognizer);
} }
void wxOSX_rotateGestureEvent(NSView* self, SEL _cmd, NSRotationGestureRecognizer* rotationGestureRecognizer) void wxOSX_rotateGestureEvent(NSView* self, SEL WXUNUSED(_cmd), NSRotationGestureRecognizer* rotationGestureRecognizer)
{ {
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
if ( impl == NULL ) if ( impl == NULL )
@@ -1155,7 +1164,7 @@ void wxOSX_rotateGestureEvent(NSView* self, SEL _cmd, NSRotationGestureRecognize
impl->RotateGestureEvent(rotationGestureRecognizer); impl->RotateGestureEvent(rotationGestureRecognizer);
} }
void wxOSX_longPressEvent(NSView* self, SEL _cmd, NSPressGestureRecognizer* pressGestureRecognizer) void wxOSX_longPressEvent(NSView* self, SEL WXUNUSED(_cmd), NSPressGestureRecognizer* pressGestureRecognizer)
{ {
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
if ( impl ==NULL ) if ( impl ==NULL )
@@ -1164,7 +1173,7 @@ void wxOSX_longPressEvent(NSView* self, SEL _cmd, NSPressGestureRecognizer* pres
impl->LongPressEvent(pressGestureRecognizer); impl->LongPressEvent(pressGestureRecognizer);
} }
void wxOSX_touchesBegan(NSView* self, SEL _cmd, NSEvent *event) void wxOSX_touchesBegan(NSView* self, SEL WXUNUSED(_cmd), NSEvent *event)
{ {
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
if ( impl == NULL ) if ( impl == NULL )
@@ -1173,7 +1182,7 @@ void wxOSX_touchesBegan(NSView* self, SEL _cmd, NSEvent *event)
impl->TouchesBegan(event); impl->TouchesBegan(event);
} }
void wxOSX_touchesMoved(NSView* self, SEL _cmd, NSEvent *event) void wxOSX_touchesMoved(NSView* self, SEL WXUNUSED(_cmd), NSEvent *event)
{ {
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
if ( impl == NULL ) if ( impl == NULL )
@@ -1182,7 +1191,7 @@ void wxOSX_touchesMoved(NSView* self, SEL _cmd, NSEvent *event)
impl->TouchesMoved(event); impl->TouchesMoved(event);
} }
void wxOSX_touchesEnded(NSView* self, SEL _cmd, NSEvent *event) void wxOSX_touchesEnded(NSView* self, SEL WXUNUSED(_cmd), NSEvent *event)
{ {
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
if ( impl == NULL ) if ( impl == NULL )
@@ -2016,7 +2025,7 @@ void wxCocoaGesturesImpl::TouchesMoved(NSEvent* event)
// Iterate through all moving touches to check if the touch corresponding to "press" // Iterate through all moving touches to check if the touch corresponding to "press"
// in Press and Tap event is moving. // in Press and Tap event is moving.
for ( int i = 0; i < [array count]; ++i ) for ( unsigned i = 0; i < [array count]; ++i )
{ {
NSTouch* touch = [array objectAtIndex:i]; NSTouch* touch = [array objectAtIndex:i];
@@ -2099,7 +2108,7 @@ void wxCocoaGesturesImpl::TouchesEnded(NSEvent* event)
bool isPressTouch = false; bool isPressTouch = false;
// Iterate through all ended touches // Iterate through all ended touches
for( int i = 0; i < [array count]; ++i ) for( unsigned i = 0; i < [array count]; ++i )
{ {
NSTouch* touch = [array objectAtIndex:i]; NSTouch* touch = [array objectAtIndex:i];
@@ -2189,7 +2198,7 @@ void wxWidgetCocoaImpl::insertText(NSString* text, WXWidget slf, void *_cmd)
} }
} }
void wxWidgetCocoaImpl::doCommandBySelector(void* sel, WXWidget slf, void* _cmd) void wxWidgetCocoaImpl::doCommandBySelector(void* sel, WXWidget slf, void* WXUNUSED(_cmd))
{ {
wxLogTrace(TRACE_KEYS, "Selector %s for %s", wxLogTrace(TRACE_KEYS, "Selector %s for %s",
wxDumpSelector((SEL)sel), wxDumpNSView(slf)); wxDumpSelector((SEL)sel), wxDumpNSView(slf));

View File

@@ -249,10 +249,8 @@ int wxCFEventLoop::DoDispatchTimeout(unsigned long timeout)
break; break;
case kCFRunLoopRunStopped: case kCFRunLoopRunStopped:
return 0; return 0;
break;
case kCFRunLoopRunTimedOut: case kCFRunLoopRunTimedOut:
return -1; return -1;
break;
case kCFRunLoopRunHandledSource: case kCFRunLoopRunHandledSource:
default: default:
break; break;

View File

@@ -41,35 +41,33 @@
/* /*
static int CalculateUIEventMaskFromEventCategory(wxEventCategory cat) static int CalculateUIEventMaskFromEventCategory(wxEventCategory cat)
{ {
NSLeftMouseDownMask | NSLeftMouseDownMask |
NSLeftMouseUpMask | NSLeftMouseUpMask |
NSRightMouseDownMask | NSRightMouseDownMask |
NSRightMouseUpMask = 1 << NSRightMouseUp, NSRightMouseUpMask = 1 << NSRightMouseUp,
NSMouseMovedMask = 1 << NSMouseMoved, NSMouseMovedMask = 1 << NSMouseMoved,
NSLeftMouseDraggedMask = 1 << NSLeftMouseDragged, NSLeftMouseDraggedMask = 1 << NSLeftMouseDragged,
NSRightMouseDraggedMask = 1 << NSRightMouseDragged, NSRightMouseDraggedMask = 1 << NSRightMouseDragged,
NSMouseEnteredMask = 1 << NSMouseEntered, NSMouseEnteredMask = 1 << NSMouseEntered,
NSMouseExitedMask = 1 << NSMouseExited, NSMouseExitedMask = 1 << NSMouseExited,
NSScrollWheelMask = 1 << NSScrollWheel, NSScrollWheelMask = 1 << NSScrollWheel,
NSTabletPointMask = 1 << NSTabletPoint, NSTabletPointMask = 1 << NSTabletPoint,
NSTabletProximityMask = 1 << NSTabletProximity, NSTabletProximityMask = 1 << NSTabletProximity,
NSOtherMouseDownMask = 1 << NSOtherMouseDown, NSOtherMouseDownMask = 1 << NSOtherMouseDown,
NSOtherMouseUpMask = 1 << NSOtherMouseUp, NSOtherMouseUpMask = 1 << NSOtherMouseUp,
NSOtherMouseDraggedMask = 1 << NSOtherMouseDragged, NSOtherMouseDraggedMask = 1 << NSOtherMouseDragged,
NSKeyDownMask = 1 << NSKeyDown,
NSKeyUpMask = 1 << NSKeyUp,
NSFlagsChangedMask = 1 << NSFlagsChanged,
NSAppKitDefinedMask = 1 << NSAppKitDefined,
NSSystemDefinedMask = 1 << NSSystemDefined,
UIApplicationDefinedMask = 1 << UIApplicationDefined,
NSPeriodicMask = 1 << NSPeriodic,
NSCursorUpdateMask = 1 << NSCursorUpdate,
NSKeyDownMask = 1 << NSKeyDown, NSAnyEventMask = 0xffffffffU
NSKeyUpMask = 1 << NSKeyUp,
NSFlagsChangedMask = 1 << NSFlagsChanged,
NSAppKitDefinedMask = 1 << NSAppKitDefined,
NSSystemDefinedMask = 1 << NSSystemDefined,
UIApplicationDefinedMask = 1 << UIApplicationDefined,
NSPeriodicMask = 1 << NSPeriodic,
NSCursorUpdateMask = 1 << NSCursorUpdate,
NSAnyEventMask = 0xffffffffU
} }
*/ */

View File

@@ -41,7 +41,7 @@ public :
{ {
} }
void SetLabel( const wxString& title, wxFontEncoding encoding ) wxOVERRIDE void SetLabel( const wxString& title, wxFontEncoding encoding ) wxOVERRIDE
{ {
// although NSControl has this method, NSImageView throws an exception if it is called // although NSControl has this method, NSImageView throws an exception if it is called
} }

View File

@@ -60,11 +60,9 @@ CGEventType CGEventTypeForMouseDrag(int button)
{ {
case wxMOUSE_BTN_LEFT: case wxMOUSE_BTN_LEFT:
return kCGEventLeftMouseDragged; return kCGEventLeftMouseDragged;
break;
case wxMOUSE_BTN_RIGHT: case wxMOUSE_BTN_RIGHT:
return kCGEventRightMouseDragged; return kCGEventRightMouseDragged;
break;
// All the other buttons use the constant OtherMouseDown but we still // All the other buttons use the constant OtherMouseDown but we still
// want to check for invalid parameters so assert first // want to check for invalid parameters so assert first
@@ -74,7 +72,6 @@ CGEventType CGEventTypeForMouseDrag(int button)
case wxMOUSE_BTN_MIDDLE: case wxMOUSE_BTN_MIDDLE:
return kCGEventOtherMouseDragged; return kCGEventOtherMouseDragged;
break;
} }
} }

View File

@@ -450,7 +450,7 @@ bool wxWebViewWebKit::RunScript(const wxString& javascript, wxString* output)
return true; return true;
} }
void wxWebViewWebKit::OnSize(wxSizeEvent &event) void wxWebViewWebKit::OnSize(wxSizeEvent &WXUNUSED(event))
{ {
} }
@@ -743,6 +743,8 @@ void wxWebViewWebKit::RegisterHandler(wxSharedPtr<wxWebViewHandler> handler)
- (void)webView:(WebView *)sender - (void)webView:(WebView *)sender
didStartProvisionalLoadForFrame:(WebFrame *)frame didStartProvisionalLoadForFrame:(WebFrame *)frame
{ {
wxUnusedVar(sender);
wxUnusedVar(frame);
webKitWindow->m_busy = true; webKitWindow->m_busy = true;
} }
@@ -906,6 +908,8 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out)
- (void)webView:(WebView *)sender didReceiveTitle:(NSString *)title - (void)webView:(WebView *)sender didReceiveTitle:(NSString *)title
forFrame:(WebFrame *)frame forFrame:(WebFrame *)frame
{ {
wxUnusedVar(sender);
wxString target = wxCFStringRef::AsString([frame name]); wxString target = wxCFStringRef::AsString([frame name]);
wxWebViewEvent event(wxEVT_WEBVIEW_TITLE_CHANGED, wxWebViewEvent event(wxEVT_WEBVIEW_TITLE_CHANGED,
webKitWindow->GetId(), webKitWindow->GetId(),
@@ -936,6 +940,8 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out)
frame:(WebFrame *)frame frame:(WebFrame *)frame
decisionListener:(id<WebPolicyDecisionListener>)listener decisionListener:(id<WebPolicyDecisionListener>)listener
{ {
wxUnusedVar(sender);
wxUnusedVar(actionInformation);
wxUnusedVar(frame); wxUnusedVar(frame);
NSString *url = [[request URL] absoluteString]; NSString *url = [[request URL] absoluteString];
@@ -983,6 +989,9 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out)
newFrameName:(NSString *)frameName newFrameName:(NSString *)frameName
decisionListener:(id < WebPolicyDecisionListener >)listener decisionListener:(id < WebPolicyDecisionListener >)listener
{ {
wxUnusedVar(sender);
wxUnusedVar(frameName);
NSString *url = [[request URL] absoluteString]; NSString *url = [[request URL] absoluteString];
wxWebViewNavigationActionFlags flags = wxWEBVIEW_NAV_ACTION_USER; wxWebViewNavigationActionFlags flags = wxWEBVIEW_NAV_ACTION_USER;
@@ -1112,6 +1121,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out)
// This method is called when window.open() is used in javascript with a target != _self // This method is called when window.open() is used in javascript with a target != _self
// request is always nil, so it can't be used for event generation // request is always nil, so it can't be used for event generation
// Mark the next navigation as "new window" // Mark the next navigation as "new window"
wxUnusedVar(request);
webKitWindow->m_nextNavigationIsNewWindow = true; webKitWindow->m_nextNavigationIsNewWindow = true;
return sender; return sender;
} }
@@ -1127,6 +1137,9 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out)
- (NSArray *)webView:(WebView *)sender contextMenuItemsForElement:(NSDictionary *)element - (NSArray *)webView:(WebView *)sender contextMenuItemsForElement:(NSDictionary *)element
defaultMenuItems:(NSArray *) defaultMenuItems defaultMenuItems:(NSArray *) defaultMenuItems
{ {
wxUnusedVar(sender);
wxUnusedVar(element);
if(webKitWindow->IsContextMenuEnabled()) if(webKitWindow->IsContextMenuEnabled())
return defaultMenuItems; return defaultMenuItems;
else else

View File

@@ -72,7 +72,7 @@
#endif #endif
"</string> "</string>
<string name="cpp_function_declaration_comment">" /// %BODY% <string name="cpp_function_declaration_comment">" /// %BODY%
"</string> "</string>
<string name="cpp_function_implementation_comment">" <string name="cpp_function_implementation_comment">"
/*! /*!

View File

@@ -58,6 +58,7 @@
- (void)mouseEntered:(NSEvent *)evt - (void)mouseEntered:(NSEvent *)evt
{ {
wxUnusedVar(evt);
wxMouseEvent wxevent(wxEVT_ENTER_WINDOW); wxMouseEvent wxevent(wxEVT_ENTER_WINDOW);
wxevent.SetEventObject(m_wxWin); wxevent.SetEventObject(m_wxWin);
m_wxWin->ProcessWindowEvent(wxevent); m_wxWin->ProcessWindowEvent(wxevent);
@@ -65,6 +66,7 @@
- (void)mouseExited:(NSEvent *)evt - (void)mouseExited:(NSEvent *)evt
{ {
wxUnusedVar(evt);
wxMouseEvent wxevent(wxEVT_LEAVE_WINDOW); wxMouseEvent wxevent(wxEVT_LEAVE_WINDOW);
wxevent.SetEventObject(m_wxWin); wxevent.SetEventObject(m_wxWin);
m_wxWin->ProcessWindowEvent(wxevent); m_wxWin->ProcessWindowEvent(wxevent);

View File

@@ -1505,7 +1505,7 @@ void ScintillaWX::ImeStartComposition() {
const int styleHere = pdoc->StyleIndexAt(sel.MainCaret()); const int styleHere = pdoc->StyleIndexAt(sel.MainCaret());
LOGFONTW lf = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, L"" }; LOGFONTW lf = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, L"" };
int sizeZoomed = vs.styles[styleHere].size + vs.zoomLevel * SC_FONT_SIZE_MULTIPLIER; int sizeZoomed = vs.styles[styleHere].size + vs.zoomLevel * SC_FONT_SIZE_MULTIPLIER;
if (sizeZoomed <= 2 * SC_FONT_SIZE_MULTIPLIER) // Hangs if sizeZoomed <= 1 if (sizeZoomed <= 2 * SC_FONT_SIZE_MULTIPLIER) // Hangs if sizeZoomed <= 1
sizeZoomed = 2 * SC_FONT_SIZE_MULTIPLIER; sizeZoomed = 2 * SC_FONT_SIZE_MULTIPLIER;
// The negative is to allow for leading // The negative is to allow for leading
lf.lfHeight = -::MulDiv(sizeZoomed, stc->GetDPI().y, 72 * SC_FONT_SIZE_MULTIPLIER); lf.lfHeight = -::MulDiv(sizeZoomed, stc->GetDPI().y, 72 * SC_FONT_SIZE_MULTIPLIER);

View File

@@ -1004,8 +1004,8 @@ void wxGTKRenderer::DrawRadioButtonBitmap(wxDC& dc,
dc.SetPen(m_penDarkGrey); dc.SetPen(m_penDarkGrey);
dc.SetBrush(wxSCHEME_COLOUR(m_scheme, CONTROL_CURRENT)); dc.SetBrush(wxSCHEME_COLOUR(m_scheme, CONTROL_CURRENT));
// draw the normal border // draw the normal border
dc.DrawCircle(xRight/2,yBottom/2,yMid); dc.DrawCircle(xRight/2,yBottom/2,yMid);
wxColor checkedCol, uncheckedCol; wxColor checkedCol, uncheckedCol;
checkedCol = wxSCHEME_COLOUR(m_scheme, SHADOW_DARK); checkedCol = wxSCHEME_COLOUR(m_scheme, SHADOW_DARK);

View File

@@ -252,6 +252,9 @@ void* wxDynamicLibrary::GetModuleFromAddress(const void* addr, wxString* path)
*path = di.dli_fname; *path = di.dli_fname;
return di.dli_fbase; return di.dli_fbase;
#else
wxUnusedVar(addr);
wxUnusedVar(path);
#endif // HAVE_DLADDR #endif // HAVE_DLADDR
return NULL; return NULL;

View File

@@ -229,7 +229,7 @@ void wxNativeFontInfo::SetStyle(wxFontStyle style)
break; break;
default: default:
wxFAIL_MSG( "unknown font style" ); wxFAIL_MSG( "unknown font style" );
// fall through wxFALLTHROUGH;
case wxFONTSTYLE_NORMAL: case wxFONTSTYLE_NORMAL:
pango_font_description_set_style( description, PANGO_STYLE_NORMAL ); pango_font_description_set_style( description, PANGO_STYLE_NORMAL );
break; break;

View File

@@ -479,7 +479,7 @@ bool wxGLCanvasEGL::CreateSurface()
wl_registry_add_listener(registry, &wl_registry_listener, this); wl_registry_add_listener(registry, &wl_registry_listener, this);
wl_display_roundtrip(display); wl_display_roundtrip(display);
if ( !m_wlCompositor || !m_wlSubcompositor ) if ( !m_wlCompositor || !m_wlSubcompositor )
{ {
wxFAIL_MSG("Invalid Wayland compositor or subcompositor"); wxFAIL_MSG("Invalid Wayland compositor or subcompositor");
return false; return false;
} }

View File

@@ -69,18 +69,18 @@ public:
m_data(NULL), m_evtHandler(NULL) {} m_data(NULL), m_evtHandler(NULL) {}
virtual ~wxSoundBackendSDL(); virtual ~wxSoundBackendSDL();
wxString GetName() const { return wxT("Simple DirectMedia Layer"); } wxString GetName() const wxOVERRIDE { return wxT("Simple DirectMedia Layer"); }
int GetPriority() const { return 9; } int GetPriority() const wxOVERRIDE { return 9; }
bool IsAvailable() const; bool IsAvailable() const wxOVERRIDE;
bool HasNativeAsyncPlayback() const { return true; } bool HasNativeAsyncPlayback() const wxOVERRIDE { return true; }
bool Play(wxSoundData *data, unsigned flags, bool Play(wxSoundData *data, unsigned flags,
volatile wxSoundPlaybackStatus *status); volatile wxSoundPlaybackStatus *status) wxOVERRIDE;
void FillAudioBuffer(Uint8 *stream, int len); void FillAudioBuffer(Uint8 *stream, int len);
void FinishedPlayback(); void FinishedPlayback();
void Stop(); void Stop() wxOVERRIDE;
bool IsPlaying() const { return m_playing; } bool IsPlaying() const wxOVERRIDE { return m_playing; }
private: private:
bool OpenAudio(); bool OpenAudio();

View File

@@ -437,9 +437,9 @@ bool wxUIActionSimulatorX11Impl::MouseMove(long x, long y)
} }
return ret; return ret;
#endif #else
return DoX11MouseMove(x, y); return DoX11MouseMove(x, y);
#endif
} }
bool wxUIActionSimulatorX11Impl::MouseUp(int button) bool wxUIActionSimulatorX11Impl::MouseUp(int button)

View File

@@ -282,7 +282,7 @@ static void wxWinHintsSetLayer(Display *display, Window rootWnd,
#ifdef __WXGTK20__ #ifdef __WXGTK20__
static bool wxQueryWMspecSupport(Display* WXUNUSED(display), static bool wxQueryWMspecSupport(Display* WXUNUSED(display),
Window WXUNUSED(rootWnd), Window WXUNUSED(rootWnd),
Atom (feature)) Atom feature)
{ {
GdkAtom gatom = gdk_x11_xatom_to_atom(feature); GdkAtom gatom = gdk_x11_xatom_to_atom(feature);
return gdk_x11_screen_supports_net_wm_hint(gdk_screen_get_default(), gatom); return gdk_x11_screen_supports_net_wm_hint(gdk_screen_get_default(), gatom);

View File

@@ -84,8 +84,8 @@ int XCopyArea(Display* display, Drawable src, Drawable dest, GC gc,
int dest_x, int dest_y) int dest_x, int dest_y)
{ {
GrCopyArea(dest, gc, dest_x, dest_y, GrCopyArea(dest, gc, dest_x, dest_y,
width, height, src, width, height, src,
src_x, src_y, 0); src_x, src_y, 0);
return Success; return Success;
} }
@@ -94,55 +94,55 @@ int XCopyPlane(Display* display, Drawable src, Drawable dest, GC gc,
int dest_x, int dest_y, unsigned long plane) int dest_x, int dest_y, unsigned long plane)
{ {
GrCopyArea(dest, gc, dest_x, dest_y, GrCopyArea(dest, gc, dest_x, dest_y,
width, height, src, width, height, src,
src_x, src_y, 0); src_x, src_y, 0);
return Success; return Success;
} }
#if 0 #if 0
typedef struct { typedef struct {
GR_WINDOW_ID wid; /* window id (or 0 if no such window) */ GR_WINDOW_ID wid; /* window id (or 0 if no such window) */
GR_WINDOW_ID parent; /* parent window id */ GR_WINDOW_ID parent; /* parent window id */
GR_WINDOW_ID child; /* first child window id (or 0) */ GR_WINDOW_ID child; /* first child window id (or 0) */
GR_WINDOW_ID sibling; /* next sibling window id (or 0) */ GR_WINDOW_ID sibling; /* next sibling window id (or 0) */
GR_BOOL inputonly; /* TRUE if window is input only */ GR_BOOL inputonly; /* TRUE if window is input only */
GR_BOOL mapped; /* TRUE if window is mapped */ GR_BOOL mapped; /* TRUE if window is mapped */
GR_COUNT unmapcount; /* reasons why window is unmapped */ GR_COUNT unmapcount; /* reasons why window is unmapped */
GR_COORD x; /* absolute x position of window */ GR_COORD x; /* absolute x position of window */
GR_COORD y; /* absolute y position of window */ GR_COORD y; /* absolute y position of window */
GR_SIZE width; /* width of window */ GR_SIZE width; /* width of window */
GR_SIZE height; /* height of window */ GR_SIZE height; /* height of window */
GR_SIZE bordersize; /* size of border */ GR_SIZE bordersize; /* size of border */
GR_COLOR bordercolor; /* color of border */ GR_COLOR bordercolor; /* color of border */
GR_COLOR background; /* background color */ GR_COLOR background; /* background color */
GR_EVENT_MASK eventmask; /* current event mask for this client */ GR_EVENT_MASK eventmask; /* current event mask for this client */
GR_WM_PROPS props; /* window properties */ GR_WM_PROPS props; /* window properties */
GR_CURSOR_ID cursor; /* cursor id*/ GR_CURSOR_ID cursor; /* cursor id*/
unsigned long processid; /* process id of owner*/ unsigned long processid; /* process id of owner*/
} GR_WINDOW_INFO; } GR_WINDOW_INFO;
typedef struct { typedef struct {
int x, y; /* location of window */ int x, y; /* location of window */
int width, height; /* width and height of window */ int width, height; /* width and height of window */
int border_width; /* border width of window */ int border_width; /* border width of window */
int depth; /* depth of window */ int depth; /* depth of window */
Visual *visual; /* the associated visual structure */ Visual *visual; /* the associated visual structure */
Window root; /* root of screen containing window */ Window root; /* root of screen containing window */
int class; /* InputOutput, InputOnly*/ int class; /* InputOutput, InputOnly*/
int bit_gravity; /* one of the bit gravity values */ int bit_gravity; /* one of the bit gravity values */
int win_gravity; /* one of the window gravity values */ int win_gravity; /* one of the window gravity values */
int backing_store; /* NotUseful, WhenMapped, Always */ int backing_store; /* NotUseful, WhenMapped, Always */
unsigned long backing_planes;/* planes to be preserved if possible */ unsigned long backing_planes;/* planes to be preserved if possible */
unsigned long backing_pixel;/* value to be used when restoring planes */ unsigned long backing_pixel;/* value to be used when restoring planes */
Bool save_under; /* boolean, should bits under be saved? */ Bool save_under; /* boolean, should bits under be saved? */
Colormap colormap; /* color map to be associated with window */ Colormap colormap; /* color map to be associated with window */
Bool map_installed; /* boolean, is color map currently installed*/ Bool map_installed; /* boolean, is color map currently installed*/
int map_state; /* IsUnmapped, IsUnviewable, IsViewable */ int map_state; /* IsUnmapped, IsUnviewable, IsViewable */
long all_event_masks; /* set of events all people have interest in*/ long all_event_masks; /* set of events all people have interest in*/
long your_event_mask; /* my event mask */ long your_event_mask; /* my event mask */
long do_not_propagate_mask;/* set of events that should not propagate */ long do_not_propagate_mask;/* set of events that should not propagate */
Bool override_redirect; /* boolean value for override-redirect */ Bool override_redirect; /* boolean value for override-redirect */
Screen *screen; /* back pointer to correct screen */ Screen *screen; /* back pointer to correct screen */
} XWindowAttributes; } XWindowAttributes;
#endif #endif
@@ -222,7 +222,7 @@ XErrorHandler XSetErrorHandler (XErrorHandler handler)
} }
static Screen s_screen; static Screen s_screen;
Screen *XScreenOfDisplay(Display* display, Screen *XScreenOfDisplay(Display* display,
int screen_number) int screen_number)
{ {
/* TODO: fill in the members. See Xlib.h */ /* TODO: fill in the members. See Xlib.h */

View File

@@ -342,7 +342,7 @@ void TextCtrlTestCase::Redirector()
void TextCtrlTestCase::HitTestSingleLine() void TextCtrlTestCase::HitTestSingleLine()
{ {
#ifdef __WXQT__ #ifdef __WXQT__
WARN("Does not work under WxQt"); WARN("Does not work under WxQt");
#else #else
m_text->ChangeValue("Hit me"); m_text->ChangeValue("Hit me");
@@ -513,7 +513,7 @@ void TextCtrlTestCase::Style()
CHECK( style.GetTextColour() == *wxRED ); CHECK( style.GetTextColour() == *wxRED );
CHECK( style.GetBackgroundColour() == *wxWHITE ); CHECK( style.GetBackgroundColour() == *wxWHITE );
#else #else
WARN("Does not work under WxQt or OSX"); WARN("Does not work under WxQt or OSX");
#endif #endif
} }