]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/uma.h
Fix wxMotif build.
[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
7// RCS-ID: $Id:
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() ;
0e5a4d20 25bool UMASystemIsInitialized() ;
cfcc3671
UJ
26
27// process manager
28
29long UMAGetProcessMode() ;
30bool UMAGetProcessModeDoesActivateOnFGSwitch() ;
31
32// menu manager
33
e40298d5
JS
34MenuRef UMANewMenu( SInt16 id , const wxString& title ) ;
35void UMASetMenuTitle( MenuRef menu , const wxString& title ) ;
36UInt32 UMAMenuEvent( EventRecord *inEvent ) ;
37void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex item , bool enable ) ;
f3fb0a07 38
e40298d5
JS
39void UMAAppendSubMenuItem( MenuRef menu , const wxString& title , SInt16 submenuid ) ;
40void UMAInsertSubMenuItem( MenuRef menu , const wxString& title , MenuItemIndex item , SInt16 submenuid ) ;
41void UMAAppendMenuItem( MenuRef menu , const wxString& title , wxAcceleratorEntry *entry = NULL ) ;
42void UMAInsertMenuItem( MenuRef menu , const wxString& title , MenuItemIndex item , wxAcceleratorEntry *entry = NULL ) ;
43void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEntry *entry ) ;
f3fb0a07 44
e40298d5 45void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& title ) ;
05adb9d2 46
cfcc3671
UJ
47// quickdraw
48
e40298d5
JS
49void UMAShowWatchCursor() ;
50void UMAShowArrowCursor() ;
cfcc3671 51
e40298d5
JS
52OSStatus UMAPrOpen(void *macPrintSession) ;
53OSStatus UMAPrClose(void *macPrintSession) ;
05adb9d2 54
cfcc3671
UJ
55// window manager
56
e40298d5
JS
57GrafPtr UMAGetWindowPort( WindowRef inWindowRef ) ;
58void UMADisposeWindow( WindowRef inWindowRef ) ;
c4e41ce3 59void UMASetWTitle( WindowRef inWindowRef , const wxString& title ) ;
e40298d5 60void UMAGetWTitleC( WindowRef inWindowRef , char *title ) ;
cfcc3671 61
e40298d5
JS
62void UMADrawGrowIcon( WindowRef inWindowRef ) ;
63void UMAShowHide( WindowRef inWindowRef , Boolean show) ;
cfcc3671
UJ
64
65// appearance manager
66
e40298d5 67void UMADrawControl( ControlHandle inControl ) ;
cfcc3671 68
e40298d5
JS
69void UMAEnableControl( ControlHandle inControl ) ;
70void UMADisableControl( ControlHandle inControl ) ;
71void UMAActivateControl( ControlHandle inControl ) ;
72void UMADeactivateControl( ControlHandle inControl ) ;
73// ControlPartCode hiliteState) ;
74void UMAShowControl (ControlHandle theControl) ;
75void UMAHideControl (ControlHandle theControl);
76void UMAActivateControl (ControlHandle inControl);
77void UMADeactivateControl (ControlHandle inControl);
c4e41ce3 78void UMASetControlTitle( ControlHandle inControl , const wxString& title ) ;
cfcc3671 79
cfcc3671
UJ
80void UMAMoveControl( ControlHandle inControl , short x , short y ) ;
81void UMASizeControl( ControlHandle inControl , short x , short y ) ;
82// control hierarchy
83
cfcc3671 84// keyboard focus
e40298d5
JS
85OSErr UMASetKeyboardFocus (WindowPtr inWindow,
86 ControlHandle inControl,
87 ControlFocusPart inPart) ;
cfcc3671 88
cfcc3671
UJ
89// events
90
cfcc3671
UJ
91void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) ;
92OSErr UMAGetRootControl( WindowPtr inWindow , ControlHandle *outControl ) ;
93
94// handling control data
e40298d5
JS
95bool UMAIsWindowFloating( WindowRef inWindow ) ;
96bool UMAIsWindowModal( WindowRef inWindow ) ;
67e3d9d3 97
cfcc3671
UJ
98void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) ;
99
56a38bbe
SC
100OSStatus UMAGetHelpMenu(
101 MenuRef * outHelpMenu,
102 MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */
103
5273bf2f
SC
104// Appearance Drawing
105
106OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ;
107
1c522100
SC
108// Clipboard support
109
110OSStatus UMAPutScrap( Size size , OSType type , void *data ) ;
111
5273bf2f
SC
112// accessor helpers
113
05adb9d2 114#if !TARGET_CARBON
5273bf2f 115#define ClearCurrentScrap() ZeroScrap() ;
35f6182b 116#define GetApplicationScript() smSystemScript
5273bf2f
SC
117#else
118
119// calls not in carbon
120
72055702 121#endif
72055702 122#define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )
cfcc3671 123
03e11df5 124#endif