X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c24937e4cc6bed655a2c163a91e4c623dfc5f15f..bf2c43c76e2819be443ab1d830ab68d9569d66b1:/src/cocoa/utils.mm diff --git a/src/cocoa/utils.mm b/src/cocoa/utils.mm index a2ae48aa1a..1388b29c1e 100644 --- a/src/cocoa/utils.mm +++ b/src/cocoa/utils.mm @@ -1,9 +1,8 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/cocoa/utils.cpp +// Name: src/cocoa/utils.mm // Purpose: Various utilities // Author: David Elliott // Created: 2003/??/?? -// RCS-ID: $Id$ // Copyright: (c) wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -18,6 +17,7 @@ #include "wx/apptrait.h" #include "wx/display.h" +#include "wx/evtloop.h" #include "wx/cocoa/private/timer.h" #include @@ -27,6 +27,11 @@ #include #include +#include "wx/cocoa/string.h" + +#import +#import + void wxDisplaySize(int *width, int *height) { // TODO @@ -67,6 +72,11 @@ wxTimerImpl* wxGUIAppTraits::CreateTimerImpl(wxTimer* timer) return new wxCocoaTimerImpl(timer); } +wxEventLoopBase* wxGUIAppTraits::CreateEventLoop() +{ + return new wxGUIEventLoop; +} + wxWindow* wxFindWindowAtPoint(const wxPoint& pt) { return wxGenericFindWindowAtPoint(pt); @@ -97,6 +107,13 @@ void wxBell() // TODO } +// Private helper method for wxLaunchDefaultBrowser +bool wxDoLaunchDefaultBrowser(const wxString& url, int flags) +{ + // NOTE: We ignore the flags + return [[NSWorkspace sharedWorkspace] openURL: [NSURL URLWithString:wxNSStringWithWxString(url)]] != NO; +} + #if 0 // DFE: These aren't even implemented by wxGTK, and no wxWidgets code calls // them. If someone needs them, then they'll get a link error