fix a couple of harmless warnings during wxOSX build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -874,6 +874,7 @@ bool wxAuiManager_HasLiveResize(wxAuiManager& manager)
|
||||
// With Core Graphics on Mac, it's not possible to show sash feedback,
|
||||
// so we'll always use live update instead.
|
||||
#if defined(__WXMAC__)
|
||||
wxUnusedVar(manager);
|
||||
return true;
|
||||
#else
|
||||
return (manager.GetFlags() & wxAUI_MGR_LIVE_RESIZE) == wxAUI_MGR_LIVE_RESIZE;
|
||||
|
@@ -298,9 +298,9 @@ bool wxListbook::SetPageImage(size_t n, int imageId)
|
||||
|
||||
void wxListbook::SetImageList(wxImageList *imageList)
|
||||
{
|
||||
#ifdef CAN_USE_REPORT_VIEW
|
||||
wxListView * const list = GetListView();
|
||||
|
||||
#ifdef CAN_USE_REPORT_VIEW
|
||||
// If imageList presence has changed, we update the list control view
|
||||
if ( (imageList != NULL) != (GetImageList() != NULL) )
|
||||
{
|
||||
|
@@ -647,17 +647,10 @@ wxRendererGeneric::DrawPushButton(wxWindow *win,
|
||||
}
|
||||
|
||||
void
|
||||
#ifdef __WXMAC__
|
||||
wxRendererGeneric::DrawItemSelectionRect(wxWindow * win,
|
||||
wxDC& dc,
|
||||
const wxRect& rect,
|
||||
int flags)
|
||||
#else
|
||||
wxRendererGeneric::DrawItemSelectionRect(wxWindow * WXUNUSED(win),
|
||||
wxDC& dc,
|
||||
const wxRect& rect,
|
||||
int flags)
|
||||
#endif
|
||||
{
|
||||
wxBrush brush;
|
||||
if ( flags & wxCONTROL_SELECTED )
|
||||
@@ -687,6 +680,9 @@ wxRendererGeneric::DrawItemSelectionRect(wxWindow * WXUNUSED(win),
|
||||
dc.SetPen( *wxTRANSPARENT_PEN );
|
||||
|
||||
dc.DrawRectangle( rect );
|
||||
|
||||
// it's unused everywhere except in wxOSX/Carbon
|
||||
wxUnusedVar(win);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -64,17 +64,13 @@ wxScreenDCImpl::~wxScreenDCImpl()
|
||||
|
||||
wxBitmap wxScreenDCImpl::DoGetAsBitmap(const wxRect *subrect) const
|
||||
{
|
||||
CGRect srcRect = CGRectMake(0, 0, m_width, m_height);
|
||||
if (subrect)
|
||||
{
|
||||
srcRect.origin.x = subrect->GetX();
|
||||
srcRect.origin.y = subrect->GetY();
|
||||
srcRect.size.width = subrect->GetWidth();
|
||||
srcRect.size.height = subrect->GetHeight();
|
||||
}
|
||||
wxBitmap bmp = wxBitmap(srcRect.size.width, srcRect.size.height, 32);
|
||||
#if wxOSX_USE_IPHONE
|
||||
#else
|
||||
wxRect rect = subrect ? *subrect : wxRect(0, 0, m_width, m_height);
|
||||
|
||||
wxBitmap bmp(rect.GetSize(), 32);
|
||||
|
||||
#if !wxOSX_USE_IPHONE
|
||||
CGRect srcRect = CGRectMake(rect.x, rect.y, rect.width, rect.height);
|
||||
|
||||
CGContextRef context = (CGContextRef)bmp.GetHBITMAP();
|
||||
|
||||
CGContextSaveGState(context);
|
||||
|
@@ -784,7 +784,7 @@ void * wxFont::MacGetATSUStyle() const
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
wxUint32 wxFont::MacGetATSUFontID() const
|
||||
{
|
||||
wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
|
||||
wxCHECK_MSG( M_FONTDATA != NULL, 0, wxT("invalid font") );
|
||||
|
||||
// cast away constness otherwise lazy font resolution is not possible
|
||||
const_cast<wxFont *>(this)->RealizeResource();
|
||||
@@ -794,7 +794,7 @@ wxUint32 wxFont::MacGetATSUFontID() const
|
||||
|
||||
wxUint32 wxFont::MacGetATSUAdditionalQDStyles() const
|
||||
{
|
||||
wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
|
||||
wxCHECK_MSG( M_FONTDATA != NULL, 0, wxT("invalid font") );
|
||||
|
||||
// cast away constness otherwise lazy font resolution is not possible
|
||||
const_cast<wxFont *>(this)->RealizeResource();
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#include "wx/settings.h"
|
||||
#endif
|
||||
|
||||
#include "wx/math.h"
|
||||
#include "wx/osx/private.h"
|
||||
|
||||
@interface wxNSScroller : NSScroller
|
||||
@@ -67,7 +68,7 @@ public :
|
||||
|
||||
virtual wxInt32 GetValue() const
|
||||
{
|
||||
return [(wxNSScroller*) m_osxView floatValue] * m_maximum;
|
||||
return wxRound([(wxNSScroller*) m_osxView floatValue] * m_maximum);
|
||||
}
|
||||
|
||||
virtual wxInt32 GetMaximum() const
|
||||
|
@@ -1654,8 +1654,11 @@ public:
|
||||
SetType(wxBITMAP_TYPE_PICT_RESOURCE);
|
||||
};
|
||||
|
||||
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
|
||||
int desiredWidth, int desiredHeight);
|
||||
virtual bool LoadFile(wxBitmap *bitmap,
|
||||
const wxString& name,
|
||||
wxBitmapType type,
|
||||
int desiredWidth,
|
||||
int desiredHeight);
|
||||
};
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPICTResourceHandler, wxBitmapHandler)
|
||||
@@ -1663,7 +1666,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPICTResourceHandler, wxBitmapHandler)
|
||||
|
||||
bool wxPICTResourceHandler::LoadFile(wxBitmap *bitmap,
|
||||
const wxString& name,
|
||||
long WXUNUSED(flags),
|
||||
wxBitmapType WXUNUSED(type),
|
||||
int WXUNUSED(desiredWidth),
|
||||
int WXUNUSED(desiredHeight))
|
||||
{
|
||||
|
@@ -146,8 +146,8 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect)
|
||||
glReadBuffer(GL_FRONT);
|
||||
|
||||
|
||||
width = srcRect.size.width;
|
||||
height = srcRect.size.height;
|
||||
width = (GLint)srcRect.size.width;
|
||||
height = (GLint)srcRect.size.height;
|
||||
|
||||
|
||||
bytewidth = width * 4; // Assume 4 bytes/pixel for now
|
||||
|
@@ -200,7 +200,8 @@ bool wxConsoleEventLoop::Pending() const
|
||||
|
||||
bool wxConsoleEventLoop::Dispatch()
|
||||
{
|
||||
DispatchTimeout(wxFDIODispatcher::TIMEOUT_INFINITE);
|
||||
DispatchTimeout(static_cast<unsigned long>(
|
||||
wxFDIODispatcher::TIMEOUT_INFINITE));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user