]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/renderer.cpp
check that the version of __sync_sub_and_fetch that returns a value is supported...
[wxWidgets.git] / src / mac / carbon / renderer.cpp
index 5018448b4ab143d9841a9d82cc3f9f5758703287..fb5e8d29aaf2e518b734d7937f6c093dc102bf3b 100644 (file)
@@ -126,8 +126,9 @@ int wxRendererMac::DrawHeaderButton( wxWindow *win,
     else
     {
         CGContextRef cgContext;
     else
     {
         CGContextRef cgContext;
-
-        cgContext = (CGContextRef) dc.GetGraphicsContext()->GetNativeContext();
+        wxGCDCImpl *impl = (wxGCDCImpl*) dc.GetImpl();
+        
+        cgContext = (CGContextRef) impl->GetGraphicsContext()->GetNativeContext();
 
         {
             HIThemeButtonDrawInfo drawInfo;
 
         {
             HIThemeButtonDrawInfo drawInfo;
@@ -209,7 +210,8 @@ void wxRendererMac::DrawTreeItemButton( wxWindow *win,
     {
         CGContextRef cgContext;
 
     {
         CGContextRef cgContext;
 
-        cgContext = (CGContextRef) dc.GetGraphicsContext()->GetNativeContext();
+        wxGCDCImpl *impl = (wxGCDCImpl*) dc.GetImpl();
+        cgContext = (CGContextRef) impl->GetGraphicsContext()->GetNativeContext();
 
         HIThemeButtonDrawInfo drawInfo;
         HIRect labelRect;
 
         HIThemeButtonDrawInfo drawInfo;
         HIRect labelRect;
@@ -248,14 +250,15 @@ void wxRendererMac::DrawSplitterSash( wxWindow *win,
 
     if ( !dc.IsKindOf( CLASSINFO( wxPaintDC ) ) )
     {
 
     if ( !dc.IsKindOf( CLASSINFO( wxPaintDC ) ) )
     {
-        wxRect rect( splitterRect.origin.x, splitterRect.origin.y, splitterRect.size.width, splitterRect.size.height );
+        wxRect rect( (int) splitterRect.origin.x, (int) splitterRect.origin.y, (int) splitterRect.size.width, 
+                     (int) splitterRect.size.height );
         win->Refresh( &rect );
    }
     else
     {
         CGContextRef cgContext;
         win->Refresh( &rect );
    }
     else
     {
         CGContextRef cgContext;
-
-        cgContext = (CGContextRef) dc.GetGraphicsContext()->GetNativeContext();
+        wxGCDCImpl *impl = (wxGCDCImpl*) dc.GetImpl();
+        cgContext = (CGContextRef) impl->GetGraphicsContext()->GetNativeContext();
 
         HIThemeSplitterDrawInfo drawInfo;
         drawInfo.version = 0;
 
         HIThemeSplitterDrawInfo drawInfo;
         drawInfo.version = 0;
@@ -273,11 +276,12 @@ wxRendererMac::DrawItemSelectionRect(wxWindow *win,
 {
     if ( !(flags & wxCONTROL_SELECTED) )
         return;
 {
     if ( !(flags & wxCONTROL_SELECTED) )
         return;
-        
-    wxBrush selBrush(wxColour( wxMacCreateCGColorFromHITheme( flags & wxCONTROL_FOCUSED ? 
-                                                             kThemeBrushAlternatePrimaryHighlightColor
-                                                             : kThemeBrushSecondaryHighlightColor ) ) , wxSOLID );
-
+    
+    wxColour col( wxMacCreateCGColorFromHITheme( (flags & wxCONTROL_FOCUSED) ? 
+                                                 kThemeBrushAlternatePrimaryHighlightColor
+                                                                             : kThemeBrushSecondaryHighlightColor ) );
+    wxBrush selBrush( col );
+    
     dc.SetPen( *wxTRANSPARENT_PEN );
     dc.SetBrush( selBrush );
     dc.DrawRectangle( rect );
     dc.SetPen( *wxTRANSPARENT_PEN );
     dc.SetBrush( selBrush );
     dc.DrawRectangle( rect );
@@ -307,8 +311,9 @@ wxRendererMac::DrawMacThemeButton(wxWindow *win,
     }
     else
     {
     }
     else
     {
+        wxGCDCImpl *impl = (wxGCDCImpl*) dc.GetImpl();
         CGContextRef cgContext;
         CGContextRef cgContext;
-        cgContext = (CGContextRef) dc.GetGraphicsContext()->GetNativeContext();
+        cgContext = (CGContextRef) impl->GetGraphicsContext()->GetNativeContext();
 
         HIThemeButtonDrawInfo drawInfo;
         HIRect labelRect;
 
         HIThemeButtonDrawInfo drawInfo;
         HIRect labelRect;