X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c24937e4cc6bed655a2c163a91e4c623dfc5f15f..d2e66707deb10dea6f92e3e4092f8a43ef942a5d:/src/cocoa/utils.mm diff --git a/src/cocoa/utils.mm b/src/cocoa/utils.mm index a2ae48aa1a..bc764949b5 100644 --- a/src/cocoa/utils.mm +++ b/src/cocoa/utils.mm @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/cocoa/utils.cpp +// Name: src/cocoa/utils.mm // Purpose: Various utilities // Author: David Elliott // Created: 2003/??/?? @@ -18,6 +18,7 @@ #include "wx/apptrait.h" #include "wx/display.h" +#include "wx/evtloop.h" #include "wx/cocoa/private/timer.h" #include @@ -27,6 +28,11 @@ #include #include +#include "wx/cocoa/string.h" + +#import +#import + void wxDisplaySize(int *width, int *height) { // TODO @@ -67,6 +73,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 +108,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