]> git.saurik.com Git - wxWidgets.git/commitdiff
Move src/cocoa/utils.cpp to src/cocoa/utils.mm.
authorDavid Elliott <dfe@tgwbd.org>
Mon, 7 May 2007 20:58:04 +0000 (20:58 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Mon, 7 May 2007 20:58:04 +0000 (20:58 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

Makefile.in
build/bakefiles/files.bkl
src/cocoa/utils.cpp [deleted file]
src/cocoa/utils.mm [new file with mode: 0644]

index 16e8ed3a61cae9afd40a08cd6c83cf6b0990bceb..da2e1dd89dbd2c462721cdb92736207a2abfee98 100644 (file)
@@ -14348,8 +14348,8 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
 @COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@monodll_utils.o: $(srcdir)/src/motif/utils.cpp $(MONODLL_ODEP)
 @COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/motif/utils.cpp
 
-@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@monodll_utils.o: $(srcdir)/src/cocoa/utils.cpp $(MONODLL_ODEP)
-@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/cocoa/utils.cpp
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@monodll_utils.o: $(srcdir)/src/cocoa/utils.mm $(MONODLL_ODEP)
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/cocoa/utils.mm
 
 @COND_PLATFORM_WIN32_1@monodll_utilsexc.o: $(srcdir)/src/msw/utilsexc.cpp $(MONODLL_ODEP)
 @COND_PLATFORM_WIN32_1@        $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/utilsexc.cpp
@@ -18548,8 +18548,8 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
 @COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@monolib_utils.o: $(srcdir)/src/motif/utils.cpp $(MONOLIB_ODEP)
 @COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/motif/utils.cpp
 
-@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@monolib_utils.o: $(srcdir)/src/cocoa/utils.cpp $(MONOLIB_ODEP)
-@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/cocoa/utils.cpp
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@monolib_utils.o: $(srcdir)/src/cocoa/utils.mm $(MONOLIB_ODEP)
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/cocoa/utils.mm
 
 @COND_PLATFORM_WIN32_1@monolib_utilsexc.o: $(srcdir)/src/msw/utilsexc.cpp $(MONOLIB_ODEP)
 @COND_PLATFORM_WIN32_1@        $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/utilsexc.cpp
@@ -23276,8 +23276,8 @@ coredll_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(COREDLL_ODEP)
 @COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@coredll_utils.o: $(srcdir)/src/motif/utils.cpp $(COREDLL_ODEP)
 @COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/motif/utils.cpp
 
-@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@coredll_utils.o: $(srcdir)/src/cocoa/utils.cpp $(COREDLL_ODEP)
-@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/cocoa/utils.cpp
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@coredll_utils.o: $(srcdir)/src/cocoa/utils.mm $(COREDLL_ODEP)
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/cocoa/utils.mm
 
 @COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@coredll_caret.o: $(srcdir)/src/generic/caret.cpp $(COREDLL_ODEP)
 @COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@  $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/generic/caret.cpp
@@ -26243,8 +26243,8 @@ corelib_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(CORELIB_ODEP)
 @COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@corelib_utils.o: $(srcdir)/src/motif/utils.cpp $(CORELIB_ODEP)
 @COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/motif/utils.cpp
 
-@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@corelib_utils.o: $(srcdir)/src/cocoa/utils.cpp $(CORELIB_ODEP)
-@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/cocoa/utils.cpp
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@corelib_utils.o: $(srcdir)/src/cocoa/utils.mm $(CORELIB_ODEP)
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@        $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/cocoa/utils.mm
 
 @COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@corelib_caret.o: $(srcdir)/src/generic/caret.cpp $(CORELIB_ODEP)
 @COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@  $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/generic/caret.cpp
index 2e9633e2d1f2f0c1bd57bcc67e9375396cc0e0fe..a0a07da5823eff64efb5e5a8b1d129b67a037e95 100644 (file)
@@ -2448,7 +2448,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
     src/cocoa/toolbar.mm
     src/cocoa/tooltip.mm
     src/cocoa/toplevel.mm
-    src/cocoa/utils.cpp
+    src/cocoa/utils.mm
     src/cocoa/utilsexc.mm
     src/cocoa/window.mm
     <!-- Generic implementations used by wxCocoa: -->
diff --git a/src/cocoa/utils.cpp b/src/cocoa/utils.cpp
deleted file mode 100644 (file)
index a2ae48a..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        src/cocoa/utils.cpp
-// Purpose:     Various utilities
-// Author:      David Elliott
-// Created:     2003/??/??
-// RCS-ID:      $Id$
-// Copyright:   (c) wxWidgets dev team
-// Licence:     wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#include "wx/wxprec.h"
-
-#include "wx/utils.h"
-
-#ifndef WX_PRECOMP
-    #include "wx/app.h"
-#endif // WX_PRECOMP
-
-#include "wx/apptrait.h"
-#include "wx/display.h"
-#include "wx/cocoa/private/timer.h"
-
-#include <ctype.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-
-void wxDisplaySize(int *width, int *height)
-{
-    // TODO
-    if(width)
-        *width = 1024;
-    if(height)
-        *height = 768;
-}
-
-void wxDisplaySizeMM(int*,int*)
-{
-    // TODO
-}
-
-void wxClientDisplayRect(int *x,int *y,int *width,int *height)
-{
-    // TODO
-    if(x)
-        *x = 0;
-    if(y)
-        *y = 0;
-    if(width)
-        *width=1024;
-    if(height)
-        *height=768;
-}
-
-wxPortId wxGUIAppTraits::GetToolkitVersion(int *verMaj, int *verMin) const
-{
-    // We suppose that toolkit version is the same as OS version under Mac
-    wxGetOsVersion(verMaj, verMin);
-
-    return wxPORT_COCOA;
-}
-
-wxTimerImpl* wxGUIAppTraits::CreateTimerImpl(wxTimer* timer)
-{
-    return new wxCocoaTimerImpl(timer);
-}
-
-wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
-{
-    return wxGenericFindWindowAtPoint(pt);
-}
-
-// Return true if we have a colour display
-bool wxColourDisplay()
-{
-    // TODO
-    return true;
-}
-
-void wxGetMousePosition( int* x, int* y )
-{
-    // TODO
-};
-
-// Returns depth of screen
-int wxDisplayDepth()
-{
-    // TODO
-    return 0;
-}
-
-// Emit a beeeeeep
-void wxBell()
-{
-    // TODO
-}
-
-#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
-
-// Consume all events until no more left
-void wxFlushEvents()
-{
-}
-
-// Check whether this window wants to process messages, e.g. Stop button
-// in long calculations.
-bool wxCheckForInterrupt(wxWindow *wnd)
-{
-    // TODO
-    return false;
-}
-
-#endif
-
diff --git a/src/cocoa/utils.mm b/src/cocoa/utils.mm
new file mode 100644 (file)
index 0000000..a2ae48a
--- /dev/null
@@ -0,0 +1,118 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        src/cocoa/utils.cpp
+// Purpose:     Various utilities
+// Author:      David Elliott
+// Created:     2003/??/??
+// RCS-ID:      $Id$
+// Copyright:   (c) wxWidgets dev team
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#include "wx/wxprec.h"
+
+#include "wx/utils.h"
+
+#ifndef WX_PRECOMP
+    #include "wx/app.h"
+#endif // WX_PRECOMP
+
+#include "wx/apptrait.h"
+#include "wx/display.h"
+#include "wx/cocoa/private/timer.h"
+
+#include <ctype.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+
+void wxDisplaySize(int *width, int *height)
+{
+    // TODO
+    if(width)
+        *width = 1024;
+    if(height)
+        *height = 768;
+}
+
+void wxDisplaySizeMM(int*,int*)
+{
+    // TODO
+}
+
+void wxClientDisplayRect(int *x,int *y,int *width,int *height)
+{
+    // TODO
+    if(x)
+        *x = 0;
+    if(y)
+        *y = 0;
+    if(width)
+        *width=1024;
+    if(height)
+        *height=768;
+}
+
+wxPortId wxGUIAppTraits::GetToolkitVersion(int *verMaj, int *verMin) const
+{
+    // We suppose that toolkit version is the same as OS version under Mac
+    wxGetOsVersion(verMaj, verMin);
+
+    return wxPORT_COCOA;
+}
+
+wxTimerImpl* wxGUIAppTraits::CreateTimerImpl(wxTimer* timer)
+{
+    return new wxCocoaTimerImpl(timer);
+}
+
+wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
+{
+    return wxGenericFindWindowAtPoint(pt);
+}
+
+// Return true if we have a colour display
+bool wxColourDisplay()
+{
+    // TODO
+    return true;
+}
+
+void wxGetMousePosition( int* x, int* y )
+{
+    // TODO
+};
+
+// Returns depth of screen
+int wxDisplayDepth()
+{
+    // TODO
+    return 0;
+}
+
+// Emit a beeeeeep
+void wxBell()
+{
+    // TODO
+}
+
+#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
+
+// Consume all events until no more left
+void wxFlushEvents()
+{
+}
+
+// Check whether this window wants to process messages, e.g. Stop button
+// in long calculations.
+bool wxCheckForInterrupt(wxWindow *wnd)
+{
+    // TODO
+    return false;
+}
+
+#endif
+