]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/uma.h
improved HTML tables layout code (patch 911377)
[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 16
e128397f 17void UMAInitToolbox( UInt16 inMoreMastersCalls, bool isEmbedded) ;
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
af3aefcf
SC
38MenuRef UMANewMenu( SInt16 id , const wxString& title , wxFontEncoding encoding) ;
39void UMASetMenuTitle( MenuRef menu , const wxString& title , wxFontEncoding encoding) ;
e40298d5
JS
40UInt32 UMAMenuEvent( EventRecord *inEvent ) ;
41void UMAEnableMenuItem( MenuRef inMenu , MenuItemIndex item , bool enable ) ;
f3fb0a07 42
af3aefcf
SC
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 ) ;
e40298d5 47void UMASetMenuItemShortcut( MenuRef menu , MenuItemIndex item , wxAcceleratorEntry *entry ) ;
f3fb0a07 48
af3aefcf 49void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& title , wxFontEncoding encoding ) ;
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 ) ;
af3aefcf 65void UMASetWTitle( WindowRef inWindowRef , const wxString& title , wxFontEncoding encoding) ;
cfcc3671 66
e40298d5
JS
67void UMADrawGrowIcon( WindowRef inWindowRef ) ;
68void UMAShowHide( WindowRef inWindowRef , Boolean show) ;
cfcc3671
UJ
69
70// appearance manager
71
e40298d5 72void UMADrawControl( ControlHandle inControl ) ;
cfcc3671 73
e40298d5
JS
74void UMAEnableControl( ControlHandle inControl ) ;
75void UMADisableControl( ControlHandle inControl ) ;
76void UMAActivateControl( ControlHandle inControl ) ;
77void UMADeactivateControl( ControlHandle inControl ) ;
78// ControlPartCode hiliteState) ;
79void UMAShowControl (ControlHandle theControl) ;
80void UMAHideControl (ControlHandle theControl);
81void UMAActivateControl (ControlHandle inControl);
82void UMADeactivateControl (ControlHandle inControl);
af3aefcf 83void UMASetControlTitle( ControlHandle inControl , const wxString& title , wxFontEncoding encoding) ;
cfcc3671 84
cfcc3671
UJ
85void UMAMoveControl( ControlHandle inControl , short x , short y ) ;
86void UMASizeControl( ControlHandle inControl , short x , short y ) ;
87// control hierarchy
88
cfcc3671 89// keyboard focus
e40298d5
JS
90OSErr UMASetKeyboardFocus (WindowPtr inWindow,
91 ControlHandle inControl,
92 ControlFocusPart inPart) ;
cfcc3671 93
cfcc3671
UJ
94// events
95
cfcc3671
UJ
96void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) ;
97OSErr UMAGetRootControl( WindowPtr inWindow , ControlHandle *outControl ) ;
98
99// handling control data
e40298d5
JS
100bool UMAIsWindowFloating( WindowRef inWindow ) ;
101bool UMAIsWindowModal( WindowRef inWindow ) ;
67e3d9d3 102
cfcc3671
UJ
103void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) ;
104
56a38bbe
SC
105OSStatus UMAGetHelpMenu(
106 MenuRef * outHelpMenu,
107 MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */
108
5273bf2f
SC
109// Appearance Drawing
110
111OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ;
112
1c522100
SC
113// Clipboard support
114
115OSStatus UMAPutScrap( Size size , OSType type , void *data ) ;
116
5273bf2f
SC
117// accessor helpers
118
05adb9d2 119#if !TARGET_CARBON
5273bf2f 120#define ClearCurrentScrap() ZeroScrap() ;
35f6182b 121#define GetApplicationScript() smSystemScript
5273bf2f
SC
122#else
123
124// calls not in carbon
125
72055702 126#endif
2dbc444a
RD
127#define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )
128
129#endif // wxUSE_GUI
cfcc3671 130
03e11df5 131#endif