#endif
}
-// process manager
-long UMAGetProcessMode()
-{
- OSErr err ;
- ProcessInfoRec processinfo;
- ProcessSerialNumber procno ;
-
- procno.highLongOfPSN = 0 ;
- procno.lowLongOfPSN = kCurrentProcess ;
- processinfo.processInfoLength = sizeof(ProcessInfoRec);
- processinfo.processName = NULL;
-#ifndef __LP64__
- processinfo.processAppSpec = NULL;
-#endif
-
- err = ::GetProcessInformation( &procno , &processinfo ) ;
- wxASSERT( err == noErr ) ;
-
- return processinfo.processMode ;
-}
-
-bool UMAGetProcessModeDoesActivateOnFGSwitch()
-{
- return UMAGetProcessMode() & modeDoesActivateOnFGSwitch ;
-}
-
// menu manager
#if wxMAC_USE_COCOA == 0
MenuRef menu ;
CreateNewMenu( id , 0 , &menu ) ;
- SetMenuTitleWithCFString( menu , wxMacCFStringHolder(str , encoding ) ) ;
+ SetMenuTitleWithCFString( menu , wxCFStringRef(str , encoding ) ) ;
return menu ;
}
{
wxString str = wxStripMenuCodes( title ) ;
- SetMenuTitleWithCFString( menu , wxMacCFStringHolder(str , encoding) ) ;
+ SetMenuTitleWithCFString( menu , wxCFStringRef(str , encoding) ) ;
}
void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& title, wxFontEncoding encoding )
// we don't strip the accels here anymore, must be done before
wxString str = title ;
- SetMenuItemTextWithCFString( menu , item , wxMacCFStringHolder(str , encoding) ) ;
+ SetMenuItemTextWithCFString( menu , item , wxCFStringRef(str , encoding) ) ;
}
void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex inItem , bool enable)
#endif
-// window manager
-
-#if wxMAC_USE_QUICKDRAW
-
-void UMAActivateControl( ControlRef inControl )
-{
- ::ActivateControl( inControl ) ;
-}
-
-void UMADeactivateControl( ControlRef inControl )
-{
- ::DeactivateControl( inControl ) ;
-}
-
-// others
-
-void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate )
-{
-#if 1 // TODO REMOVE
- if ( inWindowRef )
- {
-// bool isHighlighted = IsWindowHighlited( inWindowRef ) ;
-// if ( inActivate != isHighlighted )
-#ifndef __LP64__
- GrafPtr port ;
- GetPort( &port ) ;
- SetPortWindowPort( inWindowRef ) ;
-#endif
- HiliteWindow( inWindowRef , inActivate ) ;
- ControlRef control = NULL ;
- ::GetRootControl( inWindowRef , &control ) ;
- if ( control )
- {
- if ( inActivate )
- UMAActivateControl( control ) ;
- else
- UMADeactivateControl( control ) ;
- }
-#ifndef __LP64__
- SetPort( port ) ;
-#endif
- }
-#endif
-}
-
-Rect * UMAGetControlBoundsInWindowCoords( ControlRef theControl, Rect *bounds )
-{
- GetControlBounds( theControl , bounds ) ;
-
- WindowRef tlwref = GetControlOwner( theControl ) ;
-
- wxTopLevelWindowMac* tlwwx = wxFindWinFromMacWindow( tlwref ) ;
- if ( tlwwx != NULL )
- {
- ControlRef rootControl = tlwwx->GetPeer()->GetControlRef() ;
- HIPoint hiPoint = CGPointMake( 0 , 0 ) ;
- HIViewConvertPoint( &hiPoint , HIViewGetSuperview(theControl) , rootControl ) ;
- OffsetRect( bounds , (short) hiPoint.x , (short) hiPoint.y ) ;
- }
-
- return bounds ;
-}
-
-#endif
-
-size_t UMAPutBytesCFRefCallback( void *info, const void *bytes, size_t count )
-{
- CFMutableDataRef data = (CFMutableDataRef) info;
- if ( data )
- {
- CFDataAppendBytes( data, (const UInt8*) bytes, count );
- }
- return count;
-}
-
-void UMAReleaseCFDataProviderCallback(void *info,
- const void *WXUNUSED(data),
- size_t WXUNUSED(count))
-{
- if ( info )
- CFRelease( (CFDataRef) info );
-}
-
-void UMAReleaseCFDataConsumerCallback( void *info )
-{
- if ( info )
- CFRelease( (CFDataRef) info );
-}
-
-CGDataProviderRef UMACGDataProviderCreateWithCFData( CFDataRef data )
-{
- if ( data == NULL )
- return NULL;
-
- return CGDataProviderCreateWithCFData( data );
-}
-
-CGDataConsumerRef UMACGDataConsumerCreateWithCFData( CFMutableDataRef data )
-{
- if ( data == NULL )
- return NULL;
-
- return CGDataConsumerCreateWithCFData( data );
-}
#endif // wxUSE_GUI