]>
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 | |
292d1a2f | 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 | ||
05adb9d2 SC |
34 | void UMASetMenuTitle( MenuRef menu , StringPtr title ) ; |
35 | UInt32 UMAMenuEvent( EventRecord *inEvent ) ; | |
cfcc3671 UJ |
36 | void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex item ) ; |
37 | void UMADisableMenuItem( MenuRef inMenu , MenuItemIndex item ) ; | |
05adb9d2 SC |
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 ) ; | |
05adb9d2 | 42 | |
cfcc3671 UJ |
43 | // quickdraw |
44 | ||
45 | void UMAShowWatchCursor() ; | |
46 | void UMAShowArrowCursor() ; | |
47 | ||
a3d3d3bf GD |
48 | OSStatus UMAPrOpen(void *macPrintSession) ; |
49 | OSStatus UMAPrClose(void *macPrintSession) ; | |
05adb9d2 | 50 | |
cfcc3671 UJ |
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 ) ; | |
cfcc3671 | 59 | void UMAShowHide( WindowRef inWindowRef , Boolean show) ; |
cfcc3671 UJ |
60 | |
61 | // appearance manager | |
62 | ||
63 | void UMADrawControl( ControlHandle inControl ) ; | |
64 | ||
fdaf613a SC |
65 | void UMAEnableControl( ControlHandle inControl ) ; |
66 | void UMADisableControl( ControlHandle inControl ) ; | |
cfcc3671 UJ |
67 | void UMAActivateControl( ControlHandle inControl ) ; |
68 | void UMADeactivateControl( ControlHandle inControl ) ; | |
72055702 | 69 | // ControlPartCode hiliteState) ; |
cfcc3671 | 70 | void UMAShowControl (ControlHandle theControl) ; |
efaf6efc | 71 | void UMAHideControl (ControlHandle theControl); |
cfcc3671 UJ |
72 | void UMAActivateControl (ControlHandle inControl); |
73 | void UMADeactivateControl (ControlHandle inControl); | |
74 | ||
cfcc3671 UJ |
75 | void UMAMoveControl( ControlHandle inControl , short x , short y ) ; |
76 | void UMASizeControl( ControlHandle inControl , short x , short y ) ; | |
77 | // control hierarchy | |
78 | ||
cfcc3671 UJ |
79 | // keyboard focus |
80 | OSErr UMASetKeyboardFocus (WindowPtr inWindow, | |
81 | ControlHandle inControl, | |
82 | ControlFocusPart inPart) ; | |
83 | ||
cfcc3671 UJ |
84 | // events |
85 | ||
cfcc3671 UJ |
86 | void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) ; |
87 | OSErr UMAGetRootControl( WindowPtr inWindow , ControlHandle *outControl ) ; | |
88 | ||
89 | // handling control data | |
cfcc3671 UJ |
90 | bool UMAIsWindowFloating( WindowRef inWindow ) ; |
91 | bool UMAIsWindowModal( WindowRef inWindow ) ; | |
67e3d9d3 | 92 | |
cfcc3671 UJ |
93 | void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) ; |
94 | ||
56a38bbe SC |
95 | OSStatus UMAGetHelpMenu( |
96 | MenuRef * outHelpMenu, | |
97 | MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */ | |
98 | ||
5273bf2f SC |
99 | // Appearance Drawing |
100 | ||
101 | OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ; | |
102 | ||
103 | // accessor helpers | |
104 | ||
05adb9d2 | 105 | #if !TARGET_CARBON |
5273bf2f | 106 | #define ClearCurrentScrap() ZeroScrap() ; |
35f6182b | 107 | #define GetApplicationScript() smSystemScript |
5273bf2f SC |
108 | #else |
109 | ||
110 | // calls not in carbon | |
111 | ||
72055702 | 112 | #endif |
72055702 | 113 | #define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn ) |
cfcc3671 | 114 | |
03e11df5 | 115 | #endif |