]>
Commit | Line | Data |
---|---|---|
8cf73271 | 1 | ///////////////////////////////////////////////////////////////////////////// |
1c4e8f38 | 2 | // Name: wx/mac/carbon/uma.h |
8cf73271 SC |
3 | // Purpose: Universal MacOS API |
4 | // Author: Stefan Csomor | |
5 | // Modified by: | |
6 | // Created: 03/02/99 | |
1c4e8f38 | 7 | // RCS-ID: $Id$ |
8cf73271 | 8 | // Copyright: (c) Stefan Csomor |
65571936 | 9 | // Licence: wxWindows licence |
8cf73271 SC |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef H_UMA | |
13 | #define H_UMA | |
14 | ||
15 | #include "wx/mac/private.h" | |
16 | ||
17 | void UMAInitToolbox( UInt16 inMoreMastersCalls, bool isEmbedded) ; | |
8cf73271 | 18 | long UMAGetSystemVersion() ; |
8cf73271 | 19 | |
8cf73271 SC |
20 | // process manager |
21 | ||
22 | long UMAGetProcessMode() ; | |
23 | bool UMAGetProcessModeDoesActivateOnFGSwitch() ; | |
24 | ||
25 | #if wxUSE_GUI | |
26 | ||
27 | // menu manager | |
28 | ||
29 | MenuRef UMANewMenu( SInt16 id , const wxString& title , wxFontEncoding encoding) ; | |
30 | void UMASetMenuTitle( MenuRef menu , const wxString& title , wxFontEncoding encoding) ; | |
8cf73271 SC |
31 | void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex item , bool enable ) ; |
32 | ||
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 ) ; | |
38 | ||
39 | void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& title , wxFontEncoding encoding ) ; | |
40 | ||
41 | // quickdraw | |
42 | ||
43 | void UMAShowWatchCursor() ; | |
8cf73271 | 44 | |
8cf73271 SC |
45 | // control hierarchy |
46 | ||
4f305456 SC |
47 | Rect * UMAGetControlBoundsInWindowCoords(ControlRef theControl, Rect *bounds) ; |
48 | ||
8cf73271 SC |
49 | // events |
50 | ||
51 | void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) ; | |
4f305456 | 52 | OSErr UMAGetRootControl( WindowPtr inWindow , ControlRef *outControl ) ; |
8cf73271 | 53 | |
8cf73271 SC |
54 | void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) ; |
55 | ||
4dd25308 VZ |
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. | |
8cf73271 SC |
58 | OSStatus UMAGetHelpMenu( |
59 | MenuRef * outHelpMenu, | |
60 | MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */ | |
61 | ||
4dd25308 VZ |
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 */ | |
66 | ||
8cf73271 SC |
67 | // Appearance Drawing |
68 | ||
ebf2a1ec | 69 | #define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn ) |
8cf73271 | 70 | |
ebf2a1ec | 71 | // Quartz |
8cf73271 | 72 | |
ebf2a1ec SC |
73 | CGDataProviderRef UMACGDataProviderCreateWithCFData( CFDataRef data ); |
74 | CGDataConsumerRef UMACGDataConsumerCreateWithCFData( CFMutableDataRef data ); | |
8cf73271 SC |
75 | |
76 | #endif // wxUSE_GUI | |
77 | ||
78 | #endif |