X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/79a73b4f86090278c242a8cca5fd9147a31a4419..8da2ab99009877d864c19b1ad90a9c0d02c61e2e:/src/mac/carbon/utils.cpp diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index ab012ec103..b64f77fae0 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,6 +456,18 @@ 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 ) + *x = r.left ; + if ( y ) + *y = r.top ; + if ( width ) + *width = r.right - r.left ; + if ( height ) + *height = r.bottom - r.top ; +#else BitMap screenBits; GetQDGlobalsScreenBits( &screenBits ); @@ -480,6 +492,7 @@ void wxClientDisplayRect(int *x, int *y, int *width, int *height) } if (y) *y = mheight ; +#endif } wxWindow* wxFindWindowAtPoint(const wxPoint& pt) @@ -1152,10 +1165,10 @@ wxString wxMacCFStringHolder::AsString(wxFontEncoding encoding) #else CFIndex cStrLen ; CFStringGetBytes( m_cfs , CFRangeMake(0, cflen) , wxMacGetSystemEncFromFontEnc( encoding ) , - '?' , false , NULL , 0 , cStrLen ) ; + '?' , false , NULL , 0 , &cStrLen ) ; buf = new wxChar[ cStrLen + 1 ] ; - CFStringGetBytes( m_cfs , CFRangeMake(0, len) , wxMacGetSystemEncFromFontEnc( encoding ) , - '?' , false , (void*) buf , cStrLen , &StrLen) ; + CFStringGetBytes( m_cfs , CFRangeMake(0, cflen) , wxMacGetSystemEncFromFontEnc( encoding ) , + '?' , false , (unsigned char*) buf , cStrLen , &cStrLen) ; noChars = cStrLen ; #endif