X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ac86379e2ac8695a08fc65cee6e2475f9a6615c2..b1d7de5ae0c53162b57ac20cfed04264f0f27b30:/src/mac/carbon/utils.cpp diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index ebdbc7082f..eff9beaca2 100644 --- a/src/mac/carbon/utils.cpp +++ b/src/mac/carbon/utils.cpp @@ -45,9 +45,9 @@ #include #endif -#include "ATSUnicode.h" -#include "TextCommon.h" -#include "TextEncodingConverter.h" +#include +#include +#include #include "wx/mac/private.h" // includes mac headers @@ -456,30 +456,16 @@ void wxDisplaySizeMM(int *width, int *height) void wxClientDisplayRect(int *x, int *y, int *width, int *height) { - BitMap screenBits; - GetQDGlobalsScreenBits( &screenBits ); - - if (x) *x = 0; - if (y) *y = 0; - - if (width != NULL) { - *width = screenBits.bounds.right - screenBits.bounds.left ; - } - if (height != NULL) { - *height = screenBits.bounds.bottom - screenBits.bounds.top ; - } - - SInt16 mheight ; -#if TARGET_CARBON - GetThemeMenuBarHeight( &mheight ) ; -#else - mheight = LMGetMBarHeight() ; -#endif - if (height != NULL) { - *height -= mheight ; - } - if (y) - *y = mheight ; + Rect r ; + GetAvailableWindowPositioningBounds( GetMainDevice() , &r ) ; + if ( x ) + *x = r.left ; + if ( y ) + *y = r.top ; + if ( width ) + *width = r.right - r.left ; + if ( height ) + *height = r.bottom - r.top ; } wxWindow* wxFindWindowAtPoint(const wxPoint& pt) @@ -1238,6 +1224,21 @@ void wxMacConvertNewlines10To13( wxChar * data ) } #endif +// ---------------------------------------------------------------------------- +// Carbon Event Support +// ---------------------------------------------------------------------------- + + +OSStatus wxMacCarbonEvent::GetParameter(EventParamName inName, EventParamType inDesiredType, UInt32 inBufferSize, void * outData) +{ + return ::GetEventParameter( m_eventRef , inName , inDesiredType , NULL , inBufferSize , NULL , outData ) ; +} + +OSStatus wxMacCarbonEvent::SetParameter(EventParamName inName, EventParamType inType, UInt32 inBufferSize, void * inData) +{ + return ::SetEventParameter( m_eventRef , inName , inType , inBufferSize , inData ) ; +} + // ---------------------------------------------------------------------------- // debugging support // ----------------------------------------------------------------------------