]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/uma.h
mac cgcolor changes & cleanup
[wxWidgets.git] / include / wx / mac / carbon / uma.h
CommitLineData
8cf73271 1/////////////////////////////////////////////////////////////////////////////
1c4e8f38 2// Name: wx/mac/carbon/uma.h
8cf73271
SC
3// Purpose: Universal MacOS API
4// Author: Stefan Csomor
5// Modified by:
6// Created: 03/02/99
1c4e8f38 7// RCS-ID: $Id$
8cf73271 8// Copyright: (c) Stefan Csomor
65571936 9// Licence: wxWindows licence
8cf73271
SC
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef H_UMA
13#define H_UMA
14
15#include "wx/mac/private.h"
16
17void UMAInitToolbox( UInt16 inMoreMastersCalls, bool isEmbedded) ;
18void UMACleanupToolbox() ;
19long UMAGetSystemVersion() ;
8cf73271 20
e17206f7
VS
21WXDLLIMPEXP_BASE bool UMASystemIsInitialized();
22WXDLLIMPEXP_BASE void UMASetSystemIsInitialized(bool val);
8cf73271
SC
23
24// process manager
25
26long UMAGetProcessMode() ;
27bool UMAGetProcessModeDoesActivateOnFGSwitch() ;
28
29#if wxUSE_GUI
30
31// menu manager
32
33MenuRef UMANewMenu( SInt16 id , const wxString& title , wxFontEncoding encoding) ;
34void UMASetMenuTitle( MenuRef menu , const wxString& title , wxFontEncoding encoding) ;
35UInt32 UMAMenuEvent( EventRecord *inEvent ) ;
36void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex item , bool enable ) ;
37
38void UMAAppendSubMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , SInt16 submenuid ) ;
39void UMAInsertSubMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , MenuItemIndex item , SInt16 submenuid ) ;
40void UMAAppendMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , wxAcceleratorEntry *entry = NULL ) ;
41void UMAInsertMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , MenuItemIndex item , wxAcceleratorEntry *entry = NULL ) ;
42void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEntry *entry ) ;
43
44void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& title , wxFontEncoding encoding ) ;
45
46// quickdraw
47
48void UMAShowWatchCursor() ;
49void UMAShowArrowCursor() ;
50
8cf73271
SC
51// window manager
52
af312d21 53WXDLLIMPEXP_BASE GrafPtr UMAGetWindowPort( WindowRef inWindowRef ) ;
8cf73271
SC
54void UMADisposeWindow( WindowRef inWindowRef ) ;
55void UMASetWTitle( WindowRef inWindowRef , const wxString& title , wxFontEncoding encoding) ;
56
57void UMADrawGrowIcon( WindowRef inWindowRef ) ;
58void UMAShowHide( WindowRef inWindowRef , Boolean show) ;
59
60// appearance manager
61
4f305456 62void UMADrawControl( ControlRef inControl ) ;
8cf73271 63
4f305456
SC
64void UMAEnableControl( ControlRef inControl ) ;
65void UMADisableControl( ControlRef inControl ) ;
66void UMAActivateControl( ControlRef inControl ) ;
67void UMADeactivateControl( ControlRef inControl ) ;
8cf73271 68// ControlPartCode hiliteState) ;
4f305456
SC
69void UMAShowControl (ControlRef theControl) ;
70void UMAHideControl (ControlRef theControl);
71void UMAActivateControl (ControlRef inControl);
72void UMADeactivateControl (ControlRef inControl);
73void UMASetControlTitle( ControlRef inControl , const wxString& title , wxFontEncoding encoding) ;
74
75void UMAMoveControl( ControlRef inControl , short x , short y ) ;
76void UMASizeControl( ControlRef inControl , short x , short y ) ;
8cf73271
SC
77// control hierarchy
78
4f305456
SC
79Rect * UMAGetControlBoundsInWindowCoords(ControlRef theControl, Rect *bounds) ;
80
8cf73271
SC
81// keyboard focus
82OSErr UMASetKeyboardFocus (WindowPtr inWindow,
4f305456 83 ControlRef inControl,
8cf73271
SC
84 ControlFocusPart inPart) ;
85
86// events
87
88void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) ;
4f305456 89OSErr UMAGetRootControl( WindowPtr inWindow , ControlRef *outControl ) ;
8cf73271
SC
90
91// handling control data
92bool UMAIsWindowFloating( WindowRef inWindow ) ;
93bool UMAIsWindowModal( WindowRef inWindow ) ;
94
95void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) ;
96
4dd25308
VZ
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.
8cf73271
SC
99OSStatus UMAGetHelpMenu(
100 MenuRef * outHelpMenu,
101 MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */
102
4dd25308
VZ
103// Same as UMAGetHelpMenu, but doesn't create the Help menu if UMAGetHelpMenu hasn't been called yet.
104OSStatus UMAGetHelpMenuDontCreate(
105 MenuRef * outHelpMenu,
106 MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */
107
8cf73271
SC
108// Appearance Drawing
109
110OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ;
111
ebf2a1ec 112#define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )
8cf73271 113
ebf2a1ec 114// Quartz
8cf73271 115
ebf2a1ec
SC
116CGDataProviderRef UMACGDataProviderCreateWithCFData( CFDataRef data );
117CGDataConsumerRef UMACGDataConsumerCreateWithCFData( CFMutableDataRef data );
8cf73271
SC
118
119#endif // wxUSE_GUI
120
121#endif