]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/uma.h
added and documented wxDirTraverser::OnOpenError
[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 bool UMASystemIsInitialized() ;
26
27 // process manager
28
29 long UMAGetProcessMode() ;
30 bool UMAGetProcessModeDoesActivateOnFGSwitch() ;
31
32 // menu manager
33
34 void UMASetMenuTitle( MenuRef menu , StringPtr title ) ;
35 UInt32 UMAMenuEvent( EventRecord *inEvent ) ;
36 void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex item ) ;
37 void UMADisableMenuItem( MenuRef inMenu , MenuItemIndex item ) ;
38 void UMAAppendSubMenuItem( MenuRef menu , StringPtr label , SInt16 submenuid ) ;
39 void UMAInsertSubMenuItem( MenuRef menu , StringPtr label , MenuItemIndex item , SInt16 submenuid ) ;
40 void UMAAppendMenuItem( MenuRef menu , StringPtr label , SInt16 key= 0, UInt8 modifiers = 0 ) ;
41 void UMAInsertMenuItem( MenuRef menu , StringPtr label , MenuItemIndex item , SInt16 key = 0 , UInt8 modifiers = 0 ) ;
42
43 // quickdraw
44
45 void UMAShowWatchCursor() ;
46 void UMAShowArrowCursor() ;
47
48 OSStatus UMAPrOpen(void *macPrintSession) ;
49 OSStatus UMAPrClose(void *macPrintSession) ;
50
51 // window manager
52
53 GrafPtr UMAGetWindowPort( WindowRef inWindowRef ) ;
54 void UMADisposeWindow( WindowRef inWindowRef ) ;
55 void UMASetWTitleC( WindowRef inWindowRef , const char *title ) ;
56 void UMAGetWTitleC( WindowRef inWindowRef , char *title ) ;
57
58 void UMADrawGrowIcon( WindowRef inWindowRef ) ;
59 void UMAShowHide( WindowRef inWindowRef , Boolean show) ;
60
61 // appearance manager
62
63 void UMADrawControl( ControlHandle inControl ) ;
64
65 void UMAEnableControl( ControlHandle inControl ) ;
66 void UMADisableControl( ControlHandle inControl ) ;
67 void UMAActivateControl( ControlHandle inControl ) ;
68 void UMADeactivateControl( ControlHandle inControl ) ;
69 // ControlPartCode hiliteState) ;
70 void UMAShowControl (ControlHandle theControl) ;
71 void UMAHideControl (ControlHandle theControl);
72 void UMAActivateControl (ControlHandle inControl);
73 void UMADeactivateControl (ControlHandle inControl);
74
75 void UMAMoveControl( ControlHandle inControl , short x , short y ) ;
76 void UMASizeControl( ControlHandle inControl , short x , short y ) ;
77 // control hierarchy
78
79 // keyboard focus
80 OSErr UMASetKeyboardFocus (WindowPtr inWindow,
81 ControlHandle inControl,
82 ControlFocusPart inPart) ;
83
84 // events
85
86 void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) ;
87 OSErr UMAGetRootControl( WindowPtr inWindow , ControlHandle *outControl ) ;
88
89 // handling control data
90 bool UMAIsWindowFloating( WindowRef inWindow ) ;
91 bool UMAIsWindowModal( WindowRef inWindow ) ;
92
93 void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) ;
94
95 OSStatus UMAGetHelpMenu(
96 MenuRef * outHelpMenu,
97 MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */
98
99 // Appearance Drawing
100
101 OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ;
102
103 // accessor helpers
104
105 #if !TARGET_CARBON
106 #define ClearCurrentScrap() ZeroScrap() ;
107 #define GetApplicationScript() smSystemScript
108 #else
109
110 // calls not in carbon
111
112 #endif
113 #define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )
114
115 #endif