]> git.saurik.com Git - wxWidgets.git/commitdiff
Support for automatic setup.h in OS/2 with OW builds. __WXOS2__ final removal. Source...
authorWłodzimierz Skiba <abx@abx.art.pl>
Thu, 27 Oct 2005 16:01:45 +0000 (16:01 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Thu, 27 Oct 2005 16:01:45 +0000 (16:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

18 files changed:
docs/latex/wx/cppconst.tex
include/wx/chkconf.h
include/wx/os2/chkconf.h [new file with mode: 0644]
include/wx/os2/private.h
include/wx/platform.h
include/wx/wxprec.h
samples/nativdlg/nativdlg.cpp
samples/vscroll/vstest.cpp
src/common/prntbase.cpp
src/os2/clipbrd.cpp
src/os2/dataobj.cpp
src/os2/dc.cpp
src/os2/dcprint.cpp
src/os2/dnd.cpp
src/os2/frame.cpp
src/os2/icon.cpp
src/os2/print.cpp
src/os2/window.cpp

index 9891f0a1c778a992602e5d8d6e75d16d2aed044d..4863cb479b64dfd07cae3a24d0497bcbe825ee4e 100644 (file)
@@ -1,4 +1,15 @@
-\section{Preprocesser symbols defined by wxWidgets}\label{cppconst}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Name:        cppconst.tex
+%% Purpose:     Peprocessor symbols
+%% Author:
+%% Modified by:
+%% Created:
+%% RCS-ID:      $Id$
+%% Copyright:   (c) wxWidgets
+%% License:     wxWindows license
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\section{Preprocessor symbols defined by wxWidgets}\label{cppconst}
 
 These are preprocessor symbols used in the wxWidgets source, grouped
 by category (and sorted by alphabetical order inside each category). All of
 
 These are preprocessor symbols used in the wxWidgets source, grouped
 by category (and sorted by alphabetical order inside each category). All of
@@ -28,7 +39,6 @@ always tested using \texttt{#ifdef} and not \texttt{#if}.
 \twocolitem{\_\_WXMGL\_\_}{SciTech Soft MGL (\_\_WXUNIVERSAL\_\_ will be also
 defined)}
 \twocolitem{\_\_WXMSW\_\_}{Any Windows}
 \twocolitem{\_\_WXMGL\_\_}{SciTech Soft MGL (\_\_WXUNIVERSAL\_\_ will be also
 defined)}
 \twocolitem{\_\_WXMSW\_\_}{Any Windows}
-\twocolitem{\_\_WXOS2\_\_}{Identical to \_\_WXPM\_\_}
 \twocolitem{\_\_WXOSX\_\_}{Any Mac OS X port (either Carbon or Cocoa)}
 \twocolitem{\_\_WXPALMOS\_\_}{PalmOS}
 \twocolitem{\_\_WXPM\_\_}{OS/2 native Presentation Manager}
 \twocolitem{\_\_WXOSX\_\_}{Any Mac OS X port (either Carbon or Cocoa)}
 \twocolitem{\_\_WXPALMOS\_\_}{PalmOS}
 \twocolitem{\_\_WXPM\_\_}{OS/2 native Presentation Manager}
@@ -52,7 +62,7 @@ summarize:
 \begin{itemize}
 \item If you want to test for all Mac platforms, classic and OS X, you
 should test both \texttt{\_\_WXMAC\_\_} and \texttt{\_\_WXCOCOA\_\_}.
 \begin{itemize}
 \item If you want to test for all Mac platforms, classic and OS X, you
 should test both \texttt{\_\_WXMAC\_\_} and \texttt{\_\_WXCOCOA\_\_}.
-\item If you want to test for any GUI Mac port under OS X, use 
+\item If you want to test for any GUI Mac port under OS X, use
 \texttt{\_\_WXOSX\_\_}.
 \item If you want to test for any port under Mac OS X, including, for
 example, wxGTK and also wxBase, use \texttt{\_\_DARWIN\_\_} (see below).
 \texttt{\_\_WXOSX\_\_}.
 \item If you want to test for any port under Mac OS X, including, for
 example, wxGTK and also wxBase, use \texttt{\_\_DARWIN\_\_} (see below).
@@ -125,9 +135,9 @@ compiler used.
 to the compiler version: $500$ is $5.0$.}
 \twocolitem{\_\_DJGPP\_\_}{DJGPP}
 \twocolitem{\_\_DIGITALMARS\_\_}{Digital Mars}
 to the compiler version: $500$ is $5.0$.}
 \twocolitem{\_\_DJGPP\_\_}{DJGPP}
 \twocolitem{\_\_DIGITALMARS\_\_}{Digital Mars}
-\twocolitem{\_\_GNUG\_\_}{Gnu C++ on any platform, see also 
+\twocolitem{\_\_GNUG\_\_}{Gnu C++ on any platform, see also
 \helpref{wxCHECK\_GCC\_VERSION}{wxcheckgccversion}}
 \helpref{wxCHECK\_GCC\_VERSION}{wxcheckgccversion}}
-\twocolitem{\_\_GNUWIN32\_\_}{Gnu-Win32 compiler, see also 
+\twocolitem{\_\_GNUWIN32\_\_}{Gnu-Win32 compiler, see also
 \helpref{wxCHECK\_W32API\_VERSION}{wxcheckw32apiversion}}
 \twocolitem{\_\_MINGW32\_\_}{MinGW}
 \twocolitem{\_\_MWERKS\_\_}{CodeWarrior MetroWerks compiler}
 \helpref{wxCHECK\_W32API\_VERSION}{wxcheckw32apiversion}}
 \twocolitem{\_\_MINGW32\_\_}{MinGW}
 \twocolitem{\_\_MWERKS\_\_}{CodeWarrior MetroWerks compiler}
@@ -157,7 +167,7 @@ also \helpref{wxCHECK\_VERSION}{wxcheckversion}}
 this case, \texttt{wx/wxprec.h} includes \texttt{wx/wx.h} which, in turn,
 includes a number of wxWidgets headers thus making it unnecessary to include
 them explicitly. However if this is not defined, you do need to include them
 this case, \texttt{wx/wxprec.h} includes \texttt{wx/wx.h} which, in turn,
 includes a number of wxWidgets headers thus making it unnecessary to include
 them explicitly. However if this is not defined, you do need to include them
-and so the usual idiom which allows to support both cases is to first include 
+and so the usual idiom which allows to support both cases is to first include
 \texttt{wx/wxprec.h} and then, inside \texttt{#ifndef WX\_PRECOMP}, individual
 headers you need.}
 \twocolitem{\_UNICODE and UNICODE}{both are defined if wxUSE\_UNICODE is set to $1$}
 \texttt{wx/wxprec.h} and then, inside \texttt{#ifndef WX\_PRECOMP}, individual
 headers you need.}
 \twocolitem{\_UNICODE and UNICODE}{both are defined if wxUSE\_UNICODE is set to $1$}
@@ -175,4 +185,3 @@ don't include compiler flags needed for multithreaded code generation. This
 implies that wxUSE\_THREADS is $0$ and also that other (non wx-based) threading
 packages cannot be used neither.}
 \end{twocollist}
 implies that wxUSE\_THREADS is $0$ and also that other (non wx-based) threading
 packages cannot be used neither.}
 \end{twocollist}
-
index a991742cb7281dfa17b18e92adca1aa0d613cdbb..d5766c93d31e9830d74fe91697082358beee70a3 100644 (file)
@@ -23,6 +23,8 @@
 #  include "wx/msw/chkconf.h"
 #elif defined(__WXMAC__)
 #  include "wx/mac/chkconf.h"
 #  include "wx/msw/chkconf.h"
 #elif defined(__WXMAC__)
 #  include "wx/mac/chkconf.h"
+#elif defined(__OS2__)
+#  include "wx/os2/chkconf.h"
 #elif defined(__WXMOTIF__)
 #  include "wx/motif/chkconf.h"
 #endif
 #elif defined(__WXMOTIF__)
 #  include "wx/motif/chkconf.h"
 #endif
diff --git a/include/wx/os2/chkconf.h b/include/wx/os2/chkconf.h
new file mode 100644 (file)
index 0000000..ea0ac4d
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Name:        wx/os2/chkconf.h
+ * Purpose:     Compiler-specific configuration checking
+ * Author:      Julian Smart
+ * Modified by:
+ * Created:     01/02/97
+ * RCS-ID:      $Id$
+ * Copyright:   (c) Julian Smart
+ * Licence:     wxWindows licence
+ */
+
+/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
+
+#ifndef _WX_OS2_CHKCONF_H_
+#define _WX_OS2_CHKCONF_H_
+
+#ifdef __WATCOMC__
+
+/* Watcom builds for OS/2 port are setup.h driven and setup.h is
+   automatically generated from include/wx/setup_inc.h so we have
+   to disable here features not supported currently or enable
+   features required */
+
+#if wxUSE_STACKWALKER
+#   undef wxUSE_STACKWALKER
+#   define wxUSE_STACKWALKER 0
+#endif /* wxUSE_STACKWALKER */
+
+#if !wxUSE_POSTSCRIPT
+#   undef wxUSE_POSTSCRIPT
+#   define wxUSE_POSTSCRIPT 1
+#endif
+
+#endif /* __WATCOM__ */
+
+#endif /* _WX_OS2_CHKCONF_H_ */
index d0773e6e6aab9789ce45ecc9bf6a8f8e6838d0eb..d5481d7add24701bbc45090049b4708878654b5e 100644 (file)
 #define INCL_WINSYS
 #define INCL_SHLERRORS
 #define INCL_DOS
 #define INCL_WINSYS
 #define INCL_SHLERRORS
 #define INCL_DOS
+#define INCL_WINATOM
+#define INCL_WIN
 #include <os2.h>
 
 #include <os2.h>
 
+#if defined(__WATCOMC__) && ( __WATCOMC__ < 1240 )
+    // missing in OpenWatcom 1.3 but added in 1.4
+    inline HATOMTBL APIENTRY WinQuerySystemAtomTable(VOID){return NULL;}
+    inline ULONG APIENTRY WinQueryAtomName(HATOMTBL,ATOM,PCSZ,ULONG){return 0;}
+    inline LONG APIENTRY GpiPointArc(HPS,PPOINTL){return GPI_ERROR;}
+    inline BOOL APIENTRY WinDrawPointer(HPS,LONG,LONG,HPOINTER,ULONG){return FALSE;}
+    inline HPOINTER APIENTRY WinCreatePointerIndirect(HWND,PPOINTERINFO){return NULLHANDLE;}
+    inline BOOL APIENTRY WinGetMaxPosition(HWND,PSWP){return FALSE;}
+    inline BOOL APIENTRY WinGetMinPosition(HWND,PSWP,PPOINTL){return FALSE;}
+#endif
+
 #if defined(__WATCOMC__) && defined(__WXMOTIF__)
     #include <os2def.h>
     #define I_NEED_OS2_H
 #if defined(__WATCOMC__) && defined(__WXMOTIF__)
     #include <os2def.h>
     #define I_NEED_OS2_H
index f91591ed0137900e61e7e7ecb96a704f747b1d68..50b2c69ce2b097d561c79a4fbad175b16cee9dcf 100644 (file)
     ( defined( __CYGWIN__ ) && defined( __WINDOWS__ ) ) || \
       (defined(__WATCOMC__) && __WATCOMC__ >= 1200) ) && \
     !defined(__DOS__) && \
     ( defined( __CYGWIN__ ) && defined( __WINDOWS__ ) ) || \
       (defined(__WATCOMC__) && __WATCOMC__ >= 1200) ) && \
     !defined(__DOS__) && \
-    !defined(__WXOS2__) && \
+    !defined(__WXPM__) && \
     !defined(__WXMOTIF__) && \
     !defined(__WXGTK__) && \
     !defined(__WXX11__) && \
     !defined(__WXMOTIF__) && \
     !defined(__WXGTK__) && \
     !defined(__WXX11__) && \
index 1d3844dd9c6690ce606306cb65fc73987373539b..abdb7d02a2f3e1a824eda2d636367341fcf3b4fb 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        wxprec.h
+// Name:        wx/wxprec.h
 // Purpose:     Includes the appropriate files for precompiled headers
 // Author:      Julian Smart
 // Modified by:
 // Purpose:     Includes the appropriate files for precompiled headers
 // Author:      Julian Smart
 // Modified by:
 #   include <PalmOS.h>
 #endif
 
 #   include <PalmOS.h>
 #endif
 
+// include <os2.h>
+#ifdef __OS2__
+#   include "wx/os2/private.h"
+#endif
+
 // include the most common wx headers
 #include "wx/wx.h"
 
 // include the most common wx headers
 #include "wx/wx.h"
 
index 4e52a9ad23bf0cdad791d1d01cbaa4a1811fc88e..16e810f7856b1223e52422b2037a06ce0e2ba2b0 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        nativdlg.cpp
+// Name:        samples/nativdlg/nativdlg.cpp
 // Purpose:     Native Windows dialog sample
 // Author:      Julian Smart
 // Modified by:
 // Purpose:     Native Windows dialog sample
 // Author:      Julian Smart
 // Modified by:
@@ -82,7 +82,7 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
 
 void MyFrame::OnTest1(wxCommandEvent& WXUNUSED(event))
 {
 
 void MyFrame::OnTest1(wxCommandEvent& WXUNUSED(event))
 {
-#if ( defined(__WXOS2__) || defined(__WXMSW__) ) && !defined(__WXUNIVERSAL__)
+#if ( defined(__WXPM__) || defined(__WXMSW__) ) && !defined(__WXUNIVERSAL__)
     MyDialog dialog;
     if (dialog.LoadNativeDialog(this, _T("dialog1")))
     {
     MyDialog dialog;
     if (dialog.LoadNativeDialog(this, _T("dialog1")))
     {
@@ -108,5 +108,3 @@ void MyDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
 {
   EndModal(wxID_CANCEL);
 }
 {
   EndModal(wxID_CANCEL);
 }
-
-
index cddf8b9c6b9f1db13de04ba015e93aeed43d06c3..ff4b716705b43565e45e40732d7e295c2835aa31 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        vscroll.cpp
+// Name:        samples/vscroll/vstest.cpp
 // Purpose:     VScroll wxWidgets sample
 // Author:      Vadim Zeitlin
 // Modified by:
 // Purpose:     VScroll wxWidgets sample
 // Author:      Vadim Zeitlin
 // Modified by:
@@ -40,7 +40,7 @@
 // ----------------------------------------------------------------------------
 
 // the application icon (under Windows and OS/2 it is in resources)
 // ----------------------------------------------------------------------------
 
 // the application icon (under Windows and OS/2 it is in resources)
-#if !defined(__WXMSW__) && !defined(__WXOS2__)
+#if !defined(__WXMSW__) && !defined(__WXPM__)
     #include "../sample.xpm"
 #endif
 
     #include "../sample.xpm"
 #endif
 
index 2a46570fa05e1d1524ce25a1462abe87e382d0de..0f2e0784669aed1bb8ee71243cb2226717f2de3d 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        prntbase.cpp
+// Name:        src/common/prntbase.cpp
 // Purpose:     Printing framework base class implementation
 // Author:      Julian Smart
 // Modified by:
 // Purpose:     Printing framework base class implementation
 // Author:      Julian Smart
 // Modified by:
@@ -1513,5 +1513,4 @@ void wxPrintPreview::DetermineScaling()
     m_pimpl->DetermineScaling();
 }
 
     m_pimpl->DetermineScaling();
 }
 
-
 #endif // wxUSE_PRINTING_ARCHITECTURE
 #endif // wxUSE_PRINTING_ARCHITECTURE
index 3474d380ab6a59e49330cb04c5a9eaae43d85ee3..e2c6f65912e2d1b73e5739944a8ab87a11146c7f 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        clipbrd.cpp
+// Name:        src/os2/clipbrd.cpp
 // Purpose:     Clipboard functionality
 // Author:      David Webster
 // Modified by:
 // Purpose:     Clipboard functionality
 // Author:      David Webster
 // Modified by:
@@ -55,7 +55,7 @@
 // old-style clipboard functions using Windows API
 // ---------------------------------------------------------------------------
 
 // old-style clipboard functions using Windows API
 // ---------------------------------------------------------------------------
 
-static bool gs_wxClipboardIsOpen = FALSE;
+static bool gs_wxClipboardIsOpen = false;
 
 bool wxOpenClipboard()
 {
 
 bool wxOpenClipboard()
 {
@@ -76,24 +76,24 @@ bool wxOpenClipboard()
     {
         wxLogDebug(wxT("Can not open clipboard without a main window."));
 
     {
         wxLogDebug(wxT("Can not open clipboard without a main window."));
 
-        return FALSE;
+        return false;
     }
 */
     }
 */
-    return FALSE;
+    return false;
 }
 
 bool wxCloseClipboard()
 {
 }
 
 bool wxCloseClipboard()
 {
-    wxCHECK_MSG( gs_wxClipboardIsOpen, FALSE, wxT("clipboard is not opened") );
+    wxCHECK_MSG( gs_wxClipboardIsOpen, false, wxT("clipboard is not opened") );
 // TODO:
 /*
 // TODO:
 /*
-    gs_wxClipboardIsOpen = FALSE;
+    gs_wxClipboardIsOpen = false;
 
     if ( ::CloseClipboard() == 0 )
     {
         wxLogSysError(_("Failed to close the clipboard."));
 
 
     if ( ::CloseClipboard() == 0 )
     {
         wxLogSysError(_("Failed to close the clipboard."));
 
-        return FALSE;
+        return false;
     }
 */
     return true;
     }
 */
     return true;
@@ -107,7 +107,7 @@ bool wxEmptyClipboard()
     {
         wxLogSysError(_("Failed to empty the clipboard."));
 
     {
         wxLogSysError(_("Failed to empty the clipboard."));
 
-        return FALSE;
+        return false;
     }
 */
     return true;
     }
 */
     return true;
@@ -137,7 +137,7 @@ static bool wxSetClipboardData(wxDataObject *data)
         wxLogSysError(_("Failed to allocate %dKb of memory for clipboard "
                         "transfer."), size / 1024);
 
         wxLogSysError(_("Failed to allocate %dKb of memory for clipboard "
                         "transfer."), size / 1024);
 
-        return FALSE;
+        return false;
     }
 
     LPVOID lpGlobalMemory = ::GlobalLock(hGlobal);
     }
 
     LPVOID lpGlobalMemory = ::GlobalLock(hGlobal);
@@ -152,7 +152,7 @@ static bool wxSetClipboardData(wxDataObject *data)
         wxLogSysError(_("Failed to set clipboard data in format %s"),
                       wxDataObject::GetFormatName(format));
 
         wxLogSysError(_("Failed to set clipboard data in format %s"),
                       wxDataObject::GetFormatName(format));
 
-        return FALSE;
+        return false;
     }
 */
     return true;
     }
 */
     return true;
@@ -160,9 +160,9 @@ static bool wxSetClipboardData(wxDataObject *data)
 #endif // wxUSE_DRAG_AND_DROP
 #endif
 
 #endif // wxUSE_DRAG_AND_DROP
 #endif
 
-bool wxSetClipboardData(wxDataFormat dataFormat,
-                        const void *data,
-                        int width, int height)
+bool wxSetClipboardData(wxDataFormat WXUNUSED(dataFormat),
+                        const void *WXUNUSED(data),
+                        int WXUNUSED(width), int WXUNUSED(height))
 {
 // TODO:
 /*
 {
 // TODO:
 /*
@@ -185,7 +185,7 @@ bool wxSetClipboardData(wxDataFormat dataFormat,
                     SelectObject(hdcSrc, old);
                     DeleteDC(hdcMem);
                     DeleteDC(hdcSrc);
                     SelectObject(hdcSrc, old);
                     DeleteDC(hdcMem);
                     DeleteDC(hdcSrc);
-                    return FALSE;
+                    return false;
                 }
 
                 HBITMAP old1 = (HBITMAP) SelectObject(hdcMem, hBitmap);
                 }
 
                 HBITMAP old1 = (HBITMAP) SelectObject(hdcMem, hBitmap);
@@ -242,7 +242,7 @@ bool wxSetClipboardData(wxDataFormat dataFormat,
         default:
             {
                 wxLogError(_("Unsupported clipboard format."));
         default:
             {
                 wxLogError(_("Unsupported clipboard format."));
-                return FALSE;
+                return false;
             }
 
         case wxDF_OEMTEXT:
             }
 
         case wxDF_OEMTEXT:
@@ -275,13 +275,13 @@ bool wxSetClipboardData(wxDataFormat dataFormat,
     {
         wxLogSysError(_("Failed to set clipboard data."));
 
     {
         wxLogSysError(_("Failed to set clipboard data."));
 
-        return FALSE;
+        return false;
     }
 */
     return true;
 }
 
     }
 */
     return true;
 }
 
-void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
+void *wxGetClipboardData(wxDataFormat WXUNUSED(dataFormat), long *WXUNUSED(len))
 {
 //  void *retval = NULL;
 // TODO:
 {
 //  void *retval = NULL;
 // TODO:
@@ -342,7 +342,7 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
         case wxDF_DIB:
             {
                 wxLogError(_("Unsupported clipboard format."));
         case wxDF_DIB:
             {
                 wxLogError(_("Unsupported clipboard format."));
-                return FALSE;
+                return NULL;
             }
 
         case wxDF_OEMTEXT:
             }
 
         case wxDF_OEMTEXT:
@@ -414,15 +414,15 @@ wxDataFormat wxEnumClipboardFormats(wxDataFormat dataFormat)
   return dataFormat;
 }
 
   return dataFormat;
 }
 
-int wxRegisterClipboardFormat(wxChar *formatName)
+int wxRegisterClipboardFormat(wxChar *WXUNUSED(formatName))
 {
   // TODO: return ::RegisterClipboardFormat(formatName);
   return 0;
 }
 
 {
   // TODO: return ::RegisterClipboardFormat(formatName);
   return 0;
 }
 
-bool wxGetClipboardFormatName(wxDataFormat dataFormat,
-                              wxChar *formatName,
-                              int maxCount)
+bool wxGetClipboardFormatName(wxDataFormat WXUNUSED(dataFormat),
+                              wxChar *WXUNUSED(formatName),
+                              int WXUNUSED(maxCount))
 {
   // TODO: return ::GetClipboardFormatName((int)dataFormat, formatName, maxCount) > 0;
   return 0;
 {
   // TODO: return ::GetClipboardFormatName((int)dataFormat, formatName, maxCount) > 0;
   return 0;
@@ -450,7 +450,7 @@ void wxClipboard::Clear()
 bool wxClipboard::Flush()
 {
     // TODO:
 bool wxClipboard::Flush()
 {
     // TODO:
-    return FALSE;
+    return false;
 }
 
 bool wxClipboard::Open()
 }
 
 bool wxClipboard::Open()
@@ -463,7 +463,7 @@ bool wxClipboard::IsOpened() const
     return wxIsClipboardOpened();
 }
 
     return wxIsClipboardOpened();
 }
 
-bool wxClipboard::SetData( wxDataObject *data )
+bool wxClipboard::SetData( wxDataObject *WXUNUSED(data) )
 {
     (void)wxEmptyClipboard();
     // TODO:
 {
     (void)wxEmptyClipboard();
     // TODO:
@@ -478,10 +478,10 @@ bool wxClipboard::SetData( wxDataObject *data )
 
 bool wxClipboard::AddData( wxDataObject *data )
 {
 
 bool wxClipboard::AddData( wxDataObject *data )
 {
-    wxCHECK_MSG( data, FALSE, wxT("data is invalid") );
+    wxCHECK_MSG( data, false, wxT("data is invalid") );
 
 #if wxUSE_DRAG_AND_DROP
 
 #if wxUSE_DRAG_AND_DROP
-    wxCHECK_MSG( wxIsClipboardOpened(), FALSE, wxT("clipboard not open") );
+    wxCHECK_MSG( wxIsClipboardOpened(), false, wxT("clipboard not open") );
 
 //    wxDataFormat format = data->GetPreferredFormat();
 // TODO:
 
 //    wxDataFormat format = data->GetPreferredFormat();
 // TODO:
@@ -521,9 +521,9 @@ bool wxClipboard::AddData( wxDataObject *data )
     }
 #else // !wxUSE_DRAG_AND_DROP
 */
     }
 #else // !wxUSE_DRAG_AND_DROP
 */
-    return FALSE;
+    return false;
 #else
 #else
-    return FALSE;
+    return false;
 #endif // wxUSE_DRAG_AND_DROP/!wxUSE_DRAG_AND_DROP
 }
 
 #endif // wxUSE_DRAG_AND_DROP/!wxUSE_DRAG_AND_DROP
 }
 
@@ -537,9 +537,9 @@ bool wxClipboard::IsSupported( const wxDataFormat& format )
     return wxIsClipboardFormatAvailable(format);
 }
 
     return wxIsClipboardFormatAvailable(format);
 }
 
-bool wxClipboard::GetData( wxDataObject& data )
+bool wxClipboard::GetData( wxDataObject& WXUNUSED(data) )
 {
 {
-    wxCHECK_MSG( wxIsClipboardOpened(), FALSE, wxT("clipboard not open") );
+    wxCHECK_MSG( wxIsClipboardOpened(), false, wxT("clipboard not open") );
 
 #if wxUSE_DRAG_AND_DROP
 //    wxDataFormat format = data.GetPreferredFormat();
 
 #if wxUSE_DRAG_AND_DROP
 //    wxDataFormat format = data.GetPreferredFormat();
@@ -559,7 +559,7 @@ bool wxClipboard::GetData( wxDataObject& data )
                 return true;
             }
             else
                 return true;
             }
             else
-                return FALSE;
+                return false;
         }
 
         case wxDF_BITMAP:
         }
 
         case wxDF_BITMAP:
@@ -574,7 +574,7 @@ bool wxClipboard::GetData( wxDataObject& data )
                 return true;
             }
             else
                 return true;
             }
             else
-                return FALSE;
+                return false;
         }
 #if wxUSE_METAFILE
         case wxDF_METAFILE:
         }
 #if wxUSE_METAFILE
         case wxDF_METAFILE:
@@ -588,7 +588,7 @@ bool wxClipboard::GetData( wxDataObject& data )
                 return true;
             }
             else
                 return true;
             }
             else
-                return FALSE;
+                return false;
         }
 #endif
         default:
         }
 #endif
         default:
@@ -597,7 +597,7 @@ bool wxClipboard::GetData( wxDataObject& data )
                 void *buf = wxGetClipboardData(format, &len);
                 if ( buf )
                 {
                 void *buf = wxGetClipboardData(format, &len);
                 if ( buf )
                 {
-                    // FIXME this is for testing only!!
+                    // FIXME this is for testing only!
                     ((wxPrivateDataObject &)data).SetData(buf, len);
                     free(buf);
 
                     ((wxPrivateDataObject &)data).SetData(buf, len);
                     free(buf);
 
@@ -605,13 +605,13 @@ bool wxClipboard::GetData( wxDataObject& data )
                 }
             }
 
                 }
             }
 
-            return FALSE;
+            return false;
     }
 #else
 */
     }
 #else
 */
-    return FALSE;
+    return false;
 #else
 #else
-    return FALSE;
+    return false;
 #endif
 }
 
 #endif
 }
 
index 6633b8b12866e74cd43eff5684d4d6e5780c77da..137101f053e664958bebd49f2f6e21411b88c2ff 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        os2/dataobj.cpp
+// Name:        src/os2/dataobj.cpp
 // Purpose:     implementation of wx[I]DataObject class
 // Author:      David Webster
 // Modified by:
 // Purpose:     implementation of wx[I]DataObject class
 // Author:      David Webster
 // Modified by:
@@ -32,8 +32,7 @@
 #include "wx/mstream.h"
 #include "wx/image.h"
 
 #include "wx/mstream.h"
 #include "wx/image.h"
 
-#define INCL_DOS
-#include <os2.h>
+#include "wx/os2/private.h"
 
 // ----------------------------------------------------------------------------
 // functions
 
 // ----------------------------------------------------------------------------
 // functions
@@ -98,7 +97,7 @@ bool CIDataObject::GetData ( const wxDataFormat& rFormat,
 {
     QueryGetData(rFormat);
     if (rFormat.GetType() == wxDF_INVALID)
 {
     QueryGetData(rFormat);
     if (rFormat.GetType() == wxDF_INVALID)
-        return FALSE;
+        return false;
 
     ULONG                           ulSize = m_pDataObject->GetDataSize(rFormat);
 
 
     ULONG                           ulSize = m_pDataObject->GetDataSize(rFormat);
 
@@ -107,7 +106,7 @@ bool CIDataObject::GetData ( const wxDataFormat& rFormat,
         //
         // It probably means that the method is just not implemented
         //
         //
         // It probably means that the method is just not implemented
         //
-        return FALSE;
+        return false;
     }
     if (rFormat.GetType() == wxDF_PRIVATE)
     {
     }
     if (rFormat.GetType() == wxDF_PRIVATE)
     {
@@ -119,7 +118,7 @@ bool CIDataObject::GetData ( const wxDataFormat& rFormat,
     }
 
     if (ulSize > ulLen) // not enough room to copy
     }
 
     if (ulSize > ulLen) // not enough room to copy
-        return FALSE;
+        return false;
 
     //
     // Copy the data
 
     //
     // Copy the data
@@ -303,16 +302,13 @@ bool wxBitmapDataObject::GetDataHere( void* pBuf ) const
     if (!m_pngSize)
     {
         wxFAIL_MSG(wxT("attempt to copy empty bitmap failed"));
     if (!m_pngSize)
     {
         wxFAIL_MSG(wxT("attempt to copy empty bitmap failed"));
-        return FALSE;
+        return false;
     }
     memcpy(pBuf, m_pngData, m_pngSize);
     return true;
 }
 
     }
     memcpy(pBuf, m_pngData, m_pngSize);
     return true;
 }
 
-bool wxBitmapDataObject::SetData(
-  size_t                            nSize
-, const void*                       pBuf
-)
+bool wxBitmapDataObject::SetData( size_t nSize, const void* pBuf)
 {
     Clear();
     m_pngSize = nSize;
 {
     Clear();
     m_pngSize = nSize;
@@ -327,7 +323,7 @@ bool wxBitmapDataObject::SetData(
 
     if (!vHandler.LoadFile(&vImage, vMstream))
     {
 
     if (!vHandler.LoadFile(&vImage, vMstream))
     {
-        return FALSE;
+        return false;
     }
 
     m_bitmap = wxBitmap(vImage);
     }
 
     m_bitmap = wxBitmap(vImage);
index e21566019854aac44582eee429d6b81ac12e688b..c0f2f0b6667e32a7f3b818108fe84e52cf4d1d32 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        dc.cpp
+// Name:        src/os2/dc.cpp
 // Purpose:     wxDC class
 // Author:      David Webster
 // Modified by:
 // Purpose:     wxDC class
 // Author:      David Webster
 // Modified by:
@@ -774,11 +774,7 @@ void wxDC::DoDrawArc(
     vPtlArc[0].y = vYm;
     vPtlArc[1].x = vX2;
     vPtlArc[1].y = vY2;
     vPtlArc[0].y = vYm;
     vPtlArc[1].x = vX2;
     vPtlArc[1].y = vY2;
-#if !(defined(__WATCOMC__) && __WATCOMC__ < 1240 )
-// Open Watcom 1.3 had incomplete headers
-// that's reported and should be fixed for OW 1.4
     ::GpiPointArc(m_hPS, vPtlArc); // Draws the arc
     ::GpiPointArc(m_hPS, vPtlArc); // Draws the arc
-#endif
     CalcBoundingBox( (wxCoord)(vXc - dRadius)
                     ,(wxCoord)(vYc - dRadius)
                    );
     CalcBoundingBox( (wxCoord)(vXc - dRadius)
                     ,(wxCoord)(vYc - dRadius)
                    );
index fc49df9d0490d6d9178bb05deb6ff565ecd9c029..87c745f2e8a7f1c69baa708abb0f1b469f7a68ea 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        dcprint.cpp
+// Name:        src/os2/dcprint.cpp
 // Purpose:     wxPrinterDC class
 // Author:      David Webster
 // Modified by:
 // Purpose:     wxPrinterDC class
 // Author:      David Webster
 // Modified by:
@@ -34,13 +34,11 @@ IMPLEMENT_CLASS(wxPrinterDC, wxDC)
 
 
 // This form is deprecated
 
 
 // This form is deprecated
-wxPrinterDC::wxPrinterDC(
-  const wxString&                   rsDriverName
-, const wxString&                   rsDeviceName
-, const wxString&                   rsFile
-, bool                              bInteractive
-, int                               nOrientation
-)
+wxPrinterDC::wxPrinterDC( const wxString& rsDriverName,
+                          const wxString& rsDeviceName,
+                          const wxString& rsFile,
+                          bool bInteractive,
+                          int nOrientation )
 {
     DEVOPENSTRUC    vDevOpen = { (char*)rsDeviceName.c_str()
                                 ,(char*)rsDriverName.c_str()
 {
     DEVOPENSTRUC    vDevOpen = { (char*)rsDeviceName.c_str()
                                 ,(char*)rsDriverName.c_str()
@@ -55,7 +53,7 @@ wxPrinterDC::wxPrinterDC(
 
     m_isInteractive = bInteractive;
 
 
     m_isInteractive = bInteractive;
 
-    if (!rsFile.IsNull() && rsFile != wxT(""))
+    if (!rsFile.IsNull() && !rsFile.empty())
         m_printData.SetFilename(rsFile);
 
 /*
         m_printData.SetFilename(rsFile);
 
 /*
@@ -80,22 +78,20 @@ wxPrinterDC::wxPrinterDC(
         if ( PrintDlg( &pd ) != 0 )
         {
             m_hDC = (WXHDC) pd.hDC;
         if ( PrintDlg( &pd ) != 0 )
         {
             m_hDC = (WXHDC) pd.hDC;
-            m_ok = TRUE;
+            m_ok = true;
         }
         else
         {
         }
         else
         {
-            m_ok = FALSE;
+            m_ok = false;
             return;
         }
             return;
         }
-
-        //     m_dontDelete = TRUE;
     }
     else
 #endif
 */
     }
     else
 #endif
 */
-        if ((!rsDriverName.IsNull() && rsDriverName != wxT("")) &&
-            (!rsDeviceName.IsNull() && rsDeviceName != wxT("")) &&
-            (!rsFile.IsNull() && rsFile != wxT("")))
+        if ( !rsDriverName.empty() &&
+             !rsDeviceName.empty() &&
+             !rsFile.empty() )
         {
             m_hDC = (WXHDC) ::DevOpenDC( vHabmain
                                         ,OD_QUEUED
         {
             m_hDC = (WXHDC) ::DevOpenDC( vHabmain
                                         ,OD_QUEUED
@@ -104,7 +100,7 @@ wxPrinterDC::wxPrinterDC(
                                         ,(PDEVOPENDATA)&vDevOpen
                                         ,NULLHANDLE
                                        );
                                         ,(PDEVOPENDATA)&vDevOpen
                                         ,NULLHANDLE
                                        );
-            m_ok = m_hDC ? TRUE: FALSE;
+            m_ok = m_hDC ? true: false;
         }
         else
         {
         }
         else
         {
@@ -112,7 +108,7 @@ wxPrinterDC::wxPrinterDC(
 
             vPrintData.SetOrientation(nOrientation);
             m_hDC = wxGetPrinterDC(vPrintData);
 
             vPrintData.SetOrientation(nOrientation);
             m_hDC = wxGetPrinterDC(vPrintData);
-            m_ok = m_hDC ? TRUE: FALSE;
+            m_ok = m_hDC ? true: false;
         }
 
         if (m_hDC)
         }
 
         if (m_hDC)
@@ -125,12 +121,10 @@ wxPrinterDC::wxPrinterDC(
         SetPen(*wxBLACK_PEN);
 } // end of wxPrinterDC::wxPrinterDC
 
         SetPen(*wxBLACK_PEN);
 } // end of wxPrinterDC::wxPrinterDC
 
-wxPrinterDC::wxPrinterDC(
-  const wxPrintData&                rPrintData
-)
+wxPrinterDC::wxPrinterDC( const wxPrintData& rPrintData )
 {
     m_printData = rPrintData;
 {
     m_printData = rPrintData;
-    m_isInteractive = FALSE;
+    m_isInteractive = false;
     m_hDC = wxGetPrinterDC(rPrintData);
     m_ok = (m_hDC != 0);
     if (m_hDC)
     m_hDC = wxGetPrinterDC(rPrintData);
     m_ok = (m_hDC != 0);
     if (m_hDC)
@@ -139,13 +133,11 @@ wxPrinterDC::wxPrinterDC(
     SetPen(*wxBLACK_PEN);
 } // end of wxPrinterDC::wxPrinterDC
 
     SetPen(*wxBLACK_PEN);
 } // end of wxPrinterDC::wxPrinterDC
 
-wxPrinterDC::wxPrinterDC(
-  WXHDC                             hTheDC
-)
+wxPrinterDC::wxPrinterDC( WXHDC hTheDC )
 {
 {
-    m_isInteractive = FALSE;
+    m_isInteractive = false;
     m_hDC = hTheDC;
     m_hDC = hTheDC;
-    m_ok = TRUE;
+    m_ok = true;
     if (m_hDC)
     {
         SetMapMode(wxMM_TEXT);
     if (m_hDC)
     {
         SetMapMode(wxMM_TEXT);
@@ -165,9 +157,7 @@ void wxPrinterDC::Init()
     }
 } // end of wxPrinterDC::Init
 
     }
 } // end of wxPrinterDC::Init
 
-bool wxPrinterDC::StartDoc(
-  const wxString&                   rsMessage
-)
+bool wxPrinterDC::StartDoc(const wxString& WXUNUSED(rsMessage))
 {
 /* TODO:  PM's implementation
    DOCINFO docinfo;
 {
 /* TODO:  PM's implementation
    DOCINFO docinfo;
@@ -176,7 +166,7 @@ bool wxPrinterDC::StartDoc(
 
     wxString filename(m_printData.GetFilename());
 
 
     wxString filename(m_printData.GetFilename());
 
-    if (filename.IsEmpty())
+    if (filename.empty())
         docinfo.lpszOutput = NULL;
     else
         docinfo.lpszOutput = (const wxChar *) filename;
         docinfo.lpszOutput = NULL;
     else
         docinfo.lpszOutput = (const wxChar *) filename;
@@ -187,7 +177,7 @@ bool wxPrinterDC::StartDoc(
 #endif
 
     if (!m_hDC)
 #endif
 
     if (!m_hDC)
-        return FALSE;
+        return false;
 
     int ret =
 #ifndef __WIN32__
 
     int ret =
 #ifndef __WIN32__
@@ -213,7 +203,7 @@ bool wxPrinterDC::StartDoc(
 #endif
     return (ret > 0);
 */
 #endif
     return (ret > 0);
 */
-    return(TRUE);
+    return true;
 } // end of wxPrinterDC::StartDoc
 
 void wxPrinterDC::EndDoc()
 } // end of wxPrinterDC::StartDoc
 
 void wxPrinterDC::EndDoc()
@@ -234,12 +224,9 @@ void wxPrinterDC::EndPage()
 } // end of wxPrinterDC::EndPage
 #if 0
 // Returns default device and port names
 } // end of wxPrinterDC::EndPage
 #if 0
 // Returns default device and port names
-static bool wxGetDefaultDeviceName(
-  wxString&                         rsDeviceName
-, wxString&                         rsPortName
-)
+static bool wxGetDefaultDeviceName( wxString& rsDeviceName, wxString& rsPortName )
 {
 {
-    rsDeviceName = "";
+    rsDeviceName = wxEmptyString;
 /*
     LPDEVNAMES  lpDevNames;
     LPSTR       lpszDriverName;
 /*
     LPDEVNAMES  lpDevNames;
     LPSTR       lpszDriverName;
@@ -268,7 +255,7 @@ static bool wxGetDefaultDeviceName(
         if (pd.hDevNames)
             GlobalFree(pd.hDevNames);
 
         if (pd.hDevNames)
             GlobalFree(pd.hDevNames);
 
-        return FALSE;
+        return false;
     }
 
     if (pd.hDevNames)
     }
 
     if (pd.hDevNames)
@@ -292,14 +279,12 @@ static bool wxGetDefaultDeviceName(
     }
     return ( deviceName != wxT("") );
 */
     }
     return ( deviceName != wxT("") );
 */
-    return(TRUE);
+    return true;
 } // end of wxGetDefaultDeviceName
 #endif
 
 // Gets an HDC for the specified printer configuration
 } // end of wxGetDefaultDeviceName
 #endif
 
 // Gets an HDC for the specified printer configuration
-WXHDC WXDLLEXPORT wxGetPrinterDC(
-  const wxPrintData&                rPrintDataConst
-)
+WXHDC WXDLLEXPORT wxGetPrinterDC( const wxPrintData& WXUNUSED(rPrintDataConst) )
 {
     HDC   hDC = NULLHANDLE;
 /*
 {
     HDC   hDC = NULLHANDLE;
 /*
@@ -312,7 +297,7 @@ WXHDC WXDLLEXPORT wxGetPrinterDC(
     wxChar* deviceName;
     wxChar* portName = (wxChar*) NULL; // Obsolete in WIN32
 
     wxChar* deviceName;
     wxChar* portName = (wxChar*) NULL; // Obsolete in WIN32
 
-    if (devNameStr == wxT(""))
+    if (devNameStr.empty())
         deviceName = (wxChar*) NULL;
     else
         deviceName = WXSTRINGCAST devNameStr;
         deviceName = (wxChar*) NULL;
     else
         deviceName = WXSTRINGCAST devNameStr;
@@ -324,7 +309,7 @@ WXHDC WXDLLEXPORT wxGetPrinterDC(
     if ( hDevMode )
         lpDevMode = (DEVMODE*) GlobalLock(hDevMode);
 
     if ( hDevMode )
         lpDevMode = (DEVMODE*) GlobalLock(hDevMode);
 
-    if (devNameStr == wxT(""))
+    if (devNameStr.empty())
     {
         // Retrieve the default device name
         wxString portName;
     {
         // Retrieve the default device name
         wxString portName;
@@ -347,12 +332,10 @@ WXHDC WXDLLEXPORT wxGetPrinterDC(
     return (WXHDC) hDC;
 } // end of wxGetPrinterDC
 
     return (WXHDC) hDC;
 } // end of wxGetPrinterDC
 
-void wxPrinterDC::DoDrawBitmap(
-  const wxBitmap&                   rBmp
-, wxCoord                           vX
-, wxCoord                           vY
-, bool                              bUseMask
-)
+void wxPrinterDC::DoDrawBitmap( const wxBitmap& rBmp,
+                                wxCoord WXUNUSED(vX),
+                                wxCoord WXUNUSED(vY),
+                                bool WXUNUSED(bUseMask))
 {
     wxCHECK_RET( rBmp.Ok(), _T("invalid bitmap in wxPrinterDC::DrawBitmap") );
 
 {
     wxCHECK_RET( rBmp.Ok(), _T("invalid bitmap in wxPrinterDC::DrawBitmap") );
 
@@ -363,26 +346,23 @@ void wxPrinterDC::DoDrawBitmap(
 
 } // end of wxPrinterDC::DoDrawBitmap
 
 
 } // end of wxPrinterDC::DoDrawBitmap
 
-bool wxPrinterDC::DoBlit(
-  wxCoord                           vXdest
-, wxCoord                           vYdest
-, wxCoord                           vWidth
-, wxCoord                           vHeight
-, wxDC*                             pSource
-, wxCoord                           vXsrc
-, wxCoord                           vYsrc
-, int                               nRop
-, bool                              bUseMask
-, wxCoord                           xsrcMask
-, wxCoord                           ysrcMask
-)
+bool wxPrinterDC::DoBlit( wxCoord WXUNUSED(vXdest),
+                          wxCoord WXUNUSED(vYdest),
+                          wxCoord WXUNUSED(vWidth),
+                          wxCoord WXUNUSED(vHeight),
+                          wxDC* WXUNUSED(pSource),
+                          wxCoord WXUNUSED(vXsrc),
+                          wxCoord WXUNUSED(vYsrc),
+                          int WXUNUSED(nRop),
+                          bool WXUNUSED(bUseMask),
+                          wxCoord WXUNUSED(xsrcMask),
+                          wxCoord WXUNUSED(ysrcMask) )
 {
 {
-    bool                            bSuccess = TRUE;
+    bool bSuccess = true;
 
     // TODO:
 
     return bSuccess;
 } // end of wxPrintDC::DoBlit
 
 
     // TODO:
 
     return bSuccess;
 } // end of wxPrintDC::DoBlit
 
-
 #endif //wxUSE_PRINTING_ARCHITECTURE
 #endif //wxUSE_PRINTING_ARCHITECTURE
index 35d5717f78dd7bd4ea0028a96e36a1903736ad0b..9100811fc9b6c2459e25e527a30662dd0d221956 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        dnd.cpp
+// Name:        src/os2/dnd.cpp
 // Purpose:     wxDropTarget, wxDropSource, wxDataObject implementation
 // Author:      David Webster
 // Modified by:
 // Purpose:     wxDropTarget, wxDropSource, wxDataObject implementation
 // Author:      David Webster
 // Modified by:
@@ -440,17 +440,12 @@ bool wxDropTarget::OnDrop (
 // wxDropSource
 //-------------------------------------------------------------------------
 
 // wxDropSource
 //-------------------------------------------------------------------------
 
-wxDropSource::wxDropSource (
-  wxWindow*                         pWin
-)
+wxDropSource::wxDropSource ( wxWindow* WXUNUSED(pWin) )
 {
     Init();
 } // end of wxDropSource::wxDropSource
 
 {
     Init();
 } // end of wxDropSource::wxDropSource
 
-wxDropSource::wxDropSource (
-  wxDataObject&                     rData
-, wxWindow*                         pWin
-)
+wxDropSource::wxDropSource ( wxDataObject& rData, wxWindow* WXUNUSED(pWin) )
 {
     Init();
     SetData(rData);
 {
     Init();
     SetData(rData);
@@ -548,13 +543,13 @@ void wxDropSource::Init ()
     m_vDragImage.cxOffset       = 0;
     m_vDragImage.cyOffset       = 0;
 
     m_vDragImage.cxOffset       = 0;
     m_vDragImage.cyOffset       = 0;
 
-    HSTR                            hStrType = ::DrgAddStrHandle(DRT_UNKNOWN);
-    HSTR                            hStrRMF;
-    HSTR                            hStrContainer;
-    wxChar                          zFormats[128];
-    wxChar                          zContainer[128];
-    USHORT                          uSize = GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat()) + 1;
-    wxChar*                         pzBuffer = new wxChar[uSize];
+    HSTR    hStrType = ::DrgAddStrHandle(DRT_UNKNOWN);
+    HSTR    hStrRMF;
+    HSTR    hStrContainer;
+    wxChar  zFormats[128];
+    wxChar  zContainer[128];
+    USHORT  uSize = (USHORT)(GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat()) + 1);
+    wxChar* pzBuffer = new wxChar[uSize];
 
     memset(pzBuffer, '\0', GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat()));
     pzBuffer[GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat())] = '\0';
 
     memset(pzBuffer, '\0', GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat()));
     pzBuffer[GetDataObject()->GetDataSize(GetDataObject()->GetPreferredFormat())] = '\0';
index 85f39c89caf162b6ab3eeaf1843cedea0832dd12..f7e2e23b6ffa288bd013d0fb1226789f5b381012 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        frame.cpp
+// Name:        src/os2/frame.cpp
 // Purpose:     wxFrame
 // Author:      David Webster
 // Modified by:
 // Purpose:     wxFrame
 // Author:      David Webster
 // Modified by:
@@ -242,13 +242,8 @@ wxStatusBar* wxFrame::OnCreateStatusBar(
                         ,nHeight
                        );
 
                         ,nHeight
                        );
 
-    ::WinSetParent( pStatusBar->GetHWND()
-                   ,m_hFrame
-                   ,FALSE
-                  );
-    ::WinSetOwner( pStatusBar->GetHWND()
-                  ,m_hFrame
-                 );
+    ::WinSetParent( pStatusBar->GetHWND(), m_hFrame, FALSE );
+    ::WinSetOwner( pStatusBar->GetHWND(), m_hFrame);
     //
     // to show statusbar
     //
     //
     // to show statusbar
     //
@@ -310,24 +305,15 @@ void wxFrame::PositionStatusBar()
 #endif // wxUSE_STATUSBAR
 
 #if wxUSE_TOOLBAR
 #endif // wxUSE_STATUSBAR
 
 #if wxUSE_TOOLBAR
-wxToolBar* wxFrame::OnCreateToolBar(
-  long                              lStyle
-, wxWindowID                        vId
-, const wxString&                   rsName
-)
+wxToolBar* wxFrame::OnCreateToolBar( long lStyle, wxWindowID vId, const wxString& rsName )
 {
     wxToolBar*                      pToolBar = wxFrameBase::OnCreateToolBar( lStyle
                                                                             ,vId
                                                                             ,rsName
                                                                            );
 
 {
     wxToolBar*                      pToolBar = wxFrameBase::OnCreateToolBar( lStyle
                                                                             ,vId
                                                                             ,rsName
                                                                            );
 
-    ::WinSetParent( pToolBar->GetHWND()
-                   ,m_hFrame
-                   ,FALSE
-                  );
-    ::WinSetOwner( pToolBar->GetHWND()
-                  ,m_hFrame
-                 );
+    ::WinSetParent( pToolBar->GetHWND(), m_hFrame, FALSE);
+    ::WinSetOwner( pToolBar->GetHWND(), m_hFrame);
     return pToolBar;
 } // end of WinGuiBase_CFrame::OnCreateToolBar
 #endif
     return pToolBar;
 } // end of WinGuiBase_CFrame::OnCreateToolBar
 #endif
@@ -875,17 +861,12 @@ bool wxFrame::HandlePaint()
 
                 ::WinQueryWindowRect(GetHwnd(), &vRect3);
 
 
                 ::WinQueryWindowRect(GetHwnd(), &vRect3);
 
-#if !(defined(__WATCOMC__) && __WATCOMC__ < 1240 )
-// Open Watcom 1.3 had incomplete headers
-// that's reported and should be fixed for OW 1.4
-
                 static const int    nIconWidth = 32;
                 static const int    nIconHeight = 32;
                 int                 nIconX = (int)((vRect3.xRight - nIconWidth)/2);
                 int                 nIconY = (int)((vRect3.yBottom + nIconHeight)/2);
 
                 ::WinDrawPointer(hPs, nIconX, nIconY, hIcon, DP_NORMAL);
                 static const int    nIconWidth = 32;
                 static const int    nIconHeight = 32;
                 int                 nIconX = (int)((vRect3.xRight - nIconWidth)/2);
                 int                 nIconY = (int)((vRect3.yBottom + nIconHeight)/2);
 
                 ::WinDrawPointer(hPs, nIconX, nIconY, hIcon, DP_NORMAL);
-#endif
             }
             ::WinEndPaint(hPs);
         }
             }
             ::WinEndPaint(hPs);
         }
index 0c257d02c960ee4285ecca5c766d1fb76e3bf46f..a7a27c525f0eb9a7540cd9b0bc4651ba700088c5 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        icon.cpp
+// Name:        src/os2/icon.cpp
 // Purpose:     wxIcon class
 // Author:      David Webster
 // Modified by:
 // Purpose:     wxIcon class
 // Author:      David Webster
 // Modified by:
@@ -73,7 +73,7 @@ wxIcon::wxIcon( const wxString& rIconFile,
     // So we have a modified name where replace the last three characters
     // with os2.  Also need the extension.
     //
     // So we have a modified name where replace the last three characters
     // with os2.  Also need the extension.
     //
-    wxString sOs2Name = rIconFile.Mid(0, rIconFile.Length() - 3);
+    wxString sOs2Name = rIconFile.Mid(0, rIconFile.length() - 3);
 
     sOs2Name += wxT("Os2.ico");
     LoadFile( sOs2Name
 
     sOs2Name += wxT("Os2.ico");
     LoadFile( sOs2Name
@@ -122,21 +122,20 @@ void wxIcon::CopyFromBitmap( const wxBitmap& rBmp )
                           );
     }
 
                           );
     }
 
-    BITMAPINFOHEADER2               vHeader;
-    SIZEL                           vSize = {0, 0};
-    DEVOPENSTRUC                    vDop = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
-    HDC                             hDCSrc = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
-    HDC                             hDCDst = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
-    HPS                             hPSSrc = ::GpiCreatePS(vHabmain, hDCSrc, &vSize, PU_PELS | GPIA_ASSOC);
-    HPS                             hPSDst = ::GpiCreatePS(vHabmain, hDCDst, &vSize, PU_PELS | GPIA_ASSOC);
-    POINTL                          vPoint[4] = { {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()},
-                                                  {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()}
-                                                };
-    POINTL                          vPointMask[4] = { {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight() * 2},
-                                                      {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()}
-                                                    };
-
-    POINTERINFO                     vIconInfo;
+    BITMAPINFOHEADER2 vHeader;
+    SIZEL             vSize = {0, 0};
+    DEVOPENSTRUC      vDop = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
+    HDC               hDCSrc = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
+    HDC               hDCDst = ::DevOpenDC(vHabmain, OD_MEMORY, "*", 5L, (PDEVOPENDATA)&vDop, NULLHANDLE);
+    HPS               hPSSrc = ::GpiCreatePS(vHabmain, hDCSrc, &vSize, PU_PELS | GPIA_ASSOC);
+    HPS               hPSDst = ::GpiCreatePS(vHabmain, hDCDst, &vSize, PU_PELS | GPIA_ASSOC);
+    POINTL            vPoint[4] = { {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()},
+                                    {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()}
+                                  };
+    POINTL            vPointMask[4] = { {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight() * 2},
+                                        {0, 0}, {rBmp.GetWidth(), rBmp.GetHeight()}
+                                    };
+    POINTERINFO       vIconInfo;
 
     memset(&vIconInfo, '\0', sizeof(POINTERINFO));
     vIconInfo.fPointer = FALSE;  // we want an icon, not a pointer
 
     memset(&vIconInfo, '\0', sizeof(POINTERINFO));
     vIconInfo.fPointer = FALSE;  // we want an icon, not a pointer
@@ -230,10 +229,6 @@ void wxIcon::CopyFromBitmap( const wxBitmap& rBmp )
 
     vIconInfo.hbmPointer = hBmpMask;
 
 
     vIconInfo.hbmPointer = hBmpMask;
 
-#if !(defined(__WATCOMC__) && __WATCOMC__ < 1240 )
-// Open Watcom 1.3 had incomplete headers
-// that's reported and should be fixed for OW 1.4
-
     HICON hIcon = ::WinCreatePointerIndirect( HWND_DESKTOP, &vIconInfo);
 
     if (!hIcon)
     HICON hIcon = ::WinCreatePointerIndirect( HWND_DESKTOP, &vIconInfo);
 
     if (!hIcon)
@@ -249,7 +244,6 @@ void wxIcon::CopyFromBitmap( const wxBitmap& rBmp )
                 ,rBmp.GetHeight()
                );
     }
                 ,rBmp.GetHeight()
                );
     }
-#endif
 
     if (!rBmp.GetMask())
     {
 
     if (!rBmp.GetMask())
     {
index ae86ae556a72f117261e17480fd13e28b3c9f3af..99050676ed893fa7b2b6045a202dd6f9dbb879c8 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        print.cpp
+// Name:        src/os2/print.cpp
 // Purpose:     Print framework
 // Author:      David Webster
 // Modified by:
 // Purpose:     Print framework
 // Author:      David Webster
 // Modified by:
@@ -40,13 +40,15 @@ wxOS2Printer::~wxOS2Printer()
 {
 }
 
 {
 }
 
-bool wxOS2Printer::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
+bool wxOS2Printer::Print(wxWindow *WXUNUSED(parent),
+                         wxPrintout *WXUNUSED(printout),
+                         bool WXUNUSED(prompt))
 {
     // TODO. See wxPostScriptPrinter::Print for hints.
 {
     // TODO. See wxPostScriptPrinter::Print for hints.
-    return FALSE;
+    return false;
 }
 
 }
 
-wxDC* wxOS2Printer::PrintDialog(wxWindow *parent)
+wxDC* wxOS2Printer::PrintDialog(wxWindow *WXUNUSED(parent))
 {
 // TODO:
 /*
 {
 // TODO:
 /*
@@ -56,15 +58,17 @@ wxDC* wxOS2Printer::PrintDialog(wxWindow *parent)
     return NULL;
 }
 
     return NULL;
 }
 
-bool wxOS2Printer::Setup(wxWindow *parent)
+bool wxOS2Printer::Setup(wxWindow *WXUNUSED(parent))
 {
 // TODO:
 /*
     wxPrintDialog dialog(parent, & m_printData);
 {
 // TODO:
 /*
     wxPrintDialog dialog(parent, & m_printData);
-    dialog.GetPrintData().SetSetupDialog(TRUE);
+#if WXWIN_COMPATIBILITY_2_4
+    dialog.GetPrintData().SetSetupDialog(true);
+#endif
     return (dialog.ShowModal() == wxID_OK);
 */
     return (dialog.ShowModal() == wxID_OK);
 */
-    return FALSE;
+    return false;
 }
 
 /*
 }
 
 /*
@@ -87,13 +91,13 @@ wxOS2PrintPreview::~wxOS2PrintPreview()
 {
 }
 
 {
 }
 
-bool wxOS2PrintPreview::Print(bool interactive)
+bool wxOS2PrintPreview::Print(bool WXUNUSED(interactive))
 {
     if (!m_printPrintout)
 {
     if (!m_printPrintout)
-        return FALSE;
+        return false;
 //    wxOS2Printer printer(&m_printData);
 //    return printer.Print(m_previewFrame, m_printPrintout, interactive);
 //    wxOS2Printer printer(&m_printData);
 //    return printer.Print(m_previewFrame, m_printPrintout, interactive);
-    return FALSE;
+    return false;
 }
 
 void wxOS2PrintPreview::DetermineScaling()
 }
 
 void wxOS2PrintPreview::DetermineScaling()
index 502e81356ea8d6eafaf4c602db6a7fef29a529b1..076a38ac07de38fcd561aa31fa009ef053d6427b 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        windows.cpp
+// Name:        src/os2/window.cpp
 // Purpose:     wxWindow
 // Author:      David Webster
 // Modified by:
 // Purpose:     wxWindow
 // Author:      David Webster
 // Modified by:
@@ -1809,7 +1809,7 @@ void wxWindowOS2::GetTextExtent( const wxString& rString,
 
     hPS = ::WinGetPS(GetHwnd());
 
 
     hPS = ::WinGetPS(GetHwnd());
 
-    l = rString.Length();
+    l = rString.length();
     if (l > 0L)
     {
         pStr = (PCH)rString.c_str();
     if (l > 0L)
     {
         pStr = (PCH)rString.c_str();
@@ -1817,12 +1817,12 @@ void wxWindowOS2::GetTextExtent( const wxString& rString,
         //
         // In world coordinates.
         //
         //
         // In world coordinates.
         //
-        bRc = ::GpiQueryTextBox( hPS
-                                ,l
-                                ,pStr
-                                ,TXTBOX_COUNT // return maximum information
-                                ,avPoint      // array of coordinates points
-                               );
+        bRc = ::GpiQueryTextBox( hPS,
+                                 l,
+                                 pStr,
+                                 TXTBOX_COUNT,// return maximum information
+                                 avPoint      // array of coordinates points
+                                );
         if (bRc)
         {
             vPtMin.x = avPoint[0].x;
         if (bRc)
         {
             vPtMin.x = avPoint[0].x;
@@ -1910,9 +1910,7 @@ bool wxWindowOS2::IsMouseInWindow() const
 // ---------------------------------------------------------------------------
 //
 #if wxUSE_MENUS_NATIVE
 // ---------------------------------------------------------------------------
 //
 #if wxUSE_MENUS_NATIVE
-bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu,
-                               int nX,
-                               int nY )
+bool wxWindowOS2::DoPopupMenu( wxMenu* pMenu, int nX, int nY )
 {
     HWND hWndOwner = GetHwnd();
     HWND hWndParent = GetHwnd();
 {
     HWND hWndOwner = GetHwnd();
     HWND hWndParent = GetHwnd();
@@ -3878,25 +3876,15 @@ bool wxWindowOS2::HandleGetMinMaxInfo( PSWP pSwp )
     switch(pSwp->fl)
     {
         case SWP_MAXIMIZE:
     switch(pSwp->fl)
     {
         case SWP_MAXIMIZE:
-#if !(defined(__WATCOMC__) && __WATCOMC__ < 1240 )
-// Open Watcom 1.3 had incomplete headers
-// that's reported and should be fixed for OW 1.4
             ::WinGetMaxPosition(GetHwnd(), pSwp);
             m_maxWidth = pSwp->cx;
             m_maxHeight = pSwp->cy;
             ::WinGetMaxPosition(GetHwnd(), pSwp);
             m_maxWidth = pSwp->cx;
             m_maxHeight = pSwp->cy;
-#endif
             break;
 
         case SWP_MINIMIZE:
             break;
 
         case SWP_MINIMIZE:
-#if !(defined(__WATCOMC__) && __WATCOMC__ < 1240 )
-// Open Watcom 1.3 had incomplete headers
-// that's reported and should be fixed for OW 1.4
             ::WinGetMinPosition(GetHwnd(), pSwp, &vPoint);
             m_minWidth = pSwp->cx;
             m_minHeight = pSwp->cy;
             ::WinGetMinPosition(GetHwnd(), pSwp, &vPoint);
             m_minWidth = pSwp->cx;
             m_minHeight = pSwp->cy;
-#else
-            wxUnusedVar(vPoint);
-#endif
             break;
 
         default:
             break;
 
         default:
@@ -3955,7 +3943,7 @@ bool wxWindowOS2::HandleSysCommand( WXWPARAM wParam,
 // ---------------------------------------------------------------------------
 // mouse events
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 // mouse events
 // ---------------------------------------------------------------------------
-//TODO!!! check against MSW
+//TODO: check against MSW
 void wxWindowOS2::InitMouseEvent(
   wxMouseEvent&                     rEvent
 , int                               nX
 void wxWindowOS2::InitMouseEvent(
   wxMouseEvent&                     rEvent
 , int                               nX
@@ -5168,14 +5156,14 @@ wxWindow* wxFindWindowAtPointer(wxPoint& WXUNUSED(rPt))
 
 wxWindow* wxFindWindowAtPoint(const wxPoint& rPt)
 {
 
 wxWindow* wxFindWindowAtPoint(const wxPoint& rPt)
 {
-    POINTL                          vPt2;
+    POINTL vPt2;
 
     vPt2.x = rPt.x;
     vPt2.y = rPt.y;
 
 
     vPt2.x = rPt.x;
     vPt2.y = rPt.y;
 
-    HWND                            hWndHit = ::WinWindowFromPoint(HWND_DESKTOP, &vPt2, FALSE);
-    wxWindow*                       pWin = wxFindWinFromHandle((WXHWND)hWndHit) ;
-    HWND                            hWnd = hWndHit;
+    HWND      hWndHit = ::WinWindowFromPoint(HWND_DESKTOP, &vPt2, FALSE);
+    wxWindow* pWin = wxFindWinFromHandle((WXHWND)hWndHit) ;
+    HWND      hWnd = hWndHit;
 
     //
     // Try to find a window with a wxWindow associated with it
 
     //
     // Try to find a window with a wxWindow associated with it