]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/uma.h
Removed unnecessary code from utilsunx.cpp
[wxWidgets.git] / include / wx / mac / uma.h
CommitLineData
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
9// Licence: LGPL licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef H_UMA
13#define H_UMA
14
15// define this to be 1 if you have the 8.6 libs (weak linked)
16
17#define UMA_USE_8_6 0
18
19// define this to be 1 if you have the carbon libs (weak linked or PreCarbon.lib)
20
21#define UMA_USE_CARBON 0
22
23#define UMA_USE_APPEARANCE 1
24#define UMA_USE_WINDOWMGR 1
25
26#if !UMA_USE_8_6 && UMA_USE_WINDOWMGR
27#undef UMA_USE_WINDOWMGR
28#define UMA_USE_WINDOWMGR 0
29#endif
30
31#if !TARGET_CARBON
32 typedef short MenuItemIndex ;
33#endif
34
35void UMAInitToolbox( UInt16 inMoreMastersCalls) ;
36bool UMAHasAppearance() ;
37long UMAGetAppearanceVersion() ;
38
39// process manager
40
41long UMAGetProcessMode() ;
42bool UMAGetProcessModeDoesActivateOnFGSwitch() ;
43
44// menu manager
45
46void UMASetMenuTitle( MenuRef menu , ConstStr255Param title ) ;
47UInt32 UMAMenuEvent( EventRecord *inEvent ) ;
48void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex item ) ;
49void UMADisableMenuItem( MenuRef inMenu , MenuItemIndex item ) ;
50// quickdraw
51
52void UMAShowWatchCursor() ;
53void UMAShowArrowCursor() ;
54
55// window manager
56
57GrafPtr UMAGetWindowPort( WindowRef inWindowRef ) ;
58void UMADisposeWindow( WindowRef inWindowRef ) ;
59void UMASetWTitleC( WindowRef inWindowRef , const char *title ) ;
60void UMAGetWTitleC( WindowRef inWindowRef , char *title ) ;
61
62void UMADrawGrowIcon( WindowRef inWindowRef ) ;
63void UMAShowWindow( WindowRef inWindowRef ) ;
64void UMAHideWindow( WindowRef inWindowRef ) ;
65void UMAShowHide( WindowRef inWindowRef , Boolean show) ;
66void UMASelectWindow( WindowRef inWindowRef ) ;
67void UMABringToFront( WindowRef inWindowRef ) ;
68void UMASendBehind( WindowRef inWindowRef , WindowRef behindWindow ) ;
69void UMACloseWindow(WindowRef inWindowRef) ;
70
71// appearance manager
72
73void UMADrawControl( ControlHandle inControl ) ;
74
75void UMAActivateControl( ControlHandle inControl ) ;
76void UMADeactivateControl( ControlHandle inControl ) ;
77void UMASetThemeWindowBackground (WindowRef inWindow,
78 ThemeBrush inBrush,
79 Boolean inUpdate) ;
80ControlHandle UMANewControl(WindowPtr owningWindow,
81 const Rect * boundsRect,
82 ConstStr255Param controlTitle,
83 Boolean initiallyVisible,
84 SInt16 initialValue,
85 SInt16 minimumValue,
86 SInt16 maximumValue,
87 SInt16 procID,
88 SInt32 controlReference) ;
89void UMADisposeControl (ControlHandle theControl) ;
90void UMAHiliteControl (ControlHandle theControl,
91 ControlPartCode hiliteState) ;
92void UMAShowControl (ControlHandle theControl) ;
93void UMAHideControl (ControlHandle theControl);
94void UMASetControlVisibility (ControlHandle inControl,
95 Boolean inIsVisible,
96 Boolean inDoDraw);
97
98bool UMAIsControlActive (ControlHandle inControl);
99bool UMAIsControlVisible (ControlHandle inControl);
100void UMAActivateControl (ControlHandle inControl);
101void UMADeactivateControl (ControlHandle inControl);
102
103OSErr UMAGetBestControlRect (ControlHandle inControl,
104 Rect * outRect,
105 SInt16 * outBaseLineOffset);
106OSErr UMASetControlFontStyle (ControlHandle inControl,
107 const ControlFontStyleRec * inStyle) ;
108
109
110void UMAMoveControl( ControlHandle inControl , short x , short y ) ;
111void UMASizeControl( ControlHandle inControl , short x , short y ) ;
112// control hierarchy
113
114OSErr UMACreateRootControl (WindowPtr inWindow,
115 ControlHandle * outControl) ;
116
117OSErr UMAEmbedControl (ControlHandle inControl,
118 ControlHandle inContainer);
119
120// keyboard focus
121OSErr UMASetKeyboardFocus (WindowPtr inWindow,
122 ControlHandle inControl,
123 ControlFocusPart inPart) ;
124
125
126// events
127
128ControlPartCode UMAHandleControlClick (ControlHandle inControl,
129 Point inWhere,
130 SInt16 inModifiers,
131 ControlActionUPP inAction) ;
132SInt16 UMAHandleControlKey (ControlHandle inControl,
133 SInt16 inKeyCode,
134 SInt16 inCharCode,
135 SInt16 inModifiers);
136
137void UMAIdleControls (WindowPtr inWindow) ;
138
139void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) ;
140OSErr UMAGetRootControl( WindowPtr inWindow , ControlHandle *outControl ) ;
141
142// handling control data
143
144OSErr UMASetControlData (ControlHandle inControl,
145 ControlPartCode inPart,
146 ResType inTagName,
147 Size inSize,
148 Ptr inData) ;
149
150OSErr UMAGetControlData (ControlHandle inControl,
151 ControlPartCode inPart,
152 ResType inTagName,
153 Size inBufferSize,
154 Ptr outBuffer,
155 Size * outActualSize) ;
156OSErr UMAGetControlDataSize (ControlHandle inControl,
157 ControlPartCode inPart,
158 ResType inTagName,
159 Size * outMaxSize);
160
161
162// system 8.0
163
164short UMAFindWindow( Point inPoint , WindowRef *outWindow ) ;
165OSStatus UMAGetWindowFeatures( WindowRef inWindowRef , UInt32 *outFeatures ) ;
166OSStatus UMAGetWindowRegion( WindowRef inWindowRef , WindowRegionCode inRegionCode , RgnHandle ioWinRgn ) ;
167OSStatus UMACollapseWindow( WindowRef inWindowRef , Boolean inCollapseIt ) ;
168OSStatus UMACollapseAllWindows( Boolean inCollapseEm ) ;
169Boolean UMAIsWindowCollapsed( WindowRef inWindowRef ) ;
170Boolean UMAIsWindowCollapsable( WindowRef inWindowRef ) ;
171
172// system 8.5
173
174OSStatus UMACreateNewWindow( WindowClass windowClass , WindowAttributes attributes , const Rect *bounds, WindowRef *outWindow ) ;
175OSStatus UMAGetWindowClass( WindowRef inWindowRef , WindowClass *outWindowClass ) ;
176OSStatus UMAGetWindowAttributes( WindowRef inWindowRef , WindowAttributes *outAttributes ) ;
177
178void UMAShowFloatingWindows() ;
179void UMAHideFloatingWindows() ;
180Boolean UMAAreFloatingWindowsVisible() ;
181WindowRef UMAFrontWindow() ;
182WindowRef UMAFrontNonFloatingWindow() ;
183
184// floaters support
185
186bool UMAIsWindowFloating( WindowRef inWindow ) ;
187bool UMAIsWindowModal( WindowRef inWindow ) ;
188WindowRef UMAGetActiveWindow() ;
189WindowRef UMAGetActiveNonFloatingWindow() ;
190
191void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) ;
192
193
194#endif