]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/uma.h
fixed bug with wxcolourDatabase::FindColour(); added (and documented) new Find()...
[wxWidgets.git] / include / wx / mac / 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) ;
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 ) ;
39 void UMASetMenuTitle( MenuRef menu , const wxString& title ) ;
40 UInt32 UMAMenuEvent( EventRecord *inEvent ) ;
41 void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex item , bool enable ) ;
42
43 void UMAAppendSubMenuItem( MenuRef menu , const wxString& title , SInt16 submenuid ) ;
44 void UMAInsertSubMenuItem( MenuRef menu , const wxString& title , MenuItemIndex item , SInt16 submenuid ) ;
45 void UMAAppendMenuItem( MenuRef menu , const wxString& title , wxAcceleratorEntry *entry = NULL ) ;
46 void UMAInsertMenuItem( MenuRef menu , const wxString& title , 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 ) ;
50
51 // quickdraw
52
53 void UMAShowWatchCursor() ;
54 void UMAShowArrowCursor() ;
55
56 #if !TARGET_CARBON
57 OSStatus UMAPrOpen() ;
58 OSStatus UMAPrClose() ;
59 #endif
60
61 // window manager
62
63 GrafPtr UMAGetWindowPort( WindowRef inWindowRef ) ;
64 void UMADisposeWindow( WindowRef inWindowRef ) ;
65 void UMASetWTitle( WindowRef inWindowRef , const wxString& title ) ;
66 void UMAGetWTitleC( WindowRef inWindowRef , char *title ) ;
67
68 void UMADrawGrowIcon( WindowRef inWindowRef ) ;
69 void UMAShowHide( WindowRef inWindowRef , Boolean show) ;
70
71 // appearance manager
72
73 void UMADrawControl( ControlHandle inControl ) ;
74
75 void UMAEnableControl( ControlHandle inControl ) ;
76 void UMADisableControl( ControlHandle inControl ) ;
77 void UMAActivateControl( ControlHandle inControl ) ;
78 void UMADeactivateControl( ControlHandle inControl ) ;
79 // ControlPartCode hiliteState) ;
80 void UMAShowControl (ControlHandle theControl) ;
81 void UMAHideControl (ControlHandle theControl);
82 void UMAActivateControl (ControlHandle inControl);
83 void UMADeactivateControl (ControlHandle inControl);
84 void UMASetControlTitle( ControlHandle inControl , const wxString& title ) ;
85
86 void UMAMoveControl( ControlHandle inControl , short x , short y ) ;
87 void UMASizeControl( ControlHandle inControl , short x , short y ) ;
88 // control hierarchy
89
90 // keyboard focus
91 OSErr UMASetKeyboardFocus (WindowPtr inWindow,
92 ControlHandle inControl,
93 ControlFocusPart inPart) ;
94
95 // events
96
97 void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) ;
98 OSErr UMAGetRootControl( WindowPtr inWindow , ControlHandle *outControl ) ;
99
100 // handling control data
101 bool UMAIsWindowFloating( WindowRef inWindow ) ;
102 bool UMAIsWindowModal( WindowRef inWindow ) ;
103
104 void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) ;
105
106 OSStatus UMAGetHelpMenu(
107 MenuRef * outHelpMenu,
108 MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */
109
110 // Appearance Drawing
111
112 OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ;
113
114 // Clipboard support
115
116 OSStatus UMAPutScrap( Size size , OSType type , void *data ) ;
117
118 // accessor helpers
119
120 #if !TARGET_CARBON
121 #define ClearCurrentScrap() ZeroScrap() ;
122 #define GetApplicationScript() smSystemScript
123 #else
124
125 // calls not in carbon
126
127 #endif
128 #define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )
129
130 #endif // wxUSE_GUI
131
132 #endif