X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7f0c3a63a0eee38206d22d29db5c7eef260574ea..ebe86b1ea6f3f4018a9c6673b55ecb7d519c0e29:/src/mac/carbon/utils.cpp?ds=sidebyside diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index b64f77fae0..eff9beaca2 100644 --- a/src/mac/carbon/utils.cpp +++ b/src/mac/carbon/utils.cpp @@ -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 // ----------------------------------------------------------------------------