X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ee658398812ab334b39a2632cd99e2ffe6d4bc79..73fe67bd60b57f95dc63809f7843ed2a15928436:/src/mac/carbon/utils.cpp diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index 83f2258105..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,7 +456,6 @@ void wxDisplaySizeMM(int *width, int *height) void wxClientDisplayRect(int *x, int *y, int *width, int *height) { -#if TARGET_CARBON Rect r ; GetAvailableWindowPositioningBounds( GetMainDevice() , &r ) ; if ( x ) @@ -467,32 +466,6 @@ void wxClientDisplayRect(int *x, int *y, int *width, int *height) *width = r.right - r.left ; if ( height ) *height = r.bottom - r.top ; -#else - 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 ; -#endif } wxWindow* wxFindWindowAtPoint(const wxPoint& pt) @@ -1251,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 // ----------------------------------------------------------------------------