X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c24937e4cc6bed655a2c163a91e4c623dfc5f15f..6756186271a8394db23bc817e1aa36c27c52076a:/src/cocoa/utils.mm diff --git a/src/cocoa/utils.mm b/src/cocoa/utils.mm index a2ae48aa1a..462b68de61 100644 --- a/src/cocoa/utils.mm +++ b/src/cocoa/utils.mm @@ -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 wxCocoaLaunchDefaultBrowser(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