focus handling streamlined
[wxWidgets.git] / include / wx / osx / core / private.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/core/private.h
3 // Purpose: Private declarations: as this header is only included by
4 // wxWidgets itself, it may contain identifiers which don't start
5 // with "wx".
6 // Author: Stefan Csomor
7 // Modified by:
8 // Created: 1998-01-01
9 // RCS-ID: $Id: private.h 53819 2008-05-29 14:11:45Z SC $
10 // Copyright: (c) Stefan Csomor
11 // Licence: wxWindows licence
12 /////////////////////////////////////////////////////////////////////////////
13
14 #ifndef _WX_PRIVATE_CORE_H_
15 #define _WX_PRIVATE_CORE_H_
16
17 #include "wx/defs.h"
18
19 #include <CoreFoundation/CoreFoundation.h>
20
21 #include "wx/osx/core/cfstring.h"
22 #include "wx/osx/core/cfdataref.h"
23
24 #if wxOSX_USE_COCOA_OR_CARBON
25
26 WXDLLIMPEXP_BASE long UMAGetSystemVersion() ;
27
28 void WXDLLIMPEXP_CORE wxMacStringToPascal( const wxString&from , unsigned char * to );
29 wxString WXDLLIMPEXP_CORE wxMacMakeStringFromPascal( const unsigned char * from );
30
31 #endif
32
33 #if wxUSE_GUI
34
35 WXDLLIMPEXP_CORE wxWindowMac * wxFindWindowFromWXWidget(WXWidget inControl );
36
37 #if wxOSX_USE_IPHONE
38 #include <CoreGraphics/CoreGraphics.h>
39 #else
40 #include <ApplicationServices/ApplicationServices.h>
41 #endif
42
43 #include "wx/bitmap.h"
44 #include "wx/window.h"
45
46 class WXDLLIMPEXP_CORE wxMacCGContextStateSaver
47 {
48 wxDECLARE_NO_COPY_CLASS(wxMacCGContextStateSaver);
49
50 public:
51 wxMacCGContextStateSaver( CGContextRef cg )
52 {
53 m_cg = cg;
54 CGContextSaveGState( cg );
55 }
56 ~wxMacCGContextStateSaver()
57 {
58 CGContextRestoreGState( m_cg );
59 }
60 private:
61 CGContextRef m_cg;
62 };
63
64 class WXDLLIMPEXP_CORE wxDeferredObjectDeleter : public wxObject
65 {
66 public :
67 wxDeferredObjectDeleter( wxObject* obj ) : m_obj(obj)
68 {
69 }
70 virtual ~wxDeferredObjectDeleter()
71 {
72 delete m_obj;
73 }
74 protected :
75 wxObject* m_obj ;
76 } ;
77
78 // Quartz
79
80 WXDLLIMPEXP_CORE CGImageRef wxMacCreateCGImageFromBitmap( const wxBitmap& bitmap );
81
82 WXDLLIMPEXP_CORE CGDataProviderRef wxMacCGDataProviderCreateWithCFData( CFDataRef data );
83 WXDLLIMPEXP_CORE CGDataConsumerRef wxMacCGDataConsumerCreateWithCFData( CFMutableDataRef data );
84 WXDLLIMPEXP_CORE CGDataProviderRef wxMacCGDataProviderCreateWithMemoryBuffer( const wxMemoryBuffer& buf );
85
86 CGColorSpaceRef WXDLLIMPEXP_CORE wxMacGetGenericRGBColorSpace(void);
87
88 class wxWindowMac;
89 // to
90 extern wxWindow* g_MacLastWindow;
91 class wxNonOwnedWindow;
92
93 // temporary typedef so that no additional casts are necessary within carbon code at the moment
94
95 class wxMacControl;
96 class wxWidgetImpl;
97 class wxNotebook;
98 class wxTextCtrl;
99
100 #if wxOSX_USE_CARBON
101 typedef wxMacControl wxWidgetImplType;
102 #else
103 typedef wxWidgetImpl wxWidgetImplType;
104 #endif
105
106 class wxMenuItemImpl : public wxObject
107 {
108 public :
109 wxMenuItemImpl( wxMenuItem* peer ) : m_peer(peer)
110 {
111 }
112
113 virtual ~wxMenuItemImpl() ;
114 virtual void SetBitmap( const wxBitmap& bitmap ) = 0;
115 virtual void Enable( bool enable ) = 0;
116 virtual void Check( bool check ) = 0;
117 virtual void SetLabel( const wxString& text, wxAcceleratorEntry *entry ) = 0;
118 virtual void Hide( bool hide = true ) = 0;
119
120 virtual void * GetHMenuItem() = 0;
121
122 wxMenuItem* GetWXPeer() { return m_peer ; }
123
124 static wxMenuItemImpl* Create( wxMenuItem* peer, wxMenu *pParentMenu,
125 int id,
126 const wxString& text,
127 wxAcceleratorEntry *entry,
128 const wxString& strHelp,
129 wxItemKind kind,
130 wxMenu *pSubMenu );
131
132 protected :
133 wxMenuItem* m_peer;
134
135 DECLARE_ABSTRACT_CLASS(wxMenuItemImpl)
136 } ;
137
138 class wxMenuImpl : public wxObject
139 {
140 public :
141 wxMenuImpl( wxMenu* peer ) : m_peer(peer)
142 {
143 }
144
145 virtual ~wxMenuImpl() ;
146 virtual void InsertOrAppend(wxMenuItem *pItem, size_t pos) = 0;
147 virtual void Remove( wxMenuItem *pItem ) = 0;
148
149 virtual void MakeRoot() = 0;
150
151 virtual void SetTitle( const wxString& text ) = 0;
152
153 virtual WXHMENU GetHMenu() = 0;
154
155 wxMenu* GetWXPeer() { return m_peer ; }
156
157 virtual void PopUp( wxWindow *win, int x, int y ) = 0;
158
159 static wxMenuImpl* Create( wxMenu* peer, const wxString& title );
160 static wxMenuImpl* CreateRootMenu( wxMenu* peer );
161 protected :
162 wxMenu* m_peer;
163
164 DECLARE_ABSTRACT_CLASS(wxMenuItemImpl)
165 } ;
166
167
168
169 class WXDLLIMPEXP_CORE wxWidgetImpl : public wxObject
170 {
171 public :
172 wxWidgetImpl( wxWindowMac* peer , bool isRootControl = false );
173 wxWidgetImpl();
174 virtual ~wxWidgetImpl();
175
176 void Init();
177
178 bool IsRootControl() const { return m_isRootControl; }
179
180 wxWindowMac* GetWXPeer() const { return m_wxPeer; }
181
182 bool IsOk() const { return GetWXWidget() != NULL; }
183
184 // not only the control itself, but also all its parents must be visible
185 // in order for this function to return true
186 virtual bool IsVisible() const = 0;
187 // set the visibility of this widget (maybe latent)
188 virtual void SetVisibility( bool visible ) = 0;
189
190 virtual void Raise() = 0;
191
192 virtual void Lower() = 0;
193
194 virtual void ScrollRect( const wxRect *rect, int dx, int dy ) = 0;
195
196 virtual WXWidget GetWXWidget() const = 0;
197
198 virtual void SetBackgroundColour( const wxColour& col ) = 0;
199
200 // all coordinates in native parent widget relative coordinates
201 virtual void GetContentArea( int &left , int &top , int &width , int &height ) const = 0;
202 virtual void Move(int x, int y, int width, int height) = 0;
203 virtual void GetPosition( int &x, int &y ) const = 0;
204 virtual void GetSize( int &width, int &height ) const = 0;
205 virtual void SetControlSize( wxWindowVariant variant ) = 0;
206
207 virtual void SetNeedsDisplay( const wxRect* where = NULL ) = 0;
208 virtual bool GetNeedsDisplay() const = 0;
209
210 virtual bool NeedsFocusRect() const;
211 virtual void SetNeedsFocusRect( bool needs );
212
213 virtual bool NeedsFrame() const;
214 virtual void SetNeedsFrame( bool needs );
215
216 virtual bool CanFocus() const = 0;
217 // return true if successful
218 virtual bool SetFocus() = 0;
219 virtual bool HasFocus() const = 0;
220
221 virtual void RemoveFromParent() = 0;
222 virtual void Embed( wxWidgetImpl *parent ) = 0;
223
224 virtual void SetDefaultButton( bool isDefault ) = 0;
225 virtual void PerformClick() = 0;
226 virtual void SetLabel( const wxString& title, wxFontEncoding encoding ) = 0;
227
228 virtual void SetCursor( const wxCursor & cursor ) = 0;
229 virtual void CaptureMouse() = 0;
230 virtual void ReleaseMouse() = 0;
231
232 virtual wxInt32 GetValue() const = 0;
233 virtual void SetValue( wxInt32 v ) = 0;
234 virtual void SetBitmap( const wxBitmap& bitmap ) = 0;
235 virtual void SetupTabs( const wxNotebook &notebook ) =0;
236 virtual void GetBestRect( wxRect *r ) const = 0;
237 virtual bool IsEnabled() const = 0;
238 virtual void Enable( bool enable ) = 0;
239 virtual void SetMinimum( wxInt32 v ) = 0;
240 virtual void SetMaximum( wxInt32 v ) = 0;
241 virtual wxInt32 GetMinimum() const = 0;
242 virtual wxInt32 GetMaximum() const = 0;
243 virtual void PulseGauge() = 0;
244 virtual void SetScrollThumb( wxInt32 value, wxInt32 thumbSize ) = 0;
245
246 virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true ) = 0;
247
248 // is the clicked event sent AFTER the state already changed, so no additional
249 // state changing logic is required from the outside
250 virtual bool ButtonClickDidStateChange() = 0;
251
252 virtual void InstallEventHandler( WXWidget control = NULL ) = 0;
253
254 // static methods for associating native controls and their implementations
255
256 static wxWidgetImpl*
257 FindFromWXWidget(WXWidget control);
258
259 static void RemoveAssociations( wxWidgetImpl* impl);
260
261 static void Associate( WXWidget control, wxWidgetImpl *impl );
262
263 static WXWidget FindFocus();
264
265 // static creation methods, must be implemented by all toolkits
266
267 static wxWidgetImplType* CreateUserPane( wxWindowMac* wxpeer,
268 wxWindowMac* parent,
269 wxWindowID id,
270 const wxPoint& pos,
271 const wxSize& size,
272 long style,
273 long extraStyle) ;
274 static wxWidgetImplType* CreateContentView( wxNonOwnedWindow* now ) ;
275
276 static wxWidgetImplType* CreateButton( wxWindowMac* wxpeer,
277 wxWindowMac* parent,
278 wxWindowID id,
279 const wxString& label,
280 const wxPoint& pos,
281 const wxSize& size,
282 long style,
283 long extraStyle) ;
284
285 static wxWidgetImplType* CreateDisclosureTriangle( wxWindowMac* wxpeer,
286 wxWindowMac* parent,
287 wxWindowID id,
288 const wxString& label,
289 const wxPoint& pos,
290 const wxSize& size,
291 long style,
292 long extraStyle) ;
293
294 static wxWidgetImplType* CreateStaticLine( wxWindowMac* wxpeer,
295 wxWindowMac* parent,
296 wxWindowID id,
297 const wxPoint& pos,
298 const wxSize& size,
299 long style,
300 long extraStyle) ;
301
302 static wxWidgetImplType* CreateGroupBox( wxWindowMac* wxpeer,
303 wxWindowMac* parent,
304 wxWindowID id,
305 const wxString& label,
306 const wxPoint& pos,
307 const wxSize& size,
308 long style,
309 long extraStyle) ;
310
311 static wxWidgetImplType* CreateStaticText( wxWindowMac* wxpeer,
312 wxWindowMac* parent,
313 wxWindowID id,
314 const wxString& label,
315 const wxPoint& pos,
316 const wxSize& size,
317 long style,
318 long extraStyle) ;
319
320 static wxWidgetImplType* CreateTextControl( wxTextCtrl* wxpeer,
321 wxWindowMac* parent,
322 wxWindowID id,
323 const wxString& content,
324 const wxPoint& pos,
325 const wxSize& size,
326 long style,
327 long extraStyle) ;
328
329 static wxWidgetImplType* CreateSearchControl( wxTextCtrl* wxpeer,
330 wxWindowMac* parent,
331 wxWindowID id,
332 const wxString& content,
333 const wxPoint& pos,
334 const wxSize& size,
335 long style,
336 long extraStyle) ;
337
338 static wxWidgetImplType* CreateCheckBox( wxWindowMac* wxpeer,
339 wxWindowMac* parent,
340 wxWindowID id,
341 const wxString& label,
342 const wxPoint& pos,
343 const wxSize& size,
344 long style,
345 long extraStyle);
346
347 static wxWidgetImplType* CreateRadioButton( wxWindowMac* wxpeer,
348 wxWindowMac* parent,
349 wxWindowID id,
350 const wxString& label,
351 const wxPoint& pos,
352 const wxSize& size,
353 long style,
354 long extraStyle);
355
356 static wxWidgetImplType* CreateToggleButton( wxWindowMac* wxpeer,
357 wxWindowMac* parent,
358 wxWindowID id,
359 const wxString& label,
360 const wxPoint& pos,
361 const wxSize& size,
362 long style,
363 long extraStyle);
364
365 static wxWidgetImplType* CreateBitmapToggleButton( wxWindowMac* wxpeer,
366 wxWindowMac* parent,
367 wxWindowID id,
368 const wxBitmap& bitmap,
369 const wxPoint& pos,
370 const wxSize& size,
371 long style,
372 long extraStyle);
373
374 static wxWidgetImplType* CreateBitmapButton( wxWindowMac* wxpeer,
375 wxWindowMac* parent,
376 wxWindowID id,
377 const wxBitmap& bitmap,
378 const wxPoint& pos,
379 const wxSize& size,
380 long style,
381 long extraStyle);
382
383 static wxWidgetImplType* CreateTabView( wxWindowMac* wxpeer,
384 wxWindowMac* parent,
385 wxWindowID id,
386 const wxPoint& pos,
387 const wxSize& size,
388 long style,
389 long extraStyle);
390
391 static wxWidgetImplType* CreateGauge( wxWindowMac* wxpeer,
392 wxWindowMac* parent,
393 wxWindowID id,
394 wxInt32 value,
395 wxInt32 minimum,
396 wxInt32 maximum,
397 const wxPoint& pos,
398 const wxSize& size,
399 long style,
400 long extraStyle);
401
402 static wxWidgetImplType* CreateSlider( wxWindowMac* wxpeer,
403 wxWindowMac* parent,
404 wxWindowID id,
405 wxInt32 value,
406 wxInt32 minimum,
407 wxInt32 maximum,
408 const wxPoint& pos,
409 const wxSize& size,
410 long style,
411 long extraStyle);
412
413 static wxWidgetImplType* CreateSpinButton( wxWindowMac* wxpeer,
414 wxWindowMac* parent,
415 wxWindowID id,
416 wxInt32 value,
417 wxInt32 minimum,
418 wxInt32 maximum,
419 const wxPoint& pos,
420 const wxSize& size,
421 long style,
422 long extraStyle);
423
424 static wxWidgetImplType* CreateScrollBar( wxWindowMac* wxpeer,
425 wxWindowMac* parent,
426 wxWindowID id,
427 const wxPoint& pos,
428 const wxSize& size,
429 long style,
430 long extraStyle);
431
432 static wxWidgetImplType* CreateChoice( wxWindowMac* wxpeer,
433 wxWindowMac* parent,
434 wxWindowID id,
435 wxMenu* menu,
436 const wxPoint& pos,
437 const wxSize& size,
438 long style,
439 long extraStyle);
440
441 static wxWidgetImplType* CreateListBox( wxWindowMac* wxpeer,
442 wxWindowMac* parent,
443 wxWindowID id,
444 const wxPoint& pos,
445 const wxSize& size,
446 long style,
447 long extraStyle);
448
449 // converts from Toplevel-Content relative to local
450 static void Convert( wxPoint *pt , wxWidgetImpl *from , wxWidgetImpl *to );
451 protected :
452 bool m_isRootControl;
453 wxWindowMac* m_wxPeer;
454 bool m_needsFocusRect;
455 bool m_needsFrame;
456
457 DECLARE_ABSTRACT_CLASS(wxWidgetImpl)
458 };
459
460 //
461 // the interface to be implemented eg by a listbox
462 //
463
464 class WXDLLIMPEXP_CORE wxListWidgetColumn
465 {
466 public :
467 virtual ~wxListWidgetColumn() {}
468 } ;
469
470 class WXDLLIMPEXP_CORE wxListWidgetCellValue
471 {
472 public :
473 wxListWidgetCellValue() {}
474 virtual ~wxListWidgetCellValue() {}
475
476 virtual void Set( CFStringRef value ) = 0;
477 virtual void Set( const wxString& value ) = 0;
478 virtual void Set( int value ) = 0;
479
480 virtual int GetIntValue() const = 0;
481 virtual wxString GetStringValue() const = 0;
482 } ;
483
484 class WXDLLIMPEXP_CORE wxListWidgetImpl
485 {
486 public:
487 wxListWidgetImpl() {}
488 virtual ~wxListWidgetImpl() { }
489
490 virtual wxListWidgetColumn* InsertTextColumn( unsigned pos, const wxString& title, bool editable = false,
491 wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) = 0 ;
492 virtual wxListWidgetColumn* InsertCheckColumn( unsigned pos , const wxString& title, bool editable = false,
493 wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) = 0 ;
494
495 // add and remove
496
497 // TODO will be replaced
498 virtual void ListDelete( unsigned int n ) = 0;
499 virtual void ListInsert( unsigned int n ) = 0;
500 virtual void ListClear() = 0;
501
502 // selecting
503
504 virtual void ListDeselectAll() = 0;
505 virtual void ListSetSelection( unsigned int n, bool select, bool multi ) = 0;
506 virtual int ListGetSelection() const = 0;
507 virtual int ListGetSelections( wxArrayInt& aSelections ) const = 0;
508 virtual bool ListIsSelected( unsigned int n ) const = 0;
509
510 // display
511
512 virtual void ListScrollTo( unsigned int n ) = 0;
513 virtual void UpdateLine( unsigned int n, wxListWidgetColumn* col = NULL ) = 0;
514 virtual void UpdateLineToEnd( unsigned int n) = 0;
515
516 // accessing content
517
518 virtual unsigned int ListGetCount() const = 0;
519 };
520
521 //
522 // interface to be implemented by a textcontrol
523 //
524
525 class WXDLLIMPEXP_FWD_CORE wxTextAttr;
526
527 // common interface for all implementations
528 class WXDLLIMPEXP_CORE wxTextWidgetImpl
529
530 {
531 public :
532 wxTextWidgetImpl() {}
533
534 virtual ~wxTextWidgetImpl() {}
535
536 virtual bool CanFocus() const { return true; }
537
538 virtual wxString GetStringValue() const = 0 ;
539 virtual void SetStringValue( const wxString &val ) = 0 ;
540 virtual void SetSelection( long from, long to ) = 0 ;
541 virtual void GetSelection( long* from, long* to ) const = 0 ;
542 virtual void WriteText( const wxString& str ) = 0 ;
543
544 virtual void SetStyle( long start, long end, const wxTextAttr& style ) ;
545 virtual void Copy() ;
546 virtual void Cut() ;
547 virtual void Paste() ;
548 virtual bool CanPaste() const ;
549 virtual void SetEditable( bool editable ) ;
550 virtual long GetLastPosition() const ;
551 virtual void Replace( long from, long to, const wxString &str ) ;
552 virtual void Remove( long from, long to ) ;
553
554
555 virtual bool HasOwnContextMenu() const
556 { return false ; }
557
558 virtual bool SetupCursor( const wxPoint& WXUNUSED(pt) )
559 { return false ; }
560
561 virtual void Clear() ;
562 virtual bool CanUndo() const;
563 virtual void Undo() ;
564 virtual bool CanRedo() const;
565 virtual void Redo() ;
566 virtual int GetNumberOfLines() const ;
567 virtual long XYToPosition(long x, long y) const;
568 virtual bool PositionToXY(long pos, long *x, long *y) const ;
569 virtual void ShowPosition(long WXUNUSED(pos)) ;
570 virtual int GetLineLength(long lineNo) const ;
571 virtual wxString GetLineText(long lineNo) const ;
572 virtual void CheckSpelling(bool WXUNUSED(check)) { }
573 };
574
575 //
576 // common interface for search controls
577 //
578
579 class wxSearchWidgetImpl
580 {
581 public :
582 wxSearchWidgetImpl(){}
583 virtual ~wxSearchWidgetImpl(){}
584
585 // search field options
586 virtual void ShowSearchButton( bool show ) = 0;
587 virtual bool IsSearchButtonVisible() const = 0;
588
589 virtual void ShowCancelButton( bool show ) = 0;
590 virtual bool IsCancelButtonVisible() const = 0;
591
592 virtual void SetSearchMenu( wxMenu* menu ) = 0;
593
594 virtual void SetDescriptiveText(const wxString& text) = 0;
595 } ;
596
597 //
598 // toplevel window implementation class
599 //
600
601 class wxNonOwnedWindowImpl : public wxObject
602 {
603 public :
604 wxNonOwnedWindowImpl( wxNonOwnedWindow* nonownedwnd) : m_wxPeer(nonownedwnd)
605 {
606 }
607 wxNonOwnedWindowImpl()
608 {
609 }
610 virtual ~wxNonOwnedWindowImpl()
611 {
612 }
613
614 virtual void Destroy()
615 {
616 }
617
618 virtual void Create( wxWindow* parent, const wxPoint& pos, const wxSize& size,
619 long style, long extraStyle, const wxString& name ) = 0;
620
621
622 virtual WXWindow GetWXWindow() const = 0;
623
624 virtual void Raise()
625 {
626 }
627
628 virtual void Lower()
629 {
630 }
631
632 virtual bool Show(bool WXUNUSED(show))
633 {
634 return false;
635 }
636
637 virtual bool ShowWithEffect(bool show, wxShowEffect WXUNUSED(effect), unsigned WXUNUSED(timeout))
638 {
639 return Show(show);
640 }
641
642 virtual void Update()
643 {
644 }
645
646 virtual bool SetTransparent(wxByte WXUNUSED(alpha))
647 {
648 return false;
649 }
650
651 virtual bool SetBackgroundColour(const wxColour& WXUNUSED(col) )
652 {
653 return false;
654 }
655
656 virtual void SetExtraStyle( long WXUNUSED(exStyle) )
657 {
658 }
659
660 virtual bool SetBackgroundStyle(wxBackgroundStyle WXUNUSED(style))
661 {
662 return false ;
663 }
664
665 bool CanSetTransparent()
666 {
667 return false;
668 }
669
670 virtual void GetContentArea( int &left , int &top , int &width , int &height ) const = 0;
671 virtual void MoveWindow(int x, int y, int width, int height) = 0;
672 virtual void GetPosition( int &x, int &y ) const = 0;
673 virtual void GetSize( int &width, int &height ) const = 0;
674
675 virtual bool SetShape(const wxRegion& WXUNUSED(region))
676 {
677 return false;
678 }
679
680 virtual void SetTitle( const wxString& title, wxFontEncoding encoding ) = 0;
681
682 virtual bool IsMaximized() const = 0;
683
684 virtual bool IsIconized() const= 0;
685
686 virtual void Iconize( bool iconize )= 0;
687
688 virtual void Maximize(bool maximize) = 0;
689
690 virtual bool IsFullScreen() const= 0;
691
692 virtual bool ShowFullScreen(bool show, long style)= 0;
693
694 virtual void RequestUserAttention(int flags) = 0;
695
696 virtual void ScreenToWindow( int *x, int *y ) = 0;
697
698 virtual void WindowToScreen( int *x, int *y ) = 0;
699
700 wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; }
701
702 // static creation methods, must be implemented by all toolkits
703
704 static wxNonOwnedWindowImpl* CreateNonOwnedWindow( wxNonOwnedWindow* wxpeer, wxWindow* parent, const wxPoint& pos, const wxSize& size,
705 long style, long extraStyle, const wxString& name ) ;
706
707 protected :
708 wxNonOwnedWindow* m_wxPeer;
709 DECLARE_ABSTRACT_CLASS(wxNonOwnedWindowImpl)
710 };
711
712 #endif // wxUSE_GUI
713
714 //---------------------------------------------------------------------------
715 // cocoa bridging utilities
716 //---------------------------------------------------------------------------
717
718 bool wxMacInitCocoa();
719
720 class WXDLLIMPEXP_CORE wxMacAutoreleasePool
721 {
722 public :
723 wxMacAutoreleasePool();
724 ~wxMacAutoreleasePool();
725 private :
726 void* m_pool;
727 };
728
729 // NSObject
730
731 void wxMacCocoaRelease( void* obj );
732 void wxMacCocoaAutorelease( void* obj );
733 void* wxMacCocoaRetain( void* obj );
734
735
736 #endif
737 // _WX_PRIVATE_CORE_H_