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 MenuRef
UMANewMenu( SInt16 id
, const wxString
& title
) ;
35 void UMASetMenuTitle( MenuRef menu
, const wxString
& title
) ;
36 UInt32
UMAMenuEvent( EventRecord
*inEvent
) ;
37 void UMAEnableMenuItem( MenuRef inMenu
, MenuItemIndex item
, bool enable
) ;
39 void UMAAppendSubMenuItem( MenuRef menu
, const wxString
& title
, SInt16 submenuid
) ;
40 void UMAInsertSubMenuItem( MenuRef menu
, const wxString
& title
, MenuItemIndex item
, SInt16 submenuid
) ;
41 void UMAAppendMenuItem( MenuRef menu
, const wxString
& title
, wxAcceleratorEntry
*entry
= NULL
) ;
42 void UMAInsertMenuItem( MenuRef menu
, const wxString
& title
, MenuItemIndex item
, wxAcceleratorEntry
*entry
= NULL
) ;
43 void UMASetMenuItemShortcut( MenuRef menu
, MenuItemIndex item
, wxAcceleratorEntry
*entry
) ;
45 void UMASetMenuItemText( MenuRef menu
, MenuItemIndex item
, const wxString
& title
) ;
49 void UMAShowWatchCursor() ;
50 void UMAShowArrowCursor() ;
52 OSStatus
UMAPrOpen(void *macPrintSession
) ;
53 OSStatus
UMAPrClose(void *macPrintSession
) ;
57 GrafPtr
UMAGetWindowPort( WindowRef inWindowRef
) ;
58 void UMADisposeWindow( WindowRef inWindowRef
) ;
59 void UMASetWTitle( WindowRef inWindowRef
, const wxString
& title
) ;
60 void UMAGetWTitleC( WindowRef inWindowRef
, char *title
) ;
62 void UMADrawGrowIcon( WindowRef inWindowRef
) ;
63 void UMAShowHide( WindowRef inWindowRef
, Boolean show
) ;
67 void UMADrawControl( ControlHandle inControl
) ;
69 void UMAEnableControl( ControlHandle inControl
) ;
70 void UMADisableControl( ControlHandle inControl
) ;
71 void UMAActivateControl( ControlHandle inControl
) ;
72 void UMADeactivateControl( ControlHandle inControl
) ;
73 // ControlPartCode hiliteState) ;
74 void UMAShowControl (ControlHandle theControl
) ;
75 void UMAHideControl (ControlHandle theControl
);
76 void UMAActivateControl (ControlHandle inControl
);
77 void UMADeactivateControl (ControlHandle inControl
);
78 void UMASetControlTitle( ControlHandle inControl
, const wxString
& title
) ;
80 void UMAMoveControl( ControlHandle inControl
, short x
, short y
) ;
81 void UMASizeControl( ControlHandle inControl
, short x
, short y
) ;
85 OSErr
UMASetKeyboardFocus (WindowPtr inWindow
,
86 ControlHandle inControl
,
87 ControlFocusPart inPart
) ;
91 void UMAUpdateControls( WindowPtr inWindow
, RgnHandle inRgn
) ;
92 OSErr
UMAGetRootControl( WindowPtr inWindow
, ControlHandle
*outControl
) ;
94 // handling control data
95 bool UMAIsWindowFloating( WindowRef inWindow
) ;
96 bool UMAIsWindowModal( WindowRef inWindow
) ;
98 void UMAHighlightAndActivateWindow( WindowRef inWindowRef
, bool inActivate
) ;
100 OSStatus
UMAGetHelpMenu(
101 MenuRef
* outHelpMenu
,
102 MenuItemIndex
* outFirstCustomItemIndex
); /* can be NULL */
104 // Appearance Drawing
106 OSStatus
UMADrawThemePlacard( const Rect
*inRect
, ThemeDrawState inState
) ;
110 OSStatus
UMAPutScrap( Size size
, OSType type
, void *data
) ;
115 #define ClearCurrentScrap() ZeroScrap() ;
116 #define GetApplicationScript() smSystemScript
119 // calls not in carbon
122 #define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )