/////////////////////////////////////////////////////////////////////////////
-// 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
/////////////////////////////////////////////////////////////////////////////
// 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"
#endif
#ifndef WX_PRECOMP
+ #include "wx/dynarray.h"
#include "wx/frame.h"
#include "wx/app.h"
#include "wx/utils.h"
#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/log.h"
+ #include "wx/module.h"
#endif
#include "wx/apptrait.h"
#include "wx/filename.h"
-#include "wx/module.h"
#include "wx/dynlib.h"
#if wxUSE_TOOLTIPS
// 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");
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("msw");
- info.name = _T("wxMSW");
-#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);
+};
// ===========================================================================
// wxApp implementation
// ===========================================================================
// to create a window of this class is made.
bool wxApp::RegisterWindowClasses()
{
- return TRUE;
+ return true;
}
// ---------------------------------------------------------------------------
bool wxApp::UnregisterWindowClasses()
{
- bool retval = TRUE;
+ bool retval = true;
return retval;
}
void wxApp::OnEndSession(wxCloseEvent& WXUNUSED(event))
{
if (GetTopWindow())
- GetTopWindow()->Close(TRUE);
+ GetTopWindow()->Close(true);
}
// Default behaviour: close the application with prompts. The
if (GetTopWindow())
{
if (!GetTopWindow()->Close(!event.CanVeto()))
- event.Veto(TRUE);
+ event.Veto(true);
}
}