X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4055ed8281971e3d35bf04177193c27043d42ed1..9d5507f7a2701395e1d5c121bd877bb9066ee6ea:/src/palmos/app.cpp?ds=inline diff --git a/src/palmos/app.cpp b/src/palmos/app.cpp index 8c84faae12..888ab4bf8c 100644 --- a/src/palmos/app.cpp +++ b/src/palmos/app.cpp @@ -1,10 +1,10 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: app.cpp +// Name: src/palmos/app.cpp // Purpose: wxApp -// Author: William Osborne +// Author: William Osborne - minimal working wxPalmOS port // Modified by: // Created: 10/08/04 -// RCS-ID: $Id: +// RCS-ID: $Id$ // Copyright: (c) William Osborne // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -17,10 +17,6 @@ // headers // --------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "app.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -29,6 +25,7 @@ #endif #ifndef WX_PRECOMP + #include "wx/dynarray.h" #include "wx/frame.h" #include "wx/app.h" #include "wx/utils.h" @@ -42,16 +39,15 @@ #include "wx/dialog.h" #include "wx/msgdlg.h" #include "wx/intl.h" - #include "wx/dynarray.h" - #include "wx/wxchar.h" - #include "wx/icon.h" + #include "wx/crt.h" #include "wx/log.h" + #include "wx/module.h" #endif #include "wx/apptrait.h" #include "wx/filename.h" -#include "wx/module.h" #include "wx/dynlib.h" +#include "wx/evtloop.h" #if wxUSE_TOOLTIPS #include "wx/tooltip.h" @@ -68,8 +64,6 @@ // global variables // --------------------------------------------------------------------------- -extern wxList WXDLLEXPORT wxPendingDelete; - // NB: all "NoRedraw" classes must have the same names as the "normal" classes // with NR suffix - wxWindow::MSWCreate() supposes this const wxChar *wxCanvasClassName = wxT("wxWindowClass"); @@ -120,22 +114,21 @@ bool wxGUIAppTraits::DoMessageFromThreadWait() return false; } -wxToolkitInfo& wxGUIAppTraits::GetToolkitInfo() +wxPortId wxGUIAppTraits::GetToolkitVersion(int *majVer, int *minVer) const { - static wxToolkitInfo info; - wxToolkitInfo& baseInfo = wxAppTraits::GetToolkitInfo(); - info.versionMajor = baseInfo.versionMajor; - info.versionMinor = baseInfo.versionMinor; - info.os = baseInfo.os; - info.shortName = _T("palmos"); - info.name = _T("wxPalmOS"); -#ifdef __WXUNIVERSAL__ - info.shortName << _T("univ"); - info.name << _T("/wxUniversal"); -#endif - return info; + // TODO: how to get PalmOS GUI system version ? + return wxPORT_PALMOS; } +wxTimerImpl* wxGUIAppTraits::CreateTimerImpl(wxTimer *timer) +{ + return new wxPalmOSTimerImpl(timer); +}; + +wxEventLoopBase* wxGUIAppTraits::CreateEventLoop() +{ + return new wxEventLoop; +} // =========================================================================== // wxApp implementation // =========================================================================== @@ -149,7 +142,6 @@ int wxApp::m_nCmdShow = 0; IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler) BEGIN_EVENT_TABLE(wxApp, wxEvtHandler) - EVT_IDLE(wxApp::OnIdle) EVT_END_SESSION(wxApp::OnEndSession) EVT_QUERY_END_SESSION(wxApp::OnQueryEndSession) END_EVENT_TABLE() @@ -252,11 +244,6 @@ wxApp::~wxApp() // wxApp idle handling // ---------------------------------------------------------------------------- -void wxApp::OnIdle(wxIdleEvent& event) -{ - wxAppBase::OnIdle(event); -} - void wxApp::WakeUpIdle() { }