1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/carbon/uma.h
3 // Purpose: Universal MacOS API
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/mac/private.h"
17 void UMAInitToolbox( UInt16 inMoreMastersCalls
, bool isEmbedded
) ;
18 long UMAGetSystemVersion() ;
22 long UMAGetProcessMode() ;
23 bool UMAGetProcessModeDoesActivateOnFGSwitch() ;
29 MenuRef
UMANewMenu( SInt16 id
, const wxString
& title
, wxFontEncoding encoding
) ;
30 void UMASetMenuTitle( MenuRef menu
, const wxString
& title
, wxFontEncoding encoding
) ;
31 void UMAEnableMenuItem( MenuRef inMenu
, MenuItemIndex item
, bool enable
) ;
33 void UMAAppendSubMenuItem( MenuRef menu
, const wxString
& title
, wxFontEncoding encoding
, SInt16 submenuid
) ;
34 void UMAInsertSubMenuItem( MenuRef menu
, const wxString
& title
, wxFontEncoding encoding
, MenuItemIndex item
, SInt16 submenuid
) ;
35 void UMAAppendMenuItem( MenuRef menu
, const wxString
& title
, wxFontEncoding encoding
, wxAcceleratorEntry
*entry
= NULL
) ;
36 void UMAInsertMenuItem( MenuRef menu
, const wxString
& title
, wxFontEncoding encoding
, MenuItemIndex item
, wxAcceleratorEntry
*entry
= NULL
) ;
37 void UMASetMenuItemShortcut( MenuRef menu
, MenuItemIndex item
, wxAcceleratorEntry
*entry
) ;
39 void UMASetMenuItemText( MenuRef menu
, MenuItemIndex item
, const wxString
& title
, wxFontEncoding encoding
) ;
43 void UMAShowWatchCursor() ;
47 Rect
* UMAGetControlBoundsInWindowCoords(ControlRef theControl
, Rect
*bounds
) ;
51 void UMAUpdateControls( WindowPtr inWindow
, RgnHandle inRgn
) ;
52 OSErr
UMAGetRootControl( WindowPtr inWindow
, ControlRef
*outControl
) ;
54 void UMAHighlightAndActivateWindow( WindowRef inWindowRef
, bool inActivate
) ;
56 // Retrieves the Help menu handle. Warning: As a side-effect this functions also
57 // creates the Help menu if it didn't exist yet.
58 OSStatus
UMAGetHelpMenu(
59 MenuRef
* outHelpMenu
,
60 MenuItemIndex
* outFirstCustomItemIndex
); /* can be NULL */
62 // Same as UMAGetHelpMenu, but doesn't create the Help menu if UMAGetHelpMenu hasn't been called yet.
63 OSStatus
UMAGetHelpMenuDontCreate(
64 MenuRef
* outHelpMenu
,
65 MenuItemIndex
* outFirstCustomItemIndex
); /* can be NULL */
69 #define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )
73 CGDataProviderRef
UMACGDataProviderCreateWithCFData( CFDataRef data
);
74 CGDataConsumerRef
UMACGDataConsumerCreateWithCFData( CFMutableDataRef data
);