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