]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/mac/uma.h
build fix. Need the full declaration for CLASSINFO().
[wxWidgets.git] / include / wx / mac / uma.h
... / ...
CommitLineData
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
17void UMAInitToolbox( UInt16 inMoreMastersCalls) ;
18void UMACleanupToolbox() ;
19bool UMAHasAppearance() ;
20long UMAGetAppearanceVersion() ;
21bool UMAHasWindowManager() ;
22long UMAGetWindowManagerAttr() ;
23bool UMAHasAquaLayout() ;
24bool UMASystemIsInitialized() ;
25
26// process manager
27
28long UMAGetProcessMode() ;
29bool UMAGetProcessModeDoesActivateOnFGSwitch() ;
30
31// menu manager
32
33void UMASetMenuTitle( MenuRef menu , StringPtr title ) ;
34UInt32 UMAMenuEvent( EventRecord *inEvent ) ;
35void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex item ) ;
36void UMADisableMenuItem( MenuRef inMenu , MenuItemIndex item ) ;
37void UMAAppendSubMenuItem( MenuRef menu , StringPtr label , SInt16 submenuid ) ;
38void UMAInsertSubMenuItem( MenuRef menu , StringPtr label , MenuItemIndex item , SInt16 submenuid ) ;
39void UMAAppendMenuItem( MenuRef menu , StringPtr label , SInt16 key= 0, UInt8 modifiers = 0 ) ;
40void UMAInsertMenuItem( MenuRef menu , StringPtr label , MenuItemIndex item , SInt16 key = 0 , UInt8 modifiers = 0 ) ;
41// void UMASetMenuItemText( MenuRef menu , MenuItemIndex item , StringPtr label ) ;
42
43// MenuRef ::NewMenu( SInt16 menuid , StringPtr label ) ;
44// void UMADisposeMenu( MenuRef menu ) ;
45
46// handling the menubar
47
48// void UMADeleteMenu( SInt16 menuId ) ;
49// void UMAInsertMenu( MenuRef insertMenu , SInt16 afterId ) ;
50// void UMADrawMenuBar() ;
51
52// quickdraw
53
54void UMAShowWatchCursor() ;
55void UMAShowArrowCursor() ;
56
57OSStatus UMAPrOpen(void *macPrintSession) ;
58OSStatus UMAPrClose(void *macPrintSession) ;
59
60// window manager
61
62GrafPtr UMAGetWindowPort( WindowRef inWindowRef ) ;
63void UMADisposeWindow( WindowRef inWindowRef ) ;
64void UMASetWTitleC( WindowRef inWindowRef , const char *title ) ;
65void UMAGetWTitleC( WindowRef inWindowRef , char *title ) ;
66
67void UMADrawGrowIcon( WindowRef inWindowRef ) ;
68//void UMAShowWindow( WindowRef inWindowRef ) ;
69//void UMAHideWindow( WindowRef inWindowRef ) ;
70void UMAShowHide( WindowRef inWindowRef , Boolean show) ;
71//void UMASelectWindow( WindowRef inWindowRef ) ;
72//void UMABringToFront( WindowRef inWindowRef ) ;
73//void UMASendBehind( WindowRef inWindowRef , WindowRef behindWindow ) ;
74// void UMACloseWindow(WindowRef inWindowRef) ;
75
76// appearance manager
77
78void UMADrawControl( ControlHandle inControl ) ;
79
80void UMAEnableControl( ControlHandle inControl ) ;
81void UMADisableControl( ControlHandle inControl ) ;
82void UMAActivateControl( ControlHandle inControl ) ;
83void UMADeactivateControl( ControlHandle inControl ) ;
84//void UMAApplyThemeBackground (ThemeBackgroundKind inKind,
85// const Rect * bounds,
86// ThemeDrawState inState,
87// SInt16 inDepth,
88// Boolean inColorDev);
89//void UMASetThemeWindowBackground (WindowRef inWindow,
90// ThemeBrush inBrush,
91// Boolean inUpdate) ;
92/*
93ControlHandle ::NewControl(WindowPtr owningWindow,
94 const Rect * boundsRect,
95 ConstStr255Param controlTitle,
96 Boolean initiallyVisible,
97 SInt16 initialValue,
98 SInt16 minimumValue,
99 SInt16 maximumValue,
100 SInt16 procID,
101 SInt32 controlReference) ;
102*/
103//void UMADisposeControl (ControlHandle theControl) ;
104//void UMAHiliteControl (ControlHandle theControl,
105// ControlPartCode hiliteState) ;
106void UMAShowControl (ControlHandle theControl) ;
107void UMAHideControl (ControlHandle theControl);
108//void UMASetControlVisibility (ControlHandle inControl,
109// Boolean inIsVisible,
110// Boolean inDoDraw);
111
112//bool UMAIsControlActive (ControlHandle inControl);
113//bool UMAIsControlVisible (ControlHandle inControl);
114void UMAActivateControl (ControlHandle inControl);
115void UMADeactivateControl (ControlHandle inControl);
116
117//OSErr UMAGetBestControlRect (ControlHandle inControl,
118// Rect * outRect,
119// SInt16 * outBaseLineOffset);
120//OSErr UMASetControlFontStyle (ControlHandle inControl,
121// const ControlFontStyleRec * inStyle) ;
122
123
124void UMAMoveControl( ControlHandle inControl , short x , short y ) ;
125void UMASizeControl( ControlHandle inControl , short x , short y ) ;
126// control hierarchy
127
128//OSErr UMACreateRootControl (WindowPtr inWindow,
129// ControlHandle * outControl) ;
130
131//OSErr UMAEmbedControl (ControlHandle inControl,
132// ControlHandle inContainer);
133
134// keyboard focus
135OSErr UMASetKeyboardFocus (WindowPtr inWindow,
136 ControlHandle inControl,
137 ControlFocusPart inPart) ;
138
139
140// events
141
142//ControlPartCode UMAHandleControlClick (ControlHandle inControl,
143// Point inWhere,
144// SInt16 inModifiers,
145// ControlActionUPP inAction) ;
146//SInt16 UMAHandleControlKey (ControlHandle inControl,
147// SInt16 inKeyCode,
148// SInt16 inCharCode,
149// SInt16 inModifiers);
150
151//void UMAIdleControls (WindowPtr inWindow) ;
152
153void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) ;
154OSErr UMAGetRootControl( WindowPtr inWindow , ControlHandle *outControl ) ;
155
156// handling control data
157/*
158OSErr ::SetControlData (ControlHandle inControl,
159 ControlPartCode inPart,
160 ResType inTagName,
161 Size inSize,
162 Ptr inData) ;
163
164OSErr ::GetControlData (ControlHandle inControl,
165 ControlPartCode inPart,
166 ResType inTagName,
167 Size inBufferSize,
168 Ptr outBuffer,
169 Size * outActualSize) ;
170OSErr ::GetControlDataSize (ControlHandle inControl,
171 ControlPartCode inPart,
172 ResType inTagName,
173 Size * outMaxSize);
174
175
176// system 8.0
177
178short UMAFindWindow( Point inPoint , WindowRef *outWindow ) ;
179OSStatus UMAGetWindowFeatures( WindowRef inWindowRef , UInt32 *outFeatures ) ;
180OSStatus UMAGetWindowRegion( WindowRef inWindowRef , WindowRegionCode inRegionCode , RgnHandle ioWinRgn ) ;
181OSStatus UMACollapseWindow( WindowRef inWindowRef , Boolean inCollapseIt ) ;
182OSStatus UMACollapseAllWindows( Boolean inCollapseEm ) ;
183Boolean UMAIsWindowCollapsed( WindowRef inWindowRef ) ;
184Boolean UMAIsWindowCollapsable( WindowRef inWindowRef ) ;
185
186// system 8.5
187
188OSStatus UMACreateNewWindow( WindowClass windowClass , WindowAttributes attributes , const Rect *bounds, WindowRef *outWindow ) ;
189OSStatus UMAGetWindowClass( WindowRef inWindowRef , WindowClass *outWindowClass ) ;
190OSStatus UMAGetWindowAttributes( WindowRef inWindowRef , WindowAttributes *outAttributes ) ;
191
192void UMAShowFloatingWindows() ;
193void UMAHideFloatingWindows() ;
194Boolean UMAAreFloatingWindowsVisible() ;
195WindowRef UMAFrontWindow() ;
196WindowRef UMAFrontNonFloatingWindow() ;
197
198// floaters support
199*/
200bool UMAIsWindowFloating( WindowRef inWindow ) ;
201bool UMAIsWindowModal( WindowRef inWindow ) ;
202/*
203WindowRef UMAGetActiveWindow() ;
204WindowRef UMAGetActiveNonFloatingWindow() ;
205*/
206void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) ;
207
208OSStatus UMAGetHelpMenu(
209 MenuRef * outHelpMenu,
210 MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */
211
212// Appearance Drawing
213
214OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ;
215
216// accessor helpers
217
218#if !TARGET_CARBON
219#define ClearCurrentScrap() ZeroScrap() ;
220/*
221#define GetPortTextFont( p) ((p)->txFont )
222#define GetPortTextSize( p) ((p)->txSize )
223#define GetPortTextFace( p) ((p)->txFace )
224#define GetPortTextMode( p) ((p)->txMode )
225#define GetRegionBounds( r , b) ((*b) = (**r).rgnBBox)
226#define GetPortBounds( p , b) ((*b) = p->portRect )
227#define GetWindowPortBounds( p , b) ((*b) = p->portRect )
228#define GetPortVisibleRegion( p, r ) CopyRgn( p->visRgn , r )
229#define GetQDGlobalsWhite( a ) (&((*a) = qd.white))
230#define GetQDGlobalsBlack( a ) (&((*a) = qd.black))
231#define GetQDGlobalsScreenBits( a ) ((*a) = qd.screenBits)
232#define GetQDGlobalsArrow( a ) (&((*a) = qd.arrow))
233#define GetControlBounds( c , b ) &((*b) = (**c).contrlRect )
234#define GetPortBitMapForCopyBits( p ) ((BitMap*) &(((CGrafPtr)p)->portPixMap ))
235#define GetControlOwner( control ) ((**control).contrlOwner)
236
237#define GetPortPenMode( p ) (p->pnMode)
238#define SetPortPenMode( p , mode ) (p->pnMode = mode )
239// control manager
240
241#define GetControlReference( control ) ((**control).contrlRfCon)
242
243// list manager
244
245#define SetListSelectionFlags( list , options ) (**list).selFlags = options
246#define GetListRefCon( list ) (**list).refCon
247*/
248#else
249
250// calls not in carbon
251
252
253#endif
254#define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )
255
256#endif