From 62be94e1b151370dda8966b1ed409943f12647e6 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 28 Feb 2004 13:18:08 +0000 Subject: [PATCH] make use of GPE feature git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/app.cpp | 9 +++++++++ src/gtk/toplevel.cpp | 38 ++++++++++++++++++-------------------- src/gtk1/app.cpp | 9 +++++++++ src/gtk1/toplevel.cpp | 38 ++++++++++++++++++-------------------- 4 files changed, 54 insertions(+), 40 deletions(-) diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 53aa238e66..fee3c423dc 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -35,6 +35,10 @@ #include "wx/module.h" #include "wx/image.h" +#ifdef __WXGPE__ +#include +#endif + #ifdef __WXUNIVERSAL__ #include "wx/univ/theme.h" #include "wx/univ/renderer.h" @@ -582,7 +586,12 @@ bool wxApp::Initialize(int& argc, wxChar **argv) argvGTK[argc] = NULL; int argcGTK = argc; + +#ifdef __WXGPE__ + gpe_application_init( &argcGTK, &argvGTK ); +#else gtk_init( &argcGTK, &argvGTK ); +#endif if ( argcGTK != argc ) { diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index f5f5b12e73..78fd8c93cb 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -653,16 +653,15 @@ void wxTopLevelWindowGTK::DoSetSize( int x, int y, int width, int height, int si maxWidth = GetMaxWidth(), maxHeight = GetMaxHeight(); - if (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA) - { - // GPE's window manager doesn't like size hints - // at all, esp. when the user has to use the - // virtual keyboard. - minWidth = -1; - minHeight = -1; - maxWidth = -1; - maxHeight = -1; - } +#ifdef __WXGPE__ + // GPE's window manager doesn't like size hints + // at all, esp. when the user has to use the + // virtual keyboard. + minWidth = -1; + minHeight = -1; + maxWidth = -1; + maxHeight = -1; +#endif if ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth; if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight; @@ -745,16 +744,15 @@ void wxTopLevelWindowGTK::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), maxWidth = GetMaxWidth(), maxHeight = GetMaxHeight(); - if (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA) - { - // GPE's window manager doesn't like size hints - // at all, esp. when the user has to use the - // virtual keyboard. - minWidth = -1; - minHeight = -1; - maxWidth = -1; - maxHeight = -1; - } +#ifdef __WXGPE__ + // GPE's window manager doesn't like size hints + // at all, esp. when the user has to use the + // virtual keyboard. + minWidth = -1; + minHeight = -1; + maxWidth = -1; + maxHeight = -1; +#endif if ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth; if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight; diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index 53aa238e66..fee3c423dc 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -35,6 +35,10 @@ #include "wx/module.h" #include "wx/image.h" +#ifdef __WXGPE__ +#include +#endif + #ifdef __WXUNIVERSAL__ #include "wx/univ/theme.h" #include "wx/univ/renderer.h" @@ -582,7 +586,12 @@ bool wxApp::Initialize(int& argc, wxChar **argv) argvGTK[argc] = NULL; int argcGTK = argc; + +#ifdef __WXGPE__ + gpe_application_init( &argcGTK, &argvGTK ); +#else gtk_init( &argcGTK, &argvGTK ); +#endif if ( argcGTK != argc ) { diff --git a/src/gtk1/toplevel.cpp b/src/gtk1/toplevel.cpp index f5f5b12e73..78fd8c93cb 100644 --- a/src/gtk1/toplevel.cpp +++ b/src/gtk1/toplevel.cpp @@ -653,16 +653,15 @@ void wxTopLevelWindowGTK::DoSetSize( int x, int y, int width, int height, int si maxWidth = GetMaxWidth(), maxHeight = GetMaxHeight(); - if (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA) - { - // GPE's window manager doesn't like size hints - // at all, esp. when the user has to use the - // virtual keyboard. - minWidth = -1; - minHeight = -1; - maxWidth = -1; - maxHeight = -1; - } +#ifdef __WXGPE__ + // GPE's window manager doesn't like size hints + // at all, esp. when the user has to use the + // virtual keyboard. + minWidth = -1; + minHeight = -1; + maxWidth = -1; + maxHeight = -1; +#endif if ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth; if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight; @@ -745,16 +744,15 @@ void wxTopLevelWindowGTK::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), maxWidth = GetMaxWidth(), maxHeight = GetMaxHeight(); - if (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA) - { - // GPE's window manager doesn't like size hints - // at all, esp. when the user has to use the - // virtual keyboard. - minWidth = -1; - minHeight = -1; - maxWidth = -1; - maxHeight = -1; - } +#ifdef __WXGPE__ + // GPE's window manager doesn't like size hints + // at all, esp. when the user has to use the + // virtual keyboard. + minWidth = -1; + minHeight = -1; + maxWidth = -1; + maxHeight = -1; +#endif if ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth; if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight; -- 2.45.2