X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/73280e055362c69fa837bf44efc125a0db219c0b..3c5487b14442ddbc6e43ee2f4475b5a6ba251fb1:/src/mac/carbon/utils.cpp diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index bdaab9b20c..5c4da3a625 100644 --- a/src/mac/carbon/utils.cpp +++ b/src/mac/carbon/utils.cpp @@ -198,11 +198,15 @@ long wxGetFreeMemory() void wxUsleep(unsigned long milliseconds) { + // TODO remove if we don't encounter any other problemsy + /* clock_t start = clock() ; do { YieldToAnyThread() ; } while( clock() - start < milliseconds / 1000.0 * CLOCKS_PER_SEC ) ; + */ + wxThread::Sleep( milliseconds ) ; } void wxSleep(int nSecs) @@ -1228,6 +1232,10 @@ void wxMacConvertNewlines10To13( wxChar * data ) // Common Event Support // ---------------------------------------------------------------------------- +#endif // wxUSE_GUI + +#if wxUSE_BASE + extern ProcessSerialNumber gAppProcess ; void wxMacWakeUp() @@ -1258,6 +1266,11 @@ void wxMacWakeUp() } } +#endif // wxUSE_BASE + +#if wxUSE_GUI + + // ---------------------------------------------------------------------------- // Carbon Event Support // ---------------------------------------------------------------------------- @@ -1273,6 +1286,25 @@ OSStatus wxMacCarbonEvent::SetParameter(EventParamName inName, EventParamType in return ::SetEventParameter( m_eventRef , inName , inType , inBufferSize , inData ) ; } +// ---------------------------------------------------------------------------- +// Control Access Support +// ---------------------------------------------------------------------------- + +OSStatus wxMacControl::GetData(ControlPartCode inPartCode , ResType inTag , Size inBufferSize , void * inOutBuffer , Size * outActualSize ) +{ + return ::GetControlData( m_controlRef , inPartCode , inTag , inBufferSize , inOutBuffer , outActualSize ) ; +} + +OSStatus wxMacControl::GetDataSize(ControlPartCode inPartCode , ResType inTag , Size * outActualSize ) +{ + return ::GetControlDataSize( m_controlRef , inPartCode , inTag , outActualSize ) ; +} + +OSStatus wxMacControl::SetData(ControlPartCode inPartCode , ResType inTag , Size inSize , const void * inData) +{ + return ::SetControlData( m_controlRef , inPartCode , inTag , inSize , inData ) ; +} + // ---------------------------------------------------------------------------- // debugging support // ----------------------------------------------------------------------------