]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/uma.h
experimental --inplace flag implementation
[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
292d1a2f 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
05adb9d2
SC
34void UMASetMenuTitle( MenuRef menu , StringPtr title ) ;
35UInt32 UMAMenuEvent( EventRecord *inEvent ) ;
cfcc3671
UJ
36void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex item ) ;
37void UMADisableMenuItem( MenuRef inMenu , MenuItemIndex item ) ;
05adb9d2
SC
38void UMAAppendSubMenuItem( MenuRef menu , StringPtr label , SInt16 submenuid ) ;
39void UMAInsertSubMenuItem( MenuRef menu , StringPtr label , MenuItemIndex item , SInt16 submenuid ) ;
40void UMAAppendMenuItem( MenuRef menu , StringPtr label , SInt16 key= 0, UInt8 modifiers = 0 ) ;
41void UMAInsertMenuItem( MenuRef menu , StringPtr label , MenuItemIndex item , SInt16 key = 0 , UInt8 modifiers = 0 ) ;
05adb9d2 42
cfcc3671
UJ
43// quickdraw
44
45void UMAShowWatchCursor() ;
46void UMAShowArrowCursor() ;
47
a3d3d3bf
GD
48OSStatus UMAPrOpen(void *macPrintSession) ;
49OSStatus UMAPrClose(void *macPrintSession) ;
05adb9d2 50
cfcc3671
UJ
51// window manager
52
53GrafPtr UMAGetWindowPort( WindowRef inWindowRef ) ;
54void UMADisposeWindow( WindowRef inWindowRef ) ;
55void UMASetWTitleC( WindowRef inWindowRef , const char *title ) ;
56void UMAGetWTitleC( WindowRef inWindowRef , char *title ) ;
57
58void UMADrawGrowIcon( WindowRef inWindowRef ) ;
cfcc3671 59void UMAShowHide( WindowRef inWindowRef , Boolean show) ;
cfcc3671
UJ
60
61// appearance manager
62
63void UMADrawControl( ControlHandle inControl ) ;
64
fdaf613a
SC
65void UMAEnableControl( ControlHandle inControl ) ;
66void UMADisableControl( ControlHandle inControl ) ;
cfcc3671
UJ
67void UMAActivateControl( ControlHandle inControl ) ;
68void UMADeactivateControl( ControlHandle inControl ) ;
72055702 69// ControlPartCode hiliteState) ;
cfcc3671 70void UMAShowControl (ControlHandle theControl) ;
efaf6efc 71void UMAHideControl (ControlHandle theControl);
cfcc3671
UJ
72void UMAActivateControl (ControlHandle inControl);
73void UMADeactivateControl (ControlHandle inControl);
74
cfcc3671
UJ
75void UMAMoveControl( ControlHandle inControl , short x , short y ) ;
76void UMASizeControl( ControlHandle inControl , short x , short y ) ;
77// control hierarchy
78
cfcc3671
UJ
79// keyboard focus
80OSErr UMASetKeyboardFocus (WindowPtr inWindow,
81 ControlHandle inControl,
82 ControlFocusPart inPart) ;
83
cfcc3671
UJ
84// events
85
cfcc3671
UJ
86void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) ;
87OSErr UMAGetRootControl( WindowPtr inWindow , ControlHandle *outControl ) ;
88
89// handling control data
cfcc3671
UJ
90bool UMAIsWindowFloating( WindowRef inWindow ) ;
91bool UMAIsWindowModal( WindowRef inWindow ) ;
67e3d9d3 92
cfcc3671
UJ
93void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) ;
94
56a38bbe
SC
95OSStatus UMAGetHelpMenu(
96 MenuRef * outHelpMenu,
97 MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */
98
5273bf2f
SC
99// Appearance Drawing
100
101OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ;
102
103// accessor helpers
104
05adb9d2 105#if !TARGET_CARBON
5273bf2f 106#define ClearCurrentScrap() ZeroScrap() ;
35f6182b 107#define GetApplicationScript() smSystemScript
5273bf2f
SC
108#else
109
110// calls not in carbon
111
72055702 112#endif
72055702 113#define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )
cfcc3671 114
03e11df5 115#endif