]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/toplevel.cpp
we are always compositing on the supported OS versions
[wxWidgets.git] / src / mac / carbon / toplevel.cpp
index 0211fa1a4a68d38d48638426f888da9925bef51b..829729d46956fe43bd8d2b343eec09f27bf8d532 100644 (file)
     #pragma hdrstop
 #endif
 
+#include "wx/toplevel.h"
+
 #ifndef WX_PRECOMP
     #include "wx/app.h"
-    #include "wx/toplevel.h"
     #include "wx/frame.h"
     #include "wx/string.h"
     #include "wx/log.h"
@@ -1182,6 +1183,9 @@ void  wxTopLevelWindowMac::MacCreateRealWindow(
 #if TARGET_API_MAC_OSX
     if ( m_macUsesCompositing )
         attr |= kWindowCompositingAttribute;
+#if 0 // wxMAC_USE_CORE_GRAPHICS ; TODO : decide on overall handling of high dpi screens (pixel vs userscale)
+    attr |= kWindowFrameworkScaledAttribute;
+#endif
 #endif
 
     if ( HasFlag(wxFRAME_SHAPED) )
@@ -1430,6 +1434,20 @@ bool wxTopLevelWindowMac::IsFullScreen() const
     return m_macFullScreenData != NULL ;
 }
 
+
+bool wxTopLevelWindowMac::SetTransparent(wxByte alpha)
+{
+    OSStatus result = SetWindowAlpha((WindowRef)m_macWindow, float(alpha)/255.0);
+    return result == noErr;
+}
+
+
+bool wxTopLevelWindowMac::CanSetTransparent()
+{
+    return true;
+}
+
+
 void wxTopLevelWindowMac::SetExtraStyle(long exStyle)
 {
     if ( GetExtraStyle() == exStyle )