]>
Commit | Line | Data |
---|---|---|
cfcc3671 UJ |
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 | |
e40298d5 | 9 | // Licence: wxWindows licence |
cfcc3671 UJ |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef H_UMA | |
13 | #define H_UMA | |
14 | ||
5273bf2f | 15 | #include "wx/mac/private.h" |
cfcc3671 UJ |
16 | |
17 | void UMAInitToolbox( UInt16 inMoreMastersCalls) ; | |
5b781a67 | 18 | void UMACleanupToolbox() ; |
2b5f62a0 | 19 | long UMAGetSystemVersion() ; |
cfcc3671 UJ |
20 | bool UMAHasAppearance() ; |
21 | long UMAGetAppearanceVersion() ; | |
72055702 SC |
22 | bool UMAHasWindowManager() ; |
23 | long UMAGetWindowManagerAttr() ; | |
78c0e83b | 24 | bool UMAHasAquaLayout() ; |
0e5a4d20 | 25 | bool UMASystemIsInitialized() ; |
cfcc3671 UJ |
26 | |
27 | // process manager | |
28 | ||
29 | long UMAGetProcessMode() ; | |
30 | bool UMAGetProcessModeDoesActivateOnFGSwitch() ; | |
31 | ||
32 | // menu manager | |
33 | ||
e40298d5 JS |
34 | MenuRef UMANewMenu( SInt16 id , const wxString& title ) ; |
35 | void UMASetMenuTitle( MenuRef menu , const wxString& title ) ; | |
36 | UInt32 UMAMenuEvent( EventRecord *inEvent ) ; | |
37 | void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex item , bool enable ) ; | |
f3fb0a07 | 38 | |
e40298d5 JS |
39 | void UMAAppendSubMenuItem( MenuRef menu , const wxString& title , SInt16 submenuid ) ; |
40 | void UMAInsertSubMenuItem( MenuRef menu , const wxString& title , MenuItemIndex item , SInt16 submenuid ) ; | |
41 | void UMAAppendMenuItem( MenuRef menu , const wxString& title , wxAcceleratorEntry *entry = NULL ) ; | |
42 | void UMAInsertMenuItem( MenuRef menu , const wxString& title , MenuItemIndex item , wxAcceleratorEntry *entry = NULL ) ; | |
43 | void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEntry *entry ) ; | |
f3fb0a07 | 44 | |
e40298d5 | 45 | void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& title ) ; |
05adb9d2 | 46 | |
cfcc3671 UJ |
47 | // quickdraw |
48 | ||
e40298d5 JS |
49 | void UMAShowWatchCursor() ; |
50 | void UMAShowArrowCursor() ; | |
cfcc3671 | 51 | |
20cd7383 SC |
52 | #if !TARGET_CARBON |
53 | OSStatus UMAPrOpen() ; | |
54 | OSStatus UMAPrClose() ; | |
55 | #endif | |
05adb9d2 | 56 | |
cfcc3671 UJ |
57 | // window manager |
58 | ||
e40298d5 JS |
59 | GrafPtr UMAGetWindowPort( WindowRef inWindowRef ) ; |
60 | void UMADisposeWindow( WindowRef inWindowRef ) ; | |
c4e41ce3 | 61 | void UMASetWTitle( WindowRef inWindowRef , const wxString& title ) ; |
e40298d5 | 62 | void UMAGetWTitleC( WindowRef inWindowRef , char *title ) ; |
cfcc3671 | 63 | |
e40298d5 JS |
64 | void UMADrawGrowIcon( WindowRef inWindowRef ) ; |
65 | void UMAShowHide( WindowRef inWindowRef , Boolean show) ; | |
cfcc3671 UJ |
66 | |
67 | // appearance manager | |
68 | ||
e40298d5 | 69 | void UMADrawControl( ControlHandle inControl ) ; |
cfcc3671 | 70 | |
e40298d5 JS |
71 | void UMAEnableControl( ControlHandle inControl ) ; |
72 | void UMADisableControl( ControlHandle inControl ) ; | |
73 | void UMAActivateControl( ControlHandle inControl ) ; | |
74 | void UMADeactivateControl( ControlHandle inControl ) ; | |
75 | // ControlPartCode hiliteState) ; | |
76 | void UMAShowControl (ControlHandle theControl) ; | |
77 | void UMAHideControl (ControlHandle theControl); | |
78 | void UMAActivateControl (ControlHandle inControl); | |
79 | void UMADeactivateControl (ControlHandle inControl); | |
c4e41ce3 | 80 | void UMASetControlTitle( ControlHandle inControl , const wxString& title ) ; |
cfcc3671 | 81 | |
cfcc3671 UJ |
82 | void UMAMoveControl( ControlHandle inControl , short x , short y ) ; |
83 | void UMASizeControl( ControlHandle inControl , short x , short y ) ; | |
84 | // control hierarchy | |
85 | ||
cfcc3671 | 86 | // keyboard focus |
e40298d5 JS |
87 | OSErr UMASetKeyboardFocus (WindowPtr inWindow, |
88 | ControlHandle inControl, | |
89 | ControlFocusPart inPart) ; | |
cfcc3671 | 90 | |
cfcc3671 UJ |
91 | // events |
92 | ||
cfcc3671 UJ |
93 | void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) ; |
94 | OSErr UMAGetRootControl( WindowPtr inWindow , ControlHandle *outControl ) ; | |
95 | ||
96 | // handling control data | |
e40298d5 JS |
97 | bool UMAIsWindowFloating( WindowRef inWindow ) ; |
98 | bool UMAIsWindowModal( WindowRef inWindow ) ; | |
67e3d9d3 | 99 | |
cfcc3671 UJ |
100 | void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) ; |
101 | ||
56a38bbe SC |
102 | OSStatus UMAGetHelpMenu( |
103 | MenuRef * outHelpMenu, | |
104 | MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */ | |
105 | ||
5273bf2f SC |
106 | // Appearance Drawing |
107 | ||
108 | OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ; | |
109 | ||
1c522100 SC |
110 | // Clipboard support |
111 | ||
112 | OSStatus UMAPutScrap( Size size , OSType type , void *data ) ; | |
113 | ||
5273bf2f SC |
114 | // accessor helpers |
115 | ||
05adb9d2 | 116 | #if !TARGET_CARBON |
5273bf2f | 117 | #define ClearCurrentScrap() ZeroScrap() ; |
35f6182b | 118 | #define GetApplicationScript() smSystemScript |
5273bf2f SC |
119 | #else |
120 | ||
121 | // calls not in carbon | |
122 | ||
72055702 | 123 | #endif |
72055702 | 124 | #define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn ) |
cfcc3671 | 125 | |
03e11df5 | 126 | #endif |