*y = p.y;
}
-double wxNonOwnedWindowCocoaImpl::GetMagnificationFactor() const
-{
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
- if ( [ m_macWindow respondsToSelector:@selector(backingScaleFactor) ] )
- return [m_macWindow backingScaleFactor];
- else
-#endif
- return 1.0;
-}
-
bool wxNonOwnedWindowCocoaImpl::IsActive()
{
return [m_macWindow isKeyWindow];
[m_osxView setHidden:(visible ? NO:YES)];
}
+double wxWidgetCocoaImpl::GetContentScaleFactor() const
+{
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
+ NSWindow* tlw = [m_osxView window];
+ if ( [ tlw respondsToSelector:@selector(backingScaleFactor) ] )
+ return [tlw backingScaleFactor];
+ else
+#endif
+ return 1.0;
+}
+
// ----------------------------------------------------------------------------
// window animation stuff
// ----------------------------------------------------------------------------
{
}
-float wxWidgetIPhoneImpl::GetContentScaleFactor() const
+double wxWidgetIPhoneImpl::GetContentScaleFactor() const
{
if ( [m_osxView respondsToSelector:@selector(contentScaleFactor) ])
return [m_osxView contentScaleFactor];
*height = h ;
}
-double wxNonOwnedWindow::GetMagnificationFactor() const
-{
- return m_nowpeer->GetMagnificationFactor();
-}
-
void wxNonOwnedWindow::WindowWasPainted()
{
s_lastFlush = clock();
*y = hh;
}
-double wxWindowMac::GetMagnificationFactor() const
-{
- wxNonOwnedWindow* tlw = MacGetTopLevelWindow() ;
- wxCHECK_MSG( tlw , 1.0, wxT("TopLevel Window missing") ) ;
- return tlw->GetMagnificationFactor();
-}
-
bool wxWindowMac::SetCursor(const wxCursor& cursor)
{
if (m_cursor.IsSameAs(cursor))
}
}
-float wxWindowMac::GetContentScaleFactor() const
+double wxWindowMac::GetContentScaleFactor() const
{
return GetPeer()->GetContentScaleFactor();
}