1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/carbon/uma.h
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() ;
21 WXDLLIMPEXP_BASE
bool UMASystemIsInitialized();
22 WXDLLIMPEXP_BASE
void UMASetSystemIsInitialized(bool val
);
26 long UMAGetProcessMode() ;
27 bool UMAGetProcessModeDoesActivateOnFGSwitch() ;
33 MenuRef
UMANewMenu( SInt16 id
, const wxString
& title
, wxFontEncoding encoding
) ;
34 void UMASetMenuTitle( MenuRef menu
, const wxString
& title
, wxFontEncoding encoding
) ;
35 UInt32
UMAMenuEvent( EventRecord
*inEvent
) ;
36 void UMAEnableMenuItem( MenuRef inMenu
, MenuItemIndex item
, bool enable
) ;
38 void UMAAppendSubMenuItem( MenuRef menu
, const wxString
& title
, wxFontEncoding encoding
, SInt16 submenuid
) ;
39 void UMAInsertSubMenuItem( MenuRef menu
, const wxString
& title
, wxFontEncoding encoding
, MenuItemIndex item
, SInt16 submenuid
) ;
40 void UMAAppendMenuItem( MenuRef menu
, const wxString
& title
, wxFontEncoding encoding
, wxAcceleratorEntry
*entry
= NULL
) ;
41 void UMAInsertMenuItem( MenuRef menu
, const wxString
& title
, wxFontEncoding encoding
, MenuItemIndex item
, wxAcceleratorEntry
*entry
= NULL
) ;
42 void UMASetMenuItemShortcut( MenuRef menu
, MenuItemIndex item
, wxAcceleratorEntry
*entry
) ;
44 void UMASetMenuItemText( MenuRef menu
, MenuItemIndex item
, const wxString
& title
, wxFontEncoding encoding
) ;
48 void UMAShowWatchCursor() ;
49 void UMAShowArrowCursor() ;
53 WXDLLIMPEXP_BASE GrafPtr
UMAGetWindowPort( WindowRef inWindowRef
) ;
54 void UMADisposeWindow( WindowRef inWindowRef
) ;
55 void UMASetWTitle( WindowRef inWindowRef
, const wxString
& title
, wxFontEncoding encoding
) ;
57 void UMADrawGrowIcon( WindowRef inWindowRef
) ;
58 void UMAShowHide( WindowRef inWindowRef
, Boolean show
) ;
62 void UMADrawControl( ControlRef inControl
) ;
64 void UMAEnableControl( ControlRef inControl
) ;
65 void UMADisableControl( ControlRef inControl
) ;
66 void UMAActivateControl( ControlRef inControl
) ;
67 void UMADeactivateControl( ControlRef inControl
) ;
68 // ControlPartCode hiliteState) ;
69 void UMAShowControl (ControlRef theControl
) ;
70 void UMAHideControl (ControlRef theControl
);
71 void UMAActivateControl (ControlRef inControl
);
72 void UMADeactivateControl (ControlRef inControl
);
73 void UMASetControlTitle( ControlRef inControl
, const wxString
& title
, wxFontEncoding encoding
) ;
75 void UMAMoveControl( ControlRef inControl
, short x
, short y
) ;
76 void UMASizeControl( ControlRef inControl
, short x
, short y
) ;
79 Rect
* UMAGetControlBoundsInWindowCoords(ControlRef theControl
, Rect
*bounds
) ;
82 OSErr
UMASetKeyboardFocus (WindowPtr inWindow
,
84 ControlFocusPart inPart
) ;
88 void UMAUpdateControls( WindowPtr inWindow
, RgnHandle inRgn
) ;
89 OSErr
UMAGetRootControl( WindowPtr inWindow
, ControlRef
*outControl
) ;
91 // handling control data
92 bool UMAIsWindowFloating( WindowRef inWindow
) ;
93 bool UMAIsWindowModal( WindowRef inWindow
) ;
95 void UMAHighlightAndActivateWindow( WindowRef inWindowRef
, bool inActivate
) ;
97 // Retrieves the Help menu handle. Warning: As a side-effect this functions also
98 // creates the Help menu if it didn't exist yet.
99 OSStatus
UMAGetHelpMenu(
100 MenuRef
* outHelpMenu
,
101 MenuItemIndex
* outFirstCustomItemIndex
); /* can be NULL */
103 // Same as UMAGetHelpMenu, but doesn't create the Help menu if UMAGetHelpMenu hasn't been called yet.
104 OSStatus
UMAGetHelpMenuDontCreate(
105 MenuRef
* outHelpMenu
,
106 MenuItemIndex
* outFirstCustomItemIndex
); /* can be NULL */
108 // Appearance Drawing
110 OSStatus
UMADrawThemePlacard( const Rect
*inRect
, ThemeDrawState inState
) ;
112 #define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )
116 CGDataProviderRef
UMACGDataProviderCreateWithCFData( CFDataRef data
);
117 CGDataConsumerRef
UMACGDataConsumerCreateWithCFData( CFMutableDataRef data
);