]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/uma.h
specific workaround for XCODE native
[wxWidgets.git] / include / wx / mac / carbon / uma.h
CommitLineData
8cf73271
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: uma.h
3// Purpose: Universal MacOS API
4// Author: Stefan Csomor
5// Modified by:
6// Created: 03/02/99
7// RCS-ID: $Id:
8// Copyright: (c) Stefan Csomor
9// Licence: wxWindows licence
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() ;
20bool UMAHasAppearance() ;
21long UMAGetAppearanceVersion() ;
22bool UMAHasWindowManager() ;
23long UMAGetWindowManagerAttr() ;
24bool UMAHasAquaLayout() ;
25
26bool UMASystemIsInitialized() ;
27void UMASetSystemIsInitialized(bool val);
28
29// process manager
30
31long UMAGetProcessMode() ;
32bool UMAGetProcessModeDoesActivateOnFGSwitch() ;
33
34#if wxUSE_GUI
35
36// menu manager
37
38MenuRef UMANewMenu( SInt16 id , const wxString& title , wxFontEncoding encoding) ;
39void UMASetMenuTitle( MenuRef menu , const wxString& title , wxFontEncoding encoding) ;
40UInt32 UMAMenuEvent( EventRecord *inEvent ) ;
41void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex item , bool enable ) ;
42
43void UMAAppendSubMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , SInt16 submenuid ) ;
44void UMAInsertSubMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , MenuItemIndex item , SInt16 submenuid ) ;
45void UMAAppendMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , wxAcceleratorEntry *entry = NULL ) ;
46void UMAInsertMenuItem( MenuRef menu , const wxString& title , wxFontEncoding encoding , MenuItemIndex item , wxAcceleratorEntry *entry = NULL ) ;
47void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEntry *entry ) ;
48
49void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& title , wxFontEncoding encoding ) ;
50
51// quickdraw
52
53void UMAShowWatchCursor() ;
54void UMAShowArrowCursor() ;
55
8cf73271
SC
56// window manager
57
58GrafPtr UMAGetWindowPort( WindowRef inWindowRef ) ;
59void UMADisposeWindow( WindowRef inWindowRef ) ;
60void UMASetWTitle( WindowRef inWindowRef , const wxString& title , wxFontEncoding encoding) ;
61
62void UMADrawGrowIcon( WindowRef inWindowRef ) ;
63void UMAShowHide( WindowRef inWindowRef , Boolean show) ;
64
65// appearance manager
66
4f305456 67void UMADrawControl( ControlRef inControl ) ;
8cf73271 68
4f305456
SC
69void UMAEnableControl( ControlRef inControl ) ;
70void UMADisableControl( ControlRef inControl ) ;
71void UMAActivateControl( ControlRef inControl ) ;
72void UMADeactivateControl( ControlRef inControl ) ;
8cf73271 73// ControlPartCode hiliteState) ;
4f305456
SC
74void UMAShowControl (ControlRef theControl) ;
75void UMAHideControl (ControlRef theControl);
76void UMAActivateControl (ControlRef inControl);
77void UMADeactivateControl (ControlRef inControl);
78void UMASetControlTitle( ControlRef inControl , const wxString& title , wxFontEncoding encoding) ;
79
80void UMAMoveControl( ControlRef inControl , short x , short y ) ;
81void UMASizeControl( ControlRef inControl , short x , short y ) ;
8cf73271
SC
82// control hierarchy
83
4f305456
SC
84Rect * UMAGetControlBoundsInWindowCoords(ControlRef theControl, Rect *bounds) ;
85
8cf73271
SC
86// keyboard focus
87OSErr UMASetKeyboardFocus (WindowPtr inWindow,
4f305456 88 ControlRef inControl,
8cf73271
SC
89 ControlFocusPart inPart) ;
90
91// events
92
93void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) ;
4f305456 94OSErr UMAGetRootControl( WindowPtr inWindow , ControlRef *outControl ) ;
8cf73271
SC
95
96// handling control data
97bool UMAIsWindowFloating( WindowRef inWindow ) ;
98bool UMAIsWindowModal( WindowRef inWindow ) ;
99
100void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) ;
101
102OSStatus UMAGetHelpMenu(
103 MenuRef * outHelpMenu,
104 MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */
105
106// Appearance Drawing
107
108OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ;
109
110// Clipboard support
111
112OSStatus UMAPutScrap( Size size , OSType type , void *data ) ;
113
8cf73271
SC
114#define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )
115
116#endif // wxUSE_GUI
117
118#endif