fixing warning in osx core and carbon

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2009-03-23 15:24:04 +00:00
parent 0faf03bf97
commit de0d209531
10 changed files with 26 additions and 10 deletions

View File

@@ -1516,6 +1516,15 @@ void wxApp::MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymess
event.m_y = wherey;
event.SetTimestamp(when);
event.SetEventObject(focus);
#else
wxUnusedVar(event);
wxUnusedVar(focus);
wxUnusedVar(keymessage);
wxUnusedVar(modifiers);
wxUnusedVar(when);
wxUnusedVar(wherex);
wxUnusedVar(wherey);
wxUnusedVar(uniChar);
#endif
}

View File

@@ -659,7 +659,7 @@ bool wxComboBox::CanRedo() const
return false;
}
bool wxComboBox::OSXHandleClicked( double timestampsec )
bool wxComboBox::OSXHandleClicked( double WXUNUSED(timestampsec) )
{
/*
For consistency with other platforms, clicking in the text area does not constitute a selection

View File

@@ -302,6 +302,8 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
DisposeDrag( theDrag );
CFRelease( pasteboard );
gTrackingGlobals.m_currentSource = NULL;
#else
wxUnusedVar(flags);
#endif
return gTrackingGlobals.m_result;

View File

@@ -283,7 +283,7 @@ wxFontRefData::wxFontRefData(wxOSXSystemFont font, int size)
#if wxOSX_USE_CORE_TEXT
if ( UMAGetSystemVersion() >= 0x1050 )
{
CTFontUIFontType uifont;
CTFontUIFontType uifont = kCTFontSystemFontType;
switch( font )
{
case wxOSX_SYSTEM_FONT_NORMAL:
@@ -323,7 +323,7 @@ wxFontRefData::wxFontRefData(wxOSXSystemFont font, int size)
{
#if !wxOSX_USE_CARBON
// not needed outside
ThemeFontID m_macThemeFontID;
ThemeFontID m_macThemeFontID = kThemeSystemFont;
#endif
switch( font )
{

View File

@@ -1806,7 +1806,7 @@ bool wxMacCoreGraphicsContext::SetCompositionMode(wxCompositionMode op)
void wxMacCoreGraphicsContext::BeginLayer(wxDouble opacity)
{
CGContextSaveGState(m_cgContext);
CGContextSetAlpha(m_cgContext, opacity);
CGContextSetAlpha(m_cgContext, (CGFloat) opacity);
CGContextBeginTransparencyLayer(m_cgContext, 0);
}
@@ -2179,7 +2179,7 @@ void wxMacCoreGraphicsContext::DoDrawText( const wxString &str, wxDouble x, wxDo
y += CTFontGetAscent(font);
CGContextSaveGState(m_cgContext);
CGContextTranslateCTM(m_cgContext, x, y);
CGContextTranslateCTM(m_cgContext, (CGFloat) x, (CGFloat) y);
CGContextScaleCTM(m_cgContext, 1, -1);
CGContextSetTextPosition(m_cgContext, 0, 0);
CTLineDraw( line, m_cgContext );
@@ -2352,7 +2352,8 @@ void wxMacCoreGraphicsContext::GetTextExtent( const wxString &str, wxDouble *wid
wxCFRef<CFAttributedStringRef> attrtext( CFAttributedStringCreate(kCFAllocatorDefault, text, attributes) );
wxCFRef<CTLineRef> line( CTLineCreateWithAttributedString(attrtext) );
CGFloat w, a, d, l;
double w;
CGFloat a, d, l;
w = CTLineGetTypographicBounds(line, &a, &d, &l) ;
@@ -2703,6 +2704,7 @@ wxGraphicsContext * wxMacCoreGraphicsRenderer::CreateContextFromNativeWindow( vo
#if wxOSX_USE_CARBON
return new wxMacCoreGraphicsContext(this,(WindowRef)window);
#else
wxUnusedVar(window);
return NULL;
#endif
}

View File

@@ -71,6 +71,8 @@ void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate )
#endif
}
#elif defined(wxOSX_USE_COCOA)
wxUnusedVar(inActivate);
wxUnusedVar(inWindowRef);
// TODO: implement me!
#endif
}

View File

@@ -38,6 +38,7 @@
// check if we're currently in a paint event
inline bool wxInPaintEvent(wxWindow* win, wxDC& dc)
{
wxUnusedVar(dc);
return ( win->MacGetCGContextRef() != NULL );
}

View File

@@ -70,7 +70,7 @@ bool wxStatusBarMac::Create(wxWindow *parent, wxWindowID id,
return true;
}
void wxStatusBarMac::DrawFieldText(wxDC& dc, const wxRect& rect, int i, int textHeight)
void wxStatusBarMac::DrawFieldText(wxDC& dc, const wxRect& rect, int i, int WXUNUSED(textHeight))
{
int w, h;
GetSize( &w , &h );

View File

@@ -95,7 +95,7 @@ void* wxMacCocoaRetain( void* obj )
WX_NSFont wxFont::CreateNSFont(wxOSXSystemFont font, wxNativeFontInfo* info)
{
NSFont* nsfont;
NSFont* nsfont = nil;
switch( font )
{
case wxOSX_SYSTEM_FONT_NORMAL:

View File

@@ -298,8 +298,8 @@ void wxMimeTypesManagerImpl::InitIfNeeded()
// read system and user mailcaps and other files
void wxMimeTypesManagerImpl::Initialize(int mailcapStyles,
const wxString& sExtraDir)
void wxMimeTypesManagerImpl::Initialize(int WXUNUSED(mailcapStyles),
const wxString& WXUNUSED(sExtraDir))
{
#ifdef __VMS
// XDG tables are never installed on OpenVMS