1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Universal MacOS API
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/mac/private.h"
17 void UMAInitToolbox( UInt16 inMoreMastersCalls
) ;
18 void UMACleanupToolbox() ;
19 long UMAGetSystemVersion() ;
20 bool UMAHasAppearance() ;
21 long UMAGetAppearanceVersion() ;
22 bool UMAHasWindowManager() ;
23 long UMAGetWindowManagerAttr() ;
24 bool UMAHasAquaLayout() ;
25 bool UMASystemIsInitialized() ;
29 long UMAGetProcessMode() ;
30 bool UMAGetProcessModeDoesActivateOnFGSwitch() ;
34 void UMASetMenuTitle( MenuRef menu
, StringPtr title
) ;
35 UInt32
UMAMenuEvent( EventRecord
*inEvent
) ;
36 void UMAEnableMenuItem( MenuRef inMenu
, MenuItemIndex item
) ;
37 void UMADisableMenuItem( MenuRef inMenu
, MenuItemIndex item
) ;
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 ) ;
45 void UMAShowWatchCursor() ;
46 void UMAShowArrowCursor() ;
48 OSStatus
UMAPrOpen(void *macPrintSession
) ;
49 OSStatus
UMAPrClose(void *macPrintSession
) ;
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
) ;
58 void UMADrawGrowIcon( WindowRef inWindowRef
) ;
59 void UMAShowHide( WindowRef inWindowRef
, Boolean show
) ;
63 void UMADrawControl( ControlHandle inControl
) ;
65 void UMAEnableControl( ControlHandle inControl
) ;
66 void UMADisableControl( ControlHandle inControl
) ;
67 void UMAActivateControl( ControlHandle inControl
) ;
68 void UMADeactivateControl( ControlHandle inControl
) ;
69 // ControlPartCode hiliteState) ;
70 void UMAShowControl (ControlHandle theControl
) ;
71 void UMAHideControl (ControlHandle theControl
);
72 void UMAActivateControl (ControlHandle inControl
);
73 void UMADeactivateControl (ControlHandle inControl
);
75 void UMAMoveControl( ControlHandle inControl
, short x
, short y
) ;
76 void UMASizeControl( ControlHandle inControl
, short x
, short y
) ;
80 OSErr
UMASetKeyboardFocus (WindowPtr inWindow
,
81 ControlHandle inControl
,
82 ControlFocusPart inPart
) ;
86 void UMAUpdateControls( WindowPtr inWindow
, RgnHandle inRgn
) ;
87 OSErr
UMAGetRootControl( WindowPtr inWindow
, ControlHandle
*outControl
) ;
89 // handling control data
90 bool UMAIsWindowFloating( WindowRef inWindow
) ;
91 bool UMAIsWindowModal( WindowRef inWindow
) ;
93 void UMAHighlightAndActivateWindow( WindowRef inWindowRef
, bool inActivate
) ;
95 OSStatus
UMAGetHelpMenu(
96 MenuRef
* outHelpMenu
,
97 MenuItemIndex
* outFirstCustomItemIndex
); /* can be NULL */
101 OSStatus
UMADrawThemePlacard( const Rect
*inRect
, ThemeDrawState inState
) ;
106 #define ClearCurrentScrap() ZeroScrap() ;
107 #define GetApplicationScript() smSystemScript
110 // calls not in carbon
113 #define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )