]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/mac/uma.h
define wxCHECK_W32API_VERSION for OpenWatcom and DigitalMars
[wxWidgets.git] / include / wx / mac / uma.h
... / ...
CommitLineData
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) ;
18void UMACleanupToolbox() ;
19long UMAGetSystemVersion() ;
20bool UMAHasAppearance() ;
21long UMAGetAppearanceVersion() ;
22bool UMAHasWindowManager() ;
23long UMAGetWindowManagerAttr() ;
24bool UMAHasAquaLayout() ;
25bool UMASystemIsInitialized() ;
26
27// process manager
28
29long UMAGetProcessMode() ;
30bool UMAGetProcessModeDoesActivateOnFGSwitch() ;
31
32// menu manager
33
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 ) ;
38
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 ) ;
44
45void UMASetMenuItemText( MenuRef menu, MenuItemIndex item, const wxString& title ) ;
46
47// quickdraw
48
49void UMAShowWatchCursor() ;
50void UMAShowArrowCursor() ;
51
52#if !TARGET_CARBON
53OSStatus UMAPrOpen() ;
54OSStatus UMAPrClose() ;
55#endif
56
57// window manager
58
59GrafPtr UMAGetWindowPort( WindowRef inWindowRef ) ;
60void UMADisposeWindow( WindowRef inWindowRef ) ;
61void UMASetWTitle( WindowRef inWindowRef , const wxString& title ) ;
62void UMAGetWTitleC( WindowRef inWindowRef , char *title ) ;
63
64void UMADrawGrowIcon( WindowRef inWindowRef ) ;
65void UMAShowHide( WindowRef inWindowRef , Boolean show) ;
66
67// appearance manager
68
69void UMADrawControl( ControlHandle inControl ) ;
70
71void UMAEnableControl( ControlHandle inControl ) ;
72void UMADisableControl( ControlHandle inControl ) ;
73void UMAActivateControl( ControlHandle inControl ) ;
74void UMADeactivateControl( ControlHandle inControl ) ;
75// ControlPartCode hiliteState) ;
76void UMAShowControl (ControlHandle theControl) ;
77void UMAHideControl (ControlHandle theControl);
78void UMAActivateControl (ControlHandle inControl);
79void UMADeactivateControl (ControlHandle inControl);
80void UMASetControlTitle( ControlHandle inControl , const wxString& title ) ;
81
82void UMAMoveControl( ControlHandle inControl , short x , short y ) ;
83void UMASizeControl( ControlHandle inControl , short x , short y ) ;
84// control hierarchy
85
86// keyboard focus
87OSErr UMASetKeyboardFocus (WindowPtr inWindow,
88 ControlHandle inControl,
89 ControlFocusPart inPart) ;
90
91// events
92
93void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) ;
94OSErr UMAGetRootControl( WindowPtr inWindow , ControlHandle *outControl ) ;
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
114// accessor helpers
115
116#if !TARGET_CARBON
117#define ClearCurrentScrap() ZeroScrap() ;
118#define GetApplicationScript() smSystemScript
119#else
120
121// calls not in carbon
122
123#endif
124#define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )
125
126#endif