void wxGetMousePosition( int* x, int* y )
{
+#if wxMAC_USE_QUICKDRAW
Point pt;
GetGlobalMouse(&pt);
*x = pt.h;
*y = pt.v;
+#endif
};
// Return true if we have a colour display
// Returns depth of screen
int wxDisplayDepth()
{
+#if wxMAC_USE_QUICKDRAW
int theDepth = (int) CGDisplayBitsPerPixel(CGMainDisplayID());
Rect globRect;
SetRect(&globRect, -32760, -32760, 32760, 32760);
theDepth = (**(**theMaxDevice).gdPMap).pixelSize;
return theDepth;
+#else
+ return 32;
+#endif
}
// Get size of display
void wxClientDisplayRect(int *x, int *y, int *width, int *height)
{
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
+#if wxMAC_USE_QUICKDRAW
+
HIRect bounds ;
HIWindowGetAvailablePositioningBounds(kCGNullDirectDisplay,kHICoordSpace72DPIGlobal,
&bounds);
*width = bounds.size.width;
if ( height )
*height = bounds.size.height;
+#else
+ int w, h;
+ wxDisplaySize(&w,&h);
+ if ( x )
+ *x = 0;
+ if ( y )
+ *y = 24;
+ if ( width )
+ *width = w;
+ if ( height )
+ *height = h-24;
+#endif
#else
Rect r;
GetAvailableWindowPositioningBounds( GetMainDevice() , &r );
// Control Access Support
// ----------------------------------------------------------------------------
+#if wxMAC_USE_QUICKDRAW
+
IMPLEMENT_DYNAMIC_CLASS( wxMacControl , wxObject )
wxMacControl::wxMacControl()
return ::SetTabEnabled( m_controlRef , tabNo , enable );
}
+#endif
+
//
// Quartz Support
//
}
#endif
+#if wxMAC_USE_QUICKDRAW
+
void wxMacGlobalToLocal( WindowRef window , Point*pt )
{
HIPoint p = CGPointMake( pt->h, pt->v );
pt->h = p.x;
pt->v = p.y;
}
+#endif
#endif // wxUSE_GUI