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() ;
58 GrafPtr
UMAGetWindowPort( WindowRef inWindowRef
) ;
59 void UMADisposeWindow( WindowRef inWindowRef
) ;
60 void UMASetWTitle( WindowRef inWindowRef
, const wxString
& title
, wxFontEncoding encoding
) ;
62 void UMADrawGrowIcon( WindowRef inWindowRef
) ;
63 void UMAShowHide( WindowRef inWindowRef
, Boolean show
) ;
67 void UMADrawControl( ControlRef inControl
) ;
69 void UMAEnableControl( ControlRef inControl
) ;
70 void UMADisableControl( ControlRef inControl
) ;
71 void UMAActivateControl( ControlRef inControl
) ;
72 void UMADeactivateControl( ControlRef inControl
) ;
73 // ControlPartCode hiliteState) ;
74 void UMAShowControl (ControlRef theControl
) ;
75 void UMAHideControl (ControlRef theControl
);
76 void UMAActivateControl (ControlRef inControl
);
77 void UMADeactivateControl (ControlRef inControl
);
78 void UMASetControlTitle( ControlRef inControl
, const wxString
& title
, wxFontEncoding encoding
) ;
80 void UMAMoveControl( ControlRef inControl
, short x
, short y
) ;
81 void UMASizeControl( ControlRef inControl
, short x
, short y
) ;
84 Rect
* UMAGetControlBoundsInWindowCoords(ControlRef theControl
, Rect
*bounds
) ;
87 OSErr
UMASetKeyboardFocus (WindowPtr inWindow
,
89 ControlFocusPart inPart
) ;
93 void UMAUpdateControls( WindowPtr inWindow
, RgnHandle inRgn
) ;
94 OSErr
UMAGetRootControl( WindowPtr inWindow
, ControlRef
*outControl
) ;
96 // handling control data
97 bool UMAIsWindowFloating( WindowRef inWindow
) ;
98 bool UMAIsWindowModal( WindowRef inWindow
) ;
100 void UMAHighlightAndActivateWindow( WindowRef inWindowRef
, bool inActivate
) ;
102 OSStatus
UMAGetHelpMenu(
103 MenuRef
* outHelpMenu
,
104 MenuItemIndex
* outFirstCustomItemIndex
); /* can be NULL */
106 // Appearance Drawing
108 OSStatus
UMADrawThemePlacard( const Rect
*inRect
, ThemeDrawState inState
) ;
112 OSStatus
UMAPutScrap( Size size
, OSType type
, void *data
) ;
114 #define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )