From a637417cf7b30a7438e8b72e9e61a4a33759e1f3 Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Mon, 22 Sep 2003 00:39:22 +0000 Subject: [PATCH] Added GUI part of AppTraits for OS/2. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/apptrait.h | 2 ++ include/wx/os2/apptbase.h | 2 +- include/wx/os2/apptrait.h | 44 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 include/wx/os2/apptrait.h diff --git a/include/wx/apptrait.h b/include/wx/apptrait.h index 45b1aff24f..5b136f473c 100644 --- a/include/wx/apptrait.h +++ b/include/wx/apptrait.h @@ -221,6 +221,8 @@ public: #include "wx/unix/apptrait.h" #elif defined(__WXMAC__) #include "wx/mac/apptrait.h" +#elif defined(__OS2__) + #include "wx/os2/apptrait.h" #else // at least, we need an implementation of GetToolkitInfo ! #if wxUSE_GUI diff --git a/include/wx/os2/apptbase.h b/include/wx/os2/apptbase.h index 26cca0d69a..934ef281e5 100644 --- a/include/wx/os2/apptbase.h +++ b/include/wx/os2/apptbase.h @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////// // Name: wx/os2/apptbase.h -// Purpose: declaration of wxAppTraits for MSW +// Purpose: declaration of wxAppTraits for OS2 // Author: Stefan Neis // Modified by: // Created: 22.09.2003 diff --git a/include/wx/os2/apptrait.h b/include/wx/os2/apptrait.h new file mode 100644 index 0000000000..2ac1f4a891 --- /dev/null +++ b/include/wx/os2/apptrait.h @@ -0,0 +1,44 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/os2/apptrait.h +// Purpose: class implementing wxAppTraits for OS/2 +// Author: Stefan Neis +// Modified by: +// Created: 22.09.2003 +// RCS-ID: $Id$ +// Copyright: (c) 2003 Stefan Neis +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OS2_APPTRAIT_H_ +#define _WX_OS2_APPTRAIT_H_ + +// ---------------------------------------------------------------------------- +// wxGUI/ConsoleAppTraits: must derive from wxAppTraits, not wxAppTraitsBase +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxConsoleAppTraits : public wxConsoleAppTraitsBase +{ +public: + virtual wxToolkitInfo& GetToolkitInfo(); +}; + +#if wxUSE_GUI + +class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase +{ +public: + virtual wxToolkitInfo& GetToolkitInfo(); + + // wxThread helpers + // ---------------- + + // Initialize PM facilities to enable GUI access + virtual void InitializeGui(unsigned long &ulHab); + + // Clean up message queue. + virtual void TerminateGui(unsigned long ulHab); +}; + +#endif // wxUSE_GUI + +#endif // _WX_OS2_APPTRAIT_H_