]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/core/private.h
add support for wxStrnlen for those platforms where it's available
[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
2cb5d2d2
SC
155 virtual void PopUp( wxWindow *win, int x, int y ) = 0;
156
524c47aa
SC
157 static wxMenuImpl* Create( wxMenu* peer, const wxString& title );
158 static wxMenuImpl* CreateRootMenu( wxMenu* peer );
159protected :
160 wxMenu* m_peer;
161
162 DECLARE_ABSTRACT_CLASS(wxMenuItemImpl);
163} ;
164
165
166
eefe52da
SC
167class WXDLLIMPEXP_CORE wxWidgetImpl : public wxObject
168{
169public :
170 wxWidgetImpl( wxWindowMac* peer , bool isRootControl = false );
171 wxWidgetImpl();
172 virtual ~wxWidgetImpl();
173
174 void Init();
175
eefe52da
SC
176 bool IsRootControl() const { return m_isRootControl; }
177
178 wxWindowMac* GetWXPeer() const { return m_wxPeer; }
179
180 bool IsOk() const { return GetWXWidget() != NULL; }
181
182 // not only the control itself, but also all its parents must be visible
183 // in order for this function to return true
184 virtual bool IsVisible() const = 0;
185 // set the visibility of this widget (maybe latent)
186 virtual void SetVisibility( bool visible ) = 0;
187
188 virtual void Raise() = 0;
189
190 virtual void Lower() = 0;
191
192 virtual void ScrollRect( const wxRect *rect, int dx, int dy ) = 0;
193
194 virtual WXWidget GetWXWidget() const = 0;
195
196 virtual void SetBackgroundColour( const wxColour& col ) = 0;
197
198 // all coordinates in native parent widget relative coordinates
199 virtual void GetContentArea( int &left , int &top , int &width , int &height ) const = 0;
200 virtual void Move(int x, int y, int width, int height) = 0;
201 virtual void GetPosition( int &x, int &y ) const = 0;
202 virtual void GetSize( int &width, int &height ) const = 0;
524c47aa 203 virtual void SetControlSize( wxWindowVariant variant ) = 0;
eefe52da
SC
204
205 virtual void SetNeedsDisplay( const wxRect* where = NULL ) = 0;
206 virtual bool GetNeedsDisplay() const = 0;
207
208 virtual bool NeedsFocusRect() const;
209 virtual void SetNeedsFocusRect( bool needs );
210
211 virtual bool CanFocus() const = 0;
212 // return true if successful
213 virtual bool SetFocus() = 0;
214 virtual bool HasFocus() const = 0;
215
216 virtual void RemoveFromParent() = 0;
217 virtual void Embed( wxWidgetImpl *parent ) = 0;
524c47aa
SC
218
219 virtual void SetDefaultButton( bool isDefault ) = 0;
220 virtual void PerformClick() = 0;
221 virtual void SetLabel( const wxString& title, wxFontEncoding encoding ) = 0;
222
223 virtual wxInt32 GetValue() const = 0;
224 virtual void SetValue( wxInt32 v ) = 0;
225 virtual void SetBitmap( const wxBitmap& bitmap ) = 0;
226 virtual void SetupTabs( const wxNotebook &notebook ) =0;
227 virtual void GetBestRect( wxRect *r ) const = 0;
228 virtual bool IsEnabled() const = 0;
229 virtual void Enable( bool enable ) = 0;
230 virtual void SetMinimum( wxInt32 v ) = 0;
231 virtual void SetMaximum( wxInt32 v ) = 0;
232 virtual void PulseGauge() = 0;
233 virtual void SetScrollThumb( wxInt32 value, wxInt32 thumbSize ) = 0;
234
1e181c7a
SC
235 virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true ) = 0;
236
524c47aa
SC
237 // is the clicked event sent AFTER the state already changed, so no additional
238 // state changing logic is required from the outside
239 virtual bool ButtonClickDidStateChange() = 0;
c4825ef7
SC
240
241 virtual void InstallEventHandler( WXWidget control = NULL ) = 0;
eefe52da 242
f55d9f74
SC
243 // static methods for associating native controls and their implementations
244
245 static wxWidgetImpl*
246 FindFromWXWidget(WXWidget control);
247
248 static void RemoveAssociations( wxWidgetImpl* impl);
249
250 static void Associate( WXWidget control, wxWidgetImpl *impl );
251
eefe52da
SC
252 // static creation methods, must be implemented by all toolkits
253
524c47aa
SC
254 static wxWidgetImplType* CreateUserPane( wxWindowMac* wxpeer,
255 wxWindowMac* parent,
256 wxWindowID id,
257 const wxPoint& pos,
258 const wxSize& size,
259 long style,
260 long extraStyle) ;
261 static wxWidgetImplType* CreateContentView( wxNonOwnedWindow* now ) ;
262
263 static wxWidgetImplType* CreateButton( wxWindowMac* wxpeer,
264 wxWindowMac* parent,
265 wxWindowID id,
266 const wxString& label,
267 const wxPoint& pos,
268 const wxSize& size,
269 long style,
270 long extraStyle) ;
271
272 static wxWidgetImplType* CreateDisclosureTriangle( wxWindowMac* wxpeer,
273 wxWindowMac* parent,
274 wxWindowID id,
275 const wxString& label,
276 const wxPoint& pos,
277 const wxSize& size,
278 long style,
279 long extraStyle) ;
280
281 static wxWidgetImplType* CreateStaticLine( wxWindowMac* wxpeer,
282 wxWindowMac* parent,
283 wxWindowID id,
284 const wxPoint& pos,
285 const wxSize& size,
286 long style,
287 long extraStyle) ;
288
289 static wxWidgetImplType* CreateGroupBox( wxWindowMac* wxpeer,
290 wxWindowMac* parent,
291 wxWindowID id,
292 const wxString& label,
293 const wxPoint& pos,
294 const wxSize& size,
295 long style,
296 long extraStyle) ;
297
298 static wxWidgetImplType* CreateStaticText( wxWindowMac* wxpeer,
299 wxWindowMac* parent,
300 wxWindowID id,
301 const wxString& label,
302 const wxPoint& pos,
303 const wxSize& size,
304 long style,
305 long extraStyle) ;
306
307 static wxWidgetImplType* CreateTextControl( wxTextCtrl* wxpeer,
308 wxWindowMac* parent,
309 wxWindowID id,
310 const wxString& content,
311 const wxPoint& pos,
312 const wxSize& size,
313 long style,
314 long extraStyle) ;
315
1e181c7a
SC
316 static wxWidgetImplType* CreateSearchControl( wxTextCtrl* wxpeer,
317 wxWindowMac* parent,
318 wxWindowID id,
319 const wxString& content,
320 const wxPoint& pos,
321 const wxSize& size,
322 long style,
323 long extraStyle) ;
324
524c47aa
SC
325 static wxWidgetImplType* CreateCheckBox( wxWindowMac* wxpeer,
326 wxWindowMac* parent,
327 wxWindowID id,
328 const wxString& label,
329 const wxPoint& pos,
330 const wxSize& size,
331 long style,
332 long extraStyle);
333
334 static wxWidgetImplType* CreateRadioButton( wxWindowMac* wxpeer,
335 wxWindowMac* parent,
336 wxWindowID id,
337 const wxString& label,
338 const wxPoint& pos,
339 const wxSize& size,
340 long style,
341 long extraStyle);
342
343 static wxWidgetImplType* CreateToggleButton( wxWindowMac* wxpeer,
344 wxWindowMac* parent,
345 wxWindowID id,
346 const wxString& label,
347 const wxPoint& pos,
348 const wxSize& size,
349 long style,
350 long extraStyle);
351
352 static wxWidgetImplType* CreateBitmapToggleButton( wxWindowMac* wxpeer,
353 wxWindowMac* parent,
354 wxWindowID id,
355 const wxBitmap& bitmap,
356 const wxPoint& pos,
357 const wxSize& size,
358 long style,
359 long extraStyle);
360
361 static wxWidgetImplType* CreateBitmapButton( wxWindowMac* wxpeer,
362 wxWindowMac* parent,
363 wxWindowID id,
364 const wxBitmap& bitmap,
365 const wxPoint& pos,
366 const wxSize& size,
367 long style,
368 long extraStyle);
369
370 static wxWidgetImplType* CreateTabView( wxWindowMac* wxpeer,
371 wxWindowMac* parent,
372 wxWindowID id,
373 const wxPoint& pos,
374 const wxSize& size,
375 long style,
376 long extraStyle);
377
378 static wxWidgetImplType* CreateGauge( wxWindowMac* wxpeer,
379 wxWindowMac* parent,
380 wxWindowID id,
381 wxInt32 value,
382 wxInt32 minimum,
383 wxInt32 maximum,
384 const wxPoint& pos,
385 const wxSize& size,
386 long style,
387 long extraStyle);
388
389 static wxWidgetImplType* CreateSlider( wxWindowMac* wxpeer,
390 wxWindowMac* parent,
391 wxWindowID id,
392 wxInt32 value,
393 wxInt32 minimum,
394 wxInt32 maximum,
395 const wxPoint& pos,
396 const wxSize& size,
397 long style,
398 long extraStyle);
399
400 static wxWidgetImplType* CreateSpinButton( wxWindowMac* wxpeer,
401 wxWindowMac* parent,
402 wxWindowID id,
403 wxInt32 value,
404 wxInt32 minimum,
405 wxInt32 maximum,
406 const wxPoint& pos,
407 const wxSize& size,
408 long style,
409 long extraStyle);
410
411 static wxWidgetImplType* CreateScrollBar( wxWindowMac* wxpeer,
412 wxWindowMac* parent,
413 wxWindowID id,
414 const wxPoint& pos,
415 const wxSize& size,
416 long style,
417 long extraStyle);
418
419 static wxWidgetImplType* CreateChoice( wxWindowMac* wxpeer,
420 wxWindowMac* parent,
421 wxWindowID id,
422 wxMenu* menu,
423 const wxPoint& pos,
424 const wxSize& size,
425 long style,
426 long extraStyle);
427
428 static wxWidgetImplType* CreateListBox( wxWindowMac* wxpeer,
429 wxWindowMac* parent,
430 wxWindowID id,
431 const wxPoint& pos,
432 const wxSize& size,
433 long style,
434 long extraStyle);
eefe52da
SC
435
436 // converts from Toplevel-Content relative to local
437 static void Convert( wxPoint *pt , wxWidgetImpl *from , wxWidgetImpl *to );
438protected :
439 bool m_isRootControl;
440 wxWindowMac* m_wxPeer;
441 bool m_needsFocusRect;
442
443 DECLARE_ABSTRACT_CLASS(wxWidgetImpl)
444};
445
524c47aa
SC
446//
447// the interface to be implemented eg by a listbox
448//
449
524c47aa
SC
450class WXDLLIMPEXP_CORE wxListWidgetColumn
451{
452public :
453 virtual ~wxListWidgetColumn() {}
454} ;
455
456class WXDLLIMPEXP_CORE wxListWidgetCellValue
457{
458public :
459 wxListWidgetCellValue() {}
460 virtual ~wxListWidgetCellValue() {}
461
462 virtual void Set( CFStringRef value ) = 0;
463 virtual void Set( const wxString& value ) = 0;
464 virtual void Set( int value ) = 0;
465
466 virtual int GetIntValue() const = 0;
467 virtual wxString GetStringValue() const = 0;
468} ;
469
470class WXDLLIMPEXP_CORE wxListWidgetImpl
471{
472public:
473 wxListWidgetImpl() {}
474 virtual ~wxListWidgetImpl() { }
475
476 virtual wxListWidgetColumn* InsertTextColumn( unsigned pos, const wxString& title, bool editable = false,
477 wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) = 0 ;
478 virtual wxListWidgetColumn* InsertCheckColumn( unsigned pos , const wxString& title, bool editable = false,
479 wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) = 0 ;
480
481 // add and remove
482
483 // TODO will be replaced
484 virtual void ListDelete( unsigned int n ) = 0;
485 virtual void ListInsert( unsigned int n ) = 0;
486 virtual void ListClear() = 0;
487
488 // selecting
489
490 virtual void ListDeselectAll() = 0;
491 virtual void ListSetSelection( unsigned int n, bool select, bool multi ) = 0;
492 virtual int ListGetSelection() const = 0;
493 virtual int ListGetSelections( wxArrayInt& aSelections ) const = 0;
494 virtual bool ListIsSelected( unsigned int n ) const = 0;
495
496 // display
497
498 virtual void ListScrollTo( unsigned int n ) = 0;
499 virtual void UpdateLine( unsigned int n, wxListWidgetColumn* col = NULL ) = 0;
500 virtual void UpdateLineToEnd( unsigned int n) = 0;
501
502 // accessing content
503
504 virtual unsigned int ListGetCount() const = 0;
505};
506
1e181c7a
SC
507//
508// interface to be implemented by a textcontrol
509//
510
21a9d326
SC
511class WXDLLIMPEXP_FWD_CORE wxTextAttr;
512
1e181c7a
SC
513// common interface for all implementations
514class WXDLLIMPEXP_CORE wxTextWidgetImpl
515
516{
517public :
518 wxTextWidgetImpl() {}
519
520 virtual ~wxTextWidgetImpl() {}
521
522 virtual bool CanFocus() const { return true; }
523
524 virtual wxString GetStringValue() const = 0 ;
525 virtual void SetStringValue( const wxString &val ) = 0 ;
526 virtual void SetSelection( long from, long to ) = 0 ;
527 virtual void GetSelection( long* from, long* to ) const = 0 ;
528 virtual void WriteText( const wxString& str ) = 0 ;
529
530 virtual void SetStyle( long start, long end, const wxTextAttr& style ) ;
531 virtual void Copy() ;
532 virtual void Cut() ;
533 virtual void Paste() ;
534 virtual bool CanPaste() const ;
535 virtual void SetEditable( bool editable ) ;
0b6a49c2 536 virtual long GetLastPosition() const ;
1e181c7a
SC
537 virtual void Replace( long from, long to, const wxString &str ) ;
538 virtual void Remove( long from, long to ) ;
539
540
541 virtual bool HasOwnContextMenu() const
542 { return false ; }
543
544 virtual bool SetupCursor( const wxPoint& WXUNUSED(pt) )
545 { return false ; }
546
547 virtual void Clear() ;
548 virtual bool CanUndo() const;
549 virtual void Undo() ;
550 virtual bool CanRedo() const;
551 virtual void Redo() ;
552 virtual int GetNumberOfLines() const ;
553 virtual long XYToPosition(long x, long y) const;
554 virtual bool PositionToXY(long pos, long *x, long *y) const ;
555 virtual void ShowPosition(long WXUNUSED(pos)) ;
556 virtual int GetLineLength(long lineNo) const ;
557 virtual wxString GetLineText(long lineNo) const ;
558 virtual void CheckSpelling(bool WXUNUSED(check)) { }
559};
560
561//
562// common interface for search controls
563//
564
565class wxSearchWidgetImpl
566{
567public :
568 wxSearchWidgetImpl(){}
569 virtual ~wxSearchWidgetImpl(){}
570
571 // search field options
572 virtual void ShowSearchButton( bool show ) = 0;
573 virtual bool IsSearchButtonVisible() const = 0;
574
575 virtual void ShowCancelButton( bool show ) = 0;
576 virtual bool IsCancelButtonVisible() const = 0;
577
578 virtual void SetSearchMenu( wxMenu* menu ) = 0;
579
580 virtual void SetDescriptiveText(const wxString& text) = 0;
581} ;
582
524c47aa
SC
583//
584// toplevel window implementation class
585//
586
eefe52da
SC
587class wxNonOwnedWindowImpl : public wxObject
588{
589public :
590 wxNonOwnedWindowImpl( wxNonOwnedWindow* nonownedwnd) : m_wxPeer(nonownedwnd)
591 {
592 }
593 wxNonOwnedWindowImpl()
594 {
595 }
596 virtual ~wxNonOwnedWindowImpl()
597 {
598 }
599
600 virtual void Destroy()
601 {
602 }
603
604 virtual void Create( wxWindow* parent, const wxPoint& pos, const wxSize& size,
605 long style, long extraStyle, const wxString& name ) = 0;
606
607
608 virtual WXWindow GetWXWindow() const = 0;
609
610 virtual void Raise()
611 {
612 }
613
614 virtual void Lower()
615 {
616 }
617
1aec1f8b 618 virtual bool Show(bool WXUNUSED(show))
eefe52da
SC
619 {
620 return false;
621 }
622
1aec1f8b 623 virtual bool ShowWithEffect(bool show, wxShowEffect WXUNUSED(effect), unsigned WXUNUSED(timeout))
eefe52da
SC
624 {
625 return Show(show);
626 }
627
628 virtual void Update()
629 {
630 }
631
1aec1f8b 632 virtual bool SetTransparent(wxByte WXUNUSED(alpha))
eefe52da
SC
633 {
634 return false;
635 }
636
1aec1f8b 637 virtual bool SetBackgroundColour(const wxColour& WXUNUSED(col) )
eefe52da
SC
638 {
639 return false;
640 }
641
1aec1f8b 642 virtual void SetExtraStyle( long WXUNUSED(exStyle) )
eefe52da
SC
643 {
644 }
645
1aec1f8b 646 virtual bool SetBackgroundStyle(wxBackgroundStyle WXUNUSED(style))
eefe52da
SC
647 {
648 return false ;
649 }
650
651 bool CanSetTransparent()
652 {
653 return false;
654 }
655
656 virtual void GetContentArea( int &left , int &top , int &width , int &height ) const = 0;
657 virtual void MoveWindow(int x, int y, int width, int height) = 0;
658 virtual void GetPosition( int &x, int &y ) const = 0;
659 virtual void GetSize( int &width, int &height ) const = 0;
660
1aec1f8b 661 virtual bool SetShape(const wxRegion& WXUNUSED(region))
eefe52da
SC
662 {
663 return false;
664 }
665
666 virtual void SetTitle( const wxString& title, wxFontEncoding encoding ) = 0;
667
668 virtual bool IsMaximized() const = 0;
669
670 virtual bool IsIconized() const= 0;
671
672 virtual void Iconize( bool iconize )= 0;
673
674 virtual void Maximize(bool maximize) = 0;
675
676 virtual bool IsFullScreen() const= 0;
677
678 virtual bool ShowFullScreen(bool show, long style)= 0;
679
680 virtual void RequestUserAttention(int flags) = 0;
681
682 virtual void ScreenToWindow( int *x, int *y ) = 0;
683
684 virtual void WindowToScreen( int *x, int *y ) = 0;
685
686 wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; }
524c47aa
SC
687
688 // static creation methods, must be implemented by all toolkits
689
690 static wxNonOwnedWindowImpl* CreateNonOwnedWindow( wxNonOwnedWindow* wxpeer, wxWindow* parent, const wxPoint& pos, const wxSize& size,
691 long style, long extraStyle, const wxString& name ) ;
692
eefe52da
SC
693protected :
694 wxNonOwnedWindow* m_wxPeer;
695 DECLARE_ABSTRACT_CLASS(wxNonOwnedWindowImpl)
696};
697
5c6eb3a8
SC
698#endif // wxUSE_GUI
699
700//---------------------------------------------------------------------------
701// cocoa bridging utilities
702//---------------------------------------------------------------------------
703
704bool wxMacInitCocoa();
705
706class WXDLLIMPEXP_CORE wxMacAutoreleasePool
707{
708public :
709 wxMacAutoreleasePool();
710 ~wxMacAutoreleasePool();
711private :
712 void* m_pool;
713};
714
715// NSObject
716
717void wxMacCocoaRelease( void* obj );
718void wxMacCocoaAutorelease( void* obj );
719void wxMacCocoaRetain( void* obj );
720
721
722#endif
eefe52da 723 // _WX_PRIVATE_CORE_H_