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
, bool isEmbedded
) ;
18 void UMACleanupToolbox() ;
19 long UMAGetSystemVersion() ;
20 bool UMAHasAppearance() ;
21 long UMAGetAppearanceVersion() ;
22 bool UMAHasWindowManager() ;
23 long UMAGetWindowManagerAttr() ;
24 bool UMAHasAquaLayout() ;
26 bool UMASystemIsInitialized() ;
27 void UMASetSystemIsInitialized(bool val
);
31 long UMAGetProcessMode() ;
32 bool UMAGetProcessModeDoesActivateOnFGSwitch() ;
38 MenuRef
UMANewMenu( SInt16 id
, const wxString
& title
, wxFontEncoding encoding
) ;
39 void UMASetMenuTitle( MenuRef menu
, const wxString
& title
, wxFontEncoding encoding
) ;
40 UInt32
UMAMenuEvent( EventRecord
*inEvent
) ;
41 void UMAEnableMenuItem( MenuRef inMenu
, MenuItemIndex item
, bool enable
) ;
43 void UMAAppendSubMenuItem( MenuRef menu
, const wxString
& title
, wxFontEncoding encoding
, SInt16 submenuid
) ;
44 void UMAInsertSubMenuItem( MenuRef menu
, const wxString
& title
, wxFontEncoding encoding
, MenuItemIndex item
, SInt16 submenuid
) ;
45 void UMAAppendMenuItem( MenuRef menu
, const wxString
& title
, wxFontEncoding encoding
, wxAcceleratorEntry
*entry
= NULL
) ;
46 void UMAInsertMenuItem( MenuRef menu
, const wxString
& title
, wxFontEncoding encoding
, MenuItemIndex item
, wxAcceleratorEntry
*entry
= NULL
) ;
47 void UMASetMenuItemShortcut( MenuRef menu
, MenuItemIndex item
, wxAcceleratorEntry
*entry
) ;
49 void UMASetMenuItemText( MenuRef menu
, MenuItemIndex item
, const wxString
& title
, wxFontEncoding encoding
) ;
53 void UMAShowWatchCursor() ;
54 void UMAShowArrowCursor() ;
57 OSStatus
UMAPrOpen() ;
58 OSStatus
UMAPrClose() ;
63 GrafPtr
UMAGetWindowPort( WindowRef inWindowRef
) ;
64 void UMADisposeWindow( WindowRef inWindowRef
) ;
65 void UMASetWTitle( WindowRef inWindowRef
, const wxString
& title
, wxFontEncoding encoding
) ;
67 void UMADrawGrowIcon( WindowRef inWindowRef
) ;
68 void UMAShowHide( WindowRef inWindowRef
, Boolean show
) ;
72 void UMADrawControl( ControlHandle inControl
) ;
74 void UMAEnableControl( ControlHandle inControl
) ;
75 void UMADisableControl( ControlHandle inControl
) ;
76 void UMAActivateControl( ControlHandle inControl
) ;
77 void UMADeactivateControl( ControlHandle inControl
) ;
78 // ControlPartCode hiliteState) ;
79 void UMAShowControl (ControlHandle theControl
) ;
80 void UMAHideControl (ControlHandle theControl
);
81 void UMAActivateControl (ControlHandle inControl
);
82 void UMADeactivateControl (ControlHandle inControl
);
83 void UMASetControlTitle( ControlHandle inControl
, const wxString
& title
, wxFontEncoding encoding
) ;
85 void UMAMoveControl( ControlHandle inControl
, short x
, short y
) ;
86 void UMASizeControl( ControlHandle inControl
, short x
, short y
) ;
90 OSErr
UMASetKeyboardFocus (WindowPtr inWindow
,
91 ControlHandle inControl
,
92 ControlFocusPart inPart
) ;
96 void UMAUpdateControls( WindowPtr inWindow
, RgnHandle inRgn
) ;
97 OSErr
UMAGetRootControl( WindowPtr inWindow
, ControlHandle
*outControl
) ;
99 // handling control data
100 bool UMAIsWindowFloating( WindowRef inWindow
) ;
101 bool UMAIsWindowModal( WindowRef inWindow
) ;
103 void UMAHighlightAndActivateWindow( WindowRef inWindowRef
, bool inActivate
) ;
105 OSStatus
UMAGetHelpMenu(
106 MenuRef
* outHelpMenu
,
107 MenuItemIndex
* outFirstCustomItemIndex
); /* can be NULL */
109 // Appearance Drawing
111 OSStatus
UMADrawThemePlacard( const Rect
*inRect
, ThemeDrawState inState
) ;
115 OSStatus
UMAPutScrap( Size size
, OSType type
, void *data
) ;
120 #define ClearCurrentScrap() ZeroScrap() ;
121 #define GetApplicationScript() smSystemScript
124 // calls not in carbon
127 #define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )