#ifdef __WATCOMC__
+#include <types.h>
#include <sys/ioctl.h>
#include <sys/select.h>
virtual bool OnInitGui(void);
- virtual bool Yield(bool onlyIfNeeded = FALSE);
+ virtual bool Yield(bool onlyIfNeeded = false);
virtual void WakeUpIdle(void);
virtual void SetPrintMode(int mode) { m_nPrintMode = mode; }
};
#endif
// _WX_APP_H_
-
);
// If depth is omitted, will create a bitmap compatible with the display
- wxBitmap( int nWidth
- ,int nHeight
- ,int nDepth = -1
- );
+ wxBitmap( int nWidth, int nHeight, int nDepth = -1 );
wxBitmap( const wxImage& image, int depth = -1 )
{ (void)CreateFromImage(image, depth); }
,int lType
);
private:
- inline virtual bool Load( wxGDIImage* pImage
- ,const wxString& rName
- ,HPS hPs
- ,long lFlags
- ,int nDesiredWidth
- ,int nDesiredHeight
+ inline virtual bool Load( wxGDIImage* WXUNUSED(pImage)
+ ,const wxString& WXUNUSED(rName)
+ ,HPS WXUNUSED(hPs)
+ ,long WXUNUSED(lFlags)
+ ,int WXUNUSED(nDesiredWidth)
+ ,int WXUNUSED(nDesiredHeight)
)
- { return FALSE; }
+ { return false; }
DECLARE_DYNAMIC_CLASS(wxBitmapHandler)
}; // end of CLASS wxBitmapHandler
// ----------------------------------------------------------------------------
#if wxUSE_OWNER_DRAWN
- class WXDLLEXPORT wxOwnerDrawn;
+ class WXDLLEXPORT wxOwnerDrawn;
- // define the array of list box items
- #include <wx/dynarray.h>
+ // define the array of list box items
+ #include <wx/dynarray.h>
- WX_DEFINE_EXPORTED_ARRAY(wxOwnerDrawn *, wxListBoxItemsArray);
+ WX_DEFINE_EXPORTED_ARRAY_PTR(wxOwnerDrawn *, wxListBoxItemsArray);
#endif // wxUSE_OWNER_DRAWN
// forward decl for GetSelections()
#include "wx/list.h" // for "template" list classes
#include "wx/dynarray.h"
- WX_DEFINE_EXPORTED_ARRAY(wxAcceleratorEntry *, wxAcceleratorArray);
+ WX_DEFINE_EXPORTED_ARRAY_PTR(wxAcceleratorEntry *, wxAcceleratorArray);
#endif // wxUSE_ACCEL
class WXDLLEXPORT wxFrame;
void EndRadioGroup(void);
//
- // If TRUE, insert a breal before appending the next item
+ // If true, insert a breal before appending the next item
//
- bool m_bDoBreak;
+ bool m_bDoBreak;
//
// The menu handle of this menu
bool Unassociate();
// set an arbitrary command, ask confirmation if it already exists and
- // overwriteprompt is TRUE
+ // overwriteprompt is true
bool SetCommand(const wxString& cmd,
const wxString& verb,
- bool overwriteprompt = TRUE);
+ bool overwriteprompt = true);
bool SetDefaultIcon(const wxString& cmd = wxEmptyString, int index = 0);
size_t EnumAllFileTypes(wxArrayString& mimetypes);
// these are NOPs under OS/2
- bool ReadMailcap(const wxString& filename, bool fallback = TRUE)
- { return TRUE; }
- bool ReadMimeTypes(const wxString& filename)
- { return TRUE; }
+ bool ReadMailcap(const wxString& WXUNUSED(filename), bool WXUNUSED(fallback) = true)
+ { return true; }
+ bool ReadMimeTypes(const wxString& WXUNUSED(filename))
+ { return true; }
void AddFallback(const wxFileTypeInfo& ft) { m_fallbacks.Add(ft); }
#endif
//_MIMETYPE_IMPL_H
-
#define INCL_GPI
#define INCL_WINSYS
#define INCL_SHLERRORS
+#define INCL_DOS
#include <os2.h>
+
#if defined (__EMX__) && !defined(USE_OS2_TOOLKIT_HEADERS) && !defined(HAVE_SPBCDATA)
- typedef struct _SPBCDATA {
- ULONG cbSize; /* Size of control block. */
- ULONG ulTextLimit; /* Entryfield text limit. */
- LONG lLowerLimit; /* Spin lower limit (numeric only). */
- LONG lUpperLimit; /* Spin upper limit (numeric only). */
- ULONG idMasterSpb; /* ID of the servant's master spinbutton. */
- PVOID pHWXCtlData; /* Handwriting control data structure flag. */
- } SPBCDATA;
-
- typedef SPBCDATA *PSPBCDATA;
+
+ typedef struct _SPBCDATA {
+ ULONG cbSize; /* Size of control block. */
+ ULONG ulTextLimit; /* Entryfield text limit. */
+ LONG lLowerLimit; /* Spin lower limit (numeric only). */
+ LONG lUpperLimit; /* Spin upper limit (numeric only). */
+ ULONG idMasterSpb; /* ID of the servant's master spinbutton. */
+ PVOID pHWXCtlData; /* Handwriting control data structure flag. */
+ } SPBCDATA;
+
+ typedef SPBCDATA *PSPBCDATA;
+
#endif
#include "wx/fontenc.h"
#define STATIC_FLAGS (SS_TEXT|DT_LEFT|SS_LEFT|WS_VISIBLE)
#define CHECK_CLASS _T("BUTTON")
#define CHECK_FLAGS (BS_AUTOCHECKBOX|WS_TABSTOP)
-#define CHECK_IS_FAFA FALSE
+#define CHECK_IS_FAFA FALSE
#define RADIO_CLASS _T("BUTTON" )
#define RADIO_FLAGS (BS_AUTORADIOBUTTON|WS_VISIBLE)
#define RADIO_SIZE 20
-#define RADIO_IS_FAFA FALSE
+#define RADIO_IS_FAFA FALSE
#define PURE_WINDOWS
/* PM has no group box button style
#define GROUP_CLASS "BUTTON"
#define ENDSESSION_LOGOFF 0x80000000
#endif
+#ifndef PMERR_INVALID_PARM
+ #define PMERR_INVALID_PARM 0x1303
+#endif
+
+#ifndef PMERR_INVALID_PARAMETERS
+ #define PMERR_INVALID_PARAMETERS 0x1208
+#endif
+
+#ifndef BOOKERR_INVALID_PARAMETERS
+ #define BOOKERR_INVALID_PARAMETERS -1
+#endif
+
+#ifndef DLGC_ENTRYFIELD
+ #define DLGC_ENTRYFIELD 0x0001
+#endif
+
+#ifndef DLGC_BUTTON
+ #define DLGC_BUTTON 0x0002
+#endif
+
+#ifndef DLGC_MLE
+ #define DLGC_MLE 0x0400
+#endif
+
+#ifndef DP_NORMAL
+ #define DP_NORMAL 0
+#endif
+
// ---------------------------------------------------------------------------
// debug messages -- OS/2 has no native debug output system
// ---------------------------------------------------------------------------
#include "wx/spinbutt.h" // the base class
#include "wx/dynarray.h"
class WXDLLEXPORT wxSpinCtrl;
-WX_DEFINE_EXPORTED_ARRAY(wxSpinCtrl *, wxArraySpins);
+WX_DEFINE_EXPORTED_ARRAY_PTR(wxSpinCtrl *, wxArraySpins);
// ----------------------------------------------------------------------------
// Under Win32 and OS2 PM, wxSpinCtrl is a wxSpinButton with a buddy
public:
wxSpinCtrl() { }
wxSpinCtrl( wxWindow* pParent
- ,wxWindowID vId = -1
+ ,wxWindowID vId = wxID_ANY
,const wxString& rsValue = wxEmptyString
,const wxPoint& rPos = wxDefaultPosition
,const wxSize& rSize = wxDefaultSize
virtual ~wxSpinCtrl();
bool Create(wxWindow* pParent
- ,wxWindowID vId = -1
+ ,wxWindowID vId = wxID_ANY
,const wxString& rsValue = wxEmptyString
,const wxPoint& rPos = wxDefaultPosition
,const wxSize& rSize = wxDefaultSize
// implementation only from now on
// -------------------------------
//
- virtual bool Enable(bool bEnable = TRUE);
+ virtual bool Enable(bool bEnable = true);
- virtual int GetValue(void) const;
+ virtual int GetValue(void) const;
+
+ virtual bool SetFont(const wxFont &rFont);
+ virtual void SetFocus(void);
- virtual bool SetFont(const wxFont &rFont);
- virtual void SetFocus(void);
inline virtual void SetValue(int nVal) { wxSpinButton::SetValue(nVal); }
- void SetSelection( long lFrom
- ,long lTo
- );
- virtual bool Show(bool bShow = TRUE);
+ void SetSelection(long lFrom, long lTo);
+
+ virtual bool Show(bool bShow = true);
//
// wxSpinButton doesn't accept focus, but we do
//
- inline virtual bool AcceptsFocus(void) const { return FALSE; }
+ inline virtual bool AcceptsFocus(void) const { return false; }
//
// Return the spinctrl object whose buddy is the given window or NULL
}; // end of CLASS wxSpinCtrl
#endif // _WX_MSW_SPINCTRL_H_
-
-
// controlling tooltip behaviour: globally change tooltip parameters
// enable or disable the tooltips globally
- static void Enable(bool flag) {}
+ static void Enable(bool WXUNUSED(flag)) {}
// set the delay after which the tooltip appears
- static void SetDelay(long milliseconds) {}
+ static void SetDelay(long WXUNUSED(milliseconds)) {}
//
// Implementation
wxString m_sText; // tooltip text
wxWindow* m_pWindow; // window we're associated with
}; // end of CLASS wxToolTip
-
* PLEASE don't put C++ comments here - this is a C source file.
*/
+#if defined(__WATCOMC__)
+#include "wx/wxprec.h"
+#include <errno.h>
+#include <nerrno.h>
+#endif
+
#ifndef __GSOCKET_STANDALONE__
#include "wx/setup.h"
#endif
# define SOCKLEN_T socklen_t
# endif
# elif defined(__WXMAC__)
-# define SOCKLEN_T socklen_t
+# define SOCKLEN_T socklen_t
# else
# define SOCKLEN_T int
# endif
#define INADDR_NONE INADDR_BROADCAST
#endif
-#define MASK_SIGNAL() \
-{ \
- void (*old_handler)(int); \
- \
- old_handler = signal(SIGPIPE, SIG_IGN);
+#if defined(__VISAGECPP__) || defined(__WATCOMC__)
-#define UNMASK_SIGNAL() \
- signal(SIGPIPE, old_handler); \
-}
+ #define MASK_SIGNAL() {
+ #define UNMASK_SIGNAL() }
+
+#else
+
+ #define MASK_SIGNAL() \
+ { \
+ void (*old_handler)(int); \
+ \
+ old_handler = signal(SIGPIPE, SIG_IGN);
+
+ #define UNMASK_SIGNAL() \
+ signal(SIGPIPE, old_handler); \
+ }
+
+#endif
/* If a SIGPIPE is issued by a socket call on a remotely closed socket,
the program will "crash" unless it explicitly handles the SIGPIPE.
if (ret == -1)
{
- if ((errno == EWOULDBLOCK) || (errno == EAGAIN))
+ if ((errno == EWOULDBLOCK) || (errno == EAGAIN))
{
m_error = GSOCK_WOULDBLOCK;
GSocket_Debug(( "GSocket_Write error WOULDBLOCK\n" ));
int GSocket::Recv_Stream(char *buffer, int size)
{
int ret;
- do
+ do
{
ret = recv(m_fd, buffer, size, GSOCKET_MSG_NOSIGNAL);
} while (ret == -1 && errno == EINTR); /* Loop until not interrupted */
fromlen = sizeof(from);
- do
+ do
{
ret = recvfrom(m_fd, buffer, size, 0, &from, (SOCKLEN_T *) &fromlen);
} while (ret == -1 && errno == EINTR); /* Loop until not interrupted */
{
int ret;
-#ifndef __VISAGECPP__
- MASK_SIGNAL();
-#endif
- do
+ MASK_SIGNAL();
+
+ do
{
ret = send(m_fd, (char *)buffer, size, GSOCKET_MSG_NOSIGNAL);
} while (ret == -1 && errno == EINTR); /* Loop until not interrupted */
-#ifndef __VISAGECPP__
+
UNMASK_SIGNAL();
-#endif
return ret;
}
return -1;
}
-#ifndef __VISAGECPP__
MASK_SIGNAL();
-#endif
- do
+
+ do
{
ret = sendto(m_fd, (char *)buffer, size, 0, addr, len);
} while (ret == -1 && errno == EINTR); /* Loop until not interrupted */
-#ifndef __VISAGECPP__
+
UNMASK_SIGNAL();
-#endif
/* Frees memory allocated from _GAddress_translate_to */
free(addr);
else
{
/* Do not throw a lost event in cases where the socket isn't really lost */
- if ((errno == EWOULDBLOCK) || (errno == EAGAIN) || (errno == EINTR))
+ if ((errno == EWOULDBLOCK) || (errno == EAGAIN) || (errno == EINTR))
{
CALL_CALLBACK(this, GSOCK_INPUT);
}
- else
+ else
{
CALL_CALLBACK(this, GSOCK_LOST);
Shutdown();
- }
+ }
}
}
}
}
#endif /* !defined(__VISAGECPP__) */
#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
-