]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/mac/uma.h
Upported combobox changes and another fix.
[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
52OSStatus UMAPrOpen(void *macPrintSession) ;
53OSStatus UMAPrClose(void *macPrintSession) ;
54
55// window manager
56
57GrafPtr UMAGetWindowPort( WindowRef inWindowRef ) ;
58void UMADisposeWindow( WindowRef inWindowRef ) ;
59void UMASetWTitleC( WindowRef inWindowRef , const char *title ) ;
60void UMAGetWTitleC( WindowRef inWindowRef , char *title ) ;
61
62void UMADrawGrowIcon( WindowRef inWindowRef ) ;
63void UMAShowHide( WindowRef inWindowRef , Boolean show) ;
64
65// appearance manager
66
67void UMADrawControl( ControlHandle inControl ) ;
68
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);
78
79void UMAMoveControl( ControlHandle inControl , short x , short y ) ;
80void UMASizeControl( ControlHandle inControl , short x , short y ) ;
81// control hierarchy
82
83// keyboard focus
84OSErr UMASetKeyboardFocus (WindowPtr inWindow,
85 ControlHandle inControl,
86 ControlFocusPart inPart) ;
87
88// events
89
90void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) ;
91OSErr UMAGetRootControl( WindowPtr inWindow , ControlHandle *outControl ) ;
92
93// handling control data
94bool UMAIsWindowFloating( WindowRef inWindow ) ;
95bool UMAIsWindowModal( WindowRef inWindow ) ;
96
97void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) ;
98
99OSStatus UMAGetHelpMenu(
100 MenuRef * outHelpMenu,
101 MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */
102
103// Appearance Drawing
104
105OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ;
106
107// Clipboard support
108
109OSStatus UMAPutScrap( Size size , OSType type , void *data ) ;
110
111// accessor helpers
112
113#if !TARGET_CARBON
114#define ClearCurrentScrap() ZeroScrap() ;
115#define GetApplicationScript() smSystemScript
116#else
117
118// calls not in carbon
119
120#endif
121#define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )
122
123#endif