]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/uma.h
Open Watcom doesn't like typename, use class (patch 826812)
[wxWidgets.git] / include / wx / mac / uma.h
CommitLineData
cfcc3671
UJ
1/////////////////////////////////////////////////////////////////////////////
2// Name: uma.h
3// Purpose: Universal MacOS API
4// Author: Stefan Csomor
5// Modified by:
6// Created: 03/02/99
2dbc444a 7// RCS-ID: $Id:
cfcc3671 8// Copyright: (c) Stefan Csomor
e40298d5 9// Licence: wxWindows licence
cfcc3671
UJ
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef H_UMA
13#define H_UMA
14
5273bf2f 15#include "wx/mac/private.h"
cfcc3671
UJ
16
17void UMAInitToolbox( UInt16 inMoreMastersCalls) ;
5b781a67 18void UMACleanupToolbox() ;
2b5f62a0 19long UMAGetSystemVersion() ;
cfcc3671
UJ
20bool UMAHasAppearance() ;
21long UMAGetAppearanceVersion() ;
72055702
SC
22bool UMAHasWindowManager() ;
23long UMAGetWindowManagerAttr() ;
78c0e83b 24bool UMAHasAquaLayout() ;
2dbc444a 25
0e5a4d20 26bool UMASystemIsInitialized() ;
2dbc444a 27void UMASetSystemIsInitialized(bool val);
cfcc3671
UJ
28
29// process manager
30
31long UMAGetProcessMode() ;
32bool UMAGetProcessModeDoesActivateOnFGSwitch() ;
33
2dbc444a
RD
34#if wxUSE_GUI
35
cfcc3671
UJ
36// menu manager
37
e40298d5
JS
38MenuRef UMANewMenu( SInt16 id , const wxString& title ) ;
39void UMASetMenuTitle( MenuRef menu , const wxString& title ) ;
40UInt32 UMAMenuEvent( EventRecord *inEvent ) ;
41void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex item , bool enable ) ;
f3fb0a07 42
e40298d5
JS
43void UMAAppendSubMenuItem( MenuRef menu , const wxString& title , SInt16 submenuid ) ;
44void UMAInsertSubMenuItem( MenuRef menu , const wxString& title , MenuItemIndex item , SInt16 submenuid ) ;
45void UMAAppendMenuItem( MenuRef menu , const wxString& title , wxAcceleratorEntry *entry = NULL ) ;
46void UMAInsertMenuItem( MenuRef menu , const wxString& title , MenuItemIndex item , wxAcceleratorEntry *entry = NULL ) ;
47void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEntry *entry ) ;
f3fb0a07 48
e40298d5 49void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& title ) ;
05adb9d2 50
cfcc3671
UJ
51// quickdraw
52
e40298d5
JS
53void UMAShowWatchCursor() ;
54void UMAShowArrowCursor() ;
cfcc3671 55
20cd7383
SC
56#if !TARGET_CARBON
57OSStatus UMAPrOpen() ;
58OSStatus UMAPrClose() ;
59#endif
05adb9d2 60
cfcc3671
UJ
61// window manager
62
e40298d5
JS
63GrafPtr UMAGetWindowPort( WindowRef inWindowRef ) ;
64void UMADisposeWindow( WindowRef inWindowRef ) ;
c4e41ce3 65void UMASetWTitle( WindowRef inWindowRef , const wxString& title ) ;
e40298d5 66void UMAGetWTitleC( WindowRef inWindowRef , char *title ) ;
cfcc3671 67
e40298d5
JS
68void UMADrawGrowIcon( WindowRef inWindowRef ) ;
69void UMAShowHide( WindowRef inWindowRef , Boolean show) ;
cfcc3671
UJ
70
71// appearance manager
72
e40298d5 73void UMADrawControl( ControlHandle inControl ) ;
cfcc3671 74
e40298d5
JS
75void UMAEnableControl( ControlHandle inControl ) ;
76void UMADisableControl( ControlHandle inControl ) ;
77void UMAActivateControl( ControlHandle inControl ) ;
78void UMADeactivateControl( ControlHandle inControl ) ;
79// ControlPartCode hiliteState) ;
80void UMAShowControl (ControlHandle theControl) ;
81void UMAHideControl (ControlHandle theControl);
82void UMAActivateControl (ControlHandle inControl);
83void UMADeactivateControl (ControlHandle inControl);
c4e41ce3 84void UMASetControlTitle( ControlHandle inControl , const wxString& title ) ;
cfcc3671 85
cfcc3671
UJ
86void UMAMoveControl( ControlHandle inControl , short x , short y ) ;
87void UMASizeControl( ControlHandle inControl , short x , short y ) ;
88// control hierarchy
89
cfcc3671 90// keyboard focus
e40298d5
JS
91OSErr UMASetKeyboardFocus (WindowPtr inWindow,
92 ControlHandle inControl,
93 ControlFocusPart inPart) ;
cfcc3671 94
cfcc3671
UJ
95// events
96
cfcc3671
UJ
97void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) ;
98OSErr UMAGetRootControl( WindowPtr inWindow , ControlHandle *outControl ) ;
99
100// handling control data
e40298d5
JS
101bool UMAIsWindowFloating( WindowRef inWindow ) ;
102bool UMAIsWindowModal( WindowRef inWindow ) ;
67e3d9d3 103
cfcc3671
UJ
104void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) ;
105
56a38bbe
SC
106OSStatus UMAGetHelpMenu(
107 MenuRef * outHelpMenu,
108 MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */
109
5273bf2f
SC
110// Appearance Drawing
111
112OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ;
113
1c522100
SC
114// Clipboard support
115
116OSStatus UMAPutScrap( Size size , OSType type , void *data ) ;
117
5273bf2f
SC
118// accessor helpers
119
05adb9d2 120#if !TARGET_CARBON
5273bf2f 121#define ClearCurrentScrap() ZeroScrap() ;
35f6182b 122#define GetApplicationScript() smSystemScript
5273bf2f
SC
123#else
124
125// calls not in carbon
126
72055702 127#endif
2dbc444a
RD
128#define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )
129
130#endif // wxUSE_GUI
cfcc3671 131
03e11df5 132#endif