]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/private.h
1. extracted MSW-specific part of wxDynamicLibrary in msw/dlmsw.cpp
[wxWidgets.git] / include / wx / mac / carbon / private.h
CommitLineData
8cf73271
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: private.h
3// Purpose: Private declarations: as this header is only included by
77ffb593 4// wxWidgets itself, it may contain identifiers which don't start
8cf73271
SC
5// with "wx".
6// Author: Stefan Csomor
7// Modified by:
8// Created: 1998-01-01
9// RCS-ID: $Id$
10// Copyright: (c) Stefan Csomor
65571936 11// Licence: wxWindows licence
8cf73271
SC
12/////////////////////////////////////////////////////////////////////////////
13
14#ifndef _WX_PRIVATE_H_
15#define _WX_PRIVATE_H_
16
17#include "wx/defs.h"
18#include "wx/app.h"
19
20#ifdef __DARWIN__
21# include <Carbon/Carbon.h>
22#else
4f305456 23# include <Debugging.h>
8cf73271
SC
24# include <Quickdraw.h>
25# include <Appearance.h>
26# include <Folders.h>
27# include <Controls.h>
28# include <ControlDefinitions.h>
29# include <LowMem.h>
30# include <Gestalt.h>
31#endif
32
33#if UNIVERSAL_INTERFACES_VERSION < 0x0340
34 #error "please update to Apple's lastest universal headers from http://developer.apple.com/sdk/"
35#endif
36
c3a404b0
SC
37#ifndef MAC_OS_X_VERSION_10_3
38 #define MAC_OS_X_VERSION_10_3 1030
39#endif
40
5185263f
DE
41#ifdef __WXMAC_CARBON__
42#include "wx/mac/corefoundation/cfstring.h"
43#endif
44
8cf73271
SC
45#if wxUSE_GUI
46
47#include "wx/window.h"
48
49class wxMacPortStateHelper
50{
51 DECLARE_NO_COPY_CLASS(wxMacPortStateHelper)
52
53public:
54 wxMacPortStateHelper( GrafPtr newport) ;
55 wxMacPortStateHelper() ;
56 ~wxMacPortStateHelper() ;
57
58 void Setup( GrafPtr newport ) ;
59 void Clear() ;
60 bool IsCleared() { return m_clip == NULL ; }
61 GrafPtr GetCurrentPort() { return m_currentPort ; }
62
63private:
64 GrafPtr m_currentPort ;
65 GrafPtr m_oldPort ;
66 RgnHandle m_clip ;
67 ThemeDrawingState m_drawingState ;
68 short m_textFont ;
69 short m_textSize ;
70 short m_textStyle ;
71 short m_textMode ;
72} ;
73
4f305456
SC
74class WXDLLEXPORT wxMacPortSaver
75{
76 DECLARE_NO_COPY_CLASS(wxMacPortSaver)
77
78public:
79 wxMacPortSaver( GrafPtr port )
80 {
81 ::GetPort( &m_port ) ;
82 ::SetPort( port ) ;
83 }
84 ~wxMacPortSaver()
85 {
86 ::SetPort( m_port ) ;
87 }
88private :
89 GrafPtr m_port ;
90} ;
91
8cf73271
SC
92class WXDLLEXPORT wxMacPortSetter
93{
94 DECLARE_NO_COPY_CLASS(wxMacPortSetter)
95
96public:
97 wxMacPortSetter( const wxDC* dc ) ;
98 ~wxMacPortSetter() ;
99private:
100 wxMacPortStateHelper m_ph ;
101 const wxDC* m_dc ;
102} ;
103
4f305456
SC
104/*
105 Clips to the visible region of a control within the current port
106 */
107
108class WXDLLEXPORT wxMacWindowClipper : public wxMacPortSaver
8cf73271
SC
109{
110 DECLARE_NO_COPY_CLASS(wxMacWindowClipper)
111
112public:
113 wxMacWindowClipper( const wxWindow* win ) ;
114 ~wxMacWindowClipper() ;
115private:
01299d56 116 GrafPtr m_newPort ;
8cf73271
SC
117 RgnHandle m_formerClip ;
118 RgnHandle m_newClip ;
119} ;
120
01299d56
SC
121class WXDLLEXPORT wxMacWindowStateSaver : public wxMacWindowClipper
122{
123 DECLARE_NO_COPY_CLASS(wxMacWindowStateSaver)
124
125public:
126 wxMacWindowStateSaver( const wxWindow* win ) ;
127 ~wxMacWindowStateSaver() ;
128private:
129 GrafPtr m_newPort ;
130 ThemeDrawingState m_themeDrawingState ;
131} ;
132
4f305456 133/*
8cf73271
SC
134class wxMacDrawingHelper
135{
136 DECLARE_NO_COPY_CLASS(wxMacDrawingHelper)
137
138public:
139 wxMacDrawingHelper( wxWindowMac * theWindow , bool clientArea = false ) ;
140 ~wxMacDrawingHelper() ;
141 bool Ok() { return m_ok ; }
142 void LocalToWindow( Rect *rect) { OffsetRect( rect , m_origin.h , m_origin.v ) ; }
143 void LocalToWindow( Point *pt ) { AddPt( m_origin , pt ) ; }
144 void LocalToWindow( RgnHandle rgn ) { OffsetRgn( rgn , m_origin.h , m_origin.v ) ; }
145 const Point& GetOrigin() { return m_origin ; }
146private:
147 Point m_origin ;
148 GrafPtr m_formerPort ;
149 GrafPtr m_currentPort ;
150 PenState m_savedPenState ;
151 bool m_ok ;
152} ;
4f305456 153*/
8cf73271
SC
154
155// app.h
156bool wxMacConvertEventToRecord( EventRef event , EventRecord *rec) ;
157
158#endif // wxUSE_GUI
159
160// filefn.h
161WXDLLEXPORT wxString wxMacFSSpec2MacFilename( const FSSpec *spec ) ;
a2b77260 162WXDLLEXPORT void wxMacFilename2FSSpec( const wxString &path , FSSpec *spec ) ;
8cf73271
SC
163
164// utils.h
165WXDLLEXPORT wxString wxMacFindFolder(short vRefNum,
166 OSType folderType,
167 Boolean createFolder);
168
4f305456
SC
169template<typename T> EventParamType wxMacGetEventParamType() { wxFAIL_MSG( wxT("Unknown Param Type") ) ; return 0 ; }
170template<> inline EventParamType wxMacGetEventParamType<RgnHandle>() { return typeQDRgnHandle ; }
171template<> inline EventParamType wxMacGetEventParamType<ControlRef>() { return typeControlRef ; }
172template<> inline EventParamType wxMacGetEventParamType<WindowRef>() { return typeWindowRef ; }
173template<> inline EventParamType wxMacGetEventParamType<MenuRef>() { return typeMenuRef ; }
174template<> inline EventParamType wxMacGetEventParamType<EventRef>() { return typeEventRef ; }
175template<> inline EventParamType wxMacGetEventParamType<Point>() { return typeQDPoint ; }
176template<> inline EventParamType wxMacGetEventParamType<Rect>() { return typeQDRectangle ; }
177template<> inline EventParamType wxMacGetEventParamType<Boolean>() { return typeBoolean ; }
178#if TARGET_API_MAC_OSX
6d4c54a7 179template<> inline EventParamType wxMacGetEventParamType<HICommand>() { return typeHICommand ; }
4f305456
SC
180template<> inline EventParamType wxMacGetEventParamType<HIPoint>() { return typeHIPoint ; }
181template<> inline EventParamType wxMacGetEventParamType<HISize>() { return typeHISize ; }
182template<> inline EventParamType wxMacGetEventParamType<HIRect>() { return typeHIRect ; }
183template<> inline EventParamType wxMacGetEventParamType<void*>() { return typeVoidPtr ; }
184#endif
185template<> inline EventParamType wxMacGetEventParamType<Collection>() { return typeCollection ; }
186template<> inline EventParamType wxMacGetEventParamType<CGContextRef>() { return typeCGContextRef ; }
187/*
885fb02f
SC
188 These are ambiguous
189 template<> EventParamType wxMacGetEventParamType<GrafPtr>() { return typeGrafPtr ; }
190 template<> EventParamType wxMacGetEventParamType<OSStatus>() { return typeOSStatus ; }
191 template<> EventParamType wxMacGetEventParamType<CFIndex>() { return typeCFIndex ; }
192 template<> EventParamType wxMacGetEventParamType<GWorldPtr>() { return typeGWorldPtr ; }
193 */
4f305456
SC
194
195class wxMacCarbonEvent
196{
197
198public :
a4848597
SC
199 wxMacCarbonEvent()
200 {
201 m_eventRef = 0 ;
202 m_release = false ;
203 }
204
6d4c54a7 205 wxMacCarbonEvent( EventRef event , bool release = false )
4f305456
SC
206 {
207 m_eventRef = event ;
6d4c54a7
SC
208 m_release = release ;
209 }
885fb02f 210
6d4c54a7
SC
211 wxMacCarbonEvent(UInt32 inClassID,UInt32 inKind,EventTime inWhen = 0 /*now*/,EventAttributes inAttributes=kEventAttributeNone)
212 {
213 m_eventRef = NULL ;
214 verify_noerr( MacCreateEvent( NULL , inClassID, inKind,inWhen,inAttributes,&m_eventRef) ) ;
215 m_release = true ;
216 }
885fb02f 217
6d4c54a7
SC
218 ~wxMacCarbonEvent()
219 {
220 if ( m_release )
221 ReleaseEvent( m_eventRef ) ;
4f305456
SC
222 }
223
a4848597
SC
224 OSStatus Create(UInt32 inClassID,UInt32 inKind,EventTime inWhen = 0 /*now*/,EventAttributes inAttributes=kEventAttributeNone)
225 {
226 verify( (m_eventRef == NULL) || m_release ) ;
227 if ( m_eventRef && m_release )
228 {
229 ReleaseEvent( m_eventRef ) ;
230 m_release = false ;
231 m_eventRef = NULL ;
232
233 }
234 OSStatus err = MacCreateEvent( NULL , inClassID, inKind,inWhen,inAttributes,&m_eventRef) ;
235 if ( err == noErr )
236 m_release = true ;
237 return err ;
238 }
885fb02f 239
4f305456
SC
240 OSStatus GetParameter( EventParamName inName, EventParamType inDesiredType, UInt32 inBufferSize, void * outData) ;
241
242 template <typename T> OSStatus GetParameter( EventParamName inName, EventParamType type , T *data )
243 {
244 return GetParameter( inName, type , sizeof( T ) , data ) ;
245 }
246 template <typename T> OSStatus GetParameter( EventParamName inName, T *data )
247 {
248 return GetParameter<T>( inName, wxMacGetEventParamType<T>() , data ) ;
249 }
250
251 template <typename T> T GetParameter( EventParamName inName )
252 {
253 T value ;
254 verify_noerr( GetParameter<T>( inName, &value ) ) ;
255 return value ;
256 }
257 template <typename T> T GetParameter( EventParamName inName, EventParamType inDesiredType )
258 {
259 T value ;
260 verify_noerr( GetParameter<T>( inName, inDesiredType , &value ) ) ;
261 return value ;
262 }
885fb02f 263
6d4c54a7
SC
264 OSStatus SetParameter( EventParamName inName, EventParamType inType, UInt32 inSize, const void * inData) ;
265 template <typename T> OSStatus SetParameter( EventParamName inName, EventParamType inDesiredType , const T *data )
4f305456 266 {
2aefa0ef
SC
267 return SetParameter( inName, inDesiredType , sizeof( T ) , data ) ;
268 }
6d4c54a7 269 template <typename T> OSStatus SetParameter( EventParamName inName, EventParamType inDesiredType , const T& data )
2aefa0ef
SC
270 {
271 return SetParameter<T>( inName, inDesiredType , &data ) ;
4f305456 272 }
6d4c54a7 273 template <typename T> OSStatus SetParameter( EventParamName inName, const T *data )
4f305456
SC
274 {
275 return SetParameter<T>( inName, wxMacGetEventParamType<T>() , data ) ;
276 }
6d4c54a7 277 template <typename T> OSStatus SetParameter( EventParamName inName, const T& data )
2aefa0ef
SC
278 {
279 return SetParameter<T>( inName, wxMacGetEventParamType<T>() , &data ) ;
280 }
86d8b744
SC
281 UInt32 GetClass()
282 {
283 return ::GetEventClass( m_eventRef ) ;
284 }
41b53169 285 UInt32 GetKind()
4f305456
SC
286 {
287 return ::GetEventKind( m_eventRef ) ;
288 }
289 EventTime GetTime()
290 {
291 return ::GetEventTime( m_eventRef ) ;
292 }
293 UInt32 GetTicks()
294 {
295 return EventTimeToTicks( GetTime() ) ;
296 }
a4848597
SC
297 OSStatus SetTime( EventTime inWhen = 0 /*now*/ )
298 {
299 return ::SetEventTime( m_eventRef , inWhen ? inWhen : GetCurrentEventTime() ) ;
300 }
301 operator EventRef () { return m_eventRef; }
885fb02f 302
a4848597 303 bool IsValid() { return m_eventRef != 0 ; }
4f305456
SC
304protected :
305 EventRef m_eventRef ;
6d4c54a7 306 bool m_release ;
4f305456
SC
307} ;
308
3feeb1e1
SC
309//
310// helper class for allocating and deallocating Universal Proc Ptrs
311//
312
313template <typename procType, typename uppType , uppType (*newUPP)(procType) , void (*disposeUPP)(uppType) > class wxMacUPP
314{
315public :
316 wxMacUPP( procType proc )
317 {
318 m_upp = NULL ;
319 m_upp = (*newUPP)( NULL ) ;
320 }
321 ~wxMacUPP()
322 {
323 if ( m_upp )
324 disposeUPP( m_upp ) ;
325 }
326 operator uppType() { return m_upp ; }
327private :
328 uppType m_upp ;
329} ;
330
331typedef wxMacUPP<NMProcPtr,NMUPP,NewNMUPP,DisposeNMUPP> wxMacNMUPP ;
332
885fb02f
SC
333#if wxUSE_GUI
334
335GWorldPtr wxMacCreateGWorld( int width , int height , int depth ) ;
336void wxMacDestroyGWorld( GWorldPtr gw ) ;
337PicHandle wxMacCreatePict( GWorldPtr gw , GWorldPtr mask = NULL ) ;
338CIconHandle wxMacCreateCIcon(GWorldPtr image , GWorldPtr mask , short dstDepth , short iconSize ) ;
339void wxMacSetColorTableEntry( CTabHandle newColors , int index , int red , int green , int blue ) ;
340CTabHandle wxMacCreateColorTable( int numColors ) ;
341void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap , int forceType = 0 ) ;
342
343#define MAC_WXCOLORREF(a) (*((RGBColor*)&(a)))
344#define MAC_WXHBITMAP(a) (GWorldPtr(a))
345#define MAC_WXHMETAFILE(a) (PicHandle(a))
346#define MAC_WXHICON(a) (CIconHandle(a))
347#define MAC_WXHCURSOR(a) (CursHandle(a))
348#define MAC_WXHRGN(a) (RgnHandle(a))
349#define MAC_WXHWND(a) (WindowPtr(a))
350#define MAC_WXRECPTR(a) ((Rect*)a)
351#define MAC_WXPOINTPTR(a) ((Point*)a)
352#define MAC_WXHMENU(a) ((MenuHandle)a)
353
354struct wxOpaqueWindowRef
355{
356 wxOpaqueWindowRef( WindowRef ref ) { m_data = ref ; }
357 operator WindowRef() { return m_data ; }
358private :
359 WindowRef m_data ;
360} ;
361
362wxWindow * wxFindControlFromMacControl(ControlRef inControl ) ;
363wxTopLevelWindowMac* wxFindWinFromMacWindow( WindowRef inWindow ) ;
364wxMenu* wxFindMenuFromMacMenu(MenuRef inMenuRef) ;
365
366extern wxWindow* g_MacLastWindow ;
367pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , EventRef event , void *data ) ;
368Rect wxMacGetBoundsForControl( wxWindow* window , const wxPoint& pos , const wxSize &size , bool adjustForOrigin = true ) ;
369
86d8b744
SC
370class wxMacControl
371{
372public :
6d4c54a7
SC
373 wxMacControl()
374 {
375 m_controlRef = NULL ;
376 }
377
86d8b744
SC
378 wxMacControl( ControlRef control )
379 {
380 m_controlRef = control ;
381 }
382 wxMacControl( WXWidget control )
383 {
384 m_controlRef = (ControlRef) control ;
385 }
0fc3bc3b
SC
386 virtual ~wxMacControl()
387 {
388 }
6d4c54a7 389
5ca0d812
SC
390 virtual void Dispose() ;
391
392 bool Ok() const { return GetControlRef() != NULL ; }
393
394 virtual ControlRef * GetControlRefAddr() { return &m_controlRef; }
395 virtual ControlRef GetControlRef() const { return m_controlRef ; }
396
397 virtual void SetReference( SInt32 data ) ;
398 /*
2837271a
SC
399 void operator= (ControlRef c) { m_controlRef = c ; }
400 operator ControlRef () { return m_controlRef; }
401 operator ControlRef * () { return &m_controlRef; }
5ca0d812 402 */
2837271a
SC
403 // accessing data and values
404
405 virtual OSStatus SetData( ControlPartCode inPartCode , ResType inTag , Size inSize , const void * inData ) ;
0fc3bc3b
SC
406 virtual OSStatus GetData( ControlPartCode inPartCode , ResType inTag , Size inBufferSize , void * inOutBuffer , Size * outActualSize ) const ;
407 virtual OSStatus GetDataSize( ControlPartCode inPartCode , ResType inTag , Size * outActualSize ) const ;
2837271a
SC
408 virtual OSStatus SendEvent( EventRef ref , OptionBits inOptions = 0 ) ;
409 virtual OSStatus SendHICommand( HICommand &command , OptionBits inOptions = 0 ) ;
410
0fc3bc3b 411 virtual OSStatus SendHICommand( UInt32 commandID , OptionBits inOptions = 0 ) ;
2837271a 412
0fc3bc3b
SC
413 virtual SInt32 GetValue() const ;
414 virtual SInt32 GetMaximum() const ;
415 virtual SInt32 GetMinimum() const ;
2837271a 416
0fc3bc3b
SC
417 virtual void SetValue( SInt32 v ) ;
418 virtual void SetMinimum( SInt32 v ) ;
419 virtual void SetMaximum( SInt32 v ) ;
2837271a 420
0fc3bc3b
SC
421 virtual void SetValueAndRange( SInt32 value , SInt32 minimum , SInt32 maximum ) ;
422 virtual void SetRange( SInt32 minimum , SInt32 maximum ) ;
2837271a 423
5ca0d812
SC
424 virtual OSStatus SetFocus( ControlFocusPart focusPart ) ;
425 virtual bool HasFocus() const ;
426 virtual bool NeedsFocusRect() const ;
427
2837271a
SC
428 // templated helpers
429
0fc3bc3b 430 Size GetDataSize( ControlPartCode inPartCode , ResType inTag ) const
86d8b744
SC
431 {
432 Size sz ;
433 verify_noerr( GetDataSize( inPartCode , inTag , &sz ) ) ;
434 return sz ;
435 }
6d4c54a7 436 template <typename T> OSStatus SetData( ControlPartCode inPartCode , ResType inTag , const T *data )
86d8b744
SC
437 {
438 return SetData( inPartCode , inTag , sizeof( T ) , data ) ;
439 }
6d4c54a7 440 template <typename T> OSStatus SetData( ControlPartCode inPartCode , ResType inTag , const T& data )
86d8b744
SC
441 {
442 return SetData( inPartCode , inTag , sizeof( T ) , &data ) ;
443 }
0fc3bc3b 444 template <typename T> OSStatus GetData( ControlPartCode inPartCode , ResType inTag , T *data ) const
86d8b744
SC
445 {
446 Size dummy ;
447 return GetData( inPartCode , inTag , sizeof( T ) , data , &dummy ) ;
448 }
0fc3bc3b 449 template <typename T> T GetData( ControlPartCode inPartCode , ResType inTag ) const
86d8b744
SC
450 {
451 T value ;
452 verify_noerr( GetData<T>( inPartCode , inTag , &value ) ) ;
453 return value ;
454 }
2837271a 455
6d4c54a7 456 // Flash the control for the specified amount of time
0fc3bc3b
SC
457 virtual void Flash( ControlPartCode part , UInt32 ticks = 8 ) ;
458 virtual void VisibilityChanged( bool shown ) ;
459 virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle ) ;
7ea087b7 460 virtual void SetBackground( const wxBrush &brush ) ;
5ca0d812
SC
461 virtual ControlPartCode HandleKey( SInt16 keyCode, SInt16 charCode, EventModifiers modifiers ) ;
462 void SetActionProc( ControlActionUPP actionProc ) ;
463 void SetViewSize( SInt32 viewSize ) ;
464 SInt32 GetViewSize() const ;
465
466 virtual bool IsVisible() const ;
467 virtual void SetVisibility( bool visible , bool redraw ) ;
468 virtual bool IsEnabled() const ;
469 virtual bool IsActive() const ;
470 virtual void Enable( bool enable ) ;
471
472 // invalidates this control and all children
473 virtual void InvalidateWithChildren() ;
474 virtual void SetDrawingEnabled( bool enable ) ;
475 virtual bool GetNeedsDisplay() const ;
476 virtual void SetNeedsDisplay( bool needsDisplay , RgnHandle where = NULL ) ;
477
478 virtual void ScrollRect( const wxRect &rect , int dx , int dy ) ;
479
480 virtual void GetRect( Rect *r ) ;
481 virtual void SetRect( Rect *r ) ;
482 virtual void GetRectInWindowCoords( Rect *r ) ;
483 virtual void GetBestRect( Rect *r ) ;
484 virtual void SetTitle( const wxString &title ) ;
485 // converts from Toplevel-Content relative to local
486 static void Convert( wxPoint *pt , wxMacControl *convert , wxMacControl *to ) ;
487
488 virtual void GetFeatures( UInt32 *features ) ;
489 virtual OSStatus GetRegion( ControlPartCode partCode , RgnHandle region ) ;
490 virtual OSStatus SetZOrder( bool above , wxMacControl* other ) ;
491 // to be moved into a databrowser subclass
492
493 virtual OSStatus SetSelectionFlags( DataBrowserSelectionFlags ) ;
494 virtual OSStatus AddListViewColumn( DataBrowserListViewColumnDesc *columnDesc,
495 DataBrowserTableViewColumnIndex position ) ;
496 virtual OSStatus AutoSizeListViewColumns() ;
497 virtual OSStatus SetHasScrollBars( bool horiz , bool vert ) ;
498 virtual OSStatus SetTableViewHiliteStyle( DataBrowserTableViewHiliteStyle hiliteStyle ) ;
499 virtual OSStatus SetListViewHeaderBtnHeight(UInt16 height) ;
500 virtual OSStatus SetCallbacks(const DataBrowserCallbacks * callbacks) ;
501 virtual OSStatus UpdateItems( DataBrowserItemID container, UInt32 numItems,
502 const DataBrowserItemID* items,
503 DataBrowserPropertyID preSortProperty,
504 DataBrowserPropertyID propertyID ) ;
505 virtual OSStatus AddItems( DataBrowserItemID container, UInt32 numItems,
506 const DataBrowserItemID* items,
507 DataBrowserPropertyID preSortProperty ) ;
508 virtual OSStatus RemoveItems( DataBrowserItemID container, UInt32 numItems,
509 const DataBrowserItemID* items,
510 DataBrowserPropertyID preSortProperty ) ;
511 virtual OSStatus RevealItem( DataBrowserItemID item,
512 DataBrowserPropertyID propertyID,
513 DataBrowserRevealOptions options ) ;
fe3dc505 514 virtual OSStatus GetSelectionAnchor( DataBrowserItemID * first, DataBrowserItemID * last ) ;
5ca0d812
SC
515 virtual bool IsItemSelected( DataBrowserItemID item ) ;
516 virtual OSStatus SetSelectedItems(UInt32 numItems,
517 const DataBrowserItemID * items,
518 DataBrowserSetOption operation ) ;
519
520 // to be moved into a tab control class
521
522 virtual OSStatus SetTabEnabled( SInt16 tabNo , bool enable ) ;
86d8b744 523protected :
0fc3bc3b
SC
524 ControlRef m_controlRef ;
525 wxFont m_font ;
526 long m_windowStyle ;
86d8b744
SC
527} ;
528
8cf73271
SC
529#endif // wxUSE_GUI
530
531//---------------------------------------------------------------------------
532// wxMac string conversions
533//---------------------------------------------------------------------------
534
535void wxMacSetupConverters() ;
536void wxMacCleanupConverters() ;
537
538void wxMacStringToPascal( const wxString&from , StringPtr to ) ;
539wxString wxMacMakeStringFromPascal( ConstStringPtr from ) ;
540
1a42f89c
SC
541// toplevel.cpp
542
543ControlRef wxMacFindControlUnderMouse( Point location , WindowRef window , ControlPartCode *outPart ) ;
8cf73271 544
a2b77260
SC
545// filefn.cpp
546
547wxString wxMacFSRefToPath( const FSRef *fsRef , CFStringRef additionalPathComponent = NULL ) ;
548OSStatus wxMacPathToFSRef( const wxString&path , FSRef *fsRef ) ;
549wxString wxMacHFSUniStrToString( ConstHFSUniStr255Param uniname ) ;
aa0cc8a1 550
8cf73271
SC
551#endif
552 // _WX_PRIVATE_H_