Added wxWINDOWS_POCKETPC, wxWINDOWS_SMARTPHONE

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2005-03-16 10:18:13 +00:00
parent ef826e2496
commit c75d190a0a
5 changed files with 33 additions and 8 deletions

View File

@@ -1388,10 +1388,13 @@ Both {\it major} and {\it minor} have to be looked at as hexadecimal numbers. So
\twocolitem{Motif}{Return value is wxMOTIF\_X, {\it major} is X version, {\it minor} is X revision.} \twocolitem{Motif}{Return value is wxMOTIF\_X, {\it major} is X version, {\it minor} is X revision.}
\twocolitem{OS/2}{Return value is wxOS2\_PM.} \twocolitem{OS/2}{Return value is wxOS2\_PM.}
\twocolitem{Windows 3.1}{Return value is wxWINDOWS, {\it major} is 3, {\it minor} is 1.} \twocolitem{Windows 3.1}{Return value is wxWINDOWS, {\it major} is 3, {\it minor} is 1.}
\twocolitem{Windows NT/2000}{Return value is wxWINDOWS\_NT, version is returned in {\it major} and {\it minor}} \twocolitem{Windows NT/2000}{Return value is wxWINDOWS\_NT, version is returned in {\it major} and {\it minor}.}
\twocolitem{Windows 98}{Return value is wxWIN95, {\it major} is 4, {\it minor} is 1 or greater.} \twocolitem{Windows 98}{Return value is wxWIN95, {\it major} is 4, {\it minor} is 1 or greater.}
\twocolitem{Windows 95}{Return value is wxWIN95, {\it major} is 4, {\it minor} is 0.} \twocolitem{Windows 95}{Return value is wxWIN95, {\it major} is 4, {\it minor} is 0.}
\twocolitem{Win32s (Windows 3.1)}{Return value is wxWIN32S, {\it major} is 3, {\it minor} is 1.} \twocolitem{Win32s (Windows 3.1)}{Return value is wxWIN32S, {\it major} is 3, {\it minor} is 1.}
\twocolitem{Windows PocketPC}{Return value is wxWINDOWS\_POCKETPC, version is returned in {\it major} and {\it minor}.}
\twocolitem{Windows Smartphone}{Return value is wxWINDOWS\_SMARTPHONE, version is returned in {\it major} and {\it minor}.}
\twocolitem{Windows CE (non-specific)}{Return value is wxWINDOWS\_CE, version is returned in {\it major} and {\it minor}.}
\twocolitem{Watcom C++ 386 supervisor mode (Windows 3.1)}{Return value is wxWIN386, {\it major} is 3, {\it minor} is 1.} \twocolitem{Watcom C++ 386 supervisor mode (Windows 3.1)}{Return value is wxWIN386, {\it major} is 3, {\it minor} is 1.}
\end{twocollist} \end{twocollist}

View File

@@ -34,7 +34,7 @@ the amount of spacing used by sizers, for which you can
use a macro such as this: use a macro such as this:
\begin{verbatim} \begin{verbatim}
#if defined(__WXWINCE__ #if defined(__WXWINCE__)
#define wxLARGESMALL(large,small) small #define wxLARGESMALL(large,small) small
#else #else
#define wxLARGESMALL(large,small) large #define wxLARGESMALL(large,small) large
@@ -52,8 +52,17 @@ You can test the return value of wxSystemSettings::GetScreenType()
for a qualitative assessment of what kind of display is available, for a qualitative assessment of what kind of display is available,
or use wxGetDisplaySize() if you need more information. or use wxGetDisplaySize() if you need more information.
You can also use wxGetOsVersion to test for a version of Windows CE at
run-time (see the next section). However, because different builds
are currently required to target different kinds of device, these
values are hard-wired according to the build, and you cannot
dynamically adapt the same executable for different major Windows CE
platforms. This would require a different approach to the way
wxWidgets adapts its behaviour (such as for menubars) to suit the
style of device.
See the "Life!" example (demos/life) for an example of See the "Life!" example (demos/life) for an example of
an application that has been tailored for Windows CE use. an application that has been tailored for PocketPC and Smartphone use.
\subsubsection{Testing for WinCE SDKs} \subsubsection{Testing for WinCE SDKs}
@@ -70,6 +79,14 @@ Use these preprocessor symbols to test for the different types of device or SDK:
\twocolitem{\_\_WINCE\_NET\_\_}{Microsoft-powered Windows CE .NET devices (\_WIN32\_WCE is 400 or greater)} \twocolitem{\_\_WINCE\_NET\_\_}{Microsoft-powered Windows CE .NET devices (\_WIN32\_WCE is 400 or greater)}
\end{twocollist} \end{twocollist}
wxGetOsVersion will return these values:
\begin{twocollist}\itemsep=0pt
\twocolitem{wxWINDOWS\_POCKETPC}{The application is running under PocketPC.}
\twocolitem{wxWINDOWS\_SMARTPHONE}{The application is running under Smartphone.}
\twocolitem{wxWINDOWS\_CE}{The application is running under Windows CE (built with the Standard SDK).}
\end{twocollist}
\subsubsection{Window sizing in wxWinCE} \subsubsection{Window sizing in wxWinCE}
When creating frames and dialogs, create them with wxDefaultPosition and When creating frames and dialogs, create them with wxDefaultPosition and

View File

@@ -604,7 +604,9 @@ enum
wxWIN32S, /* Windows 32S API */ wxWIN32S, /* Windows 32S API */
wxWIN95, /* Windows 95 */ wxWIN95, /* Windows 95 */
wxWIN386, /* Watcom 32-bit supervisor modus */ wxWIN386, /* Watcom 32-bit supervisor modus */
wxWINDOWS_CE, /* Windows CE */ wxWINDOWS_CE, /* Windows CE (generic) */
wxWINDOWS_POCKETPC, /* Windows CE PocketPC */
wxWINDOWS_SMARTPHONE, /* Windows CE Smartphone */
wxMGL_UNIX, /* MGL with direct hardware access */ wxMGL_UNIX, /* MGL with direct hardware access */
wxMGL_X, /* MGL on X */ wxMGL_X, /* MGL on X */
wxMGL_WIN32, /* MGL on Win32 */ wxMGL_WIN32, /* MGL on Win32 */

View File

@@ -279,7 +279,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
// program under Win9x w/o MSLU emulation layer - if so, abort right now // program under Win9x w/o MSLU emulation layer - if so, abort right now
// as it has no chance to work // as it has no chance to work
#if wxUSE_UNICODE && !wxUSE_UNICODE_MSLU #if wxUSE_UNICODE && !wxUSE_UNICODE_MSLU
if ( wxGetOsVersion() != wxWINDOWS_NT && wxGetOsVersion() != wxWINDOWS_CE ) if ( wxGetOsVersion() != wxWINDOWS_NT && wxGetOsVersion() != wxWINDOWS_CE && wxGetOsVersion() != wxWINDOWS_SMARTPHONE && wxGetOsVersion() != wxWINDOWS_POCKETPC )
{ {
// note that we can use MessageBoxW() as it's implemented even under // note that we can use MessageBoxW() as it's implemented even under
// Win9x - OTOH, we can't use wxGetTranslation() because the file APIs // Win9x - OTOH, we can't use wxGetTranslation() because the file APIs

View File

@@ -1210,6 +1210,11 @@ wxToolkitInfo& wxAppTraits::GetToolkitInfo()
s_major = info.dwMajorVersion; s_major = info.dwMajorVersion;
s_minor = info.dwMinorVersion; s_minor = info.dwMinorVersion;
#ifdef __SMARTPHONE__
s_ver = wxWINDOWS_SMARTPHONE;
#elif defined(__POCKETPC__)
s_ver = wxWINDOWS_POCKETPC;
#else
switch ( info.dwPlatformId ) switch ( info.dwPlatformId )
{ {
case VER_PLATFORM_WIN32s: case VER_PLATFORM_WIN32s:
@@ -1223,12 +1228,10 @@ wxToolkitInfo& wxAppTraits::GetToolkitInfo()
case VER_PLATFORM_WIN32_NT: case VER_PLATFORM_WIN32_NT:
s_ver = wxWINDOWS_NT; s_ver = wxWINDOWS_NT;
break; break;
#ifdef __WXWINCE__
case VER_PLATFORM_WIN32_CE: case VER_PLATFORM_WIN32_CE:
s_ver = wxWINDOWS_CE; s_ver = wxWINDOWS_CE;
break;
#endif
} }
#endif
} }
} }