X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9d639ffa593d2b8996b00f6a21b6cba0bc30d3b0..621b83d9b34572321873cf3d54920a7749b2f53c:/src/cocoa/utils.cpp diff --git a/src/cocoa/utils.cpp b/src/cocoa/utils.cpp index c2112fc552..a2ae48aa1a 100644 --- a/src/cocoa/utils.cpp +++ b/src/cocoa/utils.cpp @@ -1,11 +1,10 @@ ///////////////////////////////////////////////////////////////////////////// // Name: src/cocoa/utils.cpp // Purpose: Various utilities -// Author: AUTHOR -// Modified by: +// Author: David Elliott // Created: 2003/??/?? // RCS-ID: $Id$ -// Copyright: (c) AUTHOR +// Copyright: (c) wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -19,6 +18,7 @@ #include "wx/apptrait.h" #include "wx/display.h" +#include "wx/cocoa/private/timer.h" #include @@ -62,6 +62,11 @@ wxPortId wxGUIAppTraits::GetToolkitVersion(int *verMaj, int *verMin) const return wxPORT_COCOA; } +wxTimerImpl* wxGUIAppTraits::CreateTimerImpl(wxTimer* timer) +{ + return new wxCocoaTimerImpl(timer); +} + wxWindow* wxFindWindowAtPoint(const wxPoint& pt) { return wxGenericFindWindowAtPoint(pt); @@ -111,77 +116,3 @@ bool wxCheckForInterrupt(wxWindow *wnd) #endif -// Reading and writing resources (eg WIN.INI, .Xdefaults) -#if wxUSE_RESOURCES -bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file) -{ - // TODO - return false; -} - -bool wxWriteResource(const wxString& section, const wxString& entry, float value, const wxString& file) -{ - char buf[50]; - sprintf(buf, "%.4f", value); - return wxWriteResource(section, entry, buf, file); -} - -bool wxWriteResource(const wxString& section, const wxString& entry, long value, const wxString& file) -{ - char buf[50]; - sprintf(buf, "%ld", value); - return wxWriteResource(section, entry, buf, file); -} - -bool wxWriteResource(const wxString& section, const wxString& entry, int value, const wxString& file) -{ - char buf[50]; - sprintf(buf, "%d", value); - return wxWriteResource(section, entry, buf, file); -} - -bool wxGetResource(const wxString& section, const wxString& entry, char **value, const wxString& file) -{ - // TODO - return false; -} - -bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file) -{ - char *s = NULL; - bool succ = wxGetResource(section, entry, (char **)&s, file); - if (succ) - { - *value = (float)strtod(s, NULL); - delete[] s; - return true; - } - else return false; -} - -bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file) -{ - char *s = NULL; - bool succ = wxGetResource(section, entry, (char **)&s, file); - if (succ) - { - *value = strtol(s, NULL, 10); - delete[] s; - return true; - } - else return false; -} - -bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file) -{ - char *s = NULL; - bool succ = wxGetResource(section, entry, (char **)&s, file); - if (succ) - { - *value = (int)strtol(s, NULL, 10); - delete[] s; - return true; - } - else return false; -} -#endif // wxUSE_RESOURCES