Update wx to r75363 to address a wx bug that was breaking netplay on OS X.

This commit is contained in:
comex
2013-12-08 15:37:10 -05:00
parent 9722be069b
commit 1334d7fc41
185 changed files with 2040 additions and 5175 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
# gtk, msw, osx and shared files as of r74856
# gtk, msw, osx and shared files as of r75363
set(SRCS_AUI
"src/aui/auibar.cpp"
@@ -906,6 +906,7 @@ add_definitions(-Wno-shadow)
add_definitions(-Wno-parentheses-equality)
add_definitions(-Wno-self-assign)
add_definitions(-Wno-null-conversion)
add_definitions(-Wno-sign-compare)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++98")
enable_precompiled_headers(include/wx/wxprec.h src/common/dummy.cpp SRCS)
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
svn co -r 74856 http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets
svn co -r 75363 http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets
cd wxWidgets
case $OSTYPE in
+3 -1
View File
@@ -148,6 +148,9 @@
#pragma comment(lib, wxWX_LIB_NAME("base", ""))
#ifndef wxNO_NET_LIB
#ifndef WXUSINGDLL
#pragma comment(lib, "wsock32")
#endif
#pragma comment(lib, wxBASE_LIB_NAME("net"))
#endif
#ifndef wxNO_XML_LIB
@@ -235,7 +238,6 @@
#pragma comment(lib, "uuid")
#pragma comment(lib, "rpcrt4")
#pragma comment(lib, "advapi32")
#pragma comment(lib, "wsock32")
#if wxUSE_URL_NATIVE
#pragma comment(lib, "wininet")
#endif
+2 -2
View File
@@ -175,7 +175,7 @@ public:
virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH) = 0;
virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) = 0;
virtual bool CreateScaled(int w, int h, int d, double logicalScale)
{ return Create(w*logicalScale,h*logicalScale,d); }
{ return Create(wxRound(w*logicalScale), wxRound(h*logicalScale), d); }
virtual int GetHeight() const = 0;
virtual int GetWidth() const = 0;
@@ -189,7 +189,7 @@ public:
virtual double GetScaledWidth() const { return GetWidth() / GetScaleFactor(); }
virtual double GetScaledHeight() const { return GetHeight() / GetScaleFactor(); }
virtual wxSize GetScaledSize() const
{ return wxSize(GetScaledWidth(), GetScaledHeight()); }
{ return wxSize(wxRound(GetScaledWidth()), wxRound(GetScaledHeight())); }
#if wxUSE_IMAGE
virtual wxImage ConvertToImage() const = 0;
+16 -3
View File
@@ -268,9 +268,22 @@ public:
wxCharTypeBuffer(size_t len)
{
this->m_data =
new Data((CharType *)malloc((len + 1)*sizeof(CharType)), len);
this->m_data->Get()[len] = (CharType)0;
CharType* const str = (CharType *)malloc((len + 1)*sizeof(CharType));
if ( str )
{
str[len] = (CharType)0;
// There is a potential memory leak here if new throws because it
// fails to allocate Data, we ought to use new(nothrow) here, but
// this might fail to compile under some platforms so until this
// can be fully tested, just live with this (rather unlikely, as
// Data is a small object) potential leak.
this->m_data = new Data(str, len);
}
else
{
this->m_data = this->GetNullData();
}
}
wxCharTypeBuffer(const wxCharTypeBuffer& src)
+3 -2
View File
@@ -11,11 +11,12 @@
#ifndef _WX_CHOICDLG_H_BASE_
#define _WX_CHOICDLG_H_BASE_
#include "wx/defs.h"
#if wxUSE_CHOICEDLG
#include "wx/generic/choicdgg.h"
#endif
#endif
// _WX_CHOICDLG_H_BASE_
#endif // _WX_CHOICDLG_H_BASE_
+2 -2
View File
@@ -560,7 +560,7 @@ protected:
// just recalculate.
void CalculateAreas( int btnWidth = 0 );
// Standard textctrl positioning routine. Just give it platform-dependant
// Standard textctrl positioning routine. Just give it platform-dependent
// textctrl coordinate adjustment.
virtual void PositionTextCtrl( int textCtrlXAdjust = 0,
int textCtrlYAdjust = 0);
@@ -701,7 +701,7 @@ protected:
// area used by the button
wxSize m_btnSize;
// platform-dependant customization and other flags
// platform-dependent customization and other flags
wxUint32 m_iFlags;
// custom style for m_text
+29 -4
View File
@@ -19,7 +19,7 @@
/*
Notice that Intel compiler can be used as Microsoft Visual C++ add-on and
so we should define both __INTELC__ and __VISUALC__ for it.
*/
*/
#ifdef __INTEL_COMPILER
# define __INTELC__
#endif
@@ -135,15 +135,40 @@
#endif
/*
This macro can be used to check that the version of mingw32 compiler is
at least maj.min
This macro can be used to check that the version of mingw32 CRT is at least
maj.min
*/
/* Check for Mingw runtime version: */
#if defined(__MINGW32_MAJOR_VERSION) && defined(__MINGW32_MINOR_VERSION)
#ifdef __MINGW32__
/* Include the header defining __MINGW32_{MAJ,MIN}OR_VERSION */
#include <_mingw.h>
#define wxCHECK_MINGW32_VERSION( major, minor ) \
( ( ( __MINGW32_MAJOR_VERSION > (major) ) \
|| ( __MINGW32_MAJOR_VERSION == (major) && __MINGW32_MINOR_VERSION >= (minor) ) ) )
/*
MinGW-w64 project provides compilers for both Win32 and Win64 but only
defines the same __MINGW32__ symbol for the former as MinGW32 toolchain
which is quite different (notably doesn't provide many SDK headers that
MinGW-w64 does include). So we define a separate symbol which, unlike the
predefined __MINGW64__, can be used to detect this toolchain in both 32 and
64 bit builds.
And define __MINGW32_TOOLCHAIN__ for consistency and also because it's
convenient as we often want to have some workarounds only for the (old)
MinGW32 but not (newer) MinGW-w64, which still predefines __MINGW32__.
*/
# ifdef __MINGW64_VERSION_MAJOR
# ifndef __MINGW64_TOOLCHAIN__
# define __MINGW64_TOOLCHAIN__
# endif
# else
# ifndef __MINGW32_TOOLCHAIN__
# define __MINGW32_TOOLCHAIN__
# endif
# endif
#else
#define wxCHECK_MINGW32_VERSION( major, minor ) (0)
#endif
+2
View File
@@ -972,6 +972,7 @@ public:
void InsertItem( unsigned int row, const wxVector<wxVariant> &values, wxUIntPtr data = 0 );
void DeleteItem( unsigned int pos );
void DeleteAllItems();
void ClearColumns();
unsigned int GetItemCount() const;
@@ -1040,6 +1041,7 @@ public:
virtual bool PrependColumn( wxDataViewColumn *col );
virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col );
virtual bool AppendColumn( wxDataViewColumn *col );
virtual bool ClearColumns();
wxDataViewColumn *AppendTextColumn( const wxString &label,
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
+13 -2
View File
@@ -310,8 +310,10 @@ typedef short int WXTYPE;
inline T wx_truncate_cast_impl(X x)
{
#pragma warning(push)
/* conversion from 'X' to 'T', possible loss of data */
/* conversion from 'size_t' to 'type', possible loss of data */
#pragma warning(disable: 4267)
/* conversion from 'type1' to 'type2', possible loss of data */
#pragma warning(disable: 4242)
return x;
@@ -951,6 +953,10 @@ typedef wxUint16 wxWord;
#define SIZEOF_LONG 4
#endif
#ifndef SIZEOF_LONG_LONG
#define SIZEOF_LONG_LONG 8
#endif
#ifndef SIZEOF_WCHAR_T
/* Windows uses UTF-16 */
#define SIZEOF_WCHAR_T 2
@@ -2287,8 +2293,13 @@ enum wxStandardID
wxID_OSX_HIDE = wxID_OSX_MENU_FIRST,
wxID_OSX_HIDEOTHERS,
wxID_OSX_SHOWALL,
#if wxABI_VERSION >= 30001
wxID_OSX_SERVICES,
wxID_OSX_MENU_LAST = wxID_OSX_SERVICES,
#else
wxID_OSX_MENU_LAST = wxID_OSX_SHOWALL,
#endif
/* IDs used by generic file dialog (13 consecutive starting from this value) */
wxID_FILEDLGG = 5900,
+15 -9
View File
@@ -13,6 +13,7 @@
#include "wx/toplevel.h"
#include "wx/containr.h"
#include "wx/sharedptr.h"
class WXDLLIMPEXP_FWD_CORE wxSizer;
class WXDLLIMPEXP_FWD_CORE wxStdDialogButtonSizer;
@@ -402,24 +403,29 @@ class wxWindowModalDialogEventFunctor
{
public:
wxWindowModalDialogEventFunctor(const Functor& f)
: m_f(f), m_wasCalled(false)
: m_f(new Functor(f))
{}
void operator()(wxWindowModalDialogEvent& event)
{
if ( m_wasCalled )
if ( m_f )
{
// We only want to call this handler once. Also, by deleting
// the functor here, its data (such as wxWindowPtr pointing to
// the dialog) are freed immediately after exiting this operator().
wxSharedPtr<Functor> functor(m_f);
m_f.reset();
(*functor)(event.GetReturnCode());
}
else // was already called once
{
event.Skip();
return;
}
m_wasCalled = true;
m_f(event.GetReturnCode());
}
private:
Functor m_f;
bool m_wasCalled;
wxSharedPtr<Functor> m_f;
};
template<typename Functor>
@@ -428,7 +434,7 @@ void wxDialogBase::ShowWindowModalThenDo(const Functor& onEndModal)
Bind(wxEVT_WINDOW_MODAL_DIALOG_CLOSED,
wxWindowModalDialogEventFunctor<Functor>(onEndModal));
ShowWindowModal();
};
}
#endif // wxHAS_EVENT_BIND
#endif
+22 -2
View File
@@ -279,6 +279,9 @@ public:
// destroyed
void SetDocChildFrame(wxDocChildFrameAnyBase *docChildFrame);
// get the associated frame, may be NULL during destruction
wxDocChildFrameAnyBase* GetDocChildFrame() const { return m_docChildFrame; }
protected:
// hook the document into event handlers chain here
virtual bool TryBefore(wxEvent& event);
@@ -597,9 +600,10 @@ public:
m_childDocument = NULL;
m_childView = NULL;
m_win = NULL;
m_lastEvent = NULL;
}
// full ctor equivalent to using the default one and Create(0
// full ctor equivalent to using the default one and Create()
wxDocChildFrameAnyBase(wxDocument *doc, wxView *view, wxWindow *win)
{
Create(doc, view, win);
@@ -638,6 +642,14 @@ public:
wxWindow *GetWindow() const { return m_win; }
// implementation only
// Check if this event had been just processed in this frame.
bool HasAlreadyProcessed(wxEvent& event) const
{
return m_lastEvent == &event;
}
protected:
// we're not a wxEvtHandler but we provide this wxEvtHandler-like function
// which is called from TryBefore() of the derived classes to give our view
@@ -656,6 +668,10 @@ protected:
// allows us to avoid having any virtual functions in this class
wxWindow* m_win;
private:
// Pointer to the last processed event used to avoid sending the same event
// twice to wxDocManager, from here and from wxDocParentFrameAnyBase.
wxEvent* m_lastEvent;
wxDECLARE_NO_COPY_CLASS(wxDocChildFrameAnyBase);
};
@@ -894,7 +910,11 @@ protected:
// hook the document manager into event handling chain here
virtual bool TryBefore(wxEvent& event)
{
return TryProcessEvent(event) || BaseFrame::TryBefore(event);
// It is important to send the event to the base class first as
// wxMDIParentFrame overrides its TryBefore() to send the menu events
// to the currently active child frame and the child must get them
// before our own TryProcessEvent() is executed, not afterwards.
return BaseFrame::TryBefore(event) || TryProcessEvent(event);
}
private:
+5 -3
View File
@@ -163,9 +163,7 @@ public:
virtual bool IsCustomRenderer() const { return false; }
protected:
// Called from {Cancel,Finish}Editing() to cleanup m_editorCtrl
void DestroyEditControl();
// Implementation only from now on.
// Return the alignment of this renderer if it's specified (i.e. has value
// different from the default wxDVR_DEFAULT_ALIGNMENT) or the alignment of
@@ -176,6 +174,10 @@ protected:
// wxDVR_DEFAULT_ALIGNMENT.
int GetEffectiveAlignment() const;
protected:
// Called from {Cancel,Finish}Editing() to cleanup m_editorCtrl
void DestroyEditControl();
wxString m_variantType;
wxDataViewColumn *m_owner;
wxWeakRef<wxWindow> m_editorCtrl;
+21 -4
View File
@@ -2275,19 +2275,36 @@ private:
class WXDLLIMPEXP_CORE wxActivateEvent : public wxEvent
{
public:
wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = true, int Id = 0)
: wxEvent(Id, type)
{ m_active = active; }
// Type of activation. For now we can only detect if it was by mouse or by
// some other method and even this is only available under wxMSW.
enum Reason
{
Reason_Mouse,
Reason_Unknown
};
wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = true,
int Id = 0, Reason activationReason = Reason_Unknown)
: wxEvent(Id, type),
m_activationReason(activationReason)
{
m_active = active;
}
wxActivateEvent(const wxActivateEvent& event)
: wxEvent(event)
{ m_active = event.m_active; }
{
m_active = event.m_active;
m_activationReason = event.m_activationReason;
}
bool GetActive() const { return m_active; }
Reason GetActivationReason() const { return m_activationReason;}
virtual wxEvent *Clone() const { return new wxActivateEvent(*this); }
private:
bool m_active;
Reason m_activationReason;
private:
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxActivateEvent)
+2 -1
View File
@@ -116,7 +116,8 @@
*/
#if wxCHECK_GCC_VERSION(3, 2) || wxCHECK_VISUALC_VERSION(7) \
|| (defined(__SUNCC__) && __SUNCC__ >= 0x5100) \
|| (defined(__xlC__) && __xlC__ >= 0x700)
|| (defined(__xlC__) && __xlC__ >= 0x700) \
|| defined(__INTELC__)
#define wxHAS_EVENT_BIND
#endif
+2 -3
View File
@@ -77,7 +77,7 @@
// constants
// ----------------------------------------------------------------------------
#if defined(__VISUALC__) || defined(__INTELC__) || defined(__DIGITALMARS__)
#if defined(__VISUALC__) || defined(__DIGITALMARS__)
typedef int mode_t;
#endif
@@ -204,7 +204,7 @@ enum wxPosixPermissions
#if defined(__VISUALC__)
#define wxHAS_HUGE_FILES 1
#elif defined(__MINGW32__) || defined(__MINGW64__)
#define wxHAS_HUGE_FILES 1
#define wxHAS_HUGE_FILES 1f
#elif defined(_LARGE_FILES)
#define wxHAS_HUGE_FILES 1
#endif
@@ -476,7 +476,6 @@ enum wxPosixPermissions
#define wxSeek lseek
#define wxFsync fsync
#define wxEof eof
#define wxCRT_MkDir mkdir
#define wxCRT_RmDir rmdir
-2
View File
@@ -142,9 +142,7 @@ public:
return *this;
}
#if wxOSX_USE_CORE_TEXT
void Init(CTFontDescriptorRef descr);
#endif
void Init(const wxNativeFontInfo& info);
void Init(int size,
wxFontFamily family,
+30 -4
View File
@@ -66,6 +66,13 @@ enum wxFSWPathType
wxFSWPath_Tree // Watch a directory and all its children recursively.
};
// Type of the warning for the events notifying about them.
enum wxFSWWarningType
{
wxFSW_WARNING_NONE,
wxFSW_WARNING_GENERAL,
wxFSW_WARNING_OVERFLOW
};
/**
* Event containing information about file system change.
@@ -77,24 +84,36 @@ wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_FSWATCHER,
class WXDLLIMPEXP_BASE wxFileSystemWatcherEvent: public wxEvent
{
public:
// Constructor for any kind of events, also used as default ctor.
wxFileSystemWatcherEvent(int changeType = 0, int watchid = wxID_ANY) :
wxEvent(watchid, wxEVT_FSWATCHER),
m_changeType(changeType)
m_changeType(changeType),
m_warningType(wxFSW_WARNING_NONE)
{
}
wxFileSystemWatcherEvent(int changeType, const wxString& errorMsg,
// Constructor for the error or warning events.
wxFileSystemWatcherEvent(int changeType,
wxFSWWarningType warningType,
const wxString& errorMsg = wxString(),
int watchid = wxID_ANY) :
wxEvent(watchid, wxEVT_FSWATCHER),
m_changeType(changeType), m_errorMsg(errorMsg)
m_changeType(changeType),
m_warningType(warningType),
m_errorMsg(errorMsg)
{
}
// Constructor for the normal events carrying information about the changes.
wxFileSystemWatcherEvent(int changeType,
const wxFileName& path, const wxFileName& newPath,
int watchid = wxID_ANY) :
wxEvent(watchid, wxEVT_FSWATCHER),
m_changeType(changeType), m_path(path), m_newPath(newPath)
m_changeType(changeType),
m_warningType(wxFSW_WARNING_NONE),
m_path(path),
m_newPath(newPath)
{
}
@@ -146,6 +165,7 @@ public:
evt->m_errorMsg = m_errorMsg.Clone();
evt->m_path = wxFileName(m_path.GetFullPath().Clone());
evt->m_newPath = wxFileName(m_newPath.GetFullPath().Clone());
evt->m_warningType = m_warningType;
return evt;
}
@@ -168,6 +188,11 @@ public:
return m_errorMsg;
}
wxFSWWarningType GetWarningType() const
{
return m_warningType;
}
/**
* Returns a wxString describing an event useful for debugging or testing
*/
@@ -175,6 +200,7 @@ public:
protected:
int m_changeType;
wxFSWWarningType m_warningType;
wxFileName m_path;
wxFileName m_newPath;
wxString m_errorMsg;
+3
View File
@@ -227,6 +227,9 @@ public: // utility functions not part of the API
// return the index of the given column in m_cols
int GetColumnIndex(const wxDataViewColumn *column) const;
// Return the index of the column having the given model index.
int GetModelColumnIndex(unsigned int model_column) const;
// return the column displayed at the given position in the control
wxDataViewColumn *GetColumnAt(unsigned int pos) const;
+2
View File
@@ -15,6 +15,8 @@
#if wxUSE_GRID
#include "wx/scopedptr.h"
class wxGridCellEditorEvtHandler : public wxEvtHandler
{
public:

Some files were not shown because too many files have changed in this diff Show More