]> git.saurik.com Git - wxWidgets.git/commitdiff
exposing mainWindow for C++
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 13 Jun 2012 22:32:07 +0000 (22:32 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 13 Jun 2012 22:32:07 +0000 (22:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/osx/cocoa/private.h
src/osx/carbon/utilscocoa.mm

index 36fcb7f13514681eddfda7dc31466d0fffead471..283e8ee64b05ee60a46482847d2294cf5bf67db7 100644 (file)
@@ -42,6 +42,7 @@ OSStatus WXDLLIMPEXP_CORE wxMacDrawCGImage(
 WX_NSImage WXDLLIMPEXP_CORE wxOSXGetNSImageFromCGImage( CGImageRef image );
 CGImageRef WXDLLIMPEXP_CORE wxOSXCreateCGImageFromNSImage( WX_NSImage nsimage );
 wxBitmap WXDLLIMPEXP_CORE wxOSXCreateSystemBitmap(const wxString& id, const wxString &client, const wxSize& size);
+WXWindow WXDLLIMPEXP_CORE wxOSXGetMainWindow();
 
 class WXDLLIMPEXP_FWD_CORE wxDialog;
 
index c0b0dbb8e2c98d5799036769b33f7bee35e49501..a4c9ba80161077673d0232b26e85c6ec64bb2196 100644 (file)
@@ -343,6 +343,19 @@ WX_UIFont wxFont::OSXCreateUIFont(const wxNativeFontInfo* info)
     return uiFont;
 }
 
+#endif
+
+// ----------------------------------------------------------------------------
+// NSWindow Utils
+// ----------------------------------------------------------------------------
+
+#if wxOSX_USE_COCOA
+
+WXWindow wxOSXGetMainWindow()
+{
+    return [NSApp mainWindow];
+}
+
 #endif
 // ----------------------------------------------------------------------------
 // NSImage Utils