]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/uma.h
wxHelpController now wxCHMHelpController on Windows
[wxWidgets.git] / include / wx / mac / carbon / uma.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: uma.h
3 // Purpose: Universal MacOS API
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 03/02/99
7 // RCS-ID: $Id:
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
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) ;
18 void UMACleanupToolbox() ;
19 long UMAGetSystemVersion() ;
20 bool UMAHasAppearance() ;
21 long UMAGetAppearanceVersion() ;
22 bool UMAHasWindowManager() ;
23 long UMAGetWindowManagerAttr() ;
24 bool UMAHasAquaLayout() ;
25
26 bool UMASystemIsInitialized() ;
27 void UMASetSystemIsInitialized(bool val);
28
29 // process manager
30
31 long UMAGetProcessMode() ;
32 bool UMAGetProcessModeDoesActivateOnFGSwitch() ;
33
34 #if wxUSE_GUI
35
36 // menu manager
37
38 MenuRef UMANewMenu( SInt16 id , const wxString& title , wxFontEncoding encoding) ;
39 void UMASetMenuTitle( MenuRef menu , const wxString& title , wxFontEncoding encoding) ;
40 UInt32 UMAMenuEvent( EventRecord *inEvent ) ;
41 void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex item , bool enable ) ;
42
43 void UMAAppendSubMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , SInt16 submenuid ) ;
44 void UMAInsertSubMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , MenuItemIndex item , SInt16 submenuid ) ;
45 void UMAAppendMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , wxAcceleratorEntry *entry = NULL ) ;
46 void UMAInsertMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , MenuItemIndex item , wxAcceleratorEntry *entry = NULL ) ;
47 void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEntry *entry ) ;
48
49 void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& title , wxFontEncoding encoding ) ;
50
51 // quickdraw
52
53 void UMAShowWatchCursor() ;
54 void UMAShowArrowCursor() ;
55
56 // window manager
57
58 GrafPtr UMAGetWindowPort( WindowRef inWindowRef ) ;
59 void UMADisposeWindow( WindowRef inWindowRef ) ;
60 void UMASetWTitle( WindowRef inWindowRef , const wxString& title , wxFontEncoding encoding) ;
61
62 void UMADrawGrowIcon( WindowRef inWindowRef ) ;
63 void UMAShowHide( WindowRef inWindowRef , Boolean show) ;
64
65 // appearance manager
66
67 void UMADrawControl( ControlRef inControl ) ;
68
69 void UMAEnableControl( ControlRef inControl ) ;
70 void UMADisableControl( ControlRef inControl ) ;
71 void UMAActivateControl( ControlRef inControl ) ;
72 void UMADeactivateControl( ControlRef inControl ) ;
73 // ControlPartCode hiliteState) ;
74 void UMAShowControl (ControlRef theControl) ;
75 void UMAHideControl (ControlRef theControl);
76 void UMAActivateControl (ControlRef inControl);
77 void UMADeactivateControl (ControlRef inControl);
78 void UMASetControlTitle( ControlRef inControl , const wxString& title , wxFontEncoding encoding) ;
79
80 void UMAMoveControl( ControlRef inControl , short x , short y ) ;
81 void UMASizeControl( ControlRef inControl , short x , short y ) ;
82 // control hierarchy
83
84 Rect * UMAGetControlBoundsInWindowCoords(ControlRef theControl, Rect *bounds) ;
85
86 // keyboard focus
87 OSErr UMASetKeyboardFocus (WindowPtr inWindow,
88 ControlRef inControl,
89 ControlFocusPart inPart) ;
90
91 // events
92
93 void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) ;
94 OSErr UMAGetRootControl( WindowPtr inWindow , ControlRef *outControl ) ;
95
96 // handling control data
97 bool UMAIsWindowFloating( WindowRef inWindow ) ;
98 bool UMAIsWindowModal( WindowRef inWindow ) ;
99
100 void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) ;
101
102 OSStatus UMAGetHelpMenu(
103 MenuRef * outHelpMenu,
104 MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */
105
106 // Appearance Drawing
107
108 OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ;
109
110 // Clipboard support
111
112 OSStatus UMAPutScrap( Size size , OSType type , void *data ) ;
113
114 #define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )
115
116 #endif // wxUSE_GUI
117
118 #endif