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