/////////////////////////////////////////////////////////////////////////////
-// Name: src/cocoa/utils.cpp
+// Name: src/cocoa/utils.mm
// Purpose: Various utilities
// Author: David Elliott
// Created: 2003/??/??
#include "wx/apptrait.h"
#include "wx/display.h"
+#include "wx/evtloop.h"
#include "wx/cocoa/private/timer.h"
#include <ctype.h>
#include <string.h>
#include <stdarg.h>
+#include "wx/cocoa/string.h"
+
+#import <Foundation/NSURL.h>
+#import <AppKit/NSWorkspace.h>
+
void wxDisplaySize(int *width, int *height)
{
// TODO
return new wxCocoaTimerImpl(timer);
}
+wxEventLoopBase* wxGUIAppTraits::CreateEventLoop()
+{
+ return new wxGUIEventLoop;
+}
+
wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
{
return wxGenericFindWindowAtPoint(pt);
// 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